From 79b7092514e5ff71a4ce77f433e9beaf52e37275 Mon Sep 17 00:00:00 2001 From: Shmuel H Date: Mon, 6 Nov 2017 11:50:39 +0200 Subject: [PATCH 01/38] SampleTrack: Uncomment disabled recording-related code. --- src/gui/SampleTCOView.cpp | 10 +++++----- src/tracks/SampleTrack.cpp | 4 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/gui/SampleTCOView.cpp b/src/gui/SampleTCOView.cpp index 57ca51893b1..03146d1c7b2 100644 --- a/src/gui/SampleTCOView.cpp +++ b/src/gui/SampleTCOView.cpp @@ -68,9 +68,9 @@ void SampleTCOView::constructContextMenu(QMenu* cm) cm->addSeparator(); - /*contextMenu.addAction( embed::getIconPixmap( "record" ), - tr( "Set/clear record" ), - m_tco, SLOT( toggleRecord() ) );*/ + cm->addAction(embed::getIconPixmap( "record" ), + tr("Set/clear record"), + m_tco, SLOT(toggleRecord())); cm->addAction( embed::getIconPixmap("flip_x"), @@ -291,7 +291,7 @@ void SampleTCOView::paintEvent( QPaintEvent * pe ) } // recording sample tracks is not possible at the moment - /* if( m_tco->isRecord() ) + if(m_tco->isRecord()) { p.setFont( pointSize<7>( p.font() ) ); @@ -302,7 +302,7 @@ void SampleTCOView::paintEvent( QPaintEvent * pe ) p.setBrush( QBrush( textColor() ) ); p.drawEllipse( 4, 5, 4, 4 ); - }*/ + } p.end(); diff --git a/src/tracks/SampleTrack.cpp b/src/tracks/SampleTrack.cpp index ef1c8bfc4a7..de7d2cf6861 100644 --- a/src/tracks/SampleTrack.cpp +++ b/src/tracks/SampleTrack.cpp @@ -1,4 +1,4 @@ -/* +/* * SampleTrack.cpp - implementation of class SampleTrack, a track which * provides arrangement of samples * @@ -22,7 +22,7 @@ * Boston, MA 02110-1301 USA. * */ - + #include "SampleTrack.h" #include From 50cc41a5a18f2f1dc5b7ec6d1f50e9cf61a01fbc Mon Sep 17 00:00:00 2001 From: Shmuel H Date: Mon, 6 Nov 2017 22:42:40 +0200 Subject: [PATCH 02/38] Mixer & PlayHandle: Support PlayHandle without audioPort and set audioPort as nullptr by default. --- src/core/AudioEngine.cpp | 10 +++++----- src/core/PlayHandle.cpp | 3 ++- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/src/core/AudioEngine.cpp b/src/core/AudioEngine.cpp index 0fb93462e14..e81bf4f064b 100644 --- a/src/core/AudioEngine.cpp +++ b/src/core/AudioEngine.cpp @@ -354,7 +354,7 @@ const surroundSampleFrame * AudioEngine::renderNextBuffer() if( it != m_playHandles.end() ) { - ( *it )->audioPort()->removePlayHandle( ( *it ) ); + if((*it)->audioPort()) { (*it)->audioPort()->removePlayHandle(*it); } if( ( *it )->type() == PlayHandle::TypeNotePlayHandle ) { NotePlayHandleManager::release( (NotePlayHandle*) *it ); @@ -402,7 +402,7 @@ const surroundSampleFrame * AudioEngine::renderNextBuffer() } if( ( *it )->isFinished() ) { - ( *it )->audioPort()->removePlayHandle( ( *it ) ); + if((*it)->audioPort()) { (*it)->audioPort()->removePlayHandle(*it); } if( ( *it )->type() == PlayHandle::TypeNotePlayHandle ) { NotePlayHandleManager::release( (NotePlayHandle*) *it ); @@ -675,7 +675,7 @@ bool AudioEngine::addPlayHandle( PlayHandle* handle ) if( criticalXRuns() == false ) { m_newPlayHandles.push( handle ); - handle->audioPort()->addPlayHandle( handle ); + if (handle->audioPort()) { handle->audioPort()->addPlayHandle(handle); } return true; } @@ -696,7 +696,7 @@ void AudioEngine::removePlayHandle(PlayHandle * ph) // which were created in a thread different than the audio engine thread if (ph->affinityMatters() && ph->affinity() == QThread::currentThread()) { - ph->audioPort()->removePlayHandle(ph); + if (ph->audioPort()) { ph->audioPort()->removePlayHandle(ph); } bool removedFromList = false; // Check m_newPlayHandles first because doing it the other way around // creates a race condition @@ -755,7 +755,7 @@ void AudioEngine::removePlayHandlesOfTypes(Track * track, const quint8 types) { if ((*it)->isFromTrack(track) && ((*it)->type() & types)) { - ( *it )->audioPort()->removePlayHandle( ( *it ) ); + if (( *it )->audioPort()) { (*it)->audioPort()->removePlayHandle(*it); } if( ( *it )->type() == PlayHandle::TypeNotePlayHandle ) { NotePlayHandleManager::release( (NotePlayHandle*) *it ); diff --git a/src/core/PlayHandle.cpp b/src/core/PlayHandle.cpp index 37149583f5b..93022a7d92a 100644 --- a/src/core/PlayHandle.cpp +++ b/src/core/PlayHandle.cpp @@ -38,7 +38,8 @@ PlayHandle::PlayHandle(const Type type, f_cnt_t offset) : m_affinity(QThread::currentThread()), m_playHandleBuffer(BufferManager::acquire()), m_bufferReleased(true), - m_usesBuffer(true) + m_usesBuffer(true), + m_audioPort{nullptr} { } From b8938fd7b7defd195d385e15488307e8c1fcce57 Mon Sep 17 00:00:00 2001 From: Shmuel H Date: Wed, 8 Nov 2017 21:56:59 +0200 Subject: [PATCH 03/38] SampleTrack: Make sure an empty TCO with isRecord would still be "played" (recorded). --- src/tracks/SampleTrack.cpp | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/tracks/SampleTrack.cpp b/src/tracks/SampleTrack.cpp index de7d2cf6861..f113a3fb38b 100644 --- a/src/tracks/SampleTrack.cpp +++ b/src/tracks/SampleTrack.cpp @@ -104,8 +104,15 @@ bool SampleTrack::play( const TimePos & _start, const fpp_t _frames, //if the Tco smaller than the sample length we play only until Tco end //else we play the sample to the end but nothing more f_cnt_t samplePlayLength = tcoFrameLength > sampleBufferLength ? sampleBufferLength : tcoFrameLength; - //we only play within the sampleBuffer limits - if( sampleStart < sampleBufferLength ) + + // In case we are recoding, "play" the whole TCO. + if(sTco->isRecord()) { + samplePlayLength = tcoFrameLength; + } + + //we only play within the sampleBuffer limits + //Ignore that in case of recoding. + if( sampleStart < sampleBufferLength || sTco->isRecord ()) { sTco->setSampleStartFrame( sampleStart ); sTco->setSamplePlayLength( samplePlayLength ); From ed7ff82a42a74947655217c6e8f7515ee64bba09 Mon Sep 17 00:00:00 2001 From: Shmuel H Date: Fri, 17 Nov 2017 18:16:05 +0200 Subject: [PATCH 04/38] SampleTrack: In a case of recording, play a sample TCO even if its actual data starts after that. --- src/tracks/SampleTrack.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/tracks/SampleTrack.cpp b/src/tracks/SampleTrack.cpp index f113a3fb38b..0af12de1b65 100644 --- a/src/tracks/SampleTrack.cpp +++ b/src/tracks/SampleTrack.cpp @@ -95,7 +95,8 @@ bool SampleTrack::play( const TimePos & _start, const fpp_t _frames, if( _start >= sTco->startPosition() && _start < sTco->endPosition() ) { - if( sTco->isPlaying() == false && _start >= (sTco->startPosition() + sTco->startTimeOffset()) ) + if( sTco->isPlaying() == false && (_start >= (sTco->startPosition() + sTco->startTimeOffset()) + || sTco->isRecord ()) ) { auto bufferFramesPerTick = Engine::framesPerTick (sTco->sampleBuffer ()->sampleRate ()); f_cnt_t sampleStart = bufferFramesPerTick * ( _start - sTco->startPosition() - sTco->startTimeOffset() ); From 7184ce6e5d815b3a9fc54a708ebf88f56dc306e8 Mon Sep 17 00:00:00 2001 From: Shmuel H Date: Fri, 17 Nov 2017 20:32:08 +0200 Subject: [PATCH 05/38] SampleRecordHandle: Obtain the offset to the record with a parameter instead of hacking sampleBuffer ()->startFrame (). That solves a bug with `startFrame ()` being negetive in recording some cases. --- include/SampleRecordHandle.h | 7 +++++-- src/core/SampleRecordHandle.cpp | 7 +++++-- src/tracks/SampleTrack.cpp | 2 +- 3 files changed, 11 insertions(+), 5 deletions(-) diff --git a/include/SampleRecordHandle.h b/include/SampleRecordHandle.h index f2a6fd63be4..2fd38db7e90 100644 --- a/include/SampleRecordHandle.h +++ b/include/SampleRecordHandle.h @@ -41,7 +41,7 @@ class Track; class SampleRecordHandle : public PlayHandle { public: - SampleRecordHandle( SampleTCO* tco ); + explicit SampleRecordHandle(SampleTCO* tco, TimePos startRecordTimeOffset); virtual ~SampleRecordHandle(); void play( sampleFrame * _working_buffer ) override; @@ -65,7 +65,10 @@ class SampleRecordHandle : public PlayHandle Track * m_track; BBTrack * m_bbTrack; SampleTCO * m_tco; - + + // The offset from the start of m_track that the record has + // started from. + TimePos m_startRecordTimeOffset; } ; diff --git a/src/core/SampleRecordHandle.cpp b/src/core/SampleRecordHandle.cpp index a86d19b79cf..61512b4bbb6 100644 --- a/src/core/SampleRecordHandle.cpp +++ b/src/core/SampleRecordHandle.cpp @@ -33,13 +33,14 @@ #include "debug.h" -SampleRecordHandle::SampleRecordHandle( SampleTCO* tco ) : +SampleRecordHandle::SampleRecordHandle(SampleTCO* tco , TimePos startRecordTimeOffset) : PlayHandle( TypeSamplePlayHandle ), m_framesRecorded( 0 ), m_minLength( tco->length() ), m_track( tco->getTrack() ), m_bbTrack( nullptr ), - m_tco( tco ) + m_tco(tco), + m_startRecordTimeOffset{startRecordTimeOffset} { } @@ -53,6 +54,8 @@ SampleRecordHandle::~SampleRecordHandle() SampleBuffer* sb; createSampleBuffer( &sb ); m_tco->setSampleBuffer( sb ); + + m_tco->setStartTimeOffset(m_startRecordTimeOffset); } while( !m_buffers.empty() ) diff --git a/src/tracks/SampleTrack.cpp b/src/tracks/SampleTrack.cpp index 0af12de1b65..0a109c7e831 100644 --- a/src/tracks/SampleTrack.cpp +++ b/src/tracks/SampleTrack.cpp @@ -144,7 +144,7 @@ bool SampleTrack::play( const TimePos & _start, const fpp_t _frames, { return played_a_note; } - SampleRecordHandle* smpHandle = new SampleRecordHandle( st ); + SampleRecordHandle* smpHandle = new SampleRecordHandle( st , _start - st->startPosition ()); handle = smpHandle; } else From 333f43c883b6b39900e2fc72ed328ff4fa7c0914 Mon Sep 17 00:00:00 2001 From: Shmuel H Date: Mon, 17 May 2021 16:44:54 +0300 Subject: [PATCH 06/38] fixup: fix formatting issues --- src/tracks/SampleTrack.cpp | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/src/tracks/SampleTrack.cpp b/src/tracks/SampleTrack.cpp index 0a109c7e831..47a09e181be 100644 --- a/src/tracks/SampleTrack.cpp +++ b/src/tracks/SampleTrack.cpp @@ -95,8 +95,8 @@ bool SampleTrack::play( const TimePos & _start, const fpp_t _frames, if( _start >= sTco->startPosition() && _start < sTco->endPosition() ) { - if( sTco->isPlaying() == false && (_start >= (sTco->startPosition() + sTco->startTimeOffset()) - || sTco->isRecord ()) ) + if(!sTco->isPlaying() && (_start >= (sTco->startPosition() + sTco->startTimeOffset()) + || sTco->isRecord())) { auto bufferFramesPerTick = Engine::framesPerTick (sTco->sampleBuffer ()->sampleRate ()); f_cnt_t sampleStart = bufferFramesPerTick * ( _start - sTco->startPosition() - sTco->startTimeOffset() ); @@ -113,12 +113,12 @@ bool SampleTrack::play( const TimePos & _start, const fpp_t _frames, //we only play within the sampleBuffer limits //Ignore that in case of recoding. - if( sampleStart < sampleBufferLength || sTco->isRecord ()) + if(sampleStart < sampleBufferLength || sTco->isRecord ()) { - sTco->setSampleStartFrame( sampleStart ); - sTco->setSamplePlayLength( samplePlayLength ); - tcos.push_back( sTco ); - sTco->setIsPlaying( true ); + sTco->setSampleStartFrame(sampleStart); + sTco->setSamplePlayLength(samplePlayLength); + tcos.push_back(sTco); + sTco->setIsPlaying(true); nowPlaying = true; } } @@ -138,14 +138,13 @@ bool SampleTrack::play( const TimePos & _start, const fpp_t _frames, if( !st->isMuted() ) { PlayHandle* handle; - if( st->isRecord() ) + if(st->isRecord()) { if( !Engine::getSong()->isRecording() ) { return played_a_note; } - SampleRecordHandle* smpHandle = new SampleRecordHandle( st , _start - st->startPosition ()); - handle = smpHandle; + handle = new SampleRecordHandle(st, _start - st->startPosition()); } else { From cf9cea88c31dc116f512f72bea487411b7212c72 Mon Sep 17 00:00:00 2001 From: Shmuel Hazan Date: Sat, 23 Oct 2021 20:43:17 +0300 Subject: [PATCH 07/38] DataFile: Skip empty resource attributes --- src/core/DataFile.cpp | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/core/DataFile.cpp b/src/core/DataFile.cpp index 82694b7da6d..1a470f77b9d 100644 --- a/src/core/DataFile.cpp +++ b/src/core/DataFile.cpp @@ -444,7 +444,17 @@ bool DataFile::copyResources(const QString& resourcesDir) { // Get absolute path to resource bool error; - QString resPath = PathUtil::toAbsolute(el.attribute(*res), &error); + auto attribute = el.attribute(*res); + + // Skip empty resources. In some cases, there might be an + // alternative way of actually representing the data (e.g. data element for SampleTCO) + if (attribute.isEmpty()) + { + ++res; + continue; + } + + QString resPath = PathUtil::toAbsolute(attribute, &error); // If we are running without the project loaded (from CLI), "local:" base // prefixes aren't converted, so we need to convert it ourselves if (error) From 1b39d39b2459afaf24d78ac027ce6689aaf92168 Mon Sep 17 00:00:00 2001 From: Shmuel Hazan Date: Sat, 4 Dec 2021 17:53:39 +0200 Subject: [PATCH 08/38] Recoding: Disable recording buttons when recording is unavailable Instead of hiding the record action buttons, disable them and indicate the issue on the tooltip. --- src/gui/editors/SongEditor.cpp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/gui/editors/SongEditor.cpp b/src/gui/editors/SongEditor.cpp index 6024b9184be..99f62f638ef 100644 --- a/src/gui/editors/SongEditor.cpp +++ b/src/gui/editors/SongEditor.cpp @@ -910,7 +910,7 @@ ComboBoxModel *SongEditor::snappingModel() const SongEditorWindow::SongEditorWindow(Song* song) : - Editor(Engine::audioEngine()->audioDev()->supportsCapture(), false), + Editor(true, false), m_editor(new SongEditor(song)), m_crtlAction( nullptr ), m_snapSizeLabel( new QLabel( m_toolBar ) ) @@ -1024,6 +1024,15 @@ SongEditorWindow::SongEditorWindow(Song* song) : connect(song, SIGNAL(projectLoaded()), this, SLOT(adjustUiAfterProjectLoad())); connect(this, SIGNAL(resized()), m_editor, SLOT(updatePositionLine())); + + // In case our current audio device does not support capture, + // disable the record buttons. + if(!Engine::audioEngine()->audioDev()->supportsCapture()) { + for(auto &recordAction : {m_recordAccompanyAction, m_recordAction}) { + recordAction->setEnabled(false); + recordAction->setToolTip(tr("Recording is unavailable: try connecting an input device or switching backend")); + } + } } QSize SongEditorWindow::sizeHint() const From 99d97fcc35880a8724dd1089625df834eaaf43ca Mon Sep 17 00:00:00 2001 From: Hyunjin Song Date: Wed, 2 Feb 2022 14:58:08 +0900 Subject: [PATCH 09/38] Fix indentation --- include/SampleRecordHandle.h | 2 +- src/core/AudioEngine.cpp | 4 ++-- src/core/DataFile.cpp | 18 +++++++++--------- src/gui/editors/SongEditor.cpp | 16 ++++++++-------- src/tracks/SampleTrack.cpp | 8 ++++---- 5 files changed, 24 insertions(+), 24 deletions(-) diff --git a/include/SampleRecordHandle.h b/include/SampleRecordHandle.h index e7bc296132b..b26a7d0f640 100644 --- a/include/SampleRecordHandle.h +++ b/include/SampleRecordHandle.h @@ -65,7 +65,7 @@ class SampleRecordHandle : public PlayHandle Track * m_track; BBTrack * m_bbTrack; SampleClip * m_clip; - + // The offset from the start of m_track that the record has // started from. TimePos m_startRecordTimeOffset; diff --git a/src/core/AudioEngine.cpp b/src/core/AudioEngine.cpp index 2edcd2b594a..25068d36ed0 100644 --- a/src/core/AudioEngine.cpp +++ b/src/core/AudioEngine.cpp @@ -352,7 +352,7 @@ const surroundSampleFrame * AudioEngine::renderNextBuffer() if( it != m_playHandles.end() ) { - if((*it)->audioPort()) { (*it)->audioPort()->removePlayHandle(*it); } + if((*it)->audioPort()) { (*it)->audioPort()->removePlayHandle(*it); } if( ( *it )->type() == PlayHandle::TypeNotePlayHandle ) { NotePlayHandleManager::release( (NotePlayHandle*) *it ); @@ -400,7 +400,7 @@ const surroundSampleFrame * AudioEngine::renderNextBuffer() } if( ( *it )->isFinished() ) { - if((*it)->audioPort()) { (*it)->audioPort()->removePlayHandle(*it); } + if((*it)->audioPort()) { (*it)->audioPort()->removePlayHandle(*it); } if( ( *it )->type() == PlayHandle::TypeNotePlayHandle ) { NotePlayHandleManager::release( (NotePlayHandle*) *it ); diff --git a/src/core/DataFile.cpp b/src/core/DataFile.cpp index 8dd267f9640..69eb6d7b379 100644 --- a/src/core/DataFile.cpp +++ b/src/core/DataFile.cpp @@ -445,15 +445,15 @@ bool DataFile::copyResources(const QString& resourcesDir) { // Get absolute path to resource bool error; - auto attribute = el.attribute(*res); - - // Skip empty resources. In some cases, there might be an - // alternative way of actually representing the data (e.g. data element for SampleTCO) - if (attribute.isEmpty()) - { - ++res; - continue; - } + auto attribute = el.attribute(*res); + + // Skip empty resources. In some cases, there might be an + // alternative way of actually representing the data (e.g. data element for SampleTCO) + if (attribute.isEmpty()) + { + ++res; + continue; + } QString resPath = PathUtil::toAbsolute(attribute, &error); // If we are running without the project loaded (from CLI), "local:" base diff --git a/src/gui/editors/SongEditor.cpp b/src/gui/editors/SongEditor.cpp index 5217139cc37..517b1639621 100644 --- a/src/gui/editors/SongEditor.cpp +++ b/src/gui/editors/SongEditor.cpp @@ -1025,14 +1025,14 @@ SongEditorWindow::SongEditorWindow(Song* song) : connect(song, SIGNAL(projectLoaded()), this, SLOT(adjustUiAfterProjectLoad())); connect(this, SIGNAL(resized()), m_editor, SLOT(updatePositionLine())); - // In case our current audio device does not support capture, - // disable the record buttons. - if(!Engine::audioEngine()->audioDev()->supportsCapture()) { - for(auto &recordAction : {m_recordAccompanyAction, m_recordAction}) { - recordAction->setEnabled(false); - recordAction->setToolTip(tr("Recording is unavailable: try connecting an input device or switching backend")); - } - } + // In case our current audio device does not support capture, + // disable the record buttons. + if(!Engine::audioEngine()->audioDev()->supportsCapture()) { + for(auto &recordAction : {m_recordAccompanyAction, m_recordAction}) { + recordAction->setEnabled(false); + recordAction->setToolTip(tr("Recording is unavailable: try connecting an input device or switching backend")); + } + } } QSize SongEditorWindow::sizeHint() const diff --git a/src/tracks/SampleTrack.cpp b/src/tracks/SampleTrack.cpp index 68a32187c82..f9b159e8641 100644 --- a/src/tracks/SampleTrack.cpp +++ b/src/tracks/SampleTrack.cpp @@ -108,11 +108,11 @@ bool SampleTrack::play( const TimePos & _start, const fpp_t _frames, // In case we are recoding, "play" the whole TCO. if(sClip->isRecord()) { - samplePlayLength = clipFrameLength; - } + samplePlayLength = clipFrameLength; + } - //we only play within the sampleBuffer limits - //Ignore that in case of recoding. + //we only play within the sampleBuffer limits + //Ignore that in case of recoding. if(sampleStart < sampleBufferLength || sClip->isRecord ()) { sClip->setSampleStartFrame(sampleStart); From dfed374c0d1ac341f37712fcbab0279a219cbaf7 Mon Sep 17 00:00:00 2001 From: Hyunjin Song Date: Thu, 3 Feb 2022 13:19:24 +0900 Subject: [PATCH 10/38] Minor formatting changes --- src/core/AudioEngine.cpp | 6 +++--- src/core/SampleRecordHandle.cpp | 2 +- src/gui/SampleClipView.cpp | 4 ++-- src/gui/editors/SongEditor.cpp | 2 +- src/tracks/SampleTrack.cpp | 18 +++++++++--------- 5 files changed, 16 insertions(+), 16 deletions(-) diff --git a/src/core/AudioEngine.cpp b/src/core/AudioEngine.cpp index 25068d36ed0..c3d763f169b 100644 --- a/src/core/AudioEngine.cpp +++ b/src/core/AudioEngine.cpp @@ -352,7 +352,7 @@ const surroundSampleFrame * AudioEngine::renderNextBuffer() if( it != m_playHandles.end() ) { - if((*it)->audioPort()) { (*it)->audioPort()->removePlayHandle(*it); } + if ((*it)->audioPort()) { (*it)->audioPort()->removePlayHandle(*it); } if( ( *it )->type() == PlayHandle::TypeNotePlayHandle ) { NotePlayHandleManager::release( (NotePlayHandle*) *it ); @@ -400,7 +400,7 @@ const surroundSampleFrame * AudioEngine::renderNextBuffer() } if( ( *it )->isFinished() ) { - if((*it)->audioPort()) { (*it)->audioPort()->removePlayHandle(*it); } + if ((*it)->audioPort()) { (*it)->audioPort()->removePlayHandle(*it); } if( ( *it )->type() == PlayHandle::TypeNotePlayHandle ) { NotePlayHandleManager::release( (NotePlayHandle*) *it ); @@ -753,7 +753,7 @@ void AudioEngine::removePlayHandlesOfTypes(Track * track, const quint8 types) { if ((*it)->isFromTrack(track) && ((*it)->type() & types)) { - if (( *it )->audioPort()) { (*it)->audioPort()->removePlayHandle(*it); } + if ((*it)->audioPort()) { (*it)->audioPort()->removePlayHandle(*it); } if( ( *it )->type() == PlayHandle::TypeNotePlayHandle ) { NotePlayHandleManager::release( (NotePlayHandle*) *it ); diff --git a/src/core/SampleRecordHandle.cpp b/src/core/SampleRecordHandle.cpp index 7f378a1ce82..12c115ab2cb 100644 --- a/src/core/SampleRecordHandle.cpp +++ b/src/core/SampleRecordHandle.cpp @@ -33,7 +33,7 @@ #include "debug.h" -SampleRecordHandle::SampleRecordHandle(SampleClip* clip , TimePos startRecordTimeOffset) : +SampleRecordHandle::SampleRecordHandle(SampleClip* clip, TimePos startRecordTimeOffset) : PlayHandle( TypeSamplePlayHandle ), m_framesRecorded( 0 ), m_minLength( clip->length() ), diff --git a/src/gui/SampleClipView.cpp b/src/gui/SampleClipView.cpp index 1b380a44f3e..7e53bfadf69 100644 --- a/src/gui/SampleClipView.cpp +++ b/src/gui/SampleClipView.cpp @@ -68,7 +68,7 @@ void SampleClipView::constructContextMenu(QMenu* cm) cm->addSeparator(); - cm->addAction(embed::getIconPixmap( "record" ), + cm->addAction(embed::getIconPixmap("record"), tr("Set/clear record"), m_clip, SLOT(toggleRecord())); @@ -291,7 +291,7 @@ void SampleClipView::paintEvent( QPaintEvent * pe ) } // recording sample tracks is not possible at the moment - if(m_clip->isRecord()) + if (m_clip->isRecord()) { p.setFont( pointSize<7>( p.font() ) ); diff --git a/src/gui/editors/SongEditor.cpp b/src/gui/editors/SongEditor.cpp index 517b1639621..7c9ec08a751 100644 --- a/src/gui/editors/SongEditor.cpp +++ b/src/gui/editors/SongEditor.cpp @@ -1028,7 +1028,7 @@ SongEditorWindow::SongEditorWindow(Song* song) : // In case our current audio device does not support capture, // disable the record buttons. if(!Engine::audioEngine()->audioDev()->supportsCapture()) { - for(auto &recordAction : {m_recordAccompanyAction, m_recordAction}) { + for (auto &recordAction : {m_recordAccompanyAction, m_recordAction}) { recordAction->setEnabled(false); recordAction->setToolTip(tr("Recording is unavailable: try connecting an input device or switching backend")); } diff --git a/src/tracks/SampleTrack.cpp b/src/tracks/SampleTrack.cpp index f9b159e8641..627e7734911 100644 --- a/src/tracks/SampleTrack.cpp +++ b/src/tracks/SampleTrack.cpp @@ -95,8 +95,8 @@ bool SampleTrack::play( const TimePos & _start, const fpp_t _frames, if( _start >= sClip->startPosition() && _start < sClip->endPosition() ) { - if(!sClip->isPlaying() && (_start >= (sClip->startPosition() + sClip->startTimeOffset()) - || sClip->isRecord())) + if (!sClip->isPlaying() && (_start >= (sClip->startPosition() + sClip->startTimeOffset()) + || sClip->isRecord())) { auto bufferFramesPerTick = Engine::framesPerTick (sClip->sampleBuffer ()->sampleRate ()); f_cnt_t sampleStart = bufferFramesPerTick * ( _start - sClip->startPosition() - sClip->startTimeOffset() ); @@ -107,18 +107,18 @@ bool SampleTrack::play( const TimePos & _start, const fpp_t _frames, f_cnt_t samplePlayLength = clipFrameLength > sampleBufferLength ? sampleBufferLength : clipFrameLength; // In case we are recoding, "play" the whole TCO. - if(sClip->isRecord()) { + if (sClip->isRecord()) { samplePlayLength = clipFrameLength; } //we only play within the sampleBuffer limits //Ignore that in case of recoding. - if(sampleStart < sampleBufferLength || sClip->isRecord ()) + if (sampleStart < sampleBufferLength || sClip->isRecord()) { - sClip->setSampleStartFrame(sampleStart); - sClip->setSamplePlayLength(samplePlayLength); - clips.push_back(sClip); - sClip->setIsPlaying(true); + sClip->setSampleStartFrame( sampleStart ); + sClip->setSamplePlayLength( samplePlayLength ); + clips.push_back( sClip ); + sClip->setIsPlaying( true ); nowPlaying = true; } } @@ -138,7 +138,7 @@ bool SampleTrack::play( const TimePos & _start, const fpp_t _frames, if( !st->isMuted() ) { PlayHandle* handle; - if(st->isRecord()) + if( st->isRecord() ) { if( !Engine::getSong()->isRecording() ) { From 17efb13873f2f4db2a0ef91e3d8650599d701951 Mon Sep 17 00:00:00 2001 From: Hyunjin Song Date: Sat, 26 Mar 2022 11:50:15 +0900 Subject: [PATCH 11/38] Fix missing include after merge --- src/gui/SampleClipView.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/gui/SampleClipView.cpp b/src/gui/SampleClipView.cpp index ca7f1b5f1c6..7e5450ed160 100644 --- a/src/gui/SampleClipView.cpp +++ b/src/gui/SampleClipView.cpp @@ -29,6 +29,7 @@ #include #include "embed.h" +#include "gui_templates.h" #include "PathUtil.h" #include "SampleBuffer.h" #include "SampleClip.h" From 18efc12755bb3ceca58b13ca7e544c5f49be5aa0 Mon Sep 17 00:00:00 2001 From: Michael Gregorius Date: Fri, 31 May 2024 20:17:55 +0200 Subject: [PATCH 12/38] Move "Rec" to lower left Move the recording symbol and the "Rec" string to the lower left of the clip so that it does not overlap with the clip name if it is shown. Make the "Rec" string translatable and increase the font size. --- src/gui/clips/SampleClipView.cpp | 30 +++++++++++++++++++++++------- 1 file changed, 23 insertions(+), 7 deletions(-) diff --git a/src/gui/clips/SampleClipView.cpp b/src/gui/clips/SampleClipView.cpp index 2074e794462..bb0937381a4 100644 --- a/src/gui/clips/SampleClipView.cpp +++ b/src/gui/clips/SampleClipView.cpp @@ -310,15 +310,31 @@ void SampleClipView::paintEvent( QPaintEvent * pe ) if (m_clip->isRecord()) { - p.setFont(adjustedToPixelSize(p.font(), 7)); + p.setFont(adjustedToPixelSize(p.font(), 10)); - p.setPen( textShadowColor() ); - p.drawText( 10, p.fontMetrics().height()+1, "Rec" ); - p.setPen( textColor() ); - p.drawText( 9, p.fontMetrics().height(), "Rec" ); + const auto fontHeight = p.fontMetrics().height(); - p.setBrush( QBrush( textColor() ) ); - p.drawEllipse( 4, 5, 4, 4 ); + const auto baseLine = height() - 3; + + const int recordSymbolRadius = 3; + const int recordSymbolCenterX = recordSymbolRadius + 4; + const int recordSymbolCenterY = baseLine - fontHeight / 2 + 1; + + const int textStartX = recordSymbolCenterX + recordSymbolRadius + 4; + + auto textPos = QPoint(textStartX, baseLine); + + const auto rec = tr("Rec"); + + p.setPen(textShadowColor()); + p.drawText(textPos + QPoint(1, 1), rec); + + p.setPen(textColor()); + p.drawText(textPos, rec); + + p.setBrush(QBrush(textColor())); + + p.drawEllipse(QPoint(recordSymbolCenterX, recordSymbolCenterY), recordSymbolRadius, recordSymbolRadius); } p.end(); From 33139b9f4c7a4844d3e101cbf1887823fbec776a Mon Sep 17 00:00:00 2001 From: Michael Gregorius Date: Sat, 1 Jun 2024 19:32:56 +0200 Subject: [PATCH 13/38] Enable configuration of input device for SDL Up to now the SDL audio driver attempted to use the default recording device. This might not be what users want or expect, especially since the actually used device is not visible anywhere. So if recording does not work for the users they have no way to find out what's wrong. Extend the settings screen of the SDL driver with a combo box that allows to select the input device to be used. Store the selected device name in a new attribute called "inputdevice" in the "audiosdl" section of the configuration file. Use the information from the configuration when attempting to inialize the input device. Fall back to the default device if that does not work. --- include/AudioSdl.h | 3 ++- src/core/audio/AudioSdl.cpp | 41 ++++++++++++++++++++++++++++++++----- 2 files changed, 38 insertions(+), 6 deletions(-) diff --git a/include/AudioSdl.h b/include/AudioSdl.h index 5062f79eab2..858e7abd0e2 100644 --- a/include/AudioSdl.h +++ b/include/AudioSdl.h @@ -40,6 +40,7 @@ #include "AudioDeviceSetupWidget.h" class QLineEdit; +class QComboBox; namespace lmms { @@ -67,7 +68,7 @@ class AudioSdl : public AudioDevice private: QLineEdit * m_device; - + QComboBox* m_inputDeviceComboBox = nullptr; } ; diff --git a/src/core/audio/AudioSdl.cpp b/src/core/audio/AudioSdl.cpp index 0d960c1070f..e29472f603f 100644 --- a/src/core/audio/AudioSdl.cpp +++ b/src/core/audio/AudioSdl.cpp @@ -28,6 +28,7 @@ #include #include +#include #include #include "AudioEngine.h" @@ -107,11 +108,18 @@ AudioSdl::AudioSdl( bool & _success_ful, AudioEngine* _audioEngine ) : m_inputAudioHandle = m_audioHandle; m_inputAudioHandle.callback = sdlInputAudioCallback; - m_inputDevice = SDL_OpenAudioDevice (nullptr, - 1, - &m_inputAudioHandle, - &actual, - 0); + const QString inputDevice = ConfigManager::inst()->value("audiosdl", "inputdevice"); + + // Try with the configured device + const auto inputDeviceCStr = inputDevice.toLocal8Bit().data(); + m_inputDevice = SDL_OpenAudioDevice (inputDeviceCStr, 1, &m_inputAudioHandle, &actual, 0); + + // If we did not get a device ID try again with the default device + if (m_inputDevice == 0) + { + m_inputDevice = SDL_OpenAudioDevice(nullptr, 1, &m_inputAudioHandle, &actual, 0); + } + if (m_inputDevice != 0) { m_supportsCapture = true; } else { @@ -291,6 +299,23 @@ AudioSdl::setupWidget::setupWidget( QWidget * _parent ) : m_device = new QLineEdit( dev, this ); form->addRow(tr("Device"), m_device); + + m_inputDeviceComboBox = new QComboBox(this); + +#ifdef LMMS_HAVE_SDL2 + const int numberOfInputDevices = SDL_GetNumAudioDevices(1); + for (int i = 0; i < numberOfInputDevices; ++i) + { + const QString deviceName = SDL_GetAudioDeviceName(i, 1); + m_inputDeviceComboBox->addItem(deviceName); + } + + // Set the current device to the one in the configuration + const auto inputDevice = ConfigManager::inst()->value("audiosdl", "inputdevice"); + m_inputDeviceComboBox->setCurrentText(inputDevice); +#endif + + form->addRow(tr("Input device"), m_inputDeviceComboBox); } @@ -300,6 +325,12 @@ void AudioSdl::setupWidget::saveSettings() { ConfigManager::inst()->setValue( "audiosdl", "device", m_device->text() ); + + const auto currentInputDevice = m_inputDeviceComboBox->currentText(); + if (!currentInputDevice.isEmpty()) + { + ConfigManager::inst()->setValue("audiosdl", "inputdevice", currentInputDevice); + } } From 29c43c2bb66033bd44787b3207e70ce0d31c845d Mon Sep 17 00:00:00 2001 From: Michael Gregorius Date: Sat, 1 Jun 2024 20:25:10 +0200 Subject: [PATCH 14/38] Provide a setting for system default input Provide the setting "[System Default]" which instructs the SDL driver to use the default device of the system as the input device. In the configuration file this option is represented as an empty string. This should play well with the current existing configuration of the users. --- include/AudioSdl.h | 2 ++ src/core/audio/AudioSdl.cpp | 27 ++++++++++++++++++++++----- 2 files changed, 24 insertions(+), 5 deletions(-) diff --git a/include/AudioSdl.h b/include/AudioSdl.h index 858e7abd0e2..d4f08733a60 100644 --- a/include/AudioSdl.h +++ b/include/AudioSdl.h @@ -69,6 +69,8 @@ class AudioSdl : public AudioDevice private: QLineEdit * m_device; QComboBox* m_inputDeviceComboBox = nullptr; + + static QString s_defaultInputDevice; } ; diff --git a/src/core/audio/AudioSdl.cpp b/src/core/audio/AudioSdl.cpp index e29472f603f..dedc7dc1624 100644 --- a/src/core/audio/AudioSdl.cpp +++ b/src/core/audio/AudioSdl.cpp @@ -109,13 +109,14 @@ AudioSdl::AudioSdl( bool & _success_ful, AudioEngine* _audioEngine ) : m_inputAudioHandle.callback = sdlInputAudioCallback; const QString inputDevice = ConfigManager::inst()->value("audiosdl", "inputdevice"); + const bool isDefaultInput = inputDevice.isEmpty(); // Try with the configured device - const auto inputDeviceCStr = inputDevice.toLocal8Bit().data(); + const auto inputDeviceCStr = isDefaultInput ? nullptr : inputDevice.toLocal8Bit().data(); m_inputDevice = SDL_OpenAudioDevice (inputDeviceCStr, 1, &m_inputAudioHandle, &actual, 0); - // If we did not get a device ID try again with the default device - if (m_inputDevice == 0) + // If we did not get a device ID try again with the default device if we did not try that before + if (m_inputDevice == 0 && !isDefaultInput) { m_inputDevice = SDL_OpenAudioDevice(nullptr, 1, &m_inputAudioHandle, &actual, 0); } @@ -290,6 +291,8 @@ void AudioSdl::sdlInputAudioCallback(Uint8 *_buf, int _len) { #endif +QString AudioSdl::setupWidget::s_defaultInputDevice = QObject::tr("[System Default]"); + AudioSdl::setupWidget::setupWidget( QWidget * _parent ) : AudioDeviceSetupWidget( AudioSdl::name(), _parent ) { @@ -303,6 +306,8 @@ AudioSdl::setupWidget::setupWidget( QWidget * _parent ) : m_inputDeviceComboBox = new QComboBox(this); #ifdef LMMS_HAVE_SDL2 + m_inputDeviceComboBox->addItem(s_defaultInputDevice); + const int numberOfInputDevices = SDL_GetNumAudioDevices(1); for (int i = 0; i < numberOfInputDevices; ++i) { @@ -312,7 +317,14 @@ AudioSdl::setupWidget::setupWidget( QWidget * _parent ) : // Set the current device to the one in the configuration const auto inputDevice = ConfigManager::inst()->value("audiosdl", "inputdevice"); - m_inputDeviceComboBox->setCurrentText(inputDevice); + if (inputDevice.isEmpty()) + { + m_inputDeviceComboBox->setCurrentText(s_defaultInputDevice); + } + else + { + m_inputDeviceComboBox->setCurrentText(inputDevice); + } #endif form->addRow(tr("Input device"), m_inputDeviceComboBox); @@ -327,7 +339,12 @@ void AudioSdl::setupWidget::saveSettings() m_device->text() ); const auto currentInputDevice = m_inputDeviceComboBox->currentText(); - if (!currentInputDevice.isEmpty()) + if (currentInputDevice == s_defaultInputDevice) + { + // Represent the default input device with an empty string + ConfigManager::inst()->setValue("audiosdl", "inputdevice", ""); + } + else if (!currentInputDevice.isEmpty()) { ConfigManager::inst()->setValue("audiosdl", "inputdevice", currentInputDevice); } From 1ab45e4994851d5a629db4a22d7825f79386ef5d Mon Sep 17 00:00:00 2001 From: Michael Gregorius Date: Sat, 1 Jun 2024 20:41:06 +0200 Subject: [PATCH 15/38] Configuration of output device for SDL Let users configure the output device that's used by the SDL driver. Code-wise the implementation is very similar to the input device configuration. Use a `QComboBox` instead of a `QLineEdit` for `m_device` and rename it to `m_playbackDeviceComboBox`. Rename `s_defaultInputDevice` to `s_systemDefaultDevice` because it is used in the context of playback and input devices. --- include/AudioSdl.h | 5 ++- src/core/audio/AudioSdl.cpp | 64 +++++++++++++++++++++++++++++-------- 2 files changed, 52 insertions(+), 17 deletions(-) diff --git a/include/AudioSdl.h b/include/AudioSdl.h index d4f08733a60..c8e9c4f7e81 100644 --- a/include/AudioSdl.h +++ b/include/AudioSdl.h @@ -39,7 +39,6 @@ #include "AudioDevice.h" #include "AudioDeviceSetupWidget.h" -class QLineEdit; class QComboBox; namespace lmms @@ -67,10 +66,10 @@ class AudioSdl : public AudioDevice void saveSettings() override; private: - QLineEdit * m_device; + QComboBox* m_playbackDeviceComboBox; QComboBox* m_inputDeviceComboBox = nullptr; - static QString s_defaultInputDevice; + static QString s_systemDefaultDevice; } ; diff --git a/src/core/audio/AudioSdl.cpp b/src/core/audio/AudioSdl.cpp index dedc7dc1624..772317491a0 100644 --- a/src/core/audio/AudioSdl.cpp +++ b/src/core/audio/AudioSdl.cpp @@ -78,11 +78,19 @@ AudioSdl::AudioSdl( bool & _success_ful, AudioEngine* _audioEngine ) : SDL_AudioSpec actual; #ifdef LMMS_HAVE_SDL2 - m_outputDevice = SDL_OpenAudioDevice (nullptr, - 0, - &m_audioHandle, - &actual, - 0); + const QString playbackDevice = ConfigManager::inst()->value("audiosdl", "device"); + const bool isDefaultPlayback = playbackDevice.isEmpty(); + + // Try with the configured device + const auto playbackDeviceCStr = isDefaultPlayback ? nullptr : playbackDevice.toLocal8Bit().data(); + m_outputDevice = SDL_OpenAudioDevice(playbackDeviceCStr, 0, &m_audioHandle, &actual, 0); + + // If we did not get a device ID try again with the default device if we did not try that before + if (m_outputDevice == 0 && !isDefaultPlayback) + { + m_outputDevice = SDL_OpenAudioDevice(nullptr, 0, &m_audioHandle, &actual, 0); + } + if (m_outputDevice == 0) { qCritical( "Couldn't open SDL-audio: %s\n", SDL_GetError() ); return; @@ -291,22 +299,42 @@ void AudioSdl::sdlInputAudioCallback(Uint8 *_buf, int _len) { #endif -QString AudioSdl::setupWidget::s_defaultInputDevice = QObject::tr("[System Default]"); +QString AudioSdl::setupWidget::s_systemDefaultDevice = QObject::tr("[System Default]"); AudioSdl::setupWidget::setupWidget( QWidget * _parent ) : AudioDeviceSetupWidget( AudioSdl::name(), _parent ) { QFormLayout * form = new QFormLayout(this); - QString dev = ConfigManager::inst()->value( "audiosdl", "device" ); - m_device = new QLineEdit( dev, this ); + m_playbackDeviceComboBox = new QComboBox(this); + +#ifdef LMMS_HAVE_SDL2 + m_playbackDeviceComboBox->addItem(s_systemDefaultDevice); + + const int numberOfPlaybackDevices = SDL_GetNumAudioDevices(0); + for (int i = 0; i < numberOfPlaybackDevices; ++i) + { + const QString deviceName = SDL_GetAudioDeviceName(i, 0); + m_playbackDeviceComboBox->addItem(deviceName); + } + + QString playbackDevice = ConfigManager::inst()->value("audiosdl", "device"); + if (playbackDevice.isEmpty()) + { + m_playbackDeviceComboBox->setCurrentText(s_systemDefaultDevice); + } + else + { + m_playbackDeviceComboBox->setCurrentText(playbackDevice); + } +#endif - form->addRow(tr("Device"), m_device); + form->addRow(tr("Device"), m_playbackDeviceComboBox); m_inputDeviceComboBox = new QComboBox(this); #ifdef LMMS_HAVE_SDL2 - m_inputDeviceComboBox->addItem(s_defaultInputDevice); + m_inputDeviceComboBox->addItem(s_systemDefaultDevice); const int numberOfInputDevices = SDL_GetNumAudioDevices(1); for (int i = 0; i < numberOfInputDevices; ++i) @@ -319,7 +347,7 @@ AudioSdl::setupWidget::setupWidget( QWidget * _parent ) : const auto inputDevice = ConfigManager::inst()->value("audiosdl", "inputdevice"); if (inputDevice.isEmpty()) { - m_inputDeviceComboBox->setCurrentText(s_defaultInputDevice); + m_inputDeviceComboBox->setCurrentText(s_systemDefaultDevice); } else { @@ -335,11 +363,19 @@ AudioSdl::setupWidget::setupWidget( QWidget * _parent ) : void AudioSdl::setupWidget::saveSettings() { - ConfigManager::inst()->setValue( "audiosdl", "device", - m_device->text() ); + const auto currentPlaybackDevice = m_playbackDeviceComboBox->currentText(); + if (currentPlaybackDevice == s_systemDefaultDevice) + { + // Represent the default input device with an empty string + ConfigManager::inst()->setValue("audiosdl", "device", ""); + } + else if (!currentPlaybackDevice.isEmpty()) + { + ConfigManager::inst()->setValue("audiosdl", "device", currentPlaybackDevice); + } const auto currentInputDevice = m_inputDeviceComboBox->currentText(); - if (currentInputDevice == s_defaultInputDevice) + if (currentInputDevice == s_systemDefaultDevice) { // Represent the default input device with an empty string ConfigManager::inst()->setValue("audiosdl", "inputdevice", ""); From a123d0e3cb62745b83d9304747445ff73e1345fb Mon Sep 17 00:00:00 2001 From: Michael Gregorius Date: Sat, 1 Jun 2024 20:51:13 +0200 Subject: [PATCH 16/38] Ensure label visibility Make sure that labels are always shown by setting the row wrap policy of the form layout to wrap long rows. --- src/core/audio/AudioSdl.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/core/audio/AudioSdl.cpp b/src/core/audio/AudioSdl.cpp index 772317491a0..2066f89e64b 100644 --- a/src/core/audio/AudioSdl.cpp +++ b/src/core/audio/AudioSdl.cpp @@ -305,6 +305,7 @@ AudioSdl::setupWidget::setupWidget( QWidget * _parent ) : AudioDeviceSetupWidget( AudioSdl::name(), _parent ) { QFormLayout * form = new QFormLayout(this); + form->setRowWrapPolicy(QFormLayout::WrapLongRows); m_playbackDeviceComboBox = new QComboBox(this); From 1f0cda4983f66a0d3a9f024ae3ee2d57c7bf59e6 Mon Sep 17 00:00:00 2001 From: Michael Gregorius Date: Sat, 1 Jun 2024 20:54:12 +0200 Subject: [PATCH 17/38] Rename "Device" Rename "Device" to "Playback device" to make clear what the setting refers to. --- src/core/audio/AudioSdl.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/audio/AudioSdl.cpp b/src/core/audio/AudioSdl.cpp index 2066f89e64b..c4c4dd21a1b 100644 --- a/src/core/audio/AudioSdl.cpp +++ b/src/core/audio/AudioSdl.cpp @@ -330,7 +330,7 @@ AudioSdl::setupWidget::setupWidget( QWidget * _parent ) : } #endif - form->addRow(tr("Device"), m_playbackDeviceComboBox); + form->addRow(tr("Playback device"), m_playbackDeviceComboBox); m_inputDeviceComboBox = new QComboBox(this); From f9ea9705b8780298d78e3010053ae026a64aacee Mon Sep 17 00:00:00 2001 From: Michael Gregorius Date: Sat, 1 Jun 2024 21:03:17 +0200 Subject: [PATCH 18/38] Remove repeated strings Introduce const expressions to get rid of repeated strings with a risk of typos. --- src/core/audio/AudioSdl.cpp | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/src/core/audio/AudioSdl.cpp b/src/core/audio/AudioSdl.cpp index c4c4dd21a1b..186e93a2756 100644 --- a/src/core/audio/AudioSdl.cpp +++ b/src/core/audio/AudioSdl.cpp @@ -37,6 +37,10 @@ namespace lmms { +constexpr char const* const c_sectionSDL = "audiosdl"; +constexpr char const* const c_playbackDeviceSDL = "device"; +constexpr char const* const c_inputDeviceSDL = "inputdevice"; + AudioSdl::AudioSdl( bool & _success_ful, AudioEngine* _audioEngine ) : AudioDevice( DEFAULT_CHANNELS, _audioEngine ), m_outBuf( new surroundSampleFrame[audioEngine()->framesPerPeriod()] ) @@ -78,7 +82,7 @@ AudioSdl::AudioSdl( bool & _success_ful, AudioEngine* _audioEngine ) : SDL_AudioSpec actual; #ifdef LMMS_HAVE_SDL2 - const QString playbackDevice = ConfigManager::inst()->value("audiosdl", "device"); + const QString playbackDevice = ConfigManager::inst()->value(c_sectionSDL, c_playbackDeviceSDL); const bool isDefaultPlayback = playbackDevice.isEmpty(); // Try with the configured device @@ -116,7 +120,7 @@ AudioSdl::AudioSdl( bool & _success_ful, AudioEngine* _audioEngine ) : m_inputAudioHandle = m_audioHandle; m_inputAudioHandle.callback = sdlInputAudioCallback; - const QString inputDevice = ConfigManager::inst()->value("audiosdl", "inputdevice"); + const QString inputDevice = ConfigManager::inst()->value(c_sectionSDL, c_inputDeviceSDL); const bool isDefaultInput = inputDevice.isEmpty(); // Try with the configured device @@ -319,7 +323,7 @@ AudioSdl::setupWidget::setupWidget( QWidget * _parent ) : m_playbackDeviceComboBox->addItem(deviceName); } - QString playbackDevice = ConfigManager::inst()->value("audiosdl", "device"); + QString playbackDevice = ConfigManager::inst()->value(c_sectionSDL, c_playbackDeviceSDL); if (playbackDevice.isEmpty()) { m_playbackDeviceComboBox->setCurrentText(s_systemDefaultDevice); @@ -345,7 +349,7 @@ AudioSdl::setupWidget::setupWidget( QWidget * _parent ) : } // Set the current device to the one in the configuration - const auto inputDevice = ConfigManager::inst()->value("audiosdl", "inputdevice"); + const auto inputDevice = ConfigManager::inst()->value(c_sectionSDL, c_inputDeviceSDL); if (inputDevice.isEmpty()) { m_inputDeviceComboBox->setCurrentText(s_systemDefaultDevice); @@ -368,22 +372,22 @@ void AudioSdl::setupWidget::saveSettings() if (currentPlaybackDevice == s_systemDefaultDevice) { // Represent the default input device with an empty string - ConfigManager::inst()->setValue("audiosdl", "device", ""); + ConfigManager::inst()->setValue(c_sectionSDL, c_playbackDeviceSDL, ""); } else if (!currentPlaybackDevice.isEmpty()) { - ConfigManager::inst()->setValue("audiosdl", "device", currentPlaybackDevice); + ConfigManager::inst()->setValue(c_sectionSDL, c_playbackDeviceSDL, currentPlaybackDevice); } const auto currentInputDevice = m_inputDeviceComboBox->currentText(); if (currentInputDevice == s_systemDefaultDevice) { // Represent the default input device with an empty string - ConfigManager::inst()->setValue("audiosdl", "inputdevice", ""); + ConfigManager::inst()->setValue(c_sectionSDL, c_inputDeviceSDL, ""); } else if (!currentInputDevice.isEmpty()) { - ConfigManager::inst()->setValue("audiosdl", "inputdevice", currentInputDevice); + ConfigManager::inst()->setValue(c_sectionSDL, c_inputDeviceSDL, currentInputDevice); } } From 48c4dce96fce831aa529c52127f87edf8e17be19 Mon Sep 17 00:00:00 2001 From: Michael Gregorius Date: Sun, 2 Jun 2024 12:34:59 +0200 Subject: [PATCH 19/38] More prominent recording option Make the option to record samples more prominent by providing a pixmap button that is always shown and that can be used to turn recording on or off. The corresponding widget which constitutes of the button and a label is always positioned at the bottom left of the sample clip. Technical details ------------------ The recording widget is built in the private method `buildRecordWidget`. The method `adjustRecordWidget` is used to move the recording widget to the correct position relative to the sample view. It is called after construction and whenever the sample clip is resized (see `resizeEvent`). Add the method `SampleClip::getRecordModel` so that the pixmap button can be configured to act on it. --- include/SampleClip.h | 2 + include/SampleClipView.h | 9 ++++ src/gui/clips/SampleClipView.cpp | 71 ++++++++++++++++++-------------- 3 files changed, 52 insertions(+), 30 deletions(-) diff --git a/include/SampleClip.h b/include/SampleClip.h index 3beca338bcd..5efdc5ed7bc 100644 --- a/include/SampleClip.h +++ b/include/SampleClip.h @@ -81,6 +81,8 @@ class SampleClip : public Clip void setIsPlaying(bool isPlaying); void setSampleBuffer(std::shared_ptr sb); + BoolModel& getRecordModel() { return m_recordModel; } + public slots: void setSampleFile(const QString& sf); void updateLength(); diff --git a/include/SampleClipView.h b/include/SampleClipView.h index 4ff218fb0ef..73ed474e72f 100644 --- a/include/SampleClipView.h +++ b/include/SampleClipView.h @@ -27,10 +27,13 @@ #include "ClipView.h" +class QWidget; + namespace lmms { class SampleClip; +class BoolModel; namespace gui { @@ -59,12 +62,18 @@ public slots: void dropEvent( QDropEvent * _de ) override; void mouseDoubleClickEvent( QMouseEvent * ) override; void paintEvent( QPaintEvent * ) override; + void resizeEvent(QResizeEvent *event) override; +private: + QWidget* buildRecordWidget(BoolModel& recordModel); + void adjustRecordWidget(); private: SampleClip * m_clip; QPixmap m_paintPixmap; bool splitClip( const TimePos pos ) override; + + QWidget* m_recordWidget; } ; diff --git a/src/gui/clips/SampleClipView.cpp b/src/gui/clips/SampleClipView.cpp index bb0937381a4..ca8ec097832 100644 --- a/src/gui/clips/SampleClipView.cpp +++ b/src/gui/clips/SampleClipView.cpp @@ -25,6 +25,8 @@ #include "SampleClipView.h" #include +#include +#include #include #include @@ -33,6 +35,7 @@ #include "embed.h" #include "gui_templates.h" #include "PathUtil.h" +#include "PixmapButton.h" #include "SampleClip.h" #include "SampleLoader.h" #include "SampleWaveform.h" @@ -57,6 +60,11 @@ SampleClipView::SampleClipView( SampleClip * _clip, TrackView * _tv ) : connect(m_clip, SIGNAL(wasReversed()), this, SLOT(update())); setStyle( QApplication::style() ); + + m_recordWidget = buildRecordWidget(_clip->getRecordModel()); + m_recordWidget->setVisible(true); + + adjustRecordWidget(); } void SampleClipView::updateSample() @@ -306,36 +314,6 @@ void SampleClipView::paintEvent( QPaintEvent * pe ) { p.drawLine(m_markerPos, rect().bottom(), m_markerPos, rect().top()); } - // recording sample tracks is not possible at the moment - - if (m_clip->isRecord()) - { - p.setFont(adjustedToPixelSize(p.font(), 10)); - - const auto fontHeight = p.fontMetrics().height(); - - const auto baseLine = height() - 3; - - const int recordSymbolRadius = 3; - const int recordSymbolCenterX = recordSymbolRadius + 4; - const int recordSymbolCenterY = baseLine - fontHeight / 2 + 1; - - const int textStartX = recordSymbolCenterX + recordSymbolRadius + 4; - - auto textPos = QPoint(textStartX, baseLine); - - const auto rec = tr("Rec"); - - p.setPen(textShadowColor()); - p.drawText(textPos + QPoint(1, 1), rec); - - p.setPen(textColor()); - p.drawText(textPos, rec); - - p.setBrush(QBrush(textColor())); - - p.drawEllipse(QPoint(recordSymbolCenterX, recordSymbolCenterY), recordSymbolRadius, recordSymbolRadius); - } p.end(); @@ -343,6 +321,12 @@ void SampleClipView::paintEvent( QPaintEvent * pe ) } +void SampleClipView::resizeEvent(QResizeEvent *event) +{ + adjustRecordWidget(); + + ClipView::resizeEvent(event); +} void SampleClipView::reverseSample() @@ -393,5 +377,32 @@ bool SampleClipView::splitClip( const TimePos pos ) else { return false; } } +QWidget* SampleClipView::buildRecordWidget(BoolModel& recordModel) +{ + auto recordWidget = new QWidget(this); + + auto recordButton = new PixmapButton(recordWidget); + recordButton->setActiveGraphic(embed::getIconPixmap("led_red")); + recordButton->setToolTip(tr("Enable/disable recording")); + recordButton->setCheckable(true); + recordButton->setModel(&recordModel); + + auto recordLabel = new QLabel(tr("Rec"), recordWidget); + recordLabel->setFont(adjustedToPixelSize(recordLabel->font(), 10)); + + // Now layout everything + QHBoxLayout* recordLayout = new QHBoxLayout(recordWidget); + recordLayout->setContentsMargins(0, 0, 0, 0); + + recordLayout->addWidget(recordButton); + recordLayout->addWidget(recordLabel); + + return recordWidget; +} + +void SampleClipView::adjustRecordWidget() +{ + m_recordWidget->move(1, height() - m_recordWidget->height() - 1); +} } // namespace lmms::gui From 54955307452fa7c639ae1c8ac6cbe530e165da9e Mon Sep 17 00:00:00 2001 From: Michael Gregorius Date: Sun, 2 Jun 2024 14:17:45 +0200 Subject: [PATCH 20/38] Recording widget/options visibility Only show the recording widget in the sample clip if the audio engine has a device configured that can capture audio. For simplicity of the code, i.e. no nullptr checks, the widget is always created but only shown if capture capabilities are available. Rename the context menu entry "Set/clear record" to "Toggle record" and only enable it if capture is possible. In `SampleClipView` the test for the availability of a capture device is abstracted behind the helper method `recordingCapabilitiesAvailable`. Technical details ------------------ Add the method `captureDeviceAvailable` to `AudioEngine` because clients should not be concerned with driver details. Drivers should mostly be used by the audio engine and therefore hidden to clients. Add a private `const` version of the method `audioDev` so that `captureDeviceAvailable` can be implemented in a `const` correct way. Use `captureDeviceAvailable` in the constructor of `SongEditorWindow`. --- include/AudioEngine.h | 7 +++++++ include/SampleClipView.h | 1 + src/core/AudioEngine.cpp | 4 ++++ src/gui/clips/SampleClipView.cpp | 15 ++++++++++++--- src/gui/editors/SongEditor.cpp | 3 +-- 5 files changed, 25 insertions(+), 5 deletions(-) diff --git a/include/AudioEngine.h b/include/AudioEngine.h index e434b7f15b2..d4c8331d49c 100644 --- a/include/AudioEngine.h +++ b/include/AudioEngine.h @@ -172,6 +172,8 @@ class LMMS_EXPORT AudioEngine : public QObject return m_audioDev; } + bool captureDeviceAvailable() const; + // audio-port-stuff inline void addAudioPort(AudioPort * port) @@ -355,6 +357,11 @@ class LMMS_EXPORT AudioEngine : public QObject AudioDevice * tryAudioDevices(); MidiClient * tryMidiClients(); + inline const AudioDevice* audioDev() const + { + return m_audioDev; + } + void renderStageNoteSetup(); void renderStageInstruments(); void renderStageEffects(); diff --git a/include/SampleClipView.h b/include/SampleClipView.h index 73ed474e72f..7f7d5a302ec 100644 --- a/include/SampleClipView.h +++ b/include/SampleClipView.h @@ -67,6 +67,7 @@ public slots: private: QWidget* buildRecordWidget(BoolModel& recordModel); void adjustRecordWidget(); + bool recordingCapabilitiesAvailable() const; private: SampleClip * m_clip; diff --git a/src/core/AudioEngine.cpp b/src/core/AudioEngine.cpp index 3dc0f7c15f9..8951dcde59d 100644 --- a/src/core/AudioEngine.cpp +++ b/src/core/AudioEngine.cpp @@ -666,6 +666,10 @@ void AudioEngine::restoreAudioDevice() } +bool AudioEngine::captureDeviceAvailable() const +{ + return audioDev()->supportsCapture(); +} void AudioEngine::removeAudioPort(AudioPort * port) diff --git a/src/gui/clips/SampleClipView.cpp b/src/gui/clips/SampleClipView.cpp index ca8ec097832..faa56ceb268 100644 --- a/src/gui/clips/SampleClipView.cpp +++ b/src/gui/clips/SampleClipView.cpp @@ -30,6 +30,7 @@ #include #include +#include "AudioEngine.h" #include "GuiApplication.h" #include "AutomationEditor.h" #include "embed.h" @@ -61,8 +62,9 @@ SampleClipView::SampleClipView( SampleClip * _clip, TrackView * _tv ) : setStyle( QApplication::style() ); + // To simplify the code we always create the widget but we do not always show it m_recordWidget = buildRecordWidget(_clip->getRecordModel()); - m_recordWidget->setVisible(true); + m_recordWidget->setVisible(recordingCapabilitiesAvailable()); adjustRecordWidget(); } @@ -87,9 +89,11 @@ void SampleClipView::constructContextMenu(QMenu* cm) cm->addSeparator(); - cm->addAction(embed::getIconPixmap("record"), - tr("Set/clear record"), + QAction* recordToggleAction = cm->addAction(embed::getIconPixmap("record"), + tr("Toggle record"), m_clip, SLOT(toggleRecord())); + + recordToggleAction->setEnabled(recordingCapabilitiesAvailable()); cm->addAction( embed::getIconPixmap("flip_x"), @@ -405,4 +409,9 @@ void SampleClipView::adjustRecordWidget() m_recordWidget->move(1, height() - m_recordWidget->height() - 1); } +bool SampleClipView::recordingCapabilitiesAvailable() const +{ + return Engine::audioEngine()->captureDeviceAvailable(); +} + } // namespace lmms::gui diff --git a/src/gui/editors/SongEditor.cpp b/src/gui/editors/SongEditor.cpp index ded92815787..f020e58d7ae 100644 --- a/src/gui/editors/SongEditor.cpp +++ b/src/gui/editors/SongEditor.cpp @@ -35,7 +35,6 @@ #include #include "ActionGroup.h" -#include "AudioDevice.h" #include "AudioEngine.h" #include "AutomatableSlider.h" #include "ClipView.h" @@ -1025,7 +1024,7 @@ SongEditorWindow::SongEditorWindow(Song* song) : // In case our current audio device does not support capture, // disable the record buttons. - if(!Engine::audioEngine()->audioDev()->supportsCapture()) { + if(!Engine::audioEngine()->captureDeviceAvailable()) { for (auto &recordAction : {m_recordAccompanyAction, m_recordAction}) { recordAction->setEnabled(false); recordAction->setToolTip(tr("Recording is unavailable: try connecting an input device or switching backend")); From 3b7e330d80918efb2396ab842226f77352127b81 Mon Sep 17 00:00:00 2001 From: saker Date: Sun, 2 Jun 2024 11:57:22 -0400 Subject: [PATCH 21/38] Apply code review --- include/SampleClip.h | 2 +- include/SampleRecordHandle.h | 2 +- src/core/audio/AudioSdl.cpp | 31 ++++++++++++------------------- src/gui/clips/SampleClipView.cpp | 6 +++--- src/gui/editors/SongEditor.cpp | 6 ++++-- src/tracks/SampleTrack.cpp | 3 ++- 6 files changed, 23 insertions(+), 27 deletions(-) diff --git a/include/SampleClip.h b/include/SampleClip.h index 5efdc5ed7bc..a07f9b9c925 100644 --- a/include/SampleClip.h +++ b/include/SampleClip.h @@ -81,7 +81,7 @@ class SampleClip : public Clip void setIsPlaying(bool isPlaying); void setSampleBuffer(std::shared_ptr sb); - BoolModel& getRecordModel() { return m_recordModel; } + BoolModel& recordModel() { return m_recordModel; } public slots: void setSampleFile(const QString& sf); diff --git a/include/SampleRecordHandle.h b/include/SampleRecordHandle.h index 41cf0c37e0a..77e3943e0c7 100644 --- a/include/SampleRecordHandle.h +++ b/include/SampleRecordHandle.h @@ -45,7 +45,7 @@ class Track; class SampleRecordHandle : public PlayHandle { public: - explicit SampleRecordHandle(SampleClip* clip, TimePos startRecordTimeOffset); + SampleRecordHandle(SampleClip* clip, TimePos startRecordTimeOffset); ~SampleRecordHandle() override; void play( sampleFrame * _working_buffer ) override; diff --git a/src/core/audio/AudioSdl.cpp b/src/core/audio/AudioSdl.cpp index 186e93a2756..0904606a051 100644 --- a/src/core/audio/AudioSdl.cpp +++ b/src/core/audio/AudioSdl.cpp @@ -37,9 +37,9 @@ namespace lmms { -constexpr char const* const c_sectionSDL = "audiosdl"; -constexpr char const* const c_playbackDeviceSDL = "device"; -constexpr char const* const c_inputDeviceSDL = "inputdevice"; +constexpr char const* const SectionSDL = "audiosdl"; +constexpr char const* const PlaybackDeviceSDL = "device"; +constexpr char const* const InputDeviceSDL = "inputdevice"; AudioSdl::AudioSdl( bool & _success_ful, AudioEngine* _audioEngine ) : AudioDevice( DEFAULT_CHANNELS, _audioEngine ), @@ -82,7 +82,7 @@ AudioSdl::AudioSdl( bool & _success_ful, AudioEngine* _audioEngine ) : SDL_AudioSpec actual; #ifdef LMMS_HAVE_SDL2 - const QString playbackDevice = ConfigManager::inst()->value(c_sectionSDL, c_playbackDeviceSDL); + const auto playbackDevice = ConfigManager::inst()->value(SectionSDL, PlaybackDeviceSDL); const bool isDefaultPlayback = playbackDevice.isEmpty(); // Try with the configured device @@ -120,7 +120,7 @@ AudioSdl::AudioSdl( bool & _success_ful, AudioEngine* _audioEngine ) : m_inputAudioHandle = m_audioHandle; m_inputAudioHandle.callback = sdlInputAudioCallback; - const QString inputDevice = ConfigManager::inst()->value(c_sectionSDL, c_inputDeviceSDL); + const auto inputDevice = ConfigManager::inst()->value(SectionSDL, InputDeviceSDL); const bool isDefaultInput = inputDevice.isEmpty(); // Try with the configured device @@ -323,15 +323,8 @@ AudioSdl::setupWidget::setupWidget( QWidget * _parent ) : m_playbackDeviceComboBox->addItem(deviceName); } - QString playbackDevice = ConfigManager::inst()->value(c_sectionSDL, c_playbackDeviceSDL); - if (playbackDevice.isEmpty()) - { - m_playbackDeviceComboBox->setCurrentText(s_systemDefaultDevice); - } - else - { - m_playbackDeviceComboBox->setCurrentText(playbackDevice); - } + const auto playbackDevice = ConfigManager::inst()->value(SectionSDL, PlaybackDeviceSDL); + m_playbackDeviceComboBox->setCurrentText(playbackDevice.isEmpty() ? s_systemDefaultDevice : playbackDevice); #endif form->addRow(tr("Playback device"), m_playbackDeviceComboBox); @@ -349,7 +342,7 @@ AudioSdl::setupWidget::setupWidget( QWidget * _parent ) : } // Set the current device to the one in the configuration - const auto inputDevice = ConfigManager::inst()->value(c_sectionSDL, c_inputDeviceSDL); + const auto inputDevice = ConfigManager::inst()->value(SectionSDL, InputDeviceSDL); if (inputDevice.isEmpty()) { m_inputDeviceComboBox->setCurrentText(s_systemDefaultDevice); @@ -372,22 +365,22 @@ void AudioSdl::setupWidget::saveSettings() if (currentPlaybackDevice == s_systemDefaultDevice) { // Represent the default input device with an empty string - ConfigManager::inst()->setValue(c_sectionSDL, c_playbackDeviceSDL, ""); + ConfigManager::inst()->setValue(SectionSDL, PlaybackDeviceSDL, ""); } else if (!currentPlaybackDevice.isEmpty()) { - ConfigManager::inst()->setValue(c_sectionSDL, c_playbackDeviceSDL, currentPlaybackDevice); + ConfigManager::inst()->setValue(SectionSDL, PlaybackDeviceSDL, currentPlaybackDevice); } const auto currentInputDevice = m_inputDeviceComboBox->currentText(); if (currentInputDevice == s_systemDefaultDevice) { // Represent the default input device with an empty string - ConfigManager::inst()->setValue(c_sectionSDL, c_inputDeviceSDL, ""); + ConfigManager::inst()->setValue(SectionSDL, InputDeviceSDL, ""); } else if (!currentInputDevice.isEmpty()) { - ConfigManager::inst()->setValue(c_sectionSDL, c_inputDeviceSDL, currentInputDevice); + ConfigManager::inst()->setValue(SectionSDL, InputDeviceSDL, currentInputDevice); } } diff --git a/src/gui/clips/SampleClipView.cpp b/src/gui/clips/SampleClipView.cpp index faa56ceb268..0a315ec6f3f 100644 --- a/src/gui/clips/SampleClipView.cpp +++ b/src/gui/clips/SampleClipView.cpp @@ -31,6 +31,7 @@ #include #include "AudioEngine.h" +#include "ClipView.h" #include "GuiApplication.h" #include "AutomationEditor.h" #include "embed.h" @@ -63,7 +64,7 @@ SampleClipView::SampleClipView( SampleClip * _clip, TrackView * _tv ) : setStyle( QApplication::style() ); // To simplify the code we always create the widget but we do not always show it - m_recordWidget = buildRecordWidget(_clip->getRecordModel()); + m_recordWidget = buildRecordWidget(_clip->recordModel()); m_recordWidget->setVisible(recordingCapabilitiesAvailable()); adjustRecordWidget(); @@ -91,7 +92,7 @@ void SampleClipView::constructContextMenu(QMenu* cm) QAction* recordToggleAction = cm->addAction(embed::getIconPixmap("record"), tr("Toggle record"), - m_clip, SLOT(toggleRecord())); + m_clip, &SampleClip::toggleRecord); recordToggleAction->setEnabled(recordingCapabilitiesAvailable()); @@ -328,7 +329,6 @@ void SampleClipView::paintEvent( QPaintEvent * pe ) void SampleClipView::resizeEvent(QResizeEvent *event) { adjustRecordWidget(); - ClipView::resizeEvent(event); } diff --git a/src/gui/editors/SongEditor.cpp b/src/gui/editors/SongEditor.cpp index f020e58d7ae..3cc89efe95e 100644 --- a/src/gui/editors/SongEditor.cpp +++ b/src/gui/editors/SongEditor.cpp @@ -1024,8 +1024,10 @@ SongEditorWindow::SongEditorWindow(Song* song) : // In case our current audio device does not support capture, // disable the record buttons. - if(!Engine::audioEngine()->captureDeviceAvailable()) { - for (auto &recordAction : {m_recordAccompanyAction, m_recordAction}) { + if (!Engine::audioEngine()->captureDeviceAvailable()) + { + for (auto &recordAction : {m_recordAccompanyAction, m_recordAction}) + { recordAction->setEnabled(false); recordAction->setToolTip(tr("Recording is unavailable: try connecting an input device or switching backend")); } diff --git a/src/tracks/SampleTrack.cpp b/src/tracks/SampleTrack.cpp index 8f69e78d044..be7393d2736 100644 --- a/src/tracks/SampleTrack.cpp +++ b/src/tracks/SampleTrack.cpp @@ -118,7 +118,8 @@ bool SampleTrack::play( const TimePos & _start, const fpp_t _frames, f_cnt_t samplePlayLength = clipFrameLength > sampleBufferLength ? sampleBufferLength : clipFrameLength; // In case we are recoding, "play" the whole TCO. - if (sClip->isRecord()) { + if (sClip->isRecord()) + { samplePlayLength = clipFrameLength; } From 14c16bea68b86d44a309a5827f65e6a0bff524eb Mon Sep 17 00:00:00 2001 From: saker Date: Sun, 2 Jun 2024 12:00:09 -0400 Subject: [PATCH 22/38] Do not include ClipView.h --- src/gui/clips/SampleClipView.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/src/gui/clips/SampleClipView.cpp b/src/gui/clips/SampleClipView.cpp index 0a315ec6f3f..6d9c5ab9c12 100644 --- a/src/gui/clips/SampleClipView.cpp +++ b/src/gui/clips/SampleClipView.cpp @@ -31,7 +31,6 @@ #include #include "AudioEngine.h" -#include "ClipView.h" #include "GuiApplication.h" #include "AutomationEditor.h" #include "embed.h" From d8c271650c3804995c3d2bac0bad66ac9bf25fe8 Mon Sep 17 00:00:00 2001 From: Michael Gregorius Date: Fri, 14 Jun 2024 20:16:57 +0200 Subject: [PATCH 23/38] Remove recording button Remove the recording button that was added to the sample clip view with commit 48c4dce96fc. This commit simply reverts the aforementioned one. --- include/SampleClip.h | 2 - include/SampleClipView.h | 9 ---- src/gui/clips/SampleClipView.cpp | 72 +++++++++++++------------------- 3 files changed, 30 insertions(+), 53 deletions(-) diff --git a/include/SampleClip.h b/include/SampleClip.h index a07f9b9c925..3beca338bcd 100644 --- a/include/SampleClip.h +++ b/include/SampleClip.h @@ -81,8 +81,6 @@ class SampleClip : public Clip void setIsPlaying(bool isPlaying); void setSampleBuffer(std::shared_ptr sb); - BoolModel& recordModel() { return m_recordModel; } - public slots: void setSampleFile(const QString& sf); void updateLength(); diff --git a/include/SampleClipView.h b/include/SampleClipView.h index 7f7d5a302ec..0faf8c2754b 100644 --- a/include/SampleClipView.h +++ b/include/SampleClipView.h @@ -27,13 +27,10 @@ #include "ClipView.h" -class QWidget; - namespace lmms { class SampleClip; -class BoolModel; namespace gui { @@ -62,19 +59,13 @@ public slots: void dropEvent( QDropEvent * _de ) override; void mouseDoubleClickEvent( QMouseEvent * ) override; void paintEvent( QPaintEvent * ) override; - void resizeEvent(QResizeEvent *event) override; -private: - QWidget* buildRecordWidget(BoolModel& recordModel); - void adjustRecordWidget(); bool recordingCapabilitiesAvailable() const; private: SampleClip * m_clip; QPixmap m_paintPixmap; bool splitClip( const TimePos pos ) override; - - QWidget* m_recordWidget; } ; diff --git a/src/gui/clips/SampleClipView.cpp b/src/gui/clips/SampleClipView.cpp index 6d9c5ab9c12..42ab41696b9 100644 --- a/src/gui/clips/SampleClipView.cpp +++ b/src/gui/clips/SampleClipView.cpp @@ -25,8 +25,6 @@ #include "SampleClipView.h" #include -#include -#include #include #include @@ -36,7 +34,6 @@ #include "embed.h" #include "gui_templates.h" #include "PathUtil.h" -#include "PixmapButton.h" #include "SampleClip.h" #include "SampleLoader.h" #include "SampleWaveform.h" @@ -61,12 +58,6 @@ SampleClipView::SampleClipView( SampleClip * _clip, TrackView * _tv ) : connect(m_clip, SIGNAL(wasReversed()), this, SLOT(update())); setStyle( QApplication::style() ); - - // To simplify the code we always create the widget but we do not always show it - m_recordWidget = buildRecordWidget(_clip->recordModel()); - m_recordWidget->setVisible(recordingCapabilitiesAvailable()); - - adjustRecordWidget(); } void SampleClipView::updateSample() @@ -318,6 +309,36 @@ void SampleClipView::paintEvent( QPaintEvent * pe ) { p.drawLine(m_markerPos, rect().bottom(), m_markerPos, rect().top()); } + // recording sample tracks is not possible at the moment + + if (m_clip->isRecord()) + { + p.setFont(adjustedToPixelSize(p.font(), 10)); + + const auto fontHeight = p.fontMetrics().height(); + + const auto baseLine = height() - 3; + + const int recordSymbolRadius = 3; + const int recordSymbolCenterX = recordSymbolRadius + 4; + const int recordSymbolCenterY = baseLine - fontHeight / 2 + 1; + + const int textStartX = recordSymbolCenterX + recordSymbolRadius + 4; + + auto textPos = QPoint(textStartX, baseLine); + + const auto rec = tr("Rec"); + + p.setPen(textShadowColor()); + p.drawText(textPos + QPoint(1, 1), rec); + + p.setPen(textColor()); + p.drawText(textPos, rec); + + p.setBrush(QBrush(textColor())); + + p.drawEllipse(QPoint(recordSymbolCenterX, recordSymbolCenterY), recordSymbolRadius, recordSymbolRadius); + } p.end(); @@ -325,11 +346,6 @@ void SampleClipView::paintEvent( QPaintEvent * pe ) } -void SampleClipView::resizeEvent(QResizeEvent *event) -{ - adjustRecordWidget(); - ClipView::resizeEvent(event); -} void SampleClipView::reverseSample() @@ -380,34 +396,6 @@ bool SampleClipView::splitClip( const TimePos pos ) else { return false; } } -QWidget* SampleClipView::buildRecordWidget(BoolModel& recordModel) -{ - auto recordWidget = new QWidget(this); - - auto recordButton = new PixmapButton(recordWidget); - recordButton->setActiveGraphic(embed::getIconPixmap("led_red")); - recordButton->setToolTip(tr("Enable/disable recording")); - recordButton->setCheckable(true); - recordButton->setModel(&recordModel); - - auto recordLabel = new QLabel(tr("Rec"), recordWidget); - recordLabel->setFont(adjustedToPixelSize(recordLabel->font(), 10)); - - // Now layout everything - QHBoxLayout* recordLayout = new QHBoxLayout(recordWidget); - recordLayout->setContentsMargins(0, 0, 0, 0); - - recordLayout->addWidget(recordButton); - recordLayout->addWidget(recordLabel); - - return recordWidget; -} - -void SampleClipView::adjustRecordWidget() -{ - m_recordWidget->move(1, height() - m_recordWidget->height() - 1); -} - bool SampleClipView::recordingCapabilitiesAvailable() const { return Engine::audioEngine()->captureDeviceAvailable(); From 3a3c21333afd58f02f136b5f29001886b5e4186e Mon Sep 17 00:00:00 2001 From: Tres Finocchiaro Date: Fri, 14 Jun 2024 14:32:21 -0400 Subject: [PATCH 24/38] Revert wording to match MIDI recording --- src/gui/clips/SampleClipView.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gui/clips/SampleClipView.cpp b/src/gui/clips/SampleClipView.cpp index 42ab41696b9..416664d3e0f 100644 --- a/src/gui/clips/SampleClipView.cpp +++ b/src/gui/clips/SampleClipView.cpp @@ -81,7 +81,7 @@ void SampleClipView::constructContextMenu(QMenu* cm) QAction* recordToggleAction = cm->addAction(embed::getIconPixmap("record"), - tr("Toggle record"), + tr("Set/clear record"), m_clip, &SampleClip::toggleRecord); recordToggleAction->setEnabled(recordingCapabilitiesAvailable()); From c1e5de5b3b9ee2137a98b20d05f110ce7d078b28 Mon Sep 17 00:00:00 2001 From: Michael Gregorius Date: Sat, 15 Jun 2024 08:52:35 +0200 Subject: [PATCH 25/38] Code review changes * String handling * Initialize member with `nullptr` * Use `constexpr` * Remove `inline` * Fix Whitespace --- include/AudioEngine.h | 2 +- include/AudioSdl.h | 2 +- src/core/SampleRecordHandle.cpp | 2 +- src/core/audio/AudioSdl.cpp | 12 ++++++------ src/gui/clips/SampleClipView.cpp | 6 +++--- 5 files changed, 12 insertions(+), 12 deletions(-) diff --git a/include/AudioEngine.h b/include/AudioEngine.h index d4c8331d49c..a85ea5a6f20 100644 --- a/include/AudioEngine.h +++ b/include/AudioEngine.h @@ -357,7 +357,7 @@ class LMMS_EXPORT AudioEngine : public QObject AudioDevice * tryAudioDevices(); MidiClient * tryMidiClients(); - inline const AudioDevice* audioDev() const + const AudioDevice* audioDev() const { return m_audioDev; } diff --git a/include/AudioSdl.h b/include/AudioSdl.h index c8e9c4f7e81..8f5c0d92db7 100644 --- a/include/AudioSdl.h +++ b/include/AudioSdl.h @@ -66,7 +66,7 @@ class AudioSdl : public AudioDevice void saveSettings() override; private: - QComboBox* m_playbackDeviceComboBox; + QComboBox* m_playbackDeviceComboBox = nullptr; QComboBox* m_inputDeviceComboBox = nullptr; static QString s_systemDefaultDevice; diff --git a/src/core/SampleRecordHandle.cpp b/src/core/SampleRecordHandle.cpp index 9f477128c80..f7a5bebefb2 100644 --- a/src/core/SampleRecordHandle.cpp +++ b/src/core/SampleRecordHandle.cpp @@ -54,7 +54,7 @@ SampleRecordHandle::~SampleRecordHandle() { if (!m_buffers.empty()) { m_clip->setSampleBuffer(createSampleBuffer()); } - m_clip->setStartTimeOffset(m_startRecordTimeOffset); + m_clip->setStartTimeOffset(m_startRecordTimeOffset); while( !m_buffers.empty() ) { diff --git a/src/core/audio/AudioSdl.cpp b/src/core/audio/AudioSdl.cpp index 0904606a051..60bc41f6542 100644 --- a/src/core/audio/AudioSdl.cpp +++ b/src/core/audio/AudioSdl.cpp @@ -82,11 +82,11 @@ AudioSdl::AudioSdl( bool & _success_ful, AudioEngine* _audioEngine ) : SDL_AudioSpec actual; #ifdef LMMS_HAVE_SDL2 - const auto playbackDevice = ConfigManager::inst()->value(SectionSDL, PlaybackDeviceSDL); - const bool isDefaultPlayback = playbackDevice.isEmpty(); + const auto playbackDevice = ConfigManager::inst()->value(SectionSDL, PlaybackDeviceSDL).toStdString(); + const bool isDefaultPlayback = playbackDevice.empty(); // Try with the configured device - const auto playbackDeviceCStr = isDefaultPlayback ? nullptr : playbackDevice.toLocal8Bit().data(); + const auto playbackDeviceCStr = isDefaultPlayback ? nullptr : playbackDevice.c_str(); m_outputDevice = SDL_OpenAudioDevice(playbackDeviceCStr, 0, &m_audioHandle, &actual, 0); // If we did not get a device ID try again with the default device if we did not try that before @@ -120,11 +120,11 @@ AudioSdl::AudioSdl( bool & _success_ful, AudioEngine* _audioEngine ) : m_inputAudioHandle = m_audioHandle; m_inputAudioHandle.callback = sdlInputAudioCallback; - const auto inputDevice = ConfigManager::inst()->value(SectionSDL, InputDeviceSDL); - const bool isDefaultInput = inputDevice.isEmpty(); + const auto inputDevice = ConfigManager::inst()->value(SectionSDL, InputDeviceSDL).toStdString(); + const bool isDefaultInput = inputDevice.empty(); // Try with the configured device - const auto inputDeviceCStr = isDefaultInput ? nullptr : inputDevice.toLocal8Bit().data(); + const auto inputDeviceCStr = isDefaultInput ? nullptr : inputDevice.c_str(); m_inputDevice = SDL_OpenAudioDevice (inputDeviceCStr, 1, &m_inputAudioHandle, &actual, 0); // If we did not get a device ID try again with the default device if we did not try that before diff --git a/src/gui/clips/SampleClipView.cpp b/src/gui/clips/SampleClipView.cpp index 416664d3e0f..1d4d9b78a71 100644 --- a/src/gui/clips/SampleClipView.cpp +++ b/src/gui/clips/SampleClipView.cpp @@ -319,11 +319,11 @@ void SampleClipView::paintEvent( QPaintEvent * pe ) const auto baseLine = height() - 3; - const int recordSymbolRadius = 3; - const int recordSymbolCenterX = recordSymbolRadius + 4; + constexpr int recordSymbolRadius = 3; + constexpr int recordSymbolCenterX = recordSymbolRadius + 4; const int recordSymbolCenterY = baseLine - fontHeight / 2 + 1; - const int textStartX = recordSymbolCenterX + recordSymbolRadius + 4; + constexpr int textStartX = recordSymbolCenterX + recordSymbolRadius + 4; auto textPos = QPoint(textStartX, baseLine); From a1675e4e72da8d37ebb17d13322cf98ad7b6ffcc Mon Sep 17 00:00:00 2001 From: Michael Gregorius Date: Fri, 31 May 2024 23:39:09 +0200 Subject: [PATCH 26/38] Adjust rendering of BarModelEditor (#7299) Adjust the rendering of BarModelEditor to make it respect logarithmic and linear models. The code now uses `inverseScaledValue` instead of `value` just like the `Knob` class does when calculating the angle. --- src/gui/widgets/BarModelEditor.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gui/widgets/BarModelEditor.cpp b/src/gui/widgets/BarModelEditor.cpp index 4b02c963461..ae224530d7a 100644 --- a/src/gui/widgets/BarModelEditor.cpp +++ b/src/gui/widgets/BarModelEditor.cpp @@ -86,7 +86,7 @@ void BarModelEditor::paintEvent(QPaintEvent *event) // Paint the bar // Compute the percentage as: // min + x * (max - min) = v <=> x = (v - min) / (max - min) - auto const percentage = range == 0 ? 1. : (mod->value() - minValue) / range; + auto const percentage = range == 0 ? 1. : (model()->inverseScaledValue(model()->value()) - minValue) / range; int const margin = 3; QMargins const margins(margin, margin, margin, margin); From 568abeddcfff2db7e53d909c07787137f72a95e1 Mon Sep 17 00:00:00 2001 From: Michael Gregorius Date: Sat, 1 Jun 2024 12:09:47 +0200 Subject: [PATCH 27/38] Add peak indicators (#7295) Add peak indicators to the mixer strips. They show the maximum peak value that was observed and can be reset by clicking on them. ## Implementation details The implementation works via a signal/slot mechanism. The `Fader` class has a new signal `peakChanged` which reports peak values as amplifications. A new class `PeakIndicator` is added which has a slot `updatePeak` which is connected to the new signal in `Fader`. The `PeakIndicator` inherits from `QLabel` and mainly deals with updating the label text from the current peak value. Add a `PeakIndicator` instance to `MixerChannelView`. Add a `reset` method to `MixerChannelView` so that the mixer channel can be reset on the loading of new projects, etc. The current implementation resets the peak indicator back to -inf dbFS. The `reset` method is called in `MixerView::clear`. Remove the clamping in `Fader::setPeak` so that all peaks are reported. Emit the new signal if the peak changes. --- data/themes/classic/style.css | 5 ++ data/themes/default/style.css | 5 ++ include/Fader.h | 3 ++ include/MixerChannelView.h | 5 ++ include/PeakIndicator.h | 60 ++++++++++++++++++++++ src/gui/CMakeLists.txt | 1 + src/gui/MixerChannelView.cpp | 10 ++++ src/gui/MixerView.cpp | 2 + src/gui/widgets/Fader.cpp | 4 +- src/gui/widgets/PeakIndicator.cpp | 84 +++++++++++++++++++++++++++++++ 10 files changed, 177 insertions(+), 2 deletions(-) create mode 100644 include/PeakIndicator.h create mode 100644 src/gui/widgets/PeakIndicator.cpp diff --git a/data/themes/classic/style.css b/data/themes/classic/style.css index 5489a7d215f..95737ed3afe 100644 --- a/data/themes/classic/style.css +++ b/data/themes/classic/style.css @@ -661,6 +661,11 @@ lmms--gui--MixerChannelView QGraphicsView { border-style: none; } +lmms--gui--PeakIndicator { + background-color: #111811; + font-size: 7pt; +} + /* persistent peak markers for fx peak meters */ lmms--gui--Fader { qproperty-peakOk: rgb( 74, 253, 133); diff --git a/data/themes/default/style.css b/data/themes/default/style.css index a4f94de0909..ef98c060999 100644 --- a/data/themes/default/style.css +++ b/data/themes/default/style.css @@ -710,6 +710,11 @@ lmms--gui--MixerChannelView QGraphicsView { border-style: none; } +lmms--gui--PeakIndicator { + background-color: #111811; + font-size: 7pt; +} + /* persistent peak markers for fx peak meters */ lmms--gui--Fader { qproperty-peakOk: #0ad45c; diff --git a/include/Fader.h b/include/Fader.h index a3158a8b436..53e353a3dc5 100644 --- a/include/Fader.h +++ b/include/Fader.h @@ -105,6 +105,9 @@ class LMMS_EXPORT Fader : public QWidget, public FloatModelView setUnit(txt_after); } +signals: + void peakChanged(float peak); + private: void contextMenuEvent(QContextMenuEvent* me) override; void mousePressEvent(QMouseEvent* ev) override; diff --git a/include/MixerChannelView.h b/include/MixerChannelView.h index cbaf0ccc6b4..7ccb8a24f23 100644 --- a/include/MixerChannelView.h +++ b/include/MixerChannelView.h @@ -45,6 +45,8 @@ namespace lmms namespace lmms::gui { + class PeakIndicator; + constexpr int MIXER_CHANNEL_INNER_BORDER_SIZE = 3; constexpr int MIXER_CHANNEL_OUTER_BORDER_SIZE = 1; @@ -90,6 +92,8 @@ namespace lmms::gui QColor strokeInnerInactive() const; void setStrokeInnerInactive(const QColor& c); + void reset(); + public slots: void renameChannel(); void resetColor(); @@ -119,6 +123,7 @@ namespace lmms::gui QLabel* m_receiveArrow; PixmapButton* m_muteButton; PixmapButton* m_soloButton; + PeakIndicator* m_peakIndicator = nullptr; Fader* m_fader; EffectRackView* m_effectRackView; MixerView* m_mixerView; diff --git a/include/PeakIndicator.h b/include/PeakIndicator.h new file mode 100644 index 00000000000..2bc91229274 --- /dev/null +++ b/include/PeakIndicator.h @@ -0,0 +1,60 @@ +/* + * PeakIndicator.h - Peak indicator widget + * + * Copyright (c) 2024- Michael Gregorius + * + * This file is part of LMMS - https://lmms.io + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this program (see COPYING); if not, write to the + * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301 USA. + * + */ + + +#ifndef LMMS_GUI_PEAKINDICATOR_H +#define LMMS_GUI_PEAKINDICATOR_H + +#include "lmms_export.h" + +#include + + +namespace lmms::gui +{ + +class LMMS_EXPORT PeakIndicator : public QLabel +{ + Q_OBJECT +public: + PeakIndicator(QWidget* parent); + + void resetPeakToMinusInf(); + +public slots: + void updatePeak(float peak); + +protected: + void mousePressEvent(QMouseEvent* e) override; + +private: + void updatePeakDisplay(); + +private: + float m_peak; +} ; + +} // namespace lmms::gui + +#endif // LMMS_GUI_PEAKINDICATOR_H diff --git a/src/gui/CMakeLists.txt b/src/gui/CMakeLists.txt index 2485b92d2a2..4195ec58c1a 100644 --- a/src/gui/CMakeLists.txt +++ b/src/gui/CMakeLists.txt @@ -117,6 +117,7 @@ SET(LMMS_SRCS gui/widgets/MixerChannelLcdSpinBox.cpp gui/widgets/NStateButton.cpp gui/widgets/Oscilloscope.cpp + gui/widgets/PeakIndicator.cpp gui/widgets/PixmapButton.cpp gui/widgets/SimpleTextFloat.cpp gui/widgets/TabBar.cpp diff --git a/src/gui/MixerChannelView.cpp b/src/gui/MixerChannelView.cpp index 0afdb684e78..2a1fe09289e 100644 --- a/src/gui/MixerChannelView.cpp +++ b/src/gui/MixerChannelView.cpp @@ -28,6 +28,7 @@ #include "Mixer.h" #include "MixerChannelView.h" #include "MixerView.h" +#include "PeakIndicator.h" #include "Song.h" #include "ConfigManager.h" @@ -121,6 +122,9 @@ namespace lmms::gui m_fader = new Fader{&mixerChannel->m_volumeModel, tr("Fader %1").arg(channelIndex), this}; + m_peakIndicator = new PeakIndicator(this); + connect(m_fader, &Fader::peakChanged, m_peakIndicator, &PeakIndicator::updatePeak); + m_effectRackView = new EffectRackView{&mixerChannel->m_fxChain, mixerView->m_racksWidget}; m_effectRackView->setFixedWidth(EffectRackView::DEFAULT_WIDTH); @@ -133,6 +137,7 @@ namespace lmms::gui mainLayout->addWidget(m_channelNumberLcd, 0, Qt::AlignHCenter); mainLayout->addWidget(m_renameLineEditView, 0, Qt::AlignHCenter); mainLayout->addLayout(soloMuteLayout, 0); + mainLayout->addWidget(m_peakIndicator); mainLayout->addWidget(m_fader, 1, Qt::AlignHCenter); connect(m_renameLineEdit, &QLineEdit::editingFinished, this, &MixerChannelView::renameFinished); @@ -340,6 +345,11 @@ namespace lmms::gui m_strokeInnerInactive = c; } + void MixerChannelView::reset() + { + m_peakIndicator->resetPeakToMinusInf(); + } + void MixerChannelView::renameChannel() { m_inRename = true; diff --git a/src/gui/MixerView.cpp b/src/gui/MixerView.cpp index b9a698a96c6..8152509f86a 100644 --- a/src/gui/MixerView.cpp +++ b/src/gui/MixerView.cpp @@ -544,6 +544,8 @@ void MixerView::clear() for (auto i = m_mixerChannelViews.size() - 1; i > 0; --i) { deleteChannel(i); } getMixer()->clearChannel(0); + m_mixerChannelViews[0]->reset(); + refreshDisplay(); } diff --git a/src/gui/widgets/Fader.cpp b/src/gui/widgets/Fader.cpp index d2d7c1c2ea9..24b16bfe482 100644 --- a/src/gui/widgets/Fader.cpp +++ b/src/gui/widgets/Fader.cpp @@ -207,8 +207,6 @@ void Fader::wheelEvent (QWheelEvent* ev) /// void Fader::setPeak(float fPeak, float& targetPeak, float& persistentPeak, QElapsedTimer& lastPeakTimer) { - fPeak = std::clamp(fPeak, m_fMinPeak, m_fMaxPeak); - if (targetPeak != fPeak) { targetPeak = fPeak; @@ -216,6 +214,7 @@ void Fader::setPeak(float fPeak, float& targetPeak, float& persistentPeak, QElap { persistentPeak = targetPeak; lastPeakTimer.restart(); + emit peakChanged(persistentPeak); } update(); } @@ -223,6 +222,7 @@ void Fader::setPeak(float fPeak, float& targetPeak, float& persistentPeak, QElap if (persistentPeak > 0 && lastPeakTimer.elapsed() > 1500) { persistentPeak = qMax(0, persistentPeak-0.05); + emit peakChanged(persistentPeak); update(); } } diff --git a/src/gui/widgets/PeakIndicator.cpp b/src/gui/widgets/PeakIndicator.cpp new file mode 100644 index 00000000000..e1278b7ff2d --- /dev/null +++ b/src/gui/widgets/PeakIndicator.cpp @@ -0,0 +1,84 @@ +/* + * PeakIndicator.cpp - Peak indicator widget + * + * Copyright (c) 2024- Michael Gregorius + * + * This file is part of LMMS - https://lmms.io + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this program (see COPYING); if not, write to the + * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301 USA. + * + */ + +#include "PeakIndicator.h" + +#include "lmms_math.h" + +#include +#include + + +namespace lmms::gui +{ + +PeakIndicator::PeakIndicator(QWidget* parent) : + QLabel(parent), + m_peak(0.f) +{ + setAlignment(Qt::AlignCenter); + + updatePeakDisplay(); +} + +void PeakIndicator::resetPeakToMinusInf() +{ + m_peak = 0; + updatePeakDisplay(); +} + +void PeakIndicator::updatePeak(float peak) +{ + if (peak > m_peak) + { + m_peak = peak; + updatePeakDisplay(); + } +} + +void PeakIndicator::mousePressEvent(QMouseEvent* e) +{ + if (e->buttons() & Qt::LeftButton) + { + resetPeakToMinusInf(); + } +} + +void PeakIndicator::updatePeakDisplay() +{ + // Treat everything below -144 dbFS as -inf. Otherwise some residual signals show up + // in the form of very small dbFS values, e.g. -857.1 dbFS. + // TODO Make the threshold configurable in the settings? + if (m_peak <= dbfsToAmp(-144.)) + { + setText(tr("-inf")); + } + else + { + auto dbfs = ampToDbfs(m_peak); + setText(QString::number(dbfs, 'f', 1)); + } +} + +} // namespace lmms::gui From fbcf4361763285859bab37c9496d145c54dacb06 Mon Sep 17 00:00:00 2001 From: Andrew Wiltshire <62200778+AW1534@users.noreply.github.com> Date: Sat, 1 Jun 2024 16:23:21 +0100 Subject: [PATCH 28/38] Change the wording of Instrument Plugin Dialogue (#7301) Drag an instrument into either the Song Editor, the Pattern Editor or ~~into~~ an existing instrument track. The word "into" seems redundant --- src/gui/PluginBrowser.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gui/PluginBrowser.cpp b/src/gui/PluginBrowser.cpp index 963609c431c..2594bdab374 100644 --- a/src/gui/PluginBrowser.cpp +++ b/src/gui/PluginBrowser.cpp @@ -62,7 +62,7 @@ PluginBrowser::PluginBrowser( QWidget * _parent ) : auto hint = new QLabel( tr( "Drag an instrument " "into either the Song Editor, the " - "Pattern Editor or into an " + "Pattern Editor or an " "existing instrument track." ), m_view ); hint->setWordWrap( true ); From 6ee0d9b010c5949d11e364baccd04c2208fa8311 Mon Sep 17 00:00:00 2001 From: Rossmaxx <74815851+Rossmaxx@users.noreply.github.com> Date: Sun, 2 Jun 2024 15:22:51 +0530 Subject: [PATCH 29/38] Modernize compiler and linker flags (#7255) --- CMakeLists.txt | 2 +- cmake/modules/BuildPlugin.cmake | 2 +- plugins/GigPlayer/CMakeLists.txt | 6 ++-- plugins/LadspaEffect/caps/CMakeLists.txt | 9 ------ plugins/LadspaEffect/swh/CMakeLists.txt | 28 +++++++++---------- .../VstBase/RemoteVstPlugin/CMakeLists.txt | 5 +--- plugins/ZynAddSubFx/CMakeLists.txt | 4 +-- 7 files changed, 21 insertions(+), 35 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 1da10775ba7..fbd9cdfcf1b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,4 +1,4 @@ -CMAKE_MINIMUM_REQUIRED(VERSION 3.9) +CMAKE_MINIMUM_REQUIRED(VERSION 3.13) # Set the given policy to NEW. If it does not exist, it will not be set. If it # is already set to NEW (most likely due to predating the minimum required CMake diff --git a/cmake/modules/BuildPlugin.cmake b/cmake/modules/BuildPlugin.cmake index aaccd3c4b34..69af41ecb12 100644 --- a/cmake/modules/BuildPlugin.cmake +++ b/cmake/modules/BuildPlugin.cmake @@ -60,7 +60,7 @@ MACRO(BUILD_PLUGIN PLUGIN_NAME) IF(LMMS_BUILD_APPLE) IF ("${PLUGIN_LINK}" STREQUAL "SHARED") - SET_TARGET_PROPERTIES(${PLUGIN_NAME} PROPERTIES LINK_FLAGS "-undefined dynamic_lookup") + TARGET_LINK_OPTIONS(${PLUGIN_NAME} PRIVATE -undefined dynamic_lookup) ENDIF() ENDIF(LMMS_BUILD_APPLE) IF(LMMS_BUILD_WIN32) diff --git a/plugins/GigPlayer/CMakeLists.txt b/plugins/GigPlayer/CMakeLists.txt index 6ec8fe1692c..92c80fedceb 100644 --- a/plugins/GigPlayer/CMakeLists.txt +++ b/plugins/GigPlayer/CMakeLists.txt @@ -4,13 +4,11 @@ if(LMMS_HAVE_GIG) SET(CMAKE_AUTOUIC ON) # Required for not crashing loading files with libgig - SET(GCC_COVERAGE_COMPILE_FLAGS "-fexceptions") - add_definitions(${GCC_COVERAGE_COMPILE_FLAGS}) + add_compile_options("-fexceptions") # disable deprecated check for mingw-x-libgig if(LMMS_BUILD_WIN32) - SET(GCC_GIG_COMPILE_FLAGS "-Wno-deprecated") - add_definitions(${GCC_GIG_COMPILE_FLAGS}) + add_compile_options("-Wno-deprecated") endif(LMMS_BUILD_WIN32) link_directories(${GIG_LIBRARY_DIRS}) diff --git a/plugins/LadspaEffect/caps/CMakeLists.txt b/plugins/LadspaEffect/caps/CMakeLists.txt index f82fa5ab083..ea2c1b7e9f6 100644 --- a/plugins/LadspaEffect/caps/CMakeLists.txt +++ b/plugins/LadspaEffect/caps/CMakeLists.txt @@ -27,12 +27,3 @@ IF(LMMS_BUILD_WIN32) COMMAND_EXPAND_LISTS ) ENDIF(LMMS_BUILD_WIN32) - -IF(NOT LMMS_BUILD_APPLE AND NOT LMMS_BUILD_OPENBSD) - SET_TARGET_PROPERTIES(caps PROPERTIES LINK_FLAGS "${LINK_FLAGS} -shared -Wl,-no-undefined") -ENDIF(NOT LMMS_BUILD_APPLE AND NOT LMMS_BUILD_OPENBSD) - -IF(LMMS_BUILD_LINUX) - SET_TARGET_PROPERTIES(caps PROPERTIES LINK_FLAGS "${LINK_FLAGS}") -ENDIF(LMMS_BUILD_LINUX) - diff --git a/plugins/LadspaEffect/swh/CMakeLists.txt b/plugins/LadspaEffect/swh/CMakeLists.txt index 3847429d342..c71572bd2e0 100644 --- a/plugins/LadspaEffect/swh/CMakeLists.txt +++ b/plugins/LadspaEffect/swh/CMakeLists.txt @@ -5,16 +5,17 @@ FILE(WRITE ladspa/config.h "") IF(LMMS_BUILD_WIN32) SET(PIC_FLAGS "") ELSE() - SET(PIC_FLAGS "-fPIC -DPIC") + SET(PIC_FLAGS -fPIC -DPIC) ENDIF() # Additional compile flags if(MSVC) - set(COMPILE_FLAGS "${COMPILE_FLAGS} /wd4244 /wd4273 /wd4305") + set(COMPILE_FLAGS ${COMPILE_FLAGS} /wd4244 /wd4273 /wd4305) else() - set(COMPILE_FLAGS "${COMPILE_FLAGS} -O3 -Wall") - set(COMPILE_FLAGS "${COMPILE_FLAGS} -fomit-frame-pointer -funroll-loops -ffast-math -c -fno-strict-aliasing") - set(COMPILE_FLAGS "${COMPILE_FLAGS} ${PIC_FLAGS}") + set(COMPILE_FLAGS ${COMPILE_FLAGS} -O3 -Wall -c + -fomit-frame-pointer -funroll-loops -ffast-math -fno-strict-aliasing + ${PIC_FLAGS} + ) endif() # Loop over every XML file @@ -61,8 +62,7 @@ FOREACH(_item ${XML_SOURCES}) endif(LMMS_BUILD_WIN32) SET_TARGET_PROPERTIES("${_plugin}" PROPERTIES PREFIX "") - SET_TARGET_PROPERTIES("${_plugin}" PROPERTIES COMPILE_FLAGS "${COMPILE_FLAGS}") - SET_TARGET_PROPERTIES("${_plugin}" PROPERTIES LINK_FLAGS "${LINK_FLAGS}") + target_compile_options("${_plugin}" PRIVATE "${COMPILE_FLAGS}") INSTALL(TARGETS "${_plugin}" LIBRARY DESTINATION "${PLUGIN_DIR}/ladspa") ENDFOREACH() @@ -75,7 +75,7 @@ INCLUDE_DIRECTORIES( ) ADD_LIBRARY(iir STATIC ladspa/util/iir.c) -SET_TARGET_PROPERTIES(iir PROPERTIES COMPILE_FLAGS "${PIC_FLAGS}") +target_compile_options(iir PRIVATE "${PIC_FLAGS}") TARGET_LINK_LIBRARIES(bandpass_a_iir_1893 iir) TARGET_LINK_LIBRARIES(bandpass_iir_1892 iir) TARGET_LINK_LIBRARIES(butterworth_1902 iir) @@ -86,23 +86,23 @@ TARGET_LINK_LIBRARIES(notch_iir_1894 iir) FILE(GLOB GSM_SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/ladspa/gsm/*.c") LIST(SORT GSM_SOURCES) ADD_LIBRARY(gsm STATIC ${GSM_SOURCES}) -SET_TARGET_PROPERTIES(gsm PROPERTIES COMPILE_FLAGS "${PIC_FLAGS}") +target_compile_options(gsm PRIVATE "${PIC_FLAGS}") TARGET_LINK_LIBRARIES(gsm_1215 gsm) ADD_LIBRARY(gverb STATIC ladspa/gverb/gverb.c ladspa/gverb/gverbdsp.c) -SET_TARGET_PROPERTIES(gverb PROPERTIES COMPILE_FLAGS "${PIC_FLAGS}") +target_compile_options(gverb PRIVATE "${PIC_FLAGS}") TARGET_LINK_LIBRARIES(gverb_1216 gverb) ADD_LIBRARY(blo STATIC ladspa/util/blo.c) -SET_TARGET_PROPERTIES(blo PROPERTIES COMPILE_FLAGS "${PIC_FLAGS}") +target_compile_options(blo PRIVATE "${PIC_FLAGS}") TARGET_LINK_LIBRARIES(analogue_osc_1416 blo) TARGET_LINK_LIBRARIES(fm_osc_1415 blo) TARGET_LINK_LIBRARIES(hermes_filter_1200 blo) ADD_LIBRARY(rms STATIC ladspa/util/rms.c) ADD_LIBRARY(db STATIC ladspa/util/db.c) -SET_TARGET_PROPERTIES(rms PROPERTIES COMPILE_FLAGS "${PIC_FLAGS}") -SET_TARGET_PROPERTIES(db PROPERTIES COMPILE_FLAGS "${PIC_FLAGS}") +target_compile_options(rms PRIVATE "${PIC_FLAGS}") +target_compile_options(db PRIVATE "${PIC_FLAGS}") TARGET_LINK_LIBRARIES(sc1_1425 rms db) TARGET_LINK_LIBRARIES(sc2_1426 rms db) TARGET_LINK_LIBRARIES(sc3_1427 rms db) @@ -111,7 +111,7 @@ TARGET_LINK_LIBRARIES(sc4m_1916 rms db) TARGET_LINK_LIBRARIES(se4_1883 rms db) ADD_LIBRARY(pitchscale STATIC ladspa/util/pitchscale.c) -SET_TARGET_PROPERTIES(pitchscale PROPERTIES COMPILE_FLAGS "${PIC_FLAGS}") +target_compile_options(pitchscale PRIVATE "${PIC_FLAGS}") TARGET_LINK_LIBRARIES(pitchscale ${FFTW3F_LIBRARIES}) TARGET_LINK_LIBRARIES(pitch_scale_1193 pitchscale) TARGET_LINK_LIBRARIES(pitch_scale_1194 pitchscale) diff --git a/plugins/VstBase/RemoteVstPlugin/CMakeLists.txt b/plugins/VstBase/RemoteVstPlugin/CMakeLists.txt index c75b95ab780..5bcf9f065da 100644 --- a/plugins/VstBase/RemoteVstPlugin/CMakeLists.txt +++ b/plugins/VstBase/RemoteVstPlugin/CMakeLists.txt @@ -61,10 +61,7 @@ target_compile_definitions(${EXE_NAME} PRIVATE BUILD_REMOTE_PLUGIN_CLIENT) # Workaround for missing WinMain if(MSVC) - set_property(TARGET ${EXE_NAME} - APPEND - PROPERTY LINK_FLAGS "/entry:mainCRTStartup" -) + target_link_options(${EXE_NAME} PRIVATE "/entry:mainCRTStartup") endif() if(IS_MINGW) diff --git a/plugins/ZynAddSubFx/CMakeLists.txt b/plugins/ZynAddSubFx/CMakeLists.txt index 35dc08c4dbc..0f6af20eec0 100644 --- a/plugins/ZynAddSubFx/CMakeLists.txt +++ b/plugins/ZynAddSubFx/CMakeLists.txt @@ -164,8 +164,8 @@ SET_PROPERTY(GLOBAL APPEND PROPERTY PLUGINS_BUILT "RemoteZynAddSubFx") TARGET_COMPILE_DEFINITIONS(RemoteZynAddSubFx PRIVATE BUILD_REMOTE_PLUGIN_CLIENT) IF(LMMS_BUILD_WIN32) - SET_TARGET_PROPERTIES(RemoteZynAddSubFx PROPERTIES LINK_FLAGS "${LINK_FLAGS} -mwindows") -ENDIF(LMMS_BUILD_WIN32) + target_link_options(RemoteZynAddSubFx PRIVATE "-mwindows") +ENDIF() # Remove useless dependencies from FLTK. Use fltk-config to avoid static library # in older environments From d356b7168961547a8889f2ccd25278969f395f06 Mon Sep 17 00:00:00 2001 From: Lost Robot <34612565+LostRobotMusic@users.noreply.github.com> Date: Thu, 13 Jun 2024 15:18:36 -0700 Subject: [PATCH 30/38] Fix noise generator (#7318) This noise generator doesn't work properly when multiple noise sources are being generated simultaneously. --- include/Oscillator.h | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/include/Oscillator.h b/include/Oscillator.h index ea0227bd0e9..e7eccea50ca 100644 --- a/include/Oscillator.h +++ b/include/Oscillator.h @@ -163,11 +163,7 @@ class LMMS_EXPORT Oscillator static inline sample_t noiseSample( const float ) { - // Precise implementation -// return 1.0f - rand() * 2.0f / RAND_MAX; - - // Fast implementation - return 1.0f - fast_rand() * 2.0f / FAST_RAND_MAX; + return 1.0f - rand() * 2.0f / RAND_MAX; } static sample_t userWaveSample(const SampleBuffer* buffer, const float sample) From bb0317821d5328b0b0b7eb9c3bdcd5be48e01561 Mon Sep 17 00:00:00 2001 From: Michael Gregorius Date: Fri, 14 Jun 2024 16:22:39 +0200 Subject: [PATCH 31/38] Add support for "factorysample:" prefix / Fix "bassloopes" typo (#7236) ## Add support for "factorysample:" prefix Add support to upgrade files with `src` tags that are prefixed with "factorysample:". ## Fix "bassloopes" typo Fix projects that still reference files with the typo "bassloopes" in their name. The upgrade is implemented in its own method because it is unrelated to the BPM renaming even if it is technically very similar in its solution. Introduce the helper method `mapSrcAttributeInElementsWithResources` which replaces the `src` attribute in elements with resources (samples and AFP) if it can be found in a map. --- include/DataFile.h | 3 + src/core/DataFile.cpp | 148 +++++++++++++++++++++++++++--------------- 2 files changed, 97 insertions(+), 54 deletions(-) diff --git a/include/DataFile.h b/include/DataFile.h index 452481a7f00..5005c11bc3c 100644 --- a/include/DataFile.h +++ b/include/DataFile.h @@ -101,6 +101,8 @@ class LMMS_EXPORT DataFile : public QDomDocument void cleanMetaNodes( QDomElement de ); + void mapSrcAttributeInElementsWithResources(const QMap& map); + // helper upgrade routines void upgrade_0_2_1_20070501(); void upgrade_0_2_1_20070508(); @@ -130,6 +132,7 @@ class LMMS_EXPORT DataFile : public QDomDocument void upgrade_loopsRename(); void upgrade_noteTypes(); void upgrade_fixCMTDelays(); + void upgrade_fixBassLoopsTypo(); // List of all upgrade methods static const std::vector UPGRADE_METHODS; diff --git a/src/core/DataFile.cpp b/src/core/DataFile.cpp index e048b5e9e53..6ede7bb7db0 100644 --- a/src/core/DataFile.cpp +++ b/src/core/DataFile.cpp @@ -84,7 +84,7 @@ const std::vector DataFile::UPGRADE_METHODS = { &DataFile::upgrade_mixerRename , &DataFile::upgrade_bbTcoRename, &DataFile::upgrade_sampleAndHold , &DataFile::upgrade_midiCCIndexing, &DataFile::upgrade_loopsRename , &DataFile::upgrade_noteTypes, - &DataFile::upgrade_fixCMTDelays + &DataFile::upgrade_fixCMTDelays , &DataFile::upgrade_fixBassLoopsTypo, }; // Vector of all versions that have upgrade routines. @@ -650,6 +650,32 @@ void DataFile::cleanMetaNodes( QDomElement _de ) } } +void DataFile::mapSrcAttributeInElementsWithResources(const QMap& map) +{ + for (const auto& [elem, srcAttrs] : ELEMENTS_WITH_RESOURCES) + { + auto elements = elementsByTagName(elem); + + for (const auto& srcAttr : srcAttrs) + { + for (int i = 0; i < elements.length(); ++i) + { + auto item = elements.item(i).toElement(); + + if (item.isNull() || !item.hasAttribute(srcAttr)) { continue; } + + const QString srcVal = item.attribute(srcAttr); + + const auto it = map.constFind(srcVal); + if (it != map.constEnd()) + { + item.setAttribute(srcAttr, *it); + } + } + } + } +} + void DataFile::upgrade_0_2_1_20070501() { @@ -1881,68 +1907,64 @@ void DataFile::upgrade_sampleAndHold() } -// Change loops' filenames in s -void DataFile::upgrade_loopsRename() +static QMap buildReplacementMap() { - auto createEntry = [](const QString& originalName, const QString& bpm, const QString& extension = "ogg") - { - const QString replacement = originalName + " - " + bpm + " BPM." + extension; - return std::pair{originalName + "." + extension, replacement}; + static constexpr auto loopBPMs = std::array{ + std::pair{"bassloops/briff01", "140"}, + std::pair{"bassloops/briff01", "140"}, + std::pair{"bassloops/rave_bass01", "180"}, + std::pair{"bassloops/rave_bass02", "180"}, + std::pair{"bassloops/tb303_01", "123"}, + std::pair{"bassloops/techno_bass01", "140"}, + std::pair{"bassloops/techno_bass02", "140"}, + std::pair{"bassloops/techno_synth01", "140"}, + std::pair{"bassloops/techno_synth02", "140"}, + std::pair{"bassloops/techno_synth03", "130"}, + std::pair{"bassloops/techno_synth04", "140"}, + std::pair{"beats/909beat01", "122"}, + std::pair{"beats/break01", "168"}, + std::pair{"beats/break02", "141"}, + std::pair{"beats/break03", "168"}, + std::pair{"beats/electro_beat01", "120"}, + std::pair{"beats/electro_beat02", "119"}, + std::pair{"beats/house_loop01", "142"}, + std::pair{"beats/jungle01", "168"}, + std::pair{"beats/rave_hihat01", "180"}, + std::pair{"beats/rave_hihat02", "180"}, + std::pair{"beats/rave_kick01", "180"}, + std::pair{"beats/rave_kick02", "180"}, + std::pair{"beats/rave_snare01", "180"}, + std::pair{"latin/latin_brass01", "140"}, + std::pair{"latin/latin_guitar01", "126"}, + std::pair{"latin/latin_guitar02", "140"}, + std::pair{"latin/latin_guitar03", "120"}, }; - static const QMap namesToNamesWithBPMsMap { - { createEntry("bassloops/briff01", "140") }, - { createEntry("bassloops/rave_bass01", "180") }, - { createEntry("bassloops/rave_bass02", "180") }, - { createEntry("bassloops/tb303_01", "123") }, - { createEntry("bassloops/techno_bass01", "140") }, - { createEntry("bassloops/techno_bass02", "140") }, - { createEntry("bassloops/techno_synth01", "140") }, - { createEntry("bassloops/techno_synth02", "140") }, - { createEntry("bassloops/techno_synth03", "130") }, - { createEntry("bassloops/techno_synth04", "140") }, - { createEntry("beats/909beat01", "122") }, - { createEntry("beats/break01", "168") }, - { createEntry("beats/break02", "141") }, - { createEntry("beats/break03", "168") }, - { createEntry("beats/electro_beat01", "120") }, - { createEntry("beats/electro_beat02", "119") }, - { createEntry("beats/house_loop01", "142") }, - { createEntry("beats/jungle01", "168") }, - { createEntry("beats/rave_hihat01", "180") }, - { createEntry("beats/rave_hihat02", "180") }, - { createEntry("beats/rave_kick01", "180") }, - { createEntry("beats/rave_kick02", "180") }, - { createEntry("beats/rave_snare01", "180") }, - { createEntry("latin/latin_brass01", "140") }, - { createEntry("latin/latin_guitar01", "126") }, - { createEntry("latin/latin_guitar02", "140") }, - { createEntry("latin/latin_guitar03", "120") } - }; + QMap namesToNamesWithBPMsMap; - // Replace loop sample names - for (const auto& [elem, srcAttrs] : ELEMENTS_WITH_RESOURCES) + auto insertEntry = [&namesToNamesWithBPMsMap](const QString& originalName, const QString& bpm, const QString& prefix = "", const QString& extension = "ogg") { - auto elements = elementsByTagName(elem); + const QString original = prefix + originalName + "." + extension; + const QString replacement = prefix + originalName + " - " + bpm + " BPM." + extension; - for (const auto& srcAttr : srcAttrs) - { - for (int i = 0; i < elements.length(); ++i) - { - auto item = elements.item(i).toElement(); + namesToNamesWithBPMsMap.insert(original, replacement); + }; - if (item.isNull() || !item.hasAttribute(srcAttr)) { continue; } + for (const auto & loopBPM : loopBPMs) + { + insertEntry(loopBPM.first, loopBPM.second); + insertEntry(loopBPM.first, loopBPM.second, "factorysample:"); + } - const QString srcVal = item.attribute(srcAttr); + return namesToNamesWithBPMsMap; +} - const auto it = namesToNamesWithBPMsMap.constFind(srcVal); - if (it != namesToNamesWithBPMsMap.constEnd()) - { - item.setAttribute(srcAttr, *it); - } - } - } - } +// Change loops' filenames in s +void DataFile::upgrade_loopsRename() +{ + static const QMap namesToNamesWithBPMsMap = buildReplacementMap(); + + mapSrcAttributeInElementsWithResources(namesToNamesWithBPMsMap); } //! Update MIDI CC indexes, so that they are counted from 0. Older releases of LMMS @@ -1967,6 +1989,24 @@ void DataFile::upgrade_midiCCIndexing() } } +void DataFile::upgrade_fixBassLoopsTypo() +{ + static const QMap replacementMap = { + { "bassloopes/briff01.ogg", "bassloops/briff01 - 140 BPM.ogg" }, + { "bassloopes/rave_bass01.ogg", "bassloops/rave_bass01 - 180 BPM.ogg" }, + { "bassloopes/rave_bass02.ogg", "bassloops/rave_bass02 - 180 BPM.ogg" }, + { "bassloopes/tb303_01.ogg","bassloops/tb303_01 - 123 BPM.ogg" }, + { "bassloopes/techno_bass01.ogg", "bassloops/techno_bass01 - 140 BPM.ogg" }, + { "bassloopes/techno_bass02.ogg", "bassloops/techno_bass02 - 140 BPM.ogg" }, + { "bassloopes/techno_synth01.ogg", "bassloops/techno_synth01 - 140 BPM.ogg" }, + { "bassloopes/techno_synth02.ogg", "bassloops/techno_synth02 - 140 BPM.ogg" }, + { "bassloopes/techno_synth03.ogg", "bassloops/techno_synth03 - 130 BPM.ogg" }, + { "bassloopes/techno_synth04.ogg", "bassloops/techno_synth04 - 140 BPM.ogg" } + }; + + mapSrcAttributeInElementsWithResources(replacementMap); +} + void DataFile::upgrade() { // Runs all necessary upgrade methods From c1f3b0b5f4199e2df9e6f005767f15e88b42b4a0 Mon Sep 17 00:00:00 2001 From: Rossmaxx <74815851+Rossmaxx@users.noreply.github.com> Date: Sat, 15 Jun 2024 08:29:14 +0530 Subject: [PATCH 32/38] Remove `debian` folder (#7311) * removed debian folder * removed debian entries from check-strings * fixup verify script too --- debian/changelog | 382 ------ debian/compat | 1 - debian/control | 126 -- debian/copyright | 1373 --------------------- debian/gbp.conf | 2 - debian/lmms-bin.install | 4 - debian/lmms-bin.lintian-overrides | 9 - debian/lmms-common.docs | 1 - debian/lmms-common.install | 25 - debian/lmms-common.links | 1 - debian/lmms-common.maintscript | 1 - debian/lmms-vst-server.install | 1 - debian/lmms.xpm | 103 -- debian/patches/build-amd64-20181013.patch | 46 - debian/patches/clang.patch | 601 --------- debian/patches/series | 2 - debian/rules | 41 - debian/source/format | 1 - debian/watch | 3 - tests/scripted/check-strings | 20 - tests/scripted/verify | 20 - 21 files changed, 2763 deletions(-) delete mode 100644 debian/changelog delete mode 100644 debian/compat delete mode 100644 debian/control delete mode 100644 debian/copyright delete mode 100644 debian/gbp.conf delete mode 100644 debian/lmms-bin.install delete mode 100644 debian/lmms-bin.lintian-overrides delete mode 100644 debian/lmms-common.docs delete mode 100644 debian/lmms-common.install delete mode 100644 debian/lmms-common.links delete mode 100644 debian/lmms-common.maintscript delete mode 100644 debian/lmms-vst-server.install delete mode 100644 debian/lmms.xpm delete mode 100644 debian/patches/build-amd64-20181013.patch delete mode 100644 debian/patches/clang.patch delete mode 100644 debian/patches/series delete mode 100755 debian/rules delete mode 100644 debian/source/format delete mode 100644 debian/watch diff --git a/debian/changelog b/debian/changelog deleted file mode 100644 index 86f03c427d0..00000000000 --- a/debian/changelog +++ /dev/null @@ -1,382 +0,0 @@ -lmms (@VERSION@) unstable; urgency=low - - * Upstream integration. - * Drop Debian menu entry (policy 9.6). - - -- Javier Serrano Polo Sat, 03 Nov 2018 02:43:42 +0100 - -lmms (1.1.3-8) unstable; urgency=low - - * Fix build (Closes: #897806). - * Allow recommendations (Closes: #891756). - - -- Javier Serrano Polo Sat, 13 Oct 2018 17:05:54 +0200 - -lmms (1.1.3-7.1) unstable; urgency=high - - * Non-maintainer upload. - - [ Javier Serrano Polo ] - * Fix build with Clang. - * Fix build with GCC 7 (Closes: #853527). - - [ Boyuan Yang ] - * Remove Patrick Winnertz from uploaders list. (Closes: #867759) - Thank you for your previous contributions! - - -- Boyuan Yang <073plan@gmail.com> Sat, 10 Mar 2018 11:32:05 +0800 - -lmms (1.1.3-7) unstable; urgency=low - - [ Javier Serrano Polo ] - * Separate flags for WINE_BUILD_FLAGS to fix build problem on i386. - - -- Petter Reinholdtsen Mon, 26 Dec 2016 07:36:54 +0000 - -lmms (1.1.3-6) unstable; urgency=low - - [ Javier Serrano Polo ] - * Build with install RUNPATH (reproducibility). - - -- Petter Reinholdtsen Sun, 25 Dec 2016 09:38:53 +0000 - -lmms (1.1.3-5) unstable; urgency=medium - - [ Javier Serrano Polo ] - * Add Wine stable path to PATH, otherwise wine package would be required. - * Sort plug-in embedded resources (reproducibility). - * Define NDEBUG instead of setting build type to honor optimization choice. - - -- Javier Serrano Polo Sat, 03 Sep 2016 17:31:05 +0200 - -lmms (1.1.3-4) unstable; urgency=medium - - [ Javier Serrano Polo ] - * Sort lists generated from globbing expressions (reproducibility). - * Fixed upgrade that installs recommended packages (Closes: #827039). - * Dropped unused build dependencies. - * Dropped workaround for #824715, wineg++ is fixed. - * Added contributors. - * Honor CONTRIBUTORS override. - * Replace __FILE__ (reproducibility). - * Use build type "Release" (reproducibility). - - -- Javier Serrano Polo Wed, 08 Jun 2016 01:25:37 +0200 - -lmms (1.1.3-3) unstable; urgency=medium - - [ Javier Serrano Polo ] - * Dropped Wine path from PATH. - * Fixed lmms-common upgrade (Closes: #825287). - * Hide vocoder plug-in, it is now in swh-plugins (Closes: #826110). - * Added workaround for #824715 (Closes: #825286). - - -- Petter Reinholdtsen Fri, 03 Jun 2016 08:51:31 +0000 - -lmms (1.1.3-2) unstable; urgency=medium - - [ Javier Serrano Polo ] - * Enabled vst plugin on i386 and amd64 (Closes: #763720). - * Made Calf and vocoder plugins available to other programs (Closes: #758888). - * Fixed version of metalish_dong01.ogg (Closes: #802588). - * Bumped Standards-Version to 3.9.7. Doxygen documentation is not very useful. - * Upgraded to Standards-Version 3.9.8. Ship icons in the default hicolor icon - theme directories. - * Use presets from zynaddsubfx-data. - * Fixed build problems with GCC 6 (Closes: #811697). - * Switch to PulseAudio back end on likely ALSA interception (Closes: #781479). - * Updated copyright information. - * Removed non-free projects. - - -- Petter Reinholdtsen Wed, 18 May 2016 09:09:23 +0000 - -lmms (1.1.3-1) unstable; urgency=low - - * New upstream version 1.1.3 (Closes: #788457). - - Drop well-defined-loop.patch, included upstream. - * Add config for git-buildpackage to use pristine-tar all the time. - * Change homepage url to new http://lmms.io/. - * Added fluid as build-depend. - * New patch find-fluid.patch to find the fluid binary in unstable. - * New patch gcc5.patch to get the code building with gcc 5 in - unstable (Closes: #777989). - * Added man-page-adjustment.patch to fix manpage formatting of AUTHOR - block. Discovered thanks to lintian. - - -- Petter Reinholdtsen Mon, 21 Sep 2015 13:54:02 +0200 - -lmms (1.0.3-5) unstable; urgency=low - - * Make lmms replace and break lmms-common (<< 1.0.0-1) to handle the - fact that /usr/share/menu/lmms moved from lmms-common to lmms in - this version (Closes: #765970). - - -- Petter Reinholdtsen Sun, 19 Oct 2014 23:43:08 +0200 - -lmms (1.0.3-4) unstable; urgency=low - - * Correct watch file to reflect '-src' part of upstream tarball. - * New desktop-argument.patch to let desktops know how to pass files to - lmms. Thanks to lintian for noticing the bug. - * Revert change to enable the vsl plugin in version 1.0.3-3, as it did - not work. Reopen bug #763720. - - -- Petter Reinholdtsen Wed, 08 Oct 2014 19:21:53 +0200 - -lmms (1.0.3-3) unstable; urgency=medium - - * Try to get vsl plugin working on i386 by build depending on libwine-dev - and wine32-dev-tools (Closes: #763720). Unable to get it working on - amd64. - - -- Petter Reinholdtsen Tue, 07 Oct 2014 12:13:16 +0200 - -lmms (1.0.3-2) unstable; urgency=medium - - * Change build rule to only enable ALSA support on Linux (Closes: #754718). - Patch from Steven Chamberlain with input from Guillem Jover. - * Drop libwine-dev build dependency to avoid build failure in the - vst plugin. It should be enabled when we figure out how to do it. - - -- Petter Reinholdtsen Thu, 02 Oct 2014 08:19:53 +0200 - -lmms (1.0.3-1) unstable; urgency=low - - * Move package into Debian Edu git repository and add myself as - co-maintainer. - * Update to upstream version 1.0.3. - * Correct build dependency on i386, use libwine-dev instead of the now - obsolete wine-dev (Closes: #748183). - * Update Standards-Version from 3.9.5 to 3.9.6. - * Add new well-defined-loop.patch to fix compile error triggered by - undefined loop behaviour (Closes: #753177). - - -- Petter Reinholdtsen Wed, 01 Oct 2014 23:00:19 +0200 - -lmms (1.0.0-1) unstable; urgency=low - - * New upstream version (Closes: #703900, #735764, #696271) - * Using a wraped-style control (Closes: #689347) - * Don't suggest vcf as it no longer exists (since a long time) - (Closes: #618350) - * Problems with jack backend were fixed long ago (Closes: #557421) - * No depends/recommends on wine anymore (Closes: #622215, #622080) - - -- Patrick Winnertz Thu, 24 Apr 2014 22:30:17 +0200 - -lmms (0.4.10-2.3) unstable; urgency=low - - * Non maintainer upload. - * Remove wine-related dependencies on amd64, thereby disabling building - VST plugin. (Closes: #676760) - - -- Hilko Bengen Wed, 27 Jun 2012 23:14:40 +0200 - -lmms (0.4.10-2.2) unstable; urgency=low - - * Non maintainer upload. - * Fix build failure with GCC 4.7. Closes: #667265. - * Turn on verbose build. - - -- Matthias Klose Tue, 17 Apr 2012 14:08:53 +0200 - -lmms (0.4.10-2.1) unstable; urgency=low - - * Non-maintainer upload. - * Fix FTBFS on GNU/kFreeBSD. Thanks Pino Toscano. (Closes: #641064) - - -- Robert Millan Fri, 27 Apr 2012 22:55:55 +0200 - -lmms (0.4.10-2) unstable; urgency=low - - * Removed build-dep on libestools2.0-dev (Closes: #614975) - - -- Patrick Winnertz Fri, 11 Mar 2011 09:37:43 +0100 - -lmms (0.4.10-1) unstable; urgency=low - - * Imported Upstream version 0.4.10 - * changed mode of patch - * Add source/format with 3.0 (quilt) and rearrange source a bit - * Bump standarts version to 3.9.1 - no further changes needed - - -- Patrick Winnertz Fri, 11 Feb 2011 20:03:06 +0100 - -lmms (0.4.7-2) unstable; urgency=low - - [ Reinhard Tartler ] - * Depend on wine only on i386 and amd64 (Closes: #590950) - - [ Patrick Winnertz ] - * Uploading patch from siretart, thanks for helping. - - -- Patrick Winnertz Mon, 02 Aug 2010 10:13:28 +0200 - -lmms (0.4.7-1) unstable; urgency=low - - * New upstream version - - -- Patrick Winnertz Thu, 29 Jul 2010 16:24:00 +0200 - -lmms (0.4.6-2) unstable; urgency=low - - * Build-depend on libestools2.0-dev (Closes: #589882) - - -- Patrick Winnertz Wed, 28 Jul 2010 11:55:16 +0200 - -lmms (0.4.6-1) unstable; urgency=low - - * New upstream version (Closes: #565733) - * Bumped standards version to 3.8.3, no further changes needed - - -- Patrick Winnertz Sun, 24 Jan 2010 16:40:39 +0100 - -lmms (0.4.5-1) unstable; urgency=low - - * New upstream version (Closes: #543645) - * Fix FTBFS on amd64 (Closes: #540671 #543017) - - -- Patrick Winnertz Fri, 11 Sep 2009 09:56:45 +0200 - -lmms (0.4.4-1) unstable; urgency=low - - * New upstream version (Closes: #511363) - * Provide menu file (Closes: #514905) - - The menufile is included in lmms-common and not in lmms - as it is not arch specific - * Bumped standards version to 3.8.2 no further changes needed - - -- Patrick Winnertz Wed, 05 Aug 2009 20:46:40 +0200 - -lmms (0.3.2-1) unstable; urgency=low - - * Decrease wine dependency to wine-bin as suggested. (Closes: #446163) - * Acknowlegded NMU from Pierre Habouzit in order to - fix FTBFS with gcc-4.3 which (Closes: #462202) - * Now including the singerbot plugin. (Closes: #443224) - * Add patch to prevent lmms from crashing. - - -- Patrick Winnertz Mon, 17 Mar 2008 10:56:12 +0100 - -lmms (0.3.1-1.1) unstable; urgency=low - - * Non-maintainer upload. - * Add g++-4.3.patch to fix g++-4.3 FTBFS (Closes: 462202). - - -- Pierre Habouzit Sun, 16 Mar 2008 23:21:56 +0000 - -lmms (0.3.1-1) unstable; urgency=low - - * Packaging new upstream release. - * Install Upstream Changelog (Closes: #441477) - Thanks to Felipe Sateler - * Lowered the caps dependency to Recommends (Closes: #446163) - * Added -i/-a to the build targets in rules in order to make sure that only - (in)dep packages are build. - * Changed my maintainer address - * Added patch to remove stereo_enhancer plugin which has a ftbfs with gcc - 4.2.3 - * Added imagemagick as build-dep since we have to convert a .png to a .xpm - via convert - * Doesn't install upstreams menu file, since it's outdated.. instead use - our own. - * Standard-Version bump to 3.7.3 - * Remove Homepage field from Description and create a own Header - * Added postinst and postrm for lmms-common to call update-menu if available - (this has to be done manually, since we doesn't use dh_installmenu to install - the menu file) - - -- Patrick Winnertz Thu, 06 Dec 2007 07:08:04 +0100 - -lmms (0.3.0-1) unstable; urgency=low - - [ Tobias Doerffel ] - * New upstream release. (Closes: #439301) - * Removed patch from Thomas Girard as upstream merged changes - - [ Patrick Winnertz ] - * Moved manpage into correct package (lmms) - * Removed manuall installation of Upstream Changelog, thanks to the power of - debhelper ;-) - * FTBFS with gcc 4.2 is fixed by upstream (Closes: #383295) - * lmms has now a proper menu entry (Closes: #383406) - * lmms depends now on the same version of lmms-common (Closes: #389037) - * fixed by upstream: arpeggio status is now saved (Closes: #433262) - * Added build-depends libqt3-i18n (Closes: #384406) - * Added watch file for lmms (Closes: #439302) - Thanks to Raphael Geissert - * Improved copyright file - * Doesn't build libsingerbot since it is experimental and doesn't work - correct yet - * Added several build-dependencys (libstk0-dev, libestools1.2-dev, ladspa-sdk, - libflac-dev, libwine-dev [i386], libqt3-i18n, libasound2-dev, - festival-dev, dpatch ) - * Take over this package from Florian Ragwitz, so set myself as maintainer - * Add a depends on a specific version of lmms-common - * Added several new dependencys to lmms - * Improved description of lmms and lmms-common - * Die on errors of clean, but don't die if the makefile doesn't exist - * Added watch file - - -- Patrick Winnertz Fri, 24 Aug 2007 08:23:34 +0200 - -lmms (0.2.1-1.1) unstable; urgency=high - - * Non-maintainer Upload - * Add Patch by Thomas Girard for segfault right after - lmms starting up (Closes: 382491) - - -- Michael Ablassmeier Tue, 5 Sep 2006 12:00:40 +0200 - -lmms (0.2.1-1) unstable; urgency=low - - * New upstream release. - * Bump up Standards-Version to 3.7.2 (no changes). - * Use DH_COMPAT 5. - - -- Florian Ragwitz Sun, 13 Aug 2006 14:40:13 +0200 - -lmms (0.1.4-1) unstable; urgency=low - - * New upstream release. - - -- Florian Ragwitz Sat, 4 Feb 2006 07:16:47 +0100 - -lmms (0.1.3-1) unstable; urgency=low - - * New upstream release. - * debian/lmms.1 was included by upstream. Removed it from debian/. - * Install lmms.1 in lmms-common instead of lmms to safe some mirror space. - * Added a lintian override for the above, as lintian is not smart enough to - check for manpages in other packages from the same source package on which - a package with a missing manpage depends. - - -- Florian Ragwitz Wed, 1 Feb 2006 18:28:42 +0100 - -lmms (0.1.2-1) unstable; urgency=low - - * New upstream release. - - -- Florian Ragwitz Thu, 22 Dec 2005 16:22:50 +0100 - -lmms (0.1.1-2) unstable; urgency=low - - * lmms-common doesn't depend on lmms anymore to remove a circular - dependencies (Closes: #339906). - - -- Florian Ragwitz Sun, 20 Nov 2005 12:27:08 +0100 - -lmms (0.1.1-1) unstable; urgency=low - - * New upstream release. - * Changed Maintainer address. - * Added libjack-dev to Build-Depends. - - -- Florian Ragwitz Mon, 31 Oct 2005 10:48:36 +0100 - -lmms (0.0.9+0.1.0rc1-1) unstable; urgency=low - - * Initial Release (Closes: #315976). - - -- Florian Ragwitz Fri, 22 Jul 2005 16:33:17 +0200 - diff --git a/debian/compat b/debian/compat deleted file mode 100644 index ec635144f60..00000000000 --- a/debian/compat +++ /dev/null @@ -1 +0,0 @@ -9 diff --git a/debian/control b/debian/control deleted file mode 100644 index 63eba44d2e1..00000000000 --- a/debian/control +++ /dev/null @@ -1,126 +0,0 @@ -Source: lmms -Section: sound -Priority: optional -Maintainer: Debian Edu Packaging Team -Uploaders: - Petter Reinholdtsen , - Israel Dahl , - Javier Serrano Polo , -Build-Depends: - cmake, - debhelper (>= 9.0.0), - fluid, - ladspa-sdk, - libasound2-dev [linux-any], - libfftw3-dev, - libfltk1.3-dev, - libfluidsynth-dev, - libgig-dev, - libjack-jackd2-dev, - liblist-moreutils-perl, - libmp3lame-dev, - libpulse-dev, - libqt5x11extras5-dev, - libsamplerate0-dev, - libsdl1.2-dev, - libsndfile1-dev, - libsndio-dev, - libsoundio-dev, - libstk0-dev, - libvorbis-dev, - libx11-xcb-dev, - libxcb-keysyms1-dev, - libxcb-util0-dev, - libxml-perl, - libxml2-utils, - portaudio19-dev, - qtbase5-private-dev, - qttools5-dev, - wine64-tools [amd64] | wine32-tools [i386] -Standards-Version: 4.2.1.4 -Homepage: https://lmms.io/ -Vcs-Browser: https://salsa.debian.org/debian-edu-pkg-team/lmms.git - -Package: lmms-bin -Architecture: any -Depends: - lmms-common (>= ${source:Version}), - ${shlibs:Depends}, - ${misc:Depends}, - stk, -Recommends: - caps, - lmms-vst-server:i386 (>= ${source:Version}), - lmms-vst-server:amd64 (>= ${source:Version}), - tap-plugins, -Suggests: - fil-plugins, - fluid-soundfont-gm, - freepats, - ladspa-plugin, - mcp-plugins, - omins, -Replaces: lmms-common (<< 1.0.0-1) -Breaks: lmms-common (<< 1.0.0-1) -Multi-Arch: allowed -Description: Linux Multimedia Studio - minimal installation - LMMS aims to be a free alternative to popular (but commercial and closed- - source) programs like FruityLoops, Cubase and Logic giving you the ability of - producing music with your computer by creating cool loops, synthesizing and - mixing sounds, arranging samples, having more fun with your MIDI-keyboard - and much more... - . - LMMS combines the features of a tracker-/sequencer-program (pattern-/channel-/ - sample-/song-/effect-management) and those of powerful synthesizers and - samplers in a modern, user-friendly and easy to use graphical user-interface. - . - This package provides the minimal installation. - -Package: lmms -Architecture: any -Depends: - lmms-bin, - ${misc:Depends}, -Description: Linux Multimedia Studio - LMMS aims to be a free alternative to popular (but commercial and closed- - source) programs like FruityLoops, Cubase and Logic giving you the ability of - producing music with your computer by creating cool loops, synthesizing and - mixing sounds, arranging samples, having more fun with your MIDI-keyboard - and much more... - . - LMMS combines the features of a tracker-/sequencer-program (pattern-/channel-/ - sample-/song-/effect-management) and those of powerful synthesizers and - samplers in a modern, user-friendly and easy to use graphical user-interface. - . - This package provides the recommended installation. - -Package: lmms-common -Architecture: all -Depends: - ${shlibs:Depends}, - ${misc:Depends}, - zynaddsubfx-data, -Pre-Depends: ${misc:Pre-Depends} -Description: Linux Multimedia Studio - common files - LMMS aims to be a free alternative to popular (but commercial and closed- - source) programs like FruityLoops, Cubase and Logic giving you the ability of - producing music with your computer by creating cool loops, synthesizing and - mixing sounds, arranging samples, having more fun with your MIDI-keyboard - and much more... - . - LMMS combines the features of a tracker-/sequencer-program (pattern-/channel-/ - sample-/song-/effect-management) and those of powerful synthesizers and - samplers in a modern, user-friendly and easy to use graphical user-interface. - . - This package contains the platform independent files such as samples, presets - and some example projects. - -Package: lmms-vst-server -Architecture: amd64 i386 -Depends: - wine64 [amd64] | wine64-development [amd64] | wine32 [i386] | wine32-development [i386], - ${shlibs:Depends}, - ${misc:Depends}, -Recommends: lmms-bin:any -Description: Linux Multimedia Studio - VST server - This package contains a helper application that loads VST plugins. diff --git a/debian/copyright b/debian/copyright deleted file mode 100644 index f4bc9d85c9d..00000000000 --- a/debian/copyright +++ /dev/null @@ -1,1373 +0,0 @@ -Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ -Upstream-Name: LMMS -Upstream-Contact: https://github.com/LMMS/lmms -Source: https://github.com/LMMS/lmms/tags -Comment: - This package was debianized by Florian Ragwitz on - Thu, 14 Apr 2005 13:24:57 +0200. - -Files: * -Copyright: - 1998-2000 Paul Kellett (mda-vst.com) - 1999-2004 Dag Lem - 2002 Kjetil S. Matheussen - 2003-2007 Rui Nuno Capela - 2003-2005 Shay Green - 2004-2014 Tobias Doerffel - 2004 Paul Davis - 2004 Torben Hohn - 2005-2008 Danny McRae - 2006-2008 Andreas Brandmaier - 2006-2008 Javier Serrano Polo - 2007-2014 Vesa Kivimäki - 2007-2013 Paul Giblock - 2007 Keith Marshall - 2008-2009 Andrew Kelley - 2008 Attila Herman - 2008 Csaba Hruska - 2013-2014 Raine M. Ekman - 2013 Mike Choi - 2014 David French - 2014 Hannu Haahti - 2014 Lukas Wohlschläger - 2014 Rubén Ibarra Pastor - 2014 Simon Symeonidis - 2014 Wong Cho Ching - Chrissy McManus - Gabriel - Gurjot Singh - Johannes Lorenz - Jonathan Aquilina - Jorrit Rouwe - Juan Fabián Simón - LocoMatt - Oskar Wallgren - Peter Hanappe - Sebastian Tilsch - Tobiasz Karoń (unfa) - Uroš Maravić -License: GPL-2+ - -Files: data/projects/demos/Alf42red-* - data/projects/demos/CapDan/CapDan-TwilightArea-* -Copyright: - 2010-2011 Armin Heller - 2011 Der Daniel (CapDan) -License: CC-BY-SA-3 - -Files: data/projects/demos/AngryLlama-* - data/projects/demos/Ashore.* - data/projects/demos/DnB.* - data/projects/demos/Farbro-* - data/projects/demos/Greippi* - data/projects/demos/Namitryus-* - data/projects/demos/Popsip-* - data/projects/demos/Root84-* - data/projects/demos/Shovon-* - data/projects/demos/Skiessi/* - data/projects/demos/StrictProduction-* - data/projects/demos/Thaledric-* - data/projects/demos/TobyDox-* - data/projects/demos/unfa-* - data/projects/shorties/DirtyLove.* - data/projects/shorties/Root84-* - data/projects/shorties/Skiessi-* - data/projects/shorties/sv-* -Copyright: - LMMS contributors -License: non-free - -Files: data/projects/demos/CapDan/CapDan-ReggaeTry.* - data/projects/demos/CapDan/CapDan-ReggaetonTry.* - data/projects/demos/CapDan/CapDan-ZeroSumGame-* - data/projects/demos/EsoXLB-* - data/projects/demos/Impulslogik-* - data/projects/demos/Momo64-* - data/projects/demos/Oglsdl-* - data/projects/demos/Settel-* - data/projects/demos/Socceroos-* - data/projects/demos/TameAnderson-* - data/projects/demos/Thomasso-* - data/projects/shorties/Crunk* - data/projects/shorties/Greshz-* - data/projects/shorties/Surrender-* -Copyright: - 2009 Achim Settelmeier - 2009 Peter Asplund (Surrender) - 2009 Thomasso - 2010 E.SoX (lowbudget) - 2010 Impulslogik - 2011 Der Daniel (CapDan) - 2011 Sam (socceroos) - 2011 mauro (momo64) - 2011 tame anderson - 2011 Ümit (oglsdl) - Greshz -License: Artistic-2 - -Files: data/projects/demos/Jousboxx-* -Copyright: - Jousboxx -License: CC-BY-SA-4 - -Files: data/projects/demos/Saber-* -Copyright: - Saber Rastikerdar -License: BSD-2-clause - -Files: include/ladspa.h -Copyright: - 2000-2002 Paul Barton-Davis - 2000-2002 Richard W.E. Furse - 2000-2002 Stefan Westerfeld -License: LGPL-2.1+ - -Files: plugins/LadspaEffect/calf/veal/* -Copyright: - 2001-2010 Krzysztof Foltman - 2001-2010 Markus Schmidt - 2001-2010 Thor Harald Johansen - Alexandre Prokoudine - Carl Hetherington - Christian Holschuh - Damien Zammit - Dave Robillard - David Täht - Hans Baier - Hermann Meyer - Thorsten Wilms - Tom Szilagyi - Torben Hohn -License: LGPL-2+ -Comment: - COPYING is the GNU Lesser General Public License. Headers refer to version 2 of - this license instead of version 2.1. - -Files: plugins/LadspaEffect/calf/veal/src/calf/vumeter.h -Copyright: - 2007 Krzysztof Foltman -License: GPL-2+ - -Files: plugins/LadspaEffect/caps/* -Copyright: - 1998 Robert Bristow-Johnson - 2001-2011 Tim Goetze - 2003-2009 David Yeh - 2004-2005 Steve Harris -License: GPL-2+ - -Files: plugins/LadspaEffect/cmt/* -Copyright: - 1998 Andy Sloane - 1999-2001 David A. Bartold - 2000-2002 Richard W.E. Furse - 2000 Jezar - 2002 Nathaniel Virgo -License: GPL-2+ - -Files: plugins/LadspaEffect/swh/ladspa/* -Copyright: - 1999 Juhana Sadeharju - 2000-2003 Alexander Ehlert - 2000-2002 Steve Harris - Andy Wingo - Frank Neumann - Jesse Chappell - Joern Nettingsmeier - Marcus Andersson - Mark Knecht - Matthias Nagorni - Nathaniel Virgo - Pascal Haakmat - Patrick Shirkey - Paul Winkler -License: GPL-2+ - -Files: plugins/LadspaEffect/swh/ladspa/gsm/* -Copyright: - 1992-1994 Carsten Bormann - 1992-1994 Jutta Degener -License: Bormann-Degener - -Files: plugins/LadspaEffect/swh/ladspa/util/pitchscale.c -Copyright: - 1999 Stephan M. Sprenger -License: WOL - -Files: plugins/LadspaEffect/swh/ladspa/vocoder_1337.c -Copyright: - Achim Settelmeier - Hexasoft - Josh Green -License: GPL-2+ - -Files: plugins/LadspaEffect/tap/* -Copyright: - 2004 Tom Szilagyi - Alexander Koenig -License: GPL-2+ - -Files: plugins/MidiImport/portsmf/* -Copyright: - 1999-2000 Phil Burk - 1999-2000 Ross Bencina - 2001-2006 Roger B. Dannenberg -License: Expat -Comment: - The Expat license constitutes the entire Portsmf license; however, - the PortMusic community also makes the following non-binding requests: - . - Any person wishing to distribute modifications to the Software is - requested to send the modifications to the original developer so that - they can be incorporated into the canonical version. It is also - requested that these non-binding requests be included along with the - license above. - -Files: plugins/OpulenZ/adplug/src/fmopl.* - plugins/OpulenZ/adplug/src/mididata.h - plugins/OpulenZ/adplug/src/opl.h - plugins/OpulenZ/adplug/src/temuopl.* -Copyright: - 1999-2007 Simon Peter - 1999-2000 Tatsuyuki Satoh -License: LGPL-2.1+ - -Files: plugins/Sfxr/readme.* - plugins/Sfxr/Sfxr.* -Copyright: - 2007 Tomas Pettersson - 2014 Wong Cho Ching -License: Expat and GPL-2+ - -Files: plugins/ZynAddSubFx/zynaddsubfx/* -Copyright: - 2002-2009 Nasca Octavian Paul - 2009-2010 Mark McCurry - 2009 Alan Calvert - 2012 Jonathan Liles - Achim Settelmeier - Alexis Ballier - Andre Sklenar - Christopher Oliver - Damien Goutte-Gattat - Daniel Clemente - Emmanuel Saracco - Filipe Coelho - Gerald Folcher - Hans Petter Selasky - Harald Hvaal - Ilario Glasgo - James Morris - Johannes Lorenz - Jérémie Andréi - Lars Luthman - Lieven Moors - Olaf Schulz - Ryan Billing - Stephen Parry - Tobias Doerffel -License: GPL-2+ - -License: Artistic-2 - The Artistic License 2.0 - . - Copyright (c) 2000-2006, The Perl Foundation. - . - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - . - Preamble - . - This license establishes the terms under which a given free software - Package may be copied, modified, distributed, and/or redistributed. - The intent is that the Copyright Holder maintains some artistic - control over the development of that Package while still keeping the - Package available as open source and free software. - . - You are always permitted to make arrangements wholly outside of this - license directly with the Copyright Holder of a given Package. If the - terms of this license do not permit the full use that you propose to - make of the Package, you should contact the Copyright Holder and seek - a different licensing arrangement. - . - Definitions - . - "Copyright Holder" means the individual(s) or organization(s) - named in the copyright notice for the entire Package. - . - "Contributor" means any party that has contributed code or other - material to the Package, in accordance with the Copyright Holder's - procedures. - . - "You" and "your" means any person who would like to copy, - distribute, or modify the Package. - . - "Package" means the collection of files distributed by the - Copyright Holder, and derivatives of that collection and/or of - those files. A given Package may consist of either the Standard - Version, or a Modified Version. - . - "Distribute" means providing a copy of the Package or making it - accessible to anyone else, or in the case of a company or - organization, to others outside of your company or organization. - . - "Distributor Fee" means any fee that you charge for Distributing - this Package or providing support for this Package to another - party. It does not mean licensing fees. - . - "Standard Version" refers to the Package if it has not been - modified, or has been modified only in ways explicitly requested - by the Copyright Holder. - . - "Modified Version" means the Package, if it has been changed, and - such changes were not explicitly requested by the Copyright - Holder. - . - "Original License" means this Artistic License as Distributed with - the Standard Version of the Package, in its current version or as - it may be modified by The Perl Foundation in the future. - . - "Source" form means the source code, documentation source, and - configuration files for the Package. - . - "Compiled" form means the compiled bytecode, object code, binary, - or any other form resulting from mechanical transformation or - translation of the Source form. - . - Permission for Use and Modification Without Distribution - . - (1) You are permitted to use the Standard Version and create and use - Modified Versions for any purpose without restriction, provided that - you do not Distribute the Modified Version. - . - Permissions for Redistribution of the Standard Version - . - (2) You may Distribute verbatim copies of the Source form of the - Standard Version of this Package in any medium without restriction, - either gratis or for a Distributor Fee, provided that you duplicate - all of the original copyright notices and associated disclaimers. At - your discretion, such verbatim copies may or may not include a - Compiled form of the Package. - . - (3) You may apply any bug fixes, portability changes, and other - modifications made available from the Copyright Holder. The resulting - Package will still be considered the Standard Version, and as such - will be subject to the Original License. - . - Distribution of Modified Versions of the Package as Source - . - (4) You may Distribute your Modified Version as Source (either gratis - or for a Distributor Fee, and with or without a Compiled form of the - Modified Version) provided that you clearly document how it differs - from the Standard Version, including, but not limited to, documenting - any non-standard features, executables, or modules, and provided that - you do at least ONE of the following: - . - (a) make the Modified Version available to the Copyright Holder - of the Standard Version, under the Original License, so that the - Copyright Holder may include your modifications in the Standard - Version. - . - (b) ensure that installation of your Modified Version does not - prevent the user installing or running the Standard Version. In - addition, the Modified Version must bear a name that is different - from the name of the Standard Version. - . - (c) allow anyone who receives a copy of the Modified Version to - make the Source form of the Modified Version available to others - under - . - (i) the Original License or - . - (ii) a license that permits the licensee to freely copy, - modify and redistribute the Modified Version using the same - licensing terms that apply to the copy that the licensee - received, and requires that the Source form of the Modified - Version, and of any works derived from it, be made freely - available in that license fees are prohibited but Distributor - Fees are allowed. - . - Distribution of Compiled Forms of the Standard Version - or Modified Versions without the Source - . - (5) You may Distribute Compiled forms of the Standard Version without - the Source, provided that you include complete instructions on how to - get the Source of the Standard Version. Such instructions must be - valid at the time of your distribution. If these instructions, at any - time while you are carrying out such distribution, become invalid, you - must provide new instructions on demand or cease further distribution. - If you provide valid instructions or cease distribution within thirty - days after you become aware that the instructions are invalid, then - you do not forfeit any of your rights under this license. - . - (6) You may Distribute a Modified Version in Compiled form without - the Source, provided that you comply with Section 4 with respect to - the Source of the Modified Version. - . - Aggregating or Linking the Package - . - (7) You may aggregate the Package (either the Standard Version or - Modified Version) with other packages and Distribute the resulting - aggregation provided that you do not charge a licensing fee for the - Package. Distributor Fees are permitted, and licensing fees for other - components in the aggregation are permitted. The terms of this license - apply to the use and Distribution of the Standard or Modified Versions - as included in the aggregation. - . - (8) You are permitted to link Modified and Standard Versions with - other works, to embed the Package in a larger work of your own, or to - build stand-alone binary or bytecode versions of applications that - include the Package, and Distribute the result without restriction, - provided the result does not expose a direct interface to the Package. - . - Items That are Not Considered Part of a Modified Version - . - (9) Works (including, but not limited to, modules and scripts) that - merely extend or make use of the Package, do not, by themselves, cause - the Package to be a Modified Version. In addition, such works are not - considered parts of the Package itself, and are not subject to the - terms of this license. - . - General Provisions - . - (10) Any use, modification, and distribution of the Standard or - Modified Versions is governed by this Artistic License. By using, - modifying or distributing the Package, you accept this license. Do not - use, modify, or distribute the Package, if you do not accept this - license. - . - (11) If your Modified Version has been derived from a Modified - Version made by someone other than you, you are nevertheless required - to ensure that your Modified Version complies with the requirements of - this license. - . - (12) This license does not grant you the right to use any trademark, - service mark, tradename, or logo of the Copyright Holder. - . - (13) This license includes the non-exclusive, worldwide, - free-of-charge patent license to make, have made, use, offer to sell, - sell, import and otherwise transfer the Package with respect to any - patent claims licensable by the Copyright Holder that are necessarily - infringed by the Package. If you institute patent litigation - (including a cross-claim or counterclaim) against any party alleging - that the Package constitutes direct or contributory patent - infringement, then this Artistic License to you shall terminate on the - date that such litigation is filed. - . - (14) Disclaimer of Warranty: - THE PACKAGE IS PROVIDED BY THE COPYRIGHT HOLDER AND CONTRIBUTORS "AS - IS' AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES. THE IMPLIED - WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR - NON-INFRINGEMENT ARE DISCLAIMED TO THE EXTENT PERMITTED BY YOUR LOCAL - LAW. UNLESS REQUIRED BY LAW, NO COPYRIGHT HOLDER OR CONTRIBUTOR WILL - BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL - DAMAGES ARISING IN ANY WAY OUT OF THE USE OF THE PACKAGE, EVEN IF - ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -License: BSD-2-clause - All rights reserved. - . - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - . - 1. Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - . - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - . - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE - FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -License: Bormann-Degener - Any use of this software is permitted provided that this notice is not - removed and that neither the authors nor the Technische Universitaet Berlin - are deemed to have made any representations as to the suitability of this - software for any purpose nor are held responsible for any defects of - this software. THERE IS ABSOLUTELY NO WARRANTY FOR THIS SOFTWARE. - . - As a matter of courtesy, the authors request to be informed about uses - this software has found, about bugs in this software, and about any - improvements that may be of general interest. - -License: CC-BY-SA-3 - Creative Commons Legal Code - . - Attribution-ShareAlike 3.0 Unported - . - CREATIVE COMMONS CORPORATION IS NOT A LAW FIRM AND DOES NOT PROVIDE - LEGAL SERVICES. DISTRIBUTION OF THIS LICENSE DOES NOT CREATE AN - ATTORNEY-CLIENT RELATIONSHIP. CREATIVE COMMONS PROVIDES THIS - INFORMATION ON AN "AS-IS" BASIS. CREATIVE COMMONS MAKES NO WARRANTIES - REGARDING THE INFORMATION PROVIDED, AND DISCLAIMS LIABILITY FOR - DAMAGES RESULTING FROM ITS USE. - . - License - . - THE WORK (AS DEFINED BELOW) IS PROVIDED UNDER THE TERMS OF THIS CREATIVE - COMMONS PUBLIC LICENSE ("CCPL" OR "LICENSE"). THE WORK IS PROTECTED BY - COPYRIGHT AND/OR OTHER APPLICABLE LAW. ANY USE OF THE WORK OTHER THAN AS - AUTHORIZED UNDER THIS LICENSE OR COPYRIGHT LAW IS PROHIBITED. - . - BY EXERCISING ANY RIGHTS TO THE WORK PROVIDED HERE, YOU ACCEPT AND AGREE - TO BE BOUND BY THE TERMS OF THIS LICENSE. TO THE EXTENT THIS LICENSE MAY - BE CONSIDERED TO BE A CONTRACT, THE LICENSOR GRANTS YOU THE RIGHTS - CONTAINED HERE IN CONSIDERATION OF YOUR ACCEPTANCE OF SUCH TERMS AND - CONDITIONS. - . - 1. Definitions - . - a. "Adaptation" means a work based upon the Work, or upon the Work and - other pre-existing works, such as a translation, adaptation, - derivative work, arrangement of music or other alterations of a - literary or artistic work, or phonogram or performance and includes - cinematographic adaptations or any other form in which the Work may be - recast, transformed, or adapted including in any form recognizably - derived from the original, except that a work that constitutes a - Collection will not be considered an Adaptation for the purpose of - this License. For the avoidance of doubt, where the Work is a musical - work, performance or phonogram, the synchronization of the Work in - timed-relation with a moving image ("synching") will be considered an - Adaptation for the purpose of this License. - b. "Collection" means a collection of literary or artistic works, such as - encyclopedias and anthologies, or performances, phonograms or - broadcasts, or other works or subject matter other than works listed - in Section 1(f) below, which, by reason of the selection and - arrangement of their contents, constitute intellectual creations, in - which the Work is included in its entirety in unmodified form along - with one or more other contributions, each constituting separate and - independent works in themselves, which together are assembled into a - collective whole. A work that constitutes a Collection will not be - considered an Adaptation (as defined below) for the purposes of this - License. - c. "Creative Commons Compatible License" means a license that is listed - at https://creativecommons.org/compatiblelicenses that has been - approved by Creative Commons as being essentially equivalent to this - License, including, at a minimum, because that license: (i) contains - terms that have the same purpose, meaning and effect as the License - Elements of this License; and, (ii) explicitly permits the relicensing - of adaptations of works made available under that license under this - License or a Creative Commons jurisdiction license with the same - License Elements as this License. - d. "Distribute" means to make available to the public the original and - copies of the Work or Adaptation, as appropriate, through sale or - other transfer of ownership. - e. "License Elements" means the following high-level license attributes - as selected by Licensor and indicated in the title of this License: - Attribution, ShareAlike. - f. "Licensor" means the individual, individuals, entity or entities that - offer(s) the Work under the terms of this License. - g. "Original Author" means, in the case of a literary or artistic work, - the individual, individuals, entity or entities who created the Work - or if no individual or entity can be identified, the publisher; and in - addition (i) in the case of a performance the actors, singers, - musicians, dancers, and other persons who act, sing, deliver, declaim, - play in, interpret or otherwise perform literary or artistic works or - expressions of folklore; (ii) in the case of a phonogram the producer - being the person or legal entity who first fixes the sounds of a - performance or other sounds; and, (iii) in the case of broadcasts, the - organization that transmits the broadcast. - h. "Work" means the literary and/or artistic work offered under the terms - of this License including without limitation any production in the - literary, scientific and artistic domain, whatever may be the mode or - form of its expression including digital form, such as a book, - pamphlet and other writing; a lecture, address, sermon or other work - of the same nature; a dramatic or dramatico-musical work; a - choreographic work or entertainment in dumb show; a musical - composition with or without words; a cinematographic work to which are - assimilated works expressed by a process analogous to cinematography; - a work of drawing, painting, architecture, sculpture, engraving or - lithography; a photographic work to which are assimilated works - expressed by a process analogous to photography; a work of applied - art; an illustration, map, plan, sketch or three-dimensional work - relative to geography, topography, architecture or science; a - performance; a broadcast; a phonogram; a compilation of data to the - extent it is protected as a copyrightable work; or a work performed by - a variety or circus performer to the extent it is not otherwise - considered a literary or artistic work. - i. "You" means an individual or entity exercising rights under this - License who has not previously violated the terms of this License with - respect to the Work, or who has received express permission from the - Licensor to exercise rights under this License despite a previous - violation. - j. "Publicly Perform" means to perform public recitations of the Work and - to communicate to the public those public recitations, by any means or - process, including by wire or wireless means or public digital - performances; to make available to the public Works in such a way that - members of the public may access these Works from a place and at a - place individually chosen by them; to perform the Work to the public - by any means or process and the communication to the public of the - performances of the Work, including by public digital performance; to - broadcast and rebroadcast the Work by any means including signs, - sounds or images. - k. "Reproduce" means to make copies of the Work by any means including - without limitation by sound or visual recordings and the right of - fixation and reproducing fixations of the Work, including storage of a - protected performance or phonogram in digital form or other electronic - medium. - . - 2. Fair Dealing Rights. Nothing in this License is intended to reduce, - limit, or restrict any uses free from copyright or rights arising from - limitations or exceptions that are provided for in connection with the - copyright protection under copyright law or other applicable laws. - . - 3. License Grant. Subject to the terms and conditions of this License, - Licensor hereby grants You a worldwide, royalty-free, non-exclusive, - perpetual (for the duration of the applicable copyright) license to - exercise the rights in the Work as stated below: - . - a. to Reproduce the Work, to incorporate the Work into one or more - Collections, and to Reproduce the Work as incorporated in the - Collections; - b. to create and Reproduce Adaptations provided that any such Adaptation, - including any translation in any medium, takes reasonable steps to - clearly label, demarcate or otherwise identify that changes were made - to the original Work. For example, a translation could be marked "The - original work was translated from English to Spanish," or a - modification could indicate "The original work has been modified."; - c. to Distribute and Publicly Perform the Work including as incorporated - in Collections; and, - d. to Distribute and Publicly Perform Adaptations. - e. For the avoidance of doubt: - . - i. Non-waivable Compulsory License Schemes. In those jurisdictions in - which the right to collect royalties through any statutory or - compulsory licensing scheme cannot be waived, the Licensor - reserves the exclusive right to collect such royalties for any - exercise by You of the rights granted under this License; - ii. Waivable Compulsory License Schemes. In those jurisdictions in - which the right to collect royalties through any statutory or - compulsory licensing scheme can be waived, the Licensor waives the - exclusive right to collect such royalties for any exercise by You - of the rights granted under this License; and, - iii. Voluntary License Schemes. The Licensor waives the right to - collect royalties, whether individually or, in the event that the - Licensor is a member of a collecting society that administers - voluntary licensing schemes, via that society, from any exercise - by You of the rights granted under this License. - . - The above rights may be exercised in all media and formats whether now - known or hereafter devised. The above rights include the right to make - such modifications as are technically necessary to exercise the rights in - other media and formats. Subject to Section 8(f), all rights not expressly - granted by Licensor are hereby reserved. - . - 4. Restrictions. The license granted in Section 3 above is expressly made - subject to and limited by the following restrictions: - . - a. You may Distribute or Publicly Perform the Work only under the terms - of this License. You must include a copy of, or the Uniform Resource - Identifier (URI) for, this License with every copy of the Work You - Distribute or Publicly Perform. You may not offer or impose any terms - on the Work that restrict the terms of this License or the ability of - the recipient of the Work to exercise the rights granted to that - recipient under the terms of the License. You may not sublicense the - Work. You must keep intact all notices that refer to this License and - to the disclaimer of warranties with every copy of the Work You - Distribute or Publicly Perform. When You Distribute or Publicly - Perform the Work, You may not impose any effective technological - measures on the Work that restrict the ability of a recipient of the - Work from You to exercise the rights granted to that recipient under - the terms of the License. This Section 4(a) applies to the Work as - incorporated in a Collection, but this does not require the Collection - apart from the Work itself to be made subject to the terms of this - License. If You create a Collection, upon notice from any Licensor You - must, to the extent practicable, remove from the Collection any credit - as required by Section 4(c), as requested. If You create an - Adaptation, upon notice from any Licensor You must, to the extent - practicable, remove from the Adaptation any credit as required by - Section 4(c), as requested. - b. You may Distribute or Publicly Perform an Adaptation only under the - terms of: (i) this License; (ii) a later version of this License with - the same License Elements as this License; (iii) a Creative Commons - jurisdiction license (either this or a later license version) that - contains the same License Elements as this License (e.g., - Attribution-ShareAlike 3.0 US)); (iv) a Creative Commons Compatible - License. If you license the Adaptation under one of the licenses - mentioned in (iv), you must comply with the terms of that license. If - you license the Adaptation under the terms of any of the licenses - mentioned in (i), (ii) or (iii) (the "Applicable License"), you must - comply with the terms of the Applicable License generally and the - following provisions: (I) You must include a copy of, or the URI for, - the Applicable License with every copy of each Adaptation You - Distribute or Publicly Perform; (II) You may not offer or impose any - terms on the Adaptation that restrict the terms of the Applicable - License or the ability of the recipient of the Adaptation to exercise - the rights granted to that recipient under the terms of the Applicable - License; (III) You must keep intact all notices that refer to the - Applicable License and to the disclaimer of warranties with every copy - of the Work as included in the Adaptation You Distribute or Publicly - Perform; (IV) when You Distribute or Publicly Perform the Adaptation, - You may not impose any effective technological measures on the - Adaptation that restrict the ability of a recipient of the Adaptation - from You to exercise the rights granted to that recipient under the - terms of the Applicable License. This Section 4(b) applies to the - Adaptation as incorporated in a Collection, but this does not require - the Collection apart from the Adaptation itself to be made subject to - the terms of the Applicable License. - c. If You Distribute, or Publicly Perform the Work or any Adaptations or - Collections, You must, unless a request has been made pursuant to - Section 4(a), keep intact all copyright notices for the Work and - provide, reasonable to the medium or means You are utilizing: (i) the - name of the Original Author (or pseudonym, if applicable) if supplied, - and/or if the Original Author and/or Licensor designate another party - or parties (e.g., a sponsor institute, publishing entity, journal) for - attribution ("Attribution Parties") in Licensor's copyright notice, - terms of service or by other reasonable means, the name of such party - or parties; (ii) the title of the Work if supplied; (iii) to the - extent reasonably practicable, the URI, if any, that Licensor - specifies to be associated with the Work, unless such URI does not - refer to the copyright notice or licensing information for the Work; - and (iv) , consistent with Ssection 3(b), in the case of an - Adaptation, a credit identifying the use of the Work in the Adaptation - (e.g., "French translation of the Work by Original Author," or - "Screenplay based on original Work by Original Author"). The credit - required by this Section 4(c) may be implemented in any reasonable - manner; provided, however, that in the case of a Adaptation or - Collection, at a minimum such credit will appear, if a credit for all - contributing authors of the Adaptation or Collection appears, then as - part of these credits and in a manner at least as prominent as the - credits for the other contributing authors. For the avoidance of - doubt, You may only use the credit required by this Section for the - purpose of attribution in the manner set out above and, by exercising - Your rights under this License, You may not implicitly or explicitly - assert or imply any connection with, sponsorship or endorsement by the - Original Author, Licensor and/or Attribution Parties, as appropriate, - of You or Your use of the Work, without the separate, express prior - written permission of the Original Author, Licensor and/or Attribution - Parties. - d. Except as otherwise agreed in writing by the Licensor or as may be - otherwise permitted by applicable law, if You Reproduce, Distribute or - Publicly Perform the Work either by itself or as part of any - Adaptations or Collections, You must not distort, mutilate, modify or - take other derogatory action in relation to the Work which would be - prejudicial to the Original Author's honor or reputation. Licensor - agrees that in those jurisdictions (e.g. Japan), in which any exercise - of the right granted in Section 3(b) of this License (the right to - make Adaptations) would be deemed to be a distortion, mutilation, - modification or other derogatory action prejudicial to the Original - Author's honor and reputation, the Licensor will waive or not assert, - as appropriate, this Section, to the fullest extent permitted by the - applicable national law, to enable You to reasonably exercise Your - right under Section 3(b) of this License (right to make Adaptations) - but not otherwise. - . - 5. Representations, Warranties and Disclaimer - . - UNLESS OTHERWISE MUTUALLY AGREED TO BY THE PARTIES IN WRITING, LICENSOR - OFFERS THE WORK AS-IS AND MAKES NO REPRESENTATIONS OR WARRANTIES OF ANY - KIND CONCERNING THE WORK, EXPRESS, IMPLIED, STATUTORY OR OTHERWISE, - INCLUDING, WITHOUT LIMITATION, WARRANTIES OF TITLE, MERCHANTIBILITY, - FITNESS FOR A PARTICULAR PURPOSE, NONINFRINGEMENT, OR THE ABSENCE OF - LATENT OR OTHER DEFECTS, ACCURACY, OR THE PRESENCE OF ABSENCE OF ERRORS, - WHETHER OR NOT DISCOVERABLE. SOME JURISDICTIONS DO NOT ALLOW THE EXCLUSION - OF IMPLIED WARRANTIES, SO SUCH EXCLUSION MAY NOT APPLY TO YOU. - . - 6. Limitation on Liability. EXCEPT TO THE EXTENT REQUIRED BY APPLICABLE - LAW, IN NO EVENT WILL LICENSOR BE LIABLE TO YOU ON ANY LEGAL THEORY FOR - ANY SPECIAL, INCIDENTAL, CONSEQUENTIAL, PUNITIVE OR EXEMPLARY DAMAGES - ARISING OUT OF THIS LICENSE OR THE USE OF THE WORK, EVEN IF LICENSOR HAS - BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. - . - 7. Termination - . - a. This License and the rights granted hereunder will terminate - automatically upon any breach by You of the terms of this License. - Individuals or entities who have received Adaptations or Collections - from You under this License, however, will not have their licenses - terminated provided such individuals or entities remain in full - compliance with those licenses. Sections 1, 2, 5, 6, 7, and 8 will - survive any termination of this License. - b. Subject to the above terms and conditions, the license granted here is - perpetual (for the duration of the applicable copyright in the Work). - Notwithstanding the above, Licensor reserves the right to release the - Work under different license terms or to stop distributing the Work at - any time; provided, however that any such election will not serve to - withdraw this License (or any other license that has been, or is - required to be, granted under the terms of this License), and this - License will continue in full force and effect unless terminated as - stated above. - . - 8. Miscellaneous - . - a. Each time You Distribute or Publicly Perform the Work or a Collection, - the Licensor offers to the recipient a license to the Work on the same - terms and conditions as the license granted to You under this License. - b. Each time You Distribute or Publicly Perform an Adaptation, Licensor - offers to the recipient a license to the original Work on the same - terms and conditions as the license granted to You under this License. - c. If any provision of this License is invalid or unenforceable under - applicable law, it shall not affect the validity or enforceability of - the remainder of the terms of this License, and without further action - by the parties to this agreement, such provision shall be reformed to - the minimum extent necessary to make such provision valid and - enforceable. - d. No term or provision of this License shall be deemed waived and no - breach consented to unless such waiver or consent shall be in writing - and signed by the party to be charged with such waiver or consent. - e. This License constitutes the entire agreement between the parties with - respect to the Work licensed here. There are no understandings, - agreements or representations with respect to the Work not specified - here. Licensor shall not be bound by any additional provisions that - may appear in any communication from You. This License may not be - modified without the mutual written agreement of the Licensor and You. - f. The rights granted under, and the subject matter referenced, in this - License were drafted utilizing the terminology of the Berne Convention - for the Protection of Literary and Artistic Works (as amended on - September 28, 1979), the Rome Convention of 1961, the WIPO Copyright - Treaty of 1996, the WIPO Performances and Phonograms Treaty of 1996 - and the Universal Copyright Convention (as revised on July 24, 1971). - These rights and subject matter take effect in the relevant - jurisdiction in which the License terms are sought to be enforced - according to the corresponding provisions of the implementation of - those treaty provisions in the applicable national law. If the - standard suite of rights granted under applicable copyright law - includes additional rights not granted under this License, such - additional rights are deemed to be included in the License; this - License is not intended to restrict the license of any rights under - applicable law. - . - Creative Commons Notice - . - Creative Commons is not a party to this License, and makes no warranty - whatsoever in connection with the Work. Creative Commons will not be - liable to You or any party on any legal theory for any damages - whatsoever, including without limitation any general, special, - incidental or consequential damages arising in connection to this - license. Notwithstanding the foregoing two (2) sentences, if Creative - Commons has expressly identified itself as the Licensor hereunder, it - shall have all rights and obligations of Licensor. - . - Except for the limited purpose of indicating to the public that the - Work is licensed under the CCPL, Creative Commons does not authorize - the use by either party of the trademark "Creative Commons" or any - related trademark or logo of Creative Commons without the prior - written consent of Creative Commons. Any permitted use will be in - compliance with Creative Commons' then-current trademark usage - guidelines, as may be published on its website or otherwise made - available upon request from time to time. For the avoidance of doubt, - this trademark restriction does not form part of the License. - . - Creative Commons may be contacted at https://creativecommons.org/. - -License: CC-BY-SA-4 - Attribution-ShareAlike 4.0 International - . - ======================================================================= - . - Creative Commons Corporation ("Creative Commons") is not a law firm and - does not provide legal services or legal advice. Distribution of - Creative Commons public licenses does not create a lawyer-client or - other relationship. Creative Commons makes its licenses and related - information available on an "as-is" basis. Creative Commons gives no - warranties regarding its licenses, any material licensed under their - terms and conditions, or any related information. Creative Commons - disclaims all liability for damages resulting from their use to the - fullest extent possible. - . - Using Creative Commons Public Licenses - . - Creative Commons public licenses provide a standard set of terms and - conditions that creators and other rights holders may use to share - original works of authorship and other material subject to copyright - and certain other rights specified in the public license below. The - following considerations are for informational purposes only, are not - exhaustive, and do not form part of our licenses. - . - Considerations for licensors: Our public licenses are - intended for use by those authorized to give the public - permission to use material in ways otherwise restricted by - copyright and certain other rights. Our licenses are - irrevocable. Licensors should read and understand the terms - and conditions of the license they choose before applying it. - Licensors should also secure all rights necessary before - applying our licenses so that the public can reuse the - material as expected. Licensors should clearly mark any - material not subject to the license. This includes other CC- - licensed material, or material used under an exception or - limitation to copyright. More considerations for licensors: - wiki.creativecommons.org/Considerations_for_licensors - . - Considerations for the public: By using one of our public - licenses, a licensor grants the public permission to use the - licensed material under specified terms and conditions. If - the licensor's permission is not necessary for any reason--for - example, because of any applicable exception or limitation to - copyright--then that use is not regulated by the license. Our - licenses grant only permissions under copyright and certain - other rights that a licensor has authority to grant. Use of - the licensed material may still be restricted for other - reasons, including because others have copyright or other - rights in the material. A licensor may make special requests, - such as asking that all changes be marked or described. - Although not required by our licenses, you are encouraged to - respect those requests where reasonable. More considerations - for the public: - wiki.creativecommons.org/Considerations_for_licensees - . - ======================================================================= - . - Creative Commons Attribution-ShareAlike 4.0 International Public - License - . - By exercising the Licensed Rights (defined below), You accept and agree - to be bound by the terms and conditions of this Creative Commons - Attribution-ShareAlike 4.0 International Public License ("Public - License"). To the extent this Public License may be interpreted as a - contract, You are granted the Licensed Rights in consideration of Your - acceptance of these terms and conditions, and the Licensor grants You - such rights in consideration of benefits the Licensor receives from - making the Licensed Material available under these terms and - conditions. - . - . - Section 1 -- Definitions. - . - a. Adapted Material means material subject to Copyright and Similar - Rights that is derived from or based upon the Licensed Material - and in which the Licensed Material is translated, altered, - arranged, transformed, or otherwise modified in a manner requiring - permission under the Copyright and Similar Rights held by the - Licensor. For purposes of this Public License, where the Licensed - Material is a musical work, performance, or sound recording, - Adapted Material is always produced where the Licensed Material is - synched in timed relation with a moving image. - . - b. Adapter's License means the license You apply to Your Copyright - and Similar Rights in Your contributions to Adapted Material in - accordance with the terms and conditions of this Public License. - . - c. BY-SA Compatible License means a license listed at - creativecommons.org/compatiblelicenses, approved by Creative - Commons as essentially the equivalent of this Public License. - . - d. Copyright and Similar Rights means copyright and/or similar rights - closely related to copyright including, without limitation, - performance, broadcast, sound recording, and Sui Generis Database - Rights, without regard to how the rights are labeled or - categorized. For purposes of this Public License, the rights - specified in Section 2(b)(1)-(2) are not Copyright and Similar - Rights. - . - e. Effective Technological Measures means those measures that, in the - absence of proper authority, may not be circumvented under laws - fulfilling obligations under Article 11 of the WIPO Copyright - Treaty adopted on December 20, 1996, and/or similar international - agreements. - . - f. Exceptions and Limitations means fair use, fair dealing, and/or - any other exception or limitation to Copyright and Similar Rights - that applies to Your use of the Licensed Material. - . - g. License Elements means the license attributes listed in the name - of a Creative Commons Public License. The License Elements of this - Public License are Attribution and ShareAlike. - . - h. Licensed Material means the artistic or literary work, database, - or other material to which the Licensor applied this Public - License. - . - i. Licensed Rights means the rights granted to You subject to the - terms and conditions of this Public License, which are limited to - all Copyright and Similar Rights that apply to Your use of the - Licensed Material and that the Licensor has authority to license. - . - j. Licensor means the individual(s) or entity(ies) granting rights - under this Public License. - . - k. Share means to provide material to the public by any means or - process that requires permission under the Licensed Rights, such - as reproduction, public display, public performance, distribution, - dissemination, communication, or importation, and to make material - available to the public including in ways that members of the - public may access the material from a place and at a time - individually chosen by them. - . - l. Sui Generis Database Rights means rights other than copyright - resulting from Directive 96/9/EC of the European Parliament and of - the Council of 11 March 1996 on the legal protection of databases, - as amended and/or succeeded, as well as other essentially - equivalent rights anywhere in the world. - . - m. You means the individual or entity exercising the Licensed Rights - under this Public License. Your has a corresponding meaning. - . - . - Section 2 -- Scope. - . - a. License grant. - . - 1. Subject to the terms and conditions of this Public License, - the Licensor hereby grants You a worldwide, royalty-free, - non-sublicensable, non-exclusive, irrevocable license to - exercise the Licensed Rights in the Licensed Material to: - . - a. reproduce and Share the Licensed Material, in whole or - in part; and - . - b. produce, reproduce, and Share Adapted Material. - . - 2. Exceptions and Limitations. For the avoidance of doubt, where - Exceptions and Limitations apply to Your use, this Public - License does not apply, and You do not need to comply with - its terms and conditions. - . - 3. Term. The term of this Public License is specified in Section - 6(a). - . - 4. Media and formats; technical modifications allowed. The - Licensor authorizes You to exercise the Licensed Rights in - all media and formats whether now known or hereafter created, - and to make technical modifications necessary to do so. The - Licensor waives and/or agrees not to assert any right or - authority to forbid You from making technical modifications - necessary to exercise the Licensed Rights, including - technical modifications necessary to circumvent Effective - Technological Measures. For purposes of this Public License, - simply making modifications authorized by this Section 2(a) - (4) never produces Adapted Material. - . - 5. Downstream recipients. - . - a. Offer from the Licensor -- Licensed Material. Every - recipient of the Licensed Material automatically - receives an offer from the Licensor to exercise the - Licensed Rights under the terms and conditions of this - Public License. - . - b. Additional offer from the Licensor -- Adapted Material. - Every recipient of Adapted Material from You - automatically receives an offer from the Licensor to - exercise the Licensed Rights in the Adapted Material - under the conditions of the Adapter's License You apply. - . - c. No downstream restrictions. You may not offer or impose - any additional or different terms or conditions on, or - apply any Effective Technological Measures to, the - Licensed Material if doing so restricts exercise of the - Licensed Rights by any recipient of the Licensed - Material. - . - 6. No endorsement. Nothing in this Public License constitutes or - may be construed as permission to assert or imply that You - are, or that Your use of the Licensed Material is, connected - with, or sponsored, endorsed, or granted official status by, - the Licensor or others designated to receive attribution as - provided in Section 3(a)(1)(A)(i). - . - b. Other rights. - . - 1. Moral rights, such as the right of integrity, are not - licensed under this Public License, nor are publicity, - privacy, and/or other similar personality rights; however, to - the extent possible, the Licensor waives and/or agrees not to - assert any such rights held by the Licensor to the limited - extent necessary to allow You to exercise the Licensed - Rights, but not otherwise. - . - 2. Patent and trademark rights are not licensed under this - Public License. - . - 3. To the extent possible, the Licensor waives any right to - collect royalties from You for the exercise of the Licensed - Rights, whether directly or through a collecting society - under any voluntary or waivable statutory or compulsory - licensing scheme. In all other cases the Licensor expressly - reserves any right to collect such royalties. - . - . - Section 3 -- License Conditions. - . - Your exercise of the Licensed Rights is expressly made subject to the - following conditions. - . - a. Attribution. - . - 1. If You Share the Licensed Material (including in modified - form), You must: - . - a. retain the following if it is supplied by the Licensor - with the Licensed Material: - . - i. identification of the creator(s) of the Licensed - Material and any others designated to receive - attribution, in any reasonable manner requested by - the Licensor (including by pseudonym if - designated); - . - ii. a copyright notice; - . - iii. a notice that refers to this Public License; - . - iv. a notice that refers to the disclaimer of - warranties; - . - v. a URI or hyperlink to the Licensed Material to the - extent reasonably practicable; - . - b. indicate if You modified the Licensed Material and - retain an indication of any previous modifications; and - . - c. indicate the Licensed Material is licensed under this - Public License, and include the text of, or the URI or - hyperlink to, this Public License. - . - 2. You may satisfy the conditions in Section 3(a)(1) in any - reasonable manner based on the medium, means, and context in - which You Share the Licensed Material. For example, it may be - reasonable to satisfy the conditions by providing a URI or - hyperlink to a resource that includes the required - information. - . - 3. If requested by the Licensor, You must remove any of the - information required by Section 3(a)(1)(A) to the extent - reasonably practicable. - . - b. ShareAlike. - . - In addition to the conditions in Section 3(a), if You Share - Adapted Material You produce, the following conditions also apply. - . - 1. The Adapter's License You apply must be a Creative Commons - license with the same License Elements, this version or - later, or a BY-SA Compatible License. - . - 2. You must include the text of, or the URI or hyperlink to, the - Adapter's License You apply. You may satisfy this condition - in any reasonable manner based on the medium, means, and - context in which You Share Adapted Material. - . - 3. You may not offer or impose any additional or different terms - or conditions on, or apply any Effective Technological - Measures to, Adapted Material that restrict exercise of the - rights granted under the Adapter's License You apply. - . - . - Section 4 -- Sui Generis Database Rights. - . - Where the Licensed Rights include Sui Generis Database Rights that - apply to Your use of the Licensed Material: - . - a. for the avoidance of doubt, Section 2(a)(1) grants You the right - to extract, reuse, reproduce, and Share all or a substantial - portion of the contents of the database; - . - b. if You include all or a substantial portion of the database - contents in a database in which You have Sui Generis Database - Rights, then the database in which You have Sui Generis Database - Rights (but not its individual contents) is Adapted Material, - . - including for purposes of Section 3(b); and - c. You must comply with the conditions in Section 3(a) if You Share - all or a substantial portion of the contents of the database. - . - For the avoidance of doubt, this Section 4 supplements and does not - replace Your obligations under this Public License where the Licensed - Rights include other Copyright and Similar Rights. - . - . - Section 5 -- Disclaimer of Warranties and Limitation of Liability. - . - a. UNLESS OTHERWISE SEPARATELY UNDERTAKEN BY THE LICENSOR, TO THE - EXTENT POSSIBLE, THE LICENSOR OFFERS THE LICENSED MATERIAL AS-IS - AND AS-AVAILABLE, AND MAKES NO REPRESENTATIONS OR WARRANTIES OF - ANY KIND CONCERNING THE LICENSED MATERIAL, WHETHER EXPRESS, - IMPLIED, STATUTORY, OR OTHER. THIS INCLUDES, WITHOUT LIMITATION, - WARRANTIES OF TITLE, MERCHANTABILITY, FITNESS FOR A PARTICULAR - PURPOSE, NON-INFRINGEMENT, ABSENCE OF LATENT OR OTHER DEFECTS, - ACCURACY, OR THE PRESENCE OR ABSENCE OF ERRORS, WHETHER OR NOT - KNOWN OR DISCOVERABLE. WHERE DISCLAIMERS OF WARRANTIES ARE NOT - ALLOWED IN FULL OR IN PART, THIS DISCLAIMER MAY NOT APPLY TO YOU. - . - b. TO THE EXTENT POSSIBLE, IN NO EVENT WILL THE LICENSOR BE LIABLE - TO YOU ON ANY LEGAL THEORY (INCLUDING, WITHOUT LIMITATION, - NEGLIGENCE) OR OTHERWISE FOR ANY DIRECT, SPECIAL, INDIRECT, - INCIDENTAL, CONSEQUENTIAL, PUNITIVE, EXEMPLARY, OR OTHER LOSSES, - COSTS, EXPENSES, OR DAMAGES ARISING OUT OF THIS PUBLIC LICENSE OR - USE OF THE LICENSED MATERIAL, EVEN IF THE LICENSOR HAS BEEN - ADVISED OF THE POSSIBILITY OF SUCH LOSSES, COSTS, EXPENSES, OR - DAMAGES. WHERE A LIMITATION OF LIABILITY IS NOT ALLOWED IN FULL OR - IN PART, THIS LIMITATION MAY NOT APPLY TO YOU. - . - c. The disclaimer of warranties and limitation of liability provided - above shall be interpreted in a manner that, to the extent - possible, most closely approximates an absolute disclaimer and - waiver of all liability. - . - . - Section 6 -- Term and Termination. - . - a. This Public License applies for the term of the Copyright and - Similar Rights licensed here. However, if You fail to comply with - this Public License, then Your rights under this Public License - terminate automatically. - . - b. Where Your right to use the Licensed Material has terminated under - Section 6(a), it reinstates: - . - 1. automatically as of the date the violation is cured, provided - it is cured within 30 days of Your discovery of the - violation; or - . - 2. upon express reinstatement by the Licensor. - . - For the avoidance of doubt, this Section 6(b) does not affect any - right the Licensor may have to seek remedies for Your violations - of this Public License. - . - c. For the avoidance of doubt, the Licensor may also offer the - Licensed Material under separate terms or conditions or stop - distributing the Licensed Material at any time; however, doing so - will not terminate this Public License. - . - d. Sections 1, 5, 6, 7, and 8 survive termination of this Public - License. - . - . - Section 7 -- Other Terms and Conditions. - . - a. The Licensor shall not be bound by any additional or different - terms or conditions communicated by You unless expressly agreed. - . - b. Any arrangements, understandings, or agreements regarding the - Licensed Material not stated herein are separate from and - independent of the terms and conditions of this Public License. - . - . - Section 8 -- Interpretation. - . - a. For the avoidance of doubt, this Public License does not, and - shall not be interpreted to, reduce, limit, restrict, or impose - conditions on any use of the Licensed Material that could lawfully - be made without permission under this Public License. - . - b. To the extent possible, if any provision of this Public License is - deemed unenforceable, it shall be automatically reformed to the - minimum extent necessary to make it enforceable. If the provision - cannot be reformed, it shall be severed from this Public License - without affecting the enforceability of the remaining terms and - conditions. - . - c. No term or condition of this Public License will be waived and no - failure to comply consented to unless expressly agreed to by the - Licensor. - . - d. Nothing in this Public License constitutes or may be interpreted - as a limitation upon, or waiver of, any privileges and immunities - that apply to the Licensor or You, including from the legal - processes of any jurisdiction or authority. - . - . - ======================================================================= - . - Creative Commons is not a party to its public - licenses. Notwithstanding, Creative Commons may elect to apply one of - its public licenses to material it publishes and in those instances - will be considered the “Licensor.” The text of the Creative Commons - public licenses is dedicated to the public domain under the CC0 Public - Domain Dedication. Except for the limited purpose of indicating that - material is shared under a Creative Commons public license or as - otherwise permitted by the Creative Commons policies published at - creativecommons.org/policies, Creative Commons does not authorize the - use of the trademark "Creative Commons" or any other trademark or logo - of Creative Commons without its prior written consent including, - without limitation, in connection with any unauthorized modifications - to any of its public licenses or any other arrangements, - understandings, or agreements concerning use of licensed material. For - the avoidance of doubt, this paragraph does not form part of the - public licenses. - . - Creative Commons may be contacted at creativecommons.org. - -License: Expat - Permission is hereby granted, free of charge, to any person obtaining - a copy of this software and associated documentation files (the - "Software"), to deal in the Software without restriction, including - without limitation the rights to use, copy, modify, merge, publish, - distribute, sublicense, and/or sell copies of the Software, and to - permit persons to whom the Software is furnished to do so, subject to - the following conditions: - . - The above copyright notice and this permission notice shall be included - in all copies or substantial portions of the Software. - . - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. - IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY - CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -License: GPL-2+ - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - . - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - . - You should have received a copy of the GNU General Public License along - with this program; if not, write to the Free Software Foundation, Inc., - 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - . - On Debian systems, the complete text of the GNU General Public License - can be found in `/usr/share/common-licenses/GPL-2'. - -License: LGPL-2+ - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - . - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - . - You should have received a copy of the GNU Library General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - . - On Debian systems, the complete text of the GNU Library General Public License - can be found in `/usr/share/common-licenses/LGPL-2'. - -License: LGPL-2.1+ - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - . - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - . - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - . - On Debian systems, the complete text of the GNU Lesser General Public License - can be found in `/usr/share/common-licenses/LGPL-2.1'. - -License: WOL - Permission to use, copy, modify, distribute and sell this software and its - documentation for any purpose is hereby granted without fee, provided that - the above copyright notice and this license appear in all source copies. - THIS SOFTWARE IS PROVIDED "AS IS" WITHOUT EXPRESS OR IMPLIED WARRANTY OF - ANY KIND. See https://www.dspguru.com/wol.htm for more information. - -License: non-free - This license does not comply with Debian Free Software Guidelines. diff --git a/debian/gbp.conf b/debian/gbp.conf deleted file mode 100644 index cec628c7444..00000000000 --- a/debian/gbp.conf +++ /dev/null @@ -1,2 +0,0 @@ -[DEFAULT] -pristine-tar = True diff --git a/debian/lmms-bin.install b/debian/lmms-bin.install deleted file mode 100644 index 229fa02e315..00000000000 --- a/debian/lmms-bin.install +++ /dev/null @@ -1,4 +0,0 @@ -usr/bin/lmms -usr/lib/*/lmms/ladspa/* -usr/lib/*/lmms/lib* -usr/lib/*/lmms/RemoteZynAddSubFx diff --git a/debian/lmms-bin.lintian-overrides b/debian/lmms-bin.lintian-overrides deleted file mode 100644 index 45e07c39d30..00000000000 --- a/debian/lmms-bin.lintian-overrides +++ /dev/null @@ -1,9 +0,0 @@ -lmms: pkg-has-shlibs-control-file-but-no-actual-shared-libs -lmms: postinst-has-useless-call-to-ldconfig -lmms: postrm-has-useless-call-to-ldconfig - -# env is used to set the environment, then lmms is called. -lmms: desktop-command-not-in-package usr/share/applications/lmms.desktop env - -# Icon is in lmms-common. -lmms: menu-icon-missing usr/share/pixmaps/lmms.xpm diff --git a/debian/lmms-common.docs b/debian/lmms-common.docs deleted file mode 100644 index a7b624a0a7a..00000000000 --- a/debian/lmms-common.docs +++ /dev/null @@ -1 +0,0 @@ -plugins/LadspaEffect/caps/caps.html diff --git a/debian/lmms-common.install b/debian/lmms-common.install deleted file mode 100644 index 467ee8798d3..00000000000 --- a/debian/lmms-common.install +++ /dev/null @@ -1,25 +0,0 @@ -usr/share/applications -usr/share/bash-completion -usr/share/icons -usr/share/lmms/[a-o]* -usr/share/lmms/presets/[A-Y]* -usr/share/lmms/projects/demos/Alf42red-* -usr/share/lmms/projects/demos/CapDan -usr/share/lmms/projects/demos/EsoXLB-* -usr/share/lmms/projects/demos/Impulslogik-* -usr/share/lmms/projects/demos/Jousboxx-* -usr/share/lmms/projects/demos/Momo64-* -usr/share/lmms/projects/demos/Oglsdl-* -usr/share/lmms/projects/demos/Settel-* -usr/share/lmms/projects/demos/Socceroos-* -usr/share/lmms/projects/demos/TameAnderson-* -usr/share/lmms/projects/demos/Thomasso-* -usr/share/lmms/projects/shorties/Crunk* -usr/share/lmms/projects/shorties/Greshz-* -usr/share/lmms/projects/shorties/Surrender-* -usr/share/lmms/projects/templates -usr/share/lmms/projects/tutorials -usr/share/lmms/[q-z]* -usr/share/man -usr/share/mime -debian/lmms.xpm usr/share/pixmaps/ diff --git a/debian/lmms-common.links b/debian/lmms-common.links deleted file mode 100644 index 75596233c53..00000000000 --- a/debian/lmms-common.links +++ /dev/null @@ -1 +0,0 @@ -usr/share/zynaddsubfx/banks usr/share/lmms/presets/ZynAddSubFX diff --git a/debian/lmms-common.maintscript b/debian/lmms-common.maintscript deleted file mode 100644 index 15d67355689..00000000000 --- a/debian/lmms-common.maintscript +++ /dev/null @@ -1 +0,0 @@ -dir_to_symlink /usr/share/lmms/presets/ZynAddSubFX ../../zynaddsubfx/banks 1.1.3-2~ diff --git a/debian/lmms-vst-server.install b/debian/lmms-vst-server.install deleted file mode 100644 index 60efaed7b08..00000000000 --- a/debian/lmms-vst-server.install +++ /dev/null @@ -1 +0,0 @@ -usr/lib/*/lmms/{32/,}RemoteVstPlugin* diff --git a/debian/lmms.xpm b/debian/lmms.xpm deleted file mode 100644 index 425e3156db3..00000000000 --- a/debian/lmms.xpm +++ /dev/null @@ -1,103 +0,0 @@ -/* XPM */ -static char * lmms_xpm[] = { -"24 24 76 1", -" c None", -". c #208B4D", -"+ c #208C4D", -"@ c #229452", -"# c #239654", -"$ c #239754", -"% c #299557", -"& c #2A9658", -"* c #239B56", -"= c #249B56", -"- c #249C57", -"; c #249D57", -"> c #259E58", -", c #259F59", -"' c #25A059", -") c #25A15A", -"! c #25A25A", -"~ c #25A35A", -"{ c #26A35B", -"] c #26A45B", -"^ c #26A55C", -"/ c #26A65C", -"( c #26A65D", -"_ c #3E9E67", -": c #26A75D", -"< c #28A75E", -"[ c #28A75F", -"} c #27A85E", -"| c #27A95E", -"1 c #27AA5F", -"2 c #27AB5F", -"3 c #29AC60", -"4 c #2AAC61", -"5 c #2FAC64", -"6 c #54A275", -"7 c #33AE67", -"8 c #56A477", -"9 c #2AB365", -"0 c #5BA67B", -"a c #3CB36F", -"b c #41B572", -"c c #64B285", -"d c #50BA7D", -"e c #58B881", -"f c #5CBA84", -"g c #56BC82", -"h c #5FBB86", -"i c #34D07B", -"j c #34D17A", -"k c #34D17B", -"l c #68C28F", -"m c #77C899", -"n c #7DCD9F", -"o c #90C7A8", -"p c #8CD2AA", -"q c #9AD7B4", -"r c #A9DDBF", -"s c #B0E0C5", -"t c #BDDDCB", -"u c #C3DFCF", -"v c #BFE6CF", -"w c #CBE3D5", -"x c #C5E6D3", -"y c #CDE9D9", -"z c #D1EDDD", -"A c #D7EFE2", -"B c #E1F0E8", -"C c #E6F5EC", -"D c #EAF6EF", -"E c #F3FAF6", -"F c #F7FBF9", -"G c #F8FBFA", -"H c #F6FCF9", -"I c #FCFEFD", -"J c #FDFEFE", -"K c #FFFFFF", -" ", -" kiiiiiiiiiiiiiiiiiij ", -" j92222222222222222229i ", -" i22222222222222222222i ", -" i22222222asvb22222222i ", -" i2222223nEKKHp4222222i ", -" i11111dzKKKKKKAg11111i ", -" i|||5qIKKBccBKKJr7|||i ", -" i}}lCKKFo%))&oGKKDm}}i ", -" i::KKKt_*(::(*_tKKK::i ", -" i//KKK@~//////~@KKK//i ", -" i^^KKK^^^^^^^^^^KKK^^i ", -" i]]KKK]]]]]]]]]]KKK]]i ", -" i{{KKKf{{{{{{{{fKKK{{i ", -" i!!KKKKyh!!!!exKKKK!!i ", -" i))KKKKKK))))KKKKKK))i ", -" i''KKKKKK''''KKKKKK''i ", -" i,,KKKKKK,,,,KKKKKK,,i ", -" i>>6uKKw0>>>>6uKKw0>>i ", -" i;;$+88.$;;;;$+88.$;;i ", -" i----##--------##----i ", -" j<==================[i ", -" jiiiiiiiiiiiiiiiiiii ", -" "}; diff --git a/debian/patches/build-amd64-20181013.patch b/debian/patches/build-amd64-20181013.patch deleted file mode 100644 index a9bb61da4d4..00000000000 --- a/debian/patches/build-amd64-20181013.patch +++ /dev/null @@ -1,46 +0,0 @@ -Description: Fix build as of 2018-10-13 - Fix build errors, possibly introduced with GCC 8. -Author: Javier Serrano Polo -Bug-Debian: https://bugs.debian.org/897806 - -Index: lmms-1.1.3/plugins/LadspaEffect/caps/dsp/FPTruncateMode.h -=================================================================== ---- lmms-1.1.3.orig/plugins/LadspaEffect/caps/dsp/FPTruncateMode.h -+++ lmms-1.1.3/plugins/LadspaEffect/caps/dsp/FPTruncateMode.h -@@ -40,9 +40,11 @@ class FPTruncateMode - - FPTruncateMode() - { -+#ifdef __i386__ - fstcw (cw0); - cw1 = cw0 | 0xC00; - fldcw (cw1); -+#endif - } - - ~FPTruncateMode() -Index: lmms-1.1.3/plugins/ZynAddSubFx/zynaddsubfx/src/Synth/OscilGen.cpp -=================================================================== ---- lmms-1.1.3.orig/plugins/ZynAddSubFx/zynaddsubfx/src/Synth/OscilGen.cpp -+++ lmms-1.1.3/plugins/ZynAddSubFx/zynaddsubfx/src/Synth/OscilGen.cpp -@@ -33,7 +33,8 @@ - //operations on FFTfreqs - inline void clearAll(fft_t *freqs) - { -- memset(freqs, 0, synth->oscilsize / 2 * sizeof(fft_t)); -+ for(int i = 0; i < synth->oscilsize / 2; ++i) -+ freqs[i] = fft_t(0.0f, 0.0f); - } - - inline void clearDC(fft_t *freqs) -@@ -928,8 +929,8 @@ void OscilGen::getspectrum(int n, float - if(what == 0) { - for(int i = 0; i < n; ++i) - outoscilFFTfreqs[i] = fft_t(spc[i], spc[i]); -- memset(outoscilFFTfreqs + n, 0, -- (synth->oscilsize / 2 - n) * sizeof(fft_t)); -+ for(int i = n; i < synth->oscilsize / 2; ++i) -+ outoscilFFTfreqs[i] = fft_t(0.0f, 0.0f); - adaptiveharmonic(outoscilFFTfreqs, 0.0f); - adaptiveharmonicpostprocess(outoscilFFTfreqs, n - 1); - for(int i = 0; i < n; ++i) diff --git a/debian/patches/clang.patch b/debian/patches/clang.patch deleted file mode 100644 index 7bbd15cd8de..00000000000 --- a/debian/patches/clang.patch +++ /dev/null @@ -1,601 +0,0 @@ -Description: Fix build with Clang - Several issues are present: - - Unused private elements. - - Wrong use of delete. - - Unsupported compiler options. - - Shifting negative values. - - Possible truncations. - - Uninitialized variables. - - Unused code. - - Hiding overloaded virtual functions. - - Declarations outside namespace. - - Mismatched class tag. - . - Be careful editing this patch because allegrosmfwr.cpp has CRLF terminators. -Author: Javier Serrano Polo -Bug: https://github.com/LMMS/lmms/issues/3073 - -Index: lmms-1.1.3/include/AutomatableModel.h -=================================================================== ---- lmms-1.1.3.orig/include/AutomatableModel.h 2017-01-03 13:01:47.000000000 +0100 -+++ lmms-1.1.3/include/AutomatableModel.h 2017-01-03 13:11:25.000000000 +0100 -@@ -307,7 +307,6 @@ - - // most objects will need this temporarily (until sampleExact is - // standard) -- float m_oldValue; - int m_setValueDepth; - - AutoModelVector m_linkedModels; -Index: lmms-1.1.3/plugins/LadspaEffect/calf/CMakeLists.txt -=================================================================== ---- lmms-1.1.3.orig/plugins/LadspaEffect/calf/CMakeLists.txt 2017-01-03 16:03:14.000000000 +0100 -+++ lmms-1.1.3/plugins/LadspaEffect/calf/CMakeLists.txt 2017-01-03 16:14:28.000000000 +0100 -@@ -7,11 +7,22 @@ - "${CMAKE_CURRENT_SOURCE_DIR}/src") - INSTALL(TARGETS calf LIBRARY DESTINATION "${PLUGIN_DIR}/ladspa") - SET_TARGET_PROPERTIES(calf PROPERTIES PREFIX "") -+ - SET(INLINE_FLAGS "") --IF("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU") --SET(INLINE_FLAGS "-finline-functions-called-once -finline-limit=80") -+ -+INCLUDE(CheckCXXCompilerFlag) -+CHECK_CXX_COMPILER_FLAG(-finline-functions CXX_HAVE_INLINE_FUNCTIONS) -+IF(${CXX_HAVE_INLINE_FUNCTIONS}) -+ SET(INLINE_FLAGS "${INLINE_FLAGS} -finline-functions") - ENDIF() --SET_TARGET_PROPERTIES(calf PROPERTIES COMPILE_FLAGS "-O2 -finline-functions ${INLINE_FLAGS}") -+CHECK_CXX_COMPILER_FLAG(-finline-functions-called-once -+ CXX_HAVE_INLINE_FUNCTIONS_CALLED_ONCE) -+IF(${CXX_HAVE_INLINE_FUNCTIONS_CALLED_ONCE}) -+ SET(INLINE_FLAGS "${INLINE_FLAGS} -finline-functions-called-once \ -+ -finline-limit=80") -+ENDIF() -+ -+SET_TARGET_PROPERTIES(calf PROPERTIES COMPILE_FLAGS "-O2 ${INLINE_FLAGS}") - - IF(LMMS_BUILD_WIN32) - ADD_CUSTOM_COMMAND(TARGET calf POST_BUILD COMMAND "${STRIP}" "\"${CMAKE_CURRENT_BINARY_DIR}/calf.dll\"") -Index: lmms-1.1.3/plugins/LadspaEffect/calf/veal/src/calf/metadata.h -=================================================================== ---- lmms-1.1.3.orig/plugins/LadspaEffect/calf/veal/src/calf/metadata.h 2017-01-03 17:41:17.000000000 +0100 -+++ lmms-1.1.3/plugins/LadspaEffect/calf/veal/src/calf/metadata.h 2017-01-03 17:50:40.000000000 +0100 -@@ -51,7 +51,7 @@ - enum { in_count = 2, out_count = 2, ins_optional = 0, outs_optional = 0, rt_capable = true, require_midi = false, support_midi = false }; - PLUGIN_NAME_ID_LABEL("filter", "filter", "Filter") - /// do not export mode and inertia as CVs, as those are settings and not parameters -- bool is_cv(int param_no) { return param_no != par_mode && param_no != par_inertia; } -+ bool is_cv(int param_no) const { return param_no != par_mode && param_no != par_inertia; } - }; - - /// Filterclavier - metadata -@@ -61,7 +61,7 @@ - enum { in_count = 2, out_count = 2, ins_optional = 0, outs_optional = 0, rt_capable = true, require_midi = true, support_midi = true }; - PLUGIN_NAME_ID_LABEL("filterclavier", "filterclavier", "Filterclavier") - /// do not export mode and inertia as CVs, as those are settings and not parameters -- bool is_cv(int param_no) { return param_no != par_mode && param_no != par_inertia; } -+ bool is_cv(int param_no) const { return param_no != par_mode && param_no != par_inertia; } - }; - - struct reverb_metadata: public plugin_metadata -@@ -499,7 +499,7 @@ - PLUGIN_NAME_ID_LABEL("organ", "organ", "Organ") - - public: -- plugin_command_info *get_commands(); -+ plugin_command_info *get_commands() const; - const char *const *get_configure_vars() const; - }; - -Index: lmms-1.1.3/plugins/LadspaEffect/calf/veal/src/calf/modules.h -=================================================================== ---- lmms-1.1.3.orig/plugins/LadspaEffect/calf/veal/src/calf/modules.h 2017-01-03 19:02:59.000000000 +0100 -+++ lmms-1.1.3/plugins/LadspaEffect/calf/veal/src/calf/modules.h 2017-01-03 19:30:35.000000000 +0100 -@@ -89,13 +89,14 @@ - using audio_module::ins; - using audio_module::outs; - using audio_module::params; -+ using FilterClass::calculate_filter; - - dsp::inertia inertia_cutoff, inertia_resonance, inertia_gain; - dsp::once_per_n timer; - bool is_active; - mutable volatile int last_generation, last_calculated_generation; - -- filter_module_with_inertia(float **ins, float **outs, float **params) -+ filter_module_with_inertia() - : inertia_cutoff(dsp::exponential_ramp(128), 20) - , inertia_resonance(dsp::exponential_ramp(128), 20) - , inertia_gain(dsp::exponential_ramp(128), 1.0) -@@ -193,7 +194,7 @@ - mutable float old_cutoff, old_resonance, old_mode; - public: - filter_audio_module() -- : filter_module_with_inertia(ins, outs, params) -+ : filter_module_with_inertia() - { - last_generation = 0; - old_mode = old_resonance = old_cutoff = -1; -Index: lmms-1.1.3/plugins/LadspaEffect/calf/veal/src/calf/modules_comp.h -=================================================================== ---- lmms-1.1.3.orig/plugins/LadspaEffect/calf/veal/src/calf/modules_comp.h 2017-01-03 19:35:53.000000000 +0100 -+++ lmms-1.1.3/plugins/LadspaEffect/calf/veal/src/calf/modules_comp.h 2017-01-03 19:38:06.000000000 +0100 -@@ -39,10 +39,10 @@ - class gain_reduction_audio_module - { - private: -- float linSlope, detected, kneeSqrt, kneeStart, linKneeStart, kneeStop; -+ float linSlope, detected, kneeStart, linKneeStart, kneeStop; - float compressedKneeStop, adjKneeStart, thres; - float attack, release, threshold, ratio, knee, makeup, detection, stereo_link, bypass, mute, meter_out, meter_comp; -- mutable float old_threshold, old_ratio, old_knee, old_makeup, old_bypass, old_mute, old_detection, old_stereo_link; -+ mutable float old_threshold, old_ratio, old_knee, old_makeup, old_bypass, old_mute, old_detection; - mutable volatile int last_generation; - uint32_t srate; - bool is_active; -@@ -69,7 +69,7 @@ - /// Main gate routine by Damien called by various audio modules - class expander_audio_module { - private: -- float linSlope, peak, detected, kneeSqrt, kneeStart, linKneeStart, kneeStop, linKneeStop; -+ float linSlope, detected, kneeStart, linKneeStart, kneeStop, linKneeStop; - float compressedKneeStop, adjKneeStart, range, thres, attack_coeff, release_coeff; - float attack, release, threshold, ratio, knee, makeup, detection, stereo_link, bypass, mute, meter_out, meter_gate; - mutable float old_threshold, old_ratio, old_knee, old_makeup, old_bypass, old_range, old_trigger, old_mute, old_detection, old_stereo_link; -@@ -142,7 +142,7 @@ - mutable float f1_freq_old, f2_freq_old, f1_level_old, f2_level_old; - mutable float f1_freq_old1, f2_freq_old1, f1_level_old1, f2_level_old1; - CalfScModes sc_mode; -- mutable CalfScModes sc_mode_old, sc_mode_old1; -+ mutable CalfScModes sc_mode_old1; - float f1_active, f2_active; - stereo_in_out_metering meters; - gain_reduction_audio_module compressor; -Index: lmms-1.1.3/plugins/LadspaEffect/calf/veal/src/calf/modules_limit.h -=================================================================== ---- lmms-1.1.3.orig/plugins/LadspaEffect/calf/veal/src/calf/modules_limit.h 2017-01-03 19:39:00.000000000 +0100 -+++ lmms-1.1.3/plugins/LadspaEffect/calf/veal/src/calf/modules_limit.h 2017-01-03 19:40:20.000000000 +0100 -@@ -37,7 +37,6 @@ - private: - typedef limiter_audio_module AM; - uint32_t clip_inL, clip_inR, clip_outL, clip_outR, asc_led; -- int mode, mode_old; - float meter_inL, meter_inR, meter_outL, meter_outR; - dsp::lookahead_limiter limiter; - public: -@@ -73,7 +72,6 @@ - unsigned int overall_buffer_size; - float *buffer; - int channels; -- float striprel[strips]; - float weight[strips]; - float weight_old[strips]; - float limit_old; -Index: lmms-1.1.3/plugins/LadspaEffect/calf/veal/src/calf/modules_mod.h -=================================================================== ---- lmms-1.1.3.orig/plugins/LadspaEffect/calf/veal/src/calf/modules_mod.h 2017-01-03 19:41:55.000000000 +0100 -+++ lmms-1.1.3/plugins/LadspaEffect/calf/veal/src/calf/modules_mod.h 2017-01-03 19:42:19.000000000 +0100 -@@ -160,8 +160,6 @@ - typedef pulsator_audio_module AM; - uint32_t clip_inL, clip_inR, clip_outL, clip_outR; - float meter_inL, meter_inR, meter_outL, meter_outR; -- float offset_old; -- int mode_old; - bool clear_reset; - dsp::simple_lfo lfoL, lfoR; - public: -Index: lmms-1.1.3/plugins/LadspaEffect/calf/veal/src/calf/organ.h -=================================================================== ---- lmms-1.1.3.orig/plugins/LadspaEffect/calf/veal/src/calf/organ.h 2017-01-03 19:43:08.000000000 +0100 -+++ lmms-1.1.3/plugins/LadspaEffect/calf/veal/src/calf/organ.h 2017-01-03 19:53:55.000000000 +0100 -@@ -318,6 +318,7 @@ - using drawbar_organ::note_on; - using drawbar_organ::note_off; - using drawbar_organ::control_change; -+ using drawbar_organ::pitch_bend; - enum { param_count = drawbar_organ::param_count}; - dsp::organ_parameters par_values; - uint32_t srate; -@@ -338,9 +339,9 @@ - void deactivate(); - uint32_t process(uint32_t offset, uint32_t nsamples, uint32_t inputs_mask, uint32_t outputs_mask); - /// No CV inputs for now -- bool is_cv(int param_no) { return false; } -+ bool is_cv(int param_no) const { return false; } - /// Practically all the stuff here is noisy -- bool is_noisy(int param_no) { return true; } -+ bool is_noisy(int param_no) const { return true; } - void execute(int cmd_no); - bool get_graph(int index, int subindex, float *data, int points, cairo_iface *context) const; - char *configure(const char *key, const char *value); -Index: lmms-1.1.3/plugins/LadspaEffect/calf/veal/src/calf/preset.h -=================================================================== ---- lmms-1.1.3.orig/plugins/LadspaEffect/calf/veal/src/calf/preset.h 2017-01-03 19:57:02.000000000 +0100 -+++ lmms-1.1.3/plugins/LadspaEffect/calf/veal/src/calf/preset.h 2017-01-03 20:00:25.000000000 +0100 -@@ -27,7 +27,7 @@ - - namespace calf_plugins { - --class plugin_ctl_iface; -+struct plugin_ctl_iface; - - /// Contents of single preset - struct plugin_preset -Index: lmms-1.1.3/plugins/LadspaEffect/calf/veal/src/calf/primitives.h -=================================================================== ---- lmms-1.1.3.orig/plugins/LadspaEffect/calf/veal/src/calf/primitives.h 2017-01-03 17:36:12.000000000 +0100 -+++ lmms-1.1.3/plugins/LadspaEffect/calf/veal/src/calf/primitives.h 2017-01-03 16:22:16.000000000 +0100 -@@ -370,11 +370,6 @@ - next_task = (unsigned)-1; - eob = false; - } -- inline bool is_next_tick() { -- if (time < next_task) -- return true; -- do_tasks(); -- } - inline void next_tick() { - time++; - } -@@ -382,14 +377,6 @@ - timeline.insert(std::pair(time+pos, t)); - next_task = timeline.begin()->first; - } -- void do_tasks() { -- std::multimap::iterator i = timeline.begin(); -- while(i != timeline.end() && i->first == time) { -- i->second->execute(this); -- i->second->dispose(); -- timeline.erase(i); -- } -- } - bool is_eob() { - return eob; - } -Index: lmms-1.1.3/plugins/LadspaEffect/calf/veal/src/metadata.cpp -=================================================================== ---- lmms-1.1.3.orig/plugins/LadspaEffect/calf/veal/src/metadata.cpp 2017-01-03 17:52:03.000000000 +0100 -+++ lmms-1.1.3/plugins/LadspaEffect/calf/veal/src/metadata.cpp 2017-01-03 18:49:18.000000000 +0100 -@@ -29,6 +29,8 @@ - - const char *calf_plugins::calf_copyright_info = "(C) 2001-2009 Krzysztof Foltman, Thor Harald Johanssen, Markus Schmidt and others; license: LGPL"; - -+namespace calf_plugins { -+ - //////////////////////////////////////////////////////////////////////////// - - CALF_PORT_NAMES(flanger) = {"In L", "In R", "Out L", "Out R"}; -@@ -1105,7 +1107,7 @@ - - CALF_PLUGIN_INFO(organ) = { 0x8481, "Organ", "Calf Organ", "Krzysztof Foltman", calf_plugins::calf_copyright_info, "SynthesizerPlugin" }; - --plugin_command_info *organ_metadata::get_commands() -+plugin_command_info *organ_metadata::get_commands() const - { - static plugin_command_info cmds[] = { - { "cmd_panic", "Panic!", "Stop all sounds and reset all controllers" }, -@@ -1439,6 +1441,8 @@ - - //////////////////////////////////////////////////////////////////////////// - -+}; // namespace calf_plugins -+ - calf_plugins::plugin_registry::plugin_registry() - { - #define PER_MODULE_ITEM(name, isSynth, jackname) plugins.push_back((new name##_metadata)); -Index: lmms-1.1.3/plugins/LadspaEffect/calf/veal/src/modules.cpp -=================================================================== ---- lmms-1.1.3.orig/plugins/LadspaEffect/calf/veal/src/modules.cpp 2017-01-03 19:32:38.000000000 +0100 -+++ lmms-1.1.3/plugins/LadspaEffect/calf/veal/src/modules.cpp 2017-01-03 19:33:13.000000000 +0100 -@@ -339,7 +339,7 @@ - /////////////////////////////////////////////////////////////////////////////////////////////// - - filterclavier_audio_module::filterclavier_audio_module() --: filter_module_with_inertia(ins, outs, params) -+: filter_module_with_inertia() - , min_gain(1.0) - , max_gain(32.0) - , last_note(-1) -Index: lmms-1.1.3/plugins/LadspaEffect/swh/ladspa/flanger_1191.c -=================================================================== ---- lmms-1.1.3.orig/plugins/LadspaEffect/swh/ladspa/flanger_1191.c 2017-01-03 15:44:13.000000000 +0100 -+++ lmms-1.1.3/plugins/LadspaEffect/swh/ladspa/flanger_1191.c 2017-01-03 15:45:17.000000000 +0100 -@@ -266,7 +266,7 @@ - - // Calculate position in delay table - d_base = LIN_INTERP(frac, old_d_base, new_d_base); -- n_ph = (float)(law_p - abs(next_law_pos - count))/(float)law_p; -+ n_ph = (float)(law_p - labs(next_law_pos - count))/(float)law_p; - p_ph = n_ph + 0.5f; - while (p_ph > 1.0f) { - p_ph -= 1.0f; -@@ -392,7 +392,7 @@ - - // Calculate position in delay table - d_base = LIN_INTERP(frac, old_d_base, new_d_base); -- n_ph = (float)(law_p - abs(next_law_pos - count))/(float)law_p; -+ n_ph = (float)(law_p - labs(next_law_pos - count))/(float)law_p; - p_ph = n_ph + 0.5f; - while (p_ph > 1.0f) { - p_ph -= 1.0f; -Index: lmms-1.1.3/plugins/LadspaEffect/swh/ladspa/gsm/short_term.c -=================================================================== ---- lmms-1.1.3.orig/plugins/LadspaEffect/swh/ladspa/gsm/short_term.c 2017-01-03 15:35:13.000000000 +0100 -+++ lmms-1.1.3/plugins/LadspaEffect/swh/ladspa/gsm/short_term.c 2017-01-03 15:35:55.000000000 +0100 -@@ -53,7 +53,7 @@ - #undef STEP - #define STEP( B, MIC, INVA ) \ - temp1 = GSM_ADD( *LARc++, MIC ) << 10; \ -- temp1 = GSM_SUB( temp1, B << 1 ); \ -+ temp1 = GSM_SUB( temp1, B * 2 ); \ - temp1 = GSM_MULT_R( INVA, temp1 ); \ - *LARpp++ = GSM_ADD( temp1, temp1 ); - -Index: lmms-1.1.3/plugins/LadspaEffect/swh/ladspa/multivoice_chorus_1201.c -=================================================================== ---- lmms-1.1.3.orig/plugins/LadspaEffect/swh/ladspa/multivoice_chorus_1201.c 2017-01-03 15:47:51.000000000 +0100 -+++ lmms-1.1.3/plugins/LadspaEffect/swh/ladspa/multivoice_chorus_1201.c 2017-01-03 15:48:18.000000000 +0100 -@@ -345,7 +345,7 @@ - if (count % 16 < laws) { - unsigned int t = count % 16; - // Calculate sinus phases -- float n_ph = (float)(law_p - abs(next_peak_pos[t] - count))/law_p; -+ float n_ph = (float)(law_p - labs(next_peak_pos[t] - count))/law_p; - float p_ph = n_ph + 0.5f; - if (p_ph > 1.0f) { - p_ph -= 1.0f; -@@ -488,7 +488,7 @@ - if (count % 16 < laws) { - unsigned int t = count % 16; - // Calculate sinus phases -- float n_ph = (float)(law_p - abs(next_peak_pos[t] - count))/law_p; -+ float n_ph = (float)(law_p - labs(next_peak_pos[t] - count))/law_p; - float p_ph = n_ph + 0.5f; - if (p_ph > 1.0f) { - p_ph -= 1.0f; -Index: lmms-1.1.3/plugins/LadspaEffect/swh/ladspa/retro_flange_1208.c -=================================================================== ---- lmms-1.1.3.orig/plugins/LadspaEffect/swh/ladspa/retro_flange_1208.c 2017-01-03 15:46:35.000000000 +0100 -+++ lmms-1.1.3/plugins/LadspaEffect/swh/ladspa/retro_flange_1208.c 2017-01-03 15:47:02.000000000 +0100 -@@ -321,7 +321,7 @@ - prev_law_pos = count + law_p; - } - -- n_ph = (float)(law_p - abs(next_law_pos - count))/(float)law_p; -+ n_ph = (float)(law_p - labs(next_law_pos - count))/(float)law_p; - p_ph = n_ph + 0.5f; - if (p_ph > 1.0f) { - p_ph -= 1.0f; -@@ -446,7 +446,7 @@ - prev_law_pos = count + law_p; - } - -- n_ph = (float)(law_p - abs(next_law_pos - count))/(float)law_p; -+ n_ph = (float)(law_p - labs(next_law_pos - count))/(float)law_p; - p_ph = n_ph + 0.5f; - if (p_ph > 1.0f) { - p_ph -= 1.0f; -Index: lmms-1.1.3/plugins/LadspaEffect/swh/ladspa/vynil_1905.c -=================================================================== ---- lmms-1.1.3.orig/plugins/LadspaEffect/swh/ladspa/vynil_1905.c 2017-01-03 15:51:56.000000000 +0100 -+++ lmms-1.1.3/plugins/LadspaEffect/swh/ladspa/vynil_1905.c 2017-01-03 16:01:32.000000000 +0100 -@@ -243,6 +243,8 @@ - buffer_s = malloc(sizeof(LADSPA_Data) * buffer_size); - buffer_mask = buffer_size - 1; - buffer_pos = 0; -+ click_buffer_omega.all = 0; -+ click_buffer_pos.all = 0; - click_gain = 0; - phi = 0.0f; /* Angular phase */ - -Index: lmms-1.1.3/plugins/LadspaEffect/tap/CMakeLists.txt -=================================================================== ---- lmms-1.1.3.orig/plugins/LadspaEffect/tap/CMakeLists.txt 2017-01-03 13:52:28.000000000 +0100 -+++ lmms-1.1.3/plugins/LadspaEffect/tap/CMakeLists.txt 2017-01-03 15:12:14.000000000 +0100 -@@ -1,7 +1,15 @@ - INCLUDE_DIRECTORIES("${CMAKE_SOURCE_DIR}/include") - FILE(GLOB PLUGIN_SOURCES *.c) - LIST(SORT PLUGIN_SOURCES) --SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -O3 -Wno-write-strings -fomit-frame-pointer -fno-strict-aliasing -fstrength-reduce -funroll-loops -ffast-math") -+SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -O3 -Wno-write-strings \ -+ -fomit-frame-pointer -fno-strict-aliasing -funroll-loops -ffast-math") -+ -+INCLUDE(CheckCCompilerFlag) -+CHECK_C_COMPILER_FLAG(-fstrength-reduce C_HAVE_STRENGTH_REDUCE) -+IF(${C_HAVE_STRENGTH_REDUCE}) -+ SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fstrength-reduce") -+ENDIF() -+ - FOREACH(_item ${PLUGIN_SOURCES}) - GET_FILENAME_COMPONENT(_plugin "${_item}" NAME_WE) - ADD_LIBRARY("${_plugin}" MODULE "${_item}") -Index: lmms-1.1.3/plugins/MidiImport/portsmf/allegro.h -=================================================================== ---- lmms-1.1.3.orig/plugins/MidiImport/portsmf/allegro.h 2017-01-03 20:02:37.000000000 +0100 -+++ lmms-1.1.3/plugins/MidiImport/portsmf/allegro.h 2017-01-03 20:06:48.000000000 +0100 -@@ -842,6 +842,8 @@ - Alg_event_ptr write_track_name(std::ostream &file, int n, - Alg_events &events); - public: -+ using Alg_track::paste; -+ - int channel_offset_per_track; // used to encode track_num into channel - Alg_tracks track_list; // array of Alg_events - Alg_time_sigs time_sig; -Index: lmms-1.1.3/plugins/MidiImport/portsmf/allegrosmfwr.cpp -=================================================================== ---- lmms-1.1.3.orig/plugins/MidiImport/portsmf/allegrosmfwr.cpp 2017-01-03 20:07:50.000000000 +0100 -+++ lmms-1.1.3/plugins/MidiImport/portsmf/allegrosmfwr.cpp 2017-01-03 20:08:34.000000000 +0100 -@@ -57,13 +57,11 @@ - - Alg_seq_ptr seq; - -- int num_tracks; // number of tracks not counting tempo track - int division; // divisions per quarter note, default = 120 - int initial_tempo; - - int timesig_num; // numerator of time signature - int timesig_den; // denominator of time signature -- double timesig_when; // time of time signature - - int keysig; // number of sharps (+) or flats (-), -99 for undefined - char keysig_mode; // 'M' or 'm' for major/minor -Index: lmms-1.1.3/plugins/Delay/StereoDelay.cpp -=================================================================== ---- lmms-1.1.3.orig/plugins/Delay/StereoDelay.cpp 2017-01-03 13:40:27.000000000 +0100 -+++ lmms-1.1.3/plugins/Delay/StereoDelay.cpp 2017-01-03 13:42:16.000000000 +0100 -@@ -48,7 +48,7 @@ - { - if( m_buffer ) - { -- delete m_buffer; -+ delete[] m_buffer; - } - } - -@@ -84,7 +84,7 @@ - { - if( m_buffer ) - { -- delete m_buffer; -+ delete[] m_buffer; - } - - int bufferSize = ( int )( sampleRate * m_maxTime ); -Index: lmms-1.1.3/plugins/OpulenZ/adplug/src/fmopl.c -=================================================================== ---- lmms-1.1.3.orig/plugins/OpulenZ/adplug/src/fmopl.c 2017-01-03 20:11:03.000000000 +0100 -+++ lmms-1.1.3/plugins/OpulenZ/adplug/src/fmopl.c 2017-01-03 20:22:23.000000000 +0100 -@@ -70,7 +70,7 @@ - /* final output shift , limit minimum and maximum */ - #define OPL_OUTSB (TL_BITS+3-16) /* OPL output final shift 16bit */ - #define OPL_MAXOUT (0x7fff<\n' ' \n' @@ -131,24 +129,6 @@ with tempfile.TemporaryDirectory() as tmpdir: test.expect('Error: data/themes/classic/style.css: Class does not exist in source code: NonExistentClass') test.expect('1 errors') - with ScriptTest(check_strings) as test: - create_file('debian/patches/clang.patch', '/plugins/non-existent-file') - test.run() - test.expect('Error: debian/patches/clang.patch: Source file does not exist: plugins/non-existent-file') - test.expect('1 errors') - - with ScriptTest(check_strings) as test: - create_file('debian/lmms-common.docs', '/plugins/caps.html') - test.run() - test.expect('Error: debian/lmms-common.docs: Path does not exist: /plugins/caps.html') - test.expect('1 errors') - - with ScriptTest(check_strings) as test: - create_file('debian/copyright', 'Files: NonExistent') - test.run() - test.expect('Error: debian/copyright: Glob/Path does not exist: NonExistent') - test.expect('1 errors') - with ScriptTest(check_namespace) as test: # minimal working example test.run(0) # exitcode 0 - no errors expected From 86073edf58af382f202659f6c1567e619ee57967 Mon Sep 17 00:00:00 2001 From: saker Date: Sat, 15 Jun 2024 18:34:10 -0400 Subject: [PATCH 33/38] Use `src_set_ratio` to fix artifacts within `Sample` playback (#7321) --- include/AudioResampler.h | 1 + src/core/AudioResampler.cpp | 5 +++++ src/core/Sample.cpp | 2 ++ 3 files changed, 8 insertions(+) diff --git a/include/AudioResampler.h b/include/AudioResampler.h index 379146962a8..6dd6fcc6039 100644 --- a/include/AudioResampler.h +++ b/include/AudioResampler.h @@ -52,6 +52,7 @@ class LMMS_EXPORT AudioResampler auto resample(const float* in, long inputFrames, float* out, long outputFrames, double ratio) -> ProcessResult; auto interpolationMode() const -> int { return m_interpolationMode; } auto channels() const -> int { return m_channels; } + void setRatio(double ratio); private: int m_interpolationMode = -1; diff --git a/src/core/AudioResampler.cpp b/src/core/AudioResampler.cpp index 5f6b6a23955..8fb7d95a2aa 100644 --- a/src/core/AudioResampler.cpp +++ b/src/core/AudioResampler.cpp @@ -61,4 +61,9 @@ auto AudioResampler::resample(const float* in, long inputFrames, float* out, lon return {src_process(m_state, &data), data.input_frames_used, data.output_frames_gen}; } +void AudioResampler::setRatio(double ratio) +{ + src_set_ratio(m_state, ratio); +} + } // namespace lmms diff --git a/src/core/Sample.cpp b/src/core/Sample.cpp index 584d1bc13c9..f1fe1ec1a73 100644 --- a/src/core/Sample.cpp +++ b/src/core/Sample.cpp @@ -134,6 +134,8 @@ bool Sample::play(sampleFrame* dst, PlaybackState* state, size_t numFrames, floa auto playBuffer = std::vector(numFrames / resampleRatio + marginSize); playRaw(playBuffer.data(), playBuffer.size(), state, loopMode); + state->resampler().setRatio(resampleRatio); + const auto resampleResult = state->resampler().resample(&playBuffer[0][0], playBuffer.size(), &dst[0][0], numFrames, resampleRatio); advance(state, resampleResult.inputFramesUsed, loopMode); From b1f0f897ec784085cf7020209e7e9f53e2f9aba3 Mon Sep 17 00:00:00 2001 From: szeli1 <143485814+szeli1@users.noreply.github.com> Date: Mon, 17 Jun 2024 16:11:55 +0200 Subject: [PATCH 34/38] arpeggiator sorted mode fixed (#7025) Fixes an issue where sorted arpeggios over multiple notes used a largely unusable algorithm. piano-octave-arp instead of octave-arp-piano. Fixes #6499 Fixes #4491 --- src/core/InstrumentFunctions.cpp | 67 +++++++++++++++++++++----------- 1 file changed, 45 insertions(+), 22 deletions(-) diff --git a/src/core/InstrumentFunctions.cpp b/src/core/InstrumentFunctions.cpp index 549d658fcd6..3687c0b7445 100644 --- a/src/core/InstrumentFunctions.cpp +++ b/src/core/InstrumentFunctions.cpp @@ -31,6 +31,9 @@ #include "InstrumentTrack.h" #include "PresetPreviewPlayHandle.h" +#include +#include + namespace lmms { @@ -348,10 +351,11 @@ void InstrumentFunctionArpeggio::processNote( NotePlayHandle * _n ) _n->setMasterNote(); const int selected_arp = m_arpModel.value(); + const auto arpMode = static_cast(m_arpModeModel.value()); - ConstNotePlayHandleList cnphv = NotePlayHandle::nphsOfInstrumentTrack( _n->instrumentTrack() ); + ConstNotePlayHandleList cnphv = NotePlayHandle::nphsOfInstrumentTrack(_n->instrumentTrack()); - if( static_cast(m_arpModeModel.value()) != ArpMode::Free && cnphv.size() == 0 ) + if(arpMode != ArpMode::Free && cnphv.size() == 0 ) { // maybe we're playing only a preset-preview-note? cnphv = PresetPreviewPlayHandle::nphsOfInstrumentTrack( _n->instrumentTrack() ); @@ -363,10 +367,25 @@ void InstrumentFunctionArpeggio::processNote( NotePlayHandle * _n ) } } + // avoid playing same key for all + // currently playing notes if sort mode is enabled + if (arpMode == ArpMode::Sort && _n != cnphv.first()) { return; } + const InstrumentFunctionNoteStacking::ChordTable & chord_table = InstrumentFunctionNoteStacking::ChordTable::getInstance(); const int cur_chord_size = chord_table.chords()[selected_arp].size(); - const int range = static_cast(cur_chord_size * m_arpRangeModel.value() * m_arpRepeatsModel.value()); - const int total_range = range * cnphv.size(); + const int total_chord_size = cur_chord_size * cnphv.size(); + // how many notes are in a single chord (multiplied by range) + const int singleNoteRange = static_cast(cur_chord_size * m_arpRangeModel.value() * m_arpRepeatsModel.value()); + // how many notes are in the final chord + const int range = arpMode == ArpMode::Sort ? singleNoteRange * cnphv.size() : singleNoteRange; + + if (arpMode == ArpMode::Sort) + { + std::sort(cnphv.begin(), cnphv.end(), [](const NotePlayHandle* a, const NotePlayHandle* b) + { + return a->key() < b->key(); + }); + } // number of frames that every note should be played const auto arp_frames = (f_cnt_t)(m_arpTimeModel.value() / 1000.0f * Engine::audioEngine()->outputSampleRate()); @@ -375,11 +394,11 @@ void InstrumentFunctionArpeggio::processNote( NotePlayHandle * _n ) // used for calculating remaining frames for arp-note, we have to add // arp_frames-1, otherwise the first arp-note will not be setup // correctly... -> arp_frames frames silence at the start of every note! - int cur_frame = ( ( static_cast(m_arpModeModel.value()) != ArpMode::Free ) ? + int cur_frame = (arpMode != ArpMode::Free ? cnphv.first()->totalFramesPlayed() : - _n->totalFramesPlayed() ) + arp_frames - 1; + _n->totalFramesPlayed()) + arp_frames - 1; // used for loop - f_cnt_t frames_processed = ( static_cast(m_arpModeModel.value()) != ArpMode::Free ) ? cnphv.first()->noteOffset() : _n->noteOffset(); + f_cnt_t frames_processed = arpMode != ArpMode::Free ? cnphv.first()->noteOffset() : _n->noteOffset(); while( frames_processed < Engine::audioEngine()->framesPerPeriod() ) { @@ -395,17 +414,6 @@ void InstrumentFunctionArpeggio::processNote( NotePlayHandle * _n ) frames_processed += remaining_frames_for_cur_arp; - // in sorted mode: is it our turn or do we have to be quiet for - // now? - if( static_cast(m_arpModeModel.value()) == ArpMode::Sort && - ( ( cur_frame / arp_frames ) % total_range ) / range != (f_cnt_t) _n->index() ) - { - // update counters - frames_processed += arp_frames; - cur_frame += arp_frames; - continue; - } - // Skip notes randomly if( m_arpSkipModel.value() ) { @@ -435,7 +443,7 @@ void InstrumentFunctionArpeggio::processNote( NotePlayHandle * _n ) // process according to arpeggio-direction... if (dir == ArpDirection::Up || dir == ArpDirection::Down) { - cur_arp_idx = ( cur_frame / arp_frames ) % range; + cur_arp_idx = (cur_frame / arp_frames) % range; } else if ((dir == ArpDirection::UpAndDown || dir == ArpDirection::DownAndUp) && range > 1) { @@ -454,7 +462,7 @@ void InstrumentFunctionArpeggio::processNote( NotePlayHandle * _n ) else if( dir == ArpDirection::Random ) { // just pick a random chord-index - cur_arp_idx = (int)( range * ( (float) rand() / (float) RAND_MAX ) ); + cur_arp_idx = static_cast(range * static_cast(rand()) / static_cast(RAND_MAX)); } // Divide cur_arp_idx with wanted repeats. The repeat feature will not affect random notes. @@ -464,7 +472,7 @@ void InstrumentFunctionArpeggio::processNote( NotePlayHandle * _n ) if( m_arpCycleModel.value() && dir != ArpDirection::Random ) { cur_arp_idx *= m_arpCycleModel.value() + 1; - cur_arp_idx %= static_cast( range / m_arpRepeatsModel.value() ); + cur_arp_idx %= static_cast(range / m_arpRepeatsModel.value()); } // If ArpDirection::Down or ArpDirection::DownAndUp, invert the final range. @@ -474,8 +482,23 @@ void InstrumentFunctionArpeggio::processNote( NotePlayHandle * _n ) } // now calculate final key for our arp-note - const int sub_note_key = base_note_key + (cur_arp_idx / cur_chord_size ) * + int sub_note_key = 0; + if (arpMode != ArpMode::Sort) + { + sub_note_key = base_note_key + (cur_arp_idx / cur_chord_size) * KeysPerOctave + chord_table.chords()[selected_arp][cur_arp_idx % cur_chord_size]; + } + else + { + const auto octaveDiv = std::div(cur_arp_idx, total_chord_size); + const int octave = octaveDiv.quot; + const auto arpDiv = std::div(octaveDiv.rem, cnphv.size()); + const int arpIndex = arpDiv.rem; + const int chordIndex = arpDiv.quot; + sub_note_key = cnphv[arpIndex]->key() + + chord_table.chords()[selected_arp][chordIndex] + + octave * KeysPerOctave; + } // range-checking if( sub_note_key >= NumKeys || From 1ea27c0a2076c2c59c43d91735fa7bf810eeb9d0 Mon Sep 17 00:00:00 2001 From: Dominic Clark Date: Mon, 17 Jun 2024 22:48:04 +0100 Subject: [PATCH 35/38] Suppress warnings in third-party code (#7319) --- CMakeLists.txt | 98 +++++++----- cmake/modules/StaticDependencies.cmake | 141 ++++++++++++++++++ include/AudioJack.h | 2 +- include/LocklessRingBuffer.h | 4 +- include/Lv2Proc.h | 3 +- include/MidiJack.h | 2 +- plugins/CarlaBase/CMakeLists.txt | 4 +- plugins/CarlaBase/Carla.h | 10 +- plugins/CarlaBase/DummyCarla.cpp | 2 +- plugins/CarlaPatchbay/CMakeLists.txt | 3 +- plugins/CarlaRack/CMakeLists.txt | 3 +- plugins/Eq/CMakeLists.txt | 2 +- plugins/FreeBoy/CMakeLists.txt | 25 ++-- plugins/FreeBoy/FreeBoy.h | 3 +- plugins/FreeBoy/GbApuWrapper.h | 4 +- plugins/GigPlayer/CMakeLists.txt | 2 +- plugins/LadspaEffect/calf/CMakeLists.txt | 10 +- plugins/LadspaEffect/caps/CMakeLists.txt | 8 +- plugins/LadspaEffect/cmt/CMakeLists.txt | 8 +- plugins/LadspaEffect/swh/CMakeLists.txt | 8 +- plugins/LadspaEffect/tap/CMakeLists.txt | 6 +- plugins/Lv2Effect/CMakeLists.txt | 6 +- plugins/Lv2Instrument/CMakeLists.txt | 6 +- plugins/OpulenZ/CMakeLists.txt | 22 ++- plugins/OpulenZ/OpulenZ.cpp | 6 +- plugins/Sid/SidInstrument.cpp | 2 +- plugins/Sid/resid/CMakeLists.txt | 2 + plugins/SlicerT/CMakeLists.txt | 22 ++- plugins/SpectrumAnalyzer/CMakeLists.txt | 2 +- .../VstBase/RemoteVstPlugin/CMakeLists.txt | 2 +- plugins/VstBase/VstPlugin.cpp | 2 +- plugins/Xpressive/CMakeLists.txt | 14 +- plugins/Xpressive/ExprSynth.cpp | 4 +- plugins/ZynAddSubFx/CMakeLists.txt | 49 ++++-- plugins/ZynAddSubFx/LocalZynAddSubFx.cpp | 8 +- plugins/ZynAddSubFx/RemoteZynAddSubFx.cpp | 4 +- plugins/ZynAddSubFx/ZynAddSubFx.h | 4 +- src/3rdparty/CMakeLists.txt | 30 +++- src/3rdparty/weakjack/CMakeLists.txt | 22 +-- src/CMakeLists.txt | 43 ++---- tests/CMakeLists.txt | 5 +- 41 files changed, 396 insertions(+), 207 deletions(-) create mode 100644 cmake/modules/StaticDependencies.cmake diff --git a/CMakeLists.txt b/CMakeLists.txt index fbd9cdfcf1b..6aa53d98211 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -15,8 +15,7 @@ function(enable_policy_if_exists id) endif() endfunction() -# Needed for the SWH Ladspa plugins. See below. -enable_policy_if_exists(CMP0074) # find_package() uses _ROOT variables. +enable_policy_if_exists(CMP0092) # MSVC warning flags are not in CMAKE__FLAGS by default. # Needed for ccache support with MSVC enable_policy_if_exists(CMP0141) # MSVC debug information format flags are selected by an abstraction. @@ -43,6 +42,7 @@ INCLUDE(AddFileDependencies) INCLUDE(CheckIncludeFiles) INCLUDE(FindPkgConfig) INCLUDE(GenerateExportHeader) +include(StaticDependencies) STRING(TOUPPER "${CMAKE_PROJECT_NAME}" PROJECT_NAME_UCASE) @@ -172,7 +172,7 @@ LIST(APPEND CMAKE_PREFIX_PATH "${CMAKE_INSTALL_PREFIX}") FIND_PACKAGE(Qt5 5.9.0 COMPONENTS Core Gui Widgets Xml REQUIRED) FIND_PACKAGE(Qt5 COMPONENTS LinguistTools QUIET) -INCLUDE_DIRECTORIES( +include_directories(SYSTEM ${Qt5Core_INCLUDE_DIRS} ${Qt5Gui_INCLUDE_DIRS} ${Qt5Widgets_INCLUDE_DIRS} @@ -410,7 +410,7 @@ IF(WANT_SOUNDIO) IF(SOUNDIO_FOUND) SET(LMMS_HAVE_SOUNDIO TRUE) SET(STATUS_SOUNDIO "OK") - INCLUDE_DIRECTORIES("${SOUNDIO_INCLUDE_DIR}") + include_directories(SYSTEM "${SOUNDIO_INCLUDE_DIR}") ELSE(SOUNDIO_FOUND) SET(SOUNDIO_INCLUDE_DIR "") SET(STATUS_SOUNDIO "not found, please install libsoundio if you require libsoundio support") @@ -491,11 +491,9 @@ ENDIF(NOT LMMS_HAVE_ALSA) IF(WANT_JACK) IF(WANT_WEAKJACK) SET(LMMS_HAVE_WEAKJACK TRUE) - SET(WEAKJACK_INCLUDE_DIRS ${CMAKE_SOURCE_DIR}/src/3rdparty/weakjack/weakjack) - SET(JACK_INCLUDE_DIRS ${CMAKE_SOURCE_DIR}/src/3rdparty/jack2/common) SET(STATUS_JACK "OK (weak linking enabled)") - # use dlsym instead - SET(JACK_LIBRARIES ${CMAKE_DL_LIBS}) + set(JACK_INCLUDE_DIRS "") + set(JACK_LIBRARIES weakjack) SET(LMMS_HAVE_JACK TRUE) SET(LMMS_HAVE_JACK_PRENAME TRUE) SET(JACK_FOUND TRUE) @@ -631,28 +629,63 @@ ENDIF(WANT_DEBUG_FPE) # check for libsamplerate FIND_PACKAGE(Samplerate 0.1.8 MODULE REQUIRED) -# set compiler flags -IF(CMAKE_CXX_COMPILER_ID MATCHES "GNU|Clang") - SET(WERROR_FLAGS "-Wall -Werror=unused-function -Wno-sign-compare -Wno-strict-overflow") - OPTION(USE_WERROR "Add -werror to the build flags. Stops the build on warnings" OFF) - IF(${USE_WERROR}) - SET(WERROR_FLAGS "${WERROR_FLAGS} -Werror") - ENDIF() +# Shim the SYSTEM property for older CMake versions +if(CMAKE_VERSION VERSION_LESS "3.25") + define_property(TARGET + PROPERTY SYSTEM + INHERITED + BRIEF_DOCS "Shim of built-in SYSTEM property for CMake versions less than 3.25" + FULL_DOCS "Non-functional, but allows the property to be inherited properly." + "See the CMake documentation at https://cmake.org/cmake/help/latest/prop_tgt/SYSTEM.html." + ) +endif() + +# Add warning and error flags +option(USE_WERROR "Treat compiler warnings as errors" OFF) +if(CMAKE_CXX_COMPILER_ID MATCHES "GNU|Clang") + set(COMPILE_ERROR_FLAGS + "-Wall" # Enable most warnings by default + "-Werror=unused-function" # Unused functions are an error + # TODO: Fix the code and remove the following: + "-Wno-sign-compare" # Permit comparisons between signed and unsigned integers + "-Wno-strict-overflow" # Permit optimisations assuming no signed overflow + ) + set(THIRD_PARTY_COMPILE_ERROR_FLAGS + "-w" # Disable all warnings + ) # Due to a regression in gcc-4.8.X, we need to disable array-bounds check - IF (CMAKE_COMPILER_IS_GNUCXX AND ((CMAKE_CXX_COMPILER_VERSION VERSION_EQUAL "4.8.0") OR (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER "4.8.0") OR LMMS_BUILD_WIN32)) - SET(WERROR_FLAGS "${WERROR_FLAGS} -Wno-array-bounds -Wno-attributes") - ENDIF() -ELSEIF(MSVC) - # Remove any existing /W flags - string(REGEX REPLACE "/W[0-4]" "" CMAKE_C_FLAGS ${CMAKE_C_FLAGS}) - STRING(REGEX REPLACE "/W[0-4]" "" CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS}) - SET(WERROR_FLAGS "/W2") - IF(${USE_WERROR}) - SET(WERROR_FLAGS "${WERROR_FLAGS} /WX") - ENDIF() -ENDIF() + # TODO: Is this still necessary? + if(CMAKE_COMPILER_IS_GNUCXX) + list(APPEND COMPILE_ERROR_FLAGS + "-Wno-array-bounds" # Permit out-of-bounds array subscripts + "-Wno-attributes" # Permit unrecognised attributes + ) + endif() + if(USE_WERROR) + list(APPEND COMPILE_ERROR_FLAGS + "-Werror" # Treat warnings as errors + ) + endif() +elseif(MSVC) + set(COMPILE_ERROR_FLAGS + "/W2" # Enable some warnings by default + "/external:W0" # Don't emit warnings for third-party code + "/external:anglebrackets" # Consider headers included with angle brackets to be third-party + "/external:templates-" # Still emit warnings from first-party instantiations of third-party templates + ) + set(THIRD_PARTY_COMPILE_ERROR_FLAGS + "/W0" # Disable all warnings + ) + + if(USE_WERROR) + list(APPEND COMPILE_ERROR_FLAGS + "/WX" # Treat warnings as errors + ) + endif() +endif() +add_compile_options("$>,${THIRD_PARTY_COMPILE_ERROR_FLAGS},${COMPILE_ERROR_FLAGS}>") IF(NOT CMAKE_BUILD_TYPE) message(STATUS "Setting build type to 'Release' as none was specified.") @@ -662,8 +695,6 @@ IF(NOT CMAKE_BUILD_TYPE) "MinSizeRel" "RelWithDebInfo") ENDIF() -SET(CMAKE_C_FLAGS "${WERROR_FLAGS} ${CMAKE_C_FLAGS}") -SET(CMAKE_CXX_FLAGS "${WERROR_FLAGS} ${CMAKE_CXX_FLAGS}") SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -DLMMS_DEBUG") SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DLMMS_DEBUG") @@ -705,12 +736,9 @@ ENDIF() # we somehow have to make LMMS-binary depend on MOC-files ADD_FILE_DEPENDENCIES("${CMAKE_BINARY_DIR}/lmmsconfig.h") -IF(CMAKE_CXX_COMPILER_ID MATCHES "GNU|Clang") - IF(WIN32) - SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-attributes") - ELSE(WIN32) - SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC -DPIC") - ENDIF(WIN32) +if(CMAKE_CXX_COMPILER_ID MATCHES "GNU|Clang" AND NOT WIN32) + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fPIC -DPIC") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC -DPIC") elseif(MSVC) # Use UTF-8 as the source and execution character set add_compile_options("/utf-8") diff --git a/cmake/modules/StaticDependencies.cmake b/cmake/modules/StaticDependencies.cmake new file mode 100644 index 00000000000..d12c47d12c8 --- /dev/null +++ b/cmake/modules/StaticDependencies.cmake @@ -0,0 +1,141 @@ +# StaticDependencies.cmake - adds features similar to interface properties that +# are only transitive over static dependencies. +# +# Copyright (c) 2024 Dominic Clark +# +# Redistribution and use is allowed according to the terms of the New BSD license. +# For details see the accompanying COPYING-CMAKE-SCRIPTS file. + +define_property(TARGET + PROPERTY STATIC_COMPILE_DEFINITIONS + BRIEF_DOCS "Compile definitions to be used by targets linking statically to this one" + FULL_DOCS "Behaves similarly to INTERFACE_COMPILE_DEFINITIONS, but only over static dependencies." + "Effectively becomes private once an executable module is reached." +) + +define_property(TARGET + PROPERTY STATIC_LINK_LIBRARIES + BRIEF_DOCS "Link libraries to be included in targets linking statically to this one" + FULL_DOCS "Behaves similarly to INTERFACE_LINK_LIBRARIES, but only over static dependencies." + "Effectively becomes private once an executable module is reached." +) + +# Link a target statically to a set of libraries. Forward the given arguments to +# `target_link_libraries`, but also perform two additional functions. Firstly, +# ensure that the given libraries will be linked into any module that also +# links the given target (allowing, for example, object libraries and private +# static libraries to be used transitively). Secondly, add any static compile +# definitions from the given libraries to the set of compile definitions used +# to build the given target. +# +# This function must be used in order for static requirements as defined in this +# module to be inherited transitively. Using `target_link_libraries` instead +# will break the chain for static link libraries and static compile definitions. +# +# Usage: +# target_static_libraries( +# # The target to which to add the libraries +# [] # Optionally, the scope to use for the following libraries +# ... # The libraries to which to link +# [ ...]... +# ) +function(target_static_libraries target) + # Target types that have a link step + set(linked_target_types "MODULE_LIBRARY" "SHARED_LIBRARY" "EXECUTABLE") + # Possible scopes for dependencies + set(scopes "PRIVATE" "PUBLIC" "INTERFACE") + + get_target_property(target_type "${target}" TYPE) + set(scope "") + + # Iterate over the dependencies (and possibly scopes) that we were given + foreach(dependency IN LISTS ARGN) + # If we have a scope, store it so we can apply it to upcoming libraries + if(dependency IN_LIST scopes) + set(scope "${dependency}") + continue() + endif() + + # Link the target to the current dependency. (Note: `${scope}` is + # unquoted so that the argument disappears if no scope was given.) + target_link_libraries("${target}" ${scope} "${dependency}") + + # Store the dependency so it can be linked in with this target later + set_property( + TARGET "${target}" + APPEND + PROPERTY STATIC_LINK_LIBRARIES + "${dependency}" + ) + + # If the dependency is a target, it may have some of our custom + # properties defined on it, so we have a bit more work to do + if(TARGET "${dependency}") + # Ensure it makes sense to link statically to this dependency + get_target_property(dependency_type "${dependency}" TYPE) + if(dependency_type IN_LIST linked_target_types) + message(SEND_ERROR "Cannot link statically to shared module ${dependency}") + endif() + + # Transitively include static definitions and libraries + set(defs "$>") + set(libs "$>") + set_property( + TARGET "${target}" + APPEND + PROPERTY STATIC_COMPILE_DEFINITIONS + "${defs}" + ) + set_property( + TARGET "${target}" + APPEND + PROPERTY STATIC_LINK_LIBRARIES + "${libs}" + ) + + # Add the dependency's transitive static compile definitions. + # (Note: definitions are private so dynamically linked dependents + # won't pick them up; a static dependent will have them set when + # this function is called for it.) + target_compile_definitions("${target}" PRIVATE "${defs}") + + # If the target has a link step, add the transitive static + # dependencies. (Note: we use `LINK_ONLY` so the caller can still + # control usage requirements through the normal use of scopes. Only + # transitive dependencies are needed here: the direct dependency was + # added earlier on. We have to append to `LINK_LIBRARIES` directly, + # rather than use `target_link_libraries(PRIVATE)`, in order to + # remain compatible with the scopeless signature of that command.) + if(target_type IN_LIST linked_target_types) + set_property( + TARGET "${target}" + APPEND + PROPERTY LINK_LIBRARIES + "$" + ) + endif() + endif() + endforeach() +endfunction() + +# Add compile definitions to a target only for use with dependents linking +# statically to it. +# +# Behaves like `target_compile_definitions(INTERFACE)`, except the definitions +# will not be inherited beyond any executable module into which the target is +# actually linked. The definitions are added to the `STATIC_COMPILE_DEFINITIONS` +# property on the target. +# +# Usage: +# target_static_definitions( +# # The target to which to add the definitions +# ... # The definitions to add to the target +# ) +function(target_static_definitions target) + set_property( + TARGET "${target}" + APPEND + PROPERTY STATIC_COMPILE_DEFINITIONS + "${ARGN}" + ) +endfunction() diff --git a/include/AudioJack.h b/include/AudioJack.h index 01f41f09235..a1f9b777b14 100644 --- a/include/AudioJack.h +++ b/include/AudioJack.h @@ -31,7 +31,7 @@ #ifndef LMMS_HAVE_WEAKJACK #include #else -#include "weak_libjack.h" +#include #endif #include diff --git a/include/LocklessRingBuffer.h b/include/LocklessRingBuffer.h index 2d65badfe58..ec3f4fc52de 100644 --- a/include/LocklessRingBuffer.h +++ b/include/LocklessRingBuffer.h @@ -28,9 +28,9 @@ #include #include -#include "lmms_basics.h" -#include "../src/3rdparty/ringbuffer/include/ringbuffer/ringbuffer.h" +#include +#include "lmms_basics.h" namespace lmms { diff --git a/include/Lv2Proc.h b/include/Lv2Proc.h index 65bd90698a9..36b0fa60060 100644 --- a/include/Lv2Proc.h +++ b/include/Lv2Proc.h @@ -33,6 +33,8 @@ #include #include +#include + #include "LinkedModelGroups.h" #include "LmmsSemaphore.h" #include "Lv2Basics.h" @@ -40,7 +42,6 @@ #include "Lv2Options.h" #include "Lv2Worker.h" #include "Plugin.h" -#include "../src/3rdparty/ringbuffer/include/ringbuffer/ringbuffer.h" #include "TimePos.h" diff --git a/include/MidiJack.h b/include/MidiJack.h index e2b38e290b3..e61db26dda7 100644 --- a/include/MidiJack.h +++ b/include/MidiJack.h @@ -32,7 +32,7 @@ #include #include #else -#include "weak_libjack.h" +#include #endif #include diff --git a/plugins/CarlaBase/CMakeLists.txt b/plugins/CarlaBase/CMakeLists.txt index 8f9e14dd101..6533055a4c3 100644 --- a/plugins/CarlaBase/CMakeLists.txt +++ b/plugins/CarlaBase/CMakeLists.txt @@ -15,7 +15,7 @@ if(LMMS_HAVE_WEAKCARLA) SET(CARLA_NATIVE_LIB carla_native-plugin) ADD_LIBRARY(${CARLA_NATIVE_LIB} SHARED DummyCarla.cpp) - TARGET_INCLUDE_DIRECTORIES(${CARLA_NATIVE_LIB} PUBLIC ${CARLA_INCLUDE_DIRS}) + target_include_directories(${CARLA_NATIVE_LIB} SYSTEM PUBLIC ${CARLA_INCLUDE_DIRS}) INSTALL(TARGETS ${CARLA_NATIVE_LIB} LIBRARY DESTINATION "${PLUGIN_DIR}/optional" RUNTIME DESTINATION "${PLUGIN_DIR}/optional" @@ -31,7 +31,7 @@ if(LMMS_HAVE_CARLA OR LMMS_HAVE_WEAKCARLA) SET(CARLA_INCLUDE_DIRS ${CARLA_INCLUDE_DIRS} PARENT_SCOPE) INCLUDE(BuildPlugin) - INCLUDE_DIRECTORIES(${CARLA_INCLUDE_DIRS}) + include_directories(SYSTEM ${CARLA_INCLUDE_DIRS}) LINK_DIRECTORIES(${CARLA_LIBRARY_DIRS}) LINK_LIBRARIES(${CARLA_LIBRARIES}) BUILD_PLUGIN(carlabase Carla.cpp Carla.h diff --git a/plugins/CarlaBase/Carla.h b/plugins/CarlaBase/Carla.h index 76a9b45b705..c1190e5e714 100644 --- a/plugins/CarlaBase/Carla.h +++ b/plugins/CarlaBase/Carla.h @@ -37,13 +37,13 @@ // carla/source/includes #include "carlabase_export.h" -#include "CarlaDefines.h" +#include #if CARLA_VERSION_HEX >= 0x010911 - #include "CarlaNativePlugin.h" + #include #else - #include "CarlaBackend.h" - #include "CarlaNative.h" - #include "CarlaUtils.h" + #include + #include + #include CARLA_EXPORT const NativePluginDescriptor* carla_get_native_patchbay_plugin(); diff --git a/plugins/CarlaBase/DummyCarla.cpp b/plugins/CarlaBase/DummyCarla.cpp index 572bdf4bc6f..9a5a137615e 100644 --- a/plugins/CarlaBase/DummyCarla.cpp +++ b/plugins/CarlaBase/DummyCarla.cpp @@ -1,6 +1,6 @@ // A dummy Carla interface #define BUILDING_CARLA -#include "CarlaNativePlugin.h" +#include #ifndef CARLA_PLUGIN_EXPORT #define CARLA_PLUGIN_EXPORT CARLA_EXPORT diff --git a/plugins/CarlaPatchbay/CMakeLists.txt b/plugins/CarlaPatchbay/CMakeLists.txt index 457e61e6a83..8f6efd5ea2c 100644 --- a/plugins/CarlaPatchbay/CMakeLists.txt +++ b/plugins/CarlaPatchbay/CMakeLists.txt @@ -1,7 +1,8 @@ if(LMMS_HAVE_CARLA OR LMMS_HAVE_WEAKCARLA) ADD_DEFINITIONS(-DCARLA_PLUGIN_PATCHBAY -DCARLA_PLUGIN_SYNTH) INCLUDE(BuildPlugin) - INCLUDE_DIRECTORIES(${CARLA_INCLUDE_DIRS} "${CMAKE_CURRENT_SOURCE_DIR}/../CarlaBase") + include_directories(SYSTEM ${CARLA_INCLUDE_DIRS}) + include_directories("${CMAKE_CURRENT_SOURCE_DIR}/../CarlaBase") LINK_DIRECTORIES("${CMAKE_CURRENT_BINARY_DIR}/../CarlaBase" ${CARLA_LIBRARY_DIRS}) LINK_LIBRARIES(carlabase) diff --git a/plugins/CarlaRack/CMakeLists.txt b/plugins/CarlaRack/CMakeLists.txt index 8373688c1ba..d5328562405 100644 --- a/plugins/CarlaRack/CMakeLists.txt +++ b/plugins/CarlaRack/CMakeLists.txt @@ -1,7 +1,8 @@ if(LMMS_HAVE_CARLA OR LMMS_HAVE_WEAKCARLA) ADD_DEFINITIONS(-DCARLA_PLUGIN_RACK -DCARLA_PLUGIN_SYNTH) INCLUDE(BuildPlugin) - INCLUDE_DIRECTORIES(${CARLA_INCLUDE_DIRS} "${CMAKE_CURRENT_SOURCE_DIR}/../CarlaBase") + include_directories(SYSTEM ${CARLA_INCLUDE_DIRS}) + include_directories("${CMAKE_CURRENT_SOURCE_DIR}/../CarlaBase") LINK_DIRECTORIES("${CMAKE_CURRENT_BINARY_DIR}/../CarlaBase" ${CARLA_LIBRARY_DIRS}) LINK_LIBRARIES(carlabase) diff --git a/plugins/Eq/CMakeLists.txt b/plugins/Eq/CMakeLists.txt index 899dde5ec6d..68edb034b5c 100644 --- a/plugins/Eq/CMakeLists.txt +++ b/plugins/Eq/CMakeLists.txt @@ -1,5 +1,5 @@ INCLUDE(BuildPlugin) -INCLUDE_DIRECTORIES(${FFTW3F_INCLUDE_DIRS}) +include_directories(SYSTEM ${FFTW3F_INCLUDE_DIRS}) LINK_LIBRARIES(${FFTW3F_LIBRARIES}) BUILD_PLUGIN(eq EqEffect.cpp EqCurve.cpp EqCurve.h EqControls.cpp EqControlsDialog.cpp EqFilter.h EqParameterWidget.cpp EqFader.h EqSpectrumView.h EqSpectrumView.cpp MOCFILES EqControls.h EqControlsDialog.h EqCurve.h EqParameterWidget.h EqFader.h EqSpectrumView.h EMBEDDED_RESOURCES *.png) diff --git a/plugins/FreeBoy/CMakeLists.txt b/plugins/FreeBoy/CMakeLists.txt index 485ed3cc2e9..a08dfa439c6 100644 --- a/plugins/FreeBoy/CMakeLists.txt +++ b/plugins/FreeBoy/CMakeLists.txt @@ -1,21 +1,20 @@ -INCLUDE(BuildPlugin) -INCLUDE_DIRECTORIES(game-music-emu/gme) +include(BuildPlugin) -BUILD_PLUGIN(freeboy - FreeBoy.cpp - FreeBoy.h - GbApuWrapper.cpp - GbApuWrapper.h +add_library(gme STATIC game-music-emu/gme/Gb_Apu.cpp - game-music-emu/gme/Gb_Apu.h game-music-emu/gme/Gb_Oscs.cpp game-music-emu/gme/Blip_Buffer.cpp - game-music-emu/gme/Gb_Oscs.h - game-music-emu/gme/blargg_common.h - game-music-emu/gme/Blip_Buffer.h game-music-emu/gme/Multi_Buffer.cpp - game-music-emu/gme/blargg_source.h - game-music-emu/gme/Multi_Buffer.h +) +target_include_directories(gme PUBLIC game-music-emu/gme) +set_target_properties(gme PROPERTIES SYSTEM TRUE) + +build_plugin(freeboy + FreeBoy.cpp + FreeBoy.h + GbApuWrapper.cpp + GbApuWrapper.h MOCFILES FreeBoy.h EMBEDDED_RESOURCES "${CMAKE_CURRENT_SOURCE_DIR}/*.png" ) +target_link_libraries(freeboy gme) diff --git a/plugins/FreeBoy/FreeBoy.h b/plugins/FreeBoy/FreeBoy.h index 501377715c1..bba00efbff5 100644 --- a/plugins/FreeBoy/FreeBoy.h +++ b/plugins/FreeBoy/FreeBoy.h @@ -26,8 +26,9 @@ #ifndef LMMS_FREEBOY_H #define LMMS_FREEBOY_H +#include + #include "AutomatableModel.h" -#include "Blip_Buffer.h" #include "Instrument.h" #include "InstrumentView.h" #include "Graph.h" diff --git a/plugins/FreeBoy/GbApuWrapper.h b/plugins/FreeBoy/GbApuWrapper.h index 3b95869d579..88dc8261097 100644 --- a/plugins/FreeBoy/GbApuWrapper.h +++ b/plugins/FreeBoy/GbApuWrapper.h @@ -24,8 +24,8 @@ #ifndef LMMS_GB_APU_WRAPPER_H #define LMMS_GB_APU_WRAPPER_H -#include "Gb_Apu.h" -#include "Multi_Buffer.h" +#include +#include namespace lmms { diff --git a/plugins/GigPlayer/CMakeLists.txt b/plugins/GigPlayer/CMakeLists.txt index 92c80fedceb..69ac1b80cdf 100644 --- a/plugins/GigPlayer/CMakeLists.txt +++ b/plugins/GigPlayer/CMakeLists.txt @@ -1,6 +1,6 @@ if(LMMS_HAVE_GIG) INCLUDE(BuildPlugin) - INCLUDE_DIRECTORIES(${GIG_INCLUDE_DIRS}) + include_directories(SYSTEM ${GIG_INCLUDE_DIRS}) SET(CMAKE_AUTOUIC ON) # Required for not crashing loading files with libgig diff --git a/plugins/LadspaEffect/calf/CMakeLists.txt b/plugins/LadspaEffect/calf/CMakeLists.txt index 038fa6afba1..23f93da7ae0 100644 --- a/plugins/LadspaEffect/calf/CMakeLists.txt +++ b/plugins/LadspaEffect/calf/CMakeLists.txt @@ -1,6 +1,8 @@ # Note: # The last version of Calf that was LADSPA-capable is version 0.0.18.2 +set_directory_properties(PROPERTIES SYSTEM TRUE) + # Parse version info from autoconf FILE(READ veal/configure.ac VERSION_FILE) STRING(REPLACE "[" ";" VERSION_FILE ${VERSION_FILE} ) @@ -35,16 +37,12 @@ SET_TARGET_PROPERTIES(veal PROPERTIES PREFIX "") TARGET_COMPILE_DEFINITIONS(veal PRIVATE DISABLE_OSC=1) SET(INLINE_FLAGS "") -SET(OTHER_FLAGS "") IF("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU") SET(INLINE_FLAGS -finline-functions-called-once -finline-limit=80) - SET(OTHER_FLAGS -Wno-format-overflow) ENDIF() -if(MSVC) - target_compile_options(veal PRIVATE /wd4099 /wd4244 /wd4305) -else() - target_compile_options(veal PRIVATE -fexceptions -O2 -finline-functions ${INLINE_FLAGS} ${OTHER_FLAGS}) +if(NOT MSVC) + target_compile_options(veal PRIVATE -fexceptions -O2 -finline-functions ${INLINE_FLAGS}) endif() if(MSVC) diff --git a/plugins/LadspaEffect/caps/CMakeLists.txt b/plugins/LadspaEffect/caps/CMakeLists.txt index ea2c1b7e9f6..379413ae49a 100644 --- a/plugins/LadspaEffect/caps/CMakeLists.txt +++ b/plugins/LadspaEffect/caps/CMakeLists.txt @@ -1,3 +1,5 @@ +set_directory_properties(PROPERTIES SYSTEM TRUE) + INCLUDE_DIRECTORIES("${CMAKE_SOURCE_DIR}/include") FILE(GLOB SOURCES *.cc) LIST(SORT SOURCES) @@ -8,10 +10,8 @@ ADD_DEFINITIONS(-DLMMS_BUILD_WIN64) ENDIF(LMMS_BUILD_WIN64) SET_TARGET_PROPERTIES(caps PROPERTIES PREFIX "") -if(MSVC) - target_compile_options(caps PRIVATE /wd4244 /wd4305) -else() - target_compile_options(caps PRIVATE -O2 -funroll-loops -Wno-write-strings) +if(NOT MSVC) + target_compile_options(caps PRIVATE -O2 -funroll-loops) endif() if(MSVC) diff --git a/plugins/LadspaEffect/cmt/CMakeLists.txt b/plugins/LadspaEffect/cmt/CMakeLists.txt index 65430d109a8..dbc3c9de630 100644 --- a/plugins/LadspaEffect/cmt/CMakeLists.txt +++ b/plugins/LadspaEffect/cmt/CMakeLists.txt @@ -1,3 +1,5 @@ +set_directory_properties(PROPERTIES SYSTEM TRUE) + INCLUDE_DIRECTORIES("${CMAKE_SOURCE_DIR}/include") FILE(GLOB_RECURSE SOURCES cmt/src/*.cpp) LIST(SORT SOURCES) @@ -6,10 +8,8 @@ INSTALL(TARGETS cmt LIBRARY DESTINATION "${PLUGIN_DIR}/ladspa") SET_TARGET_PROPERTIES(cmt PROPERTIES PREFIX "") -if(MSVC) - target_compile_options(cmt PRIVATE /wd4244 /wd4305) -else() - target_compile_options(cmt PRIVATE -Wall -O3 -fno-strict-aliasing) +if(NOT MSVC) + target_compile_options(cmt PRIVATE -O3 -fno-strict-aliasing) endif() if(LMMS_BUILD_WIN32) diff --git a/plugins/LadspaEffect/swh/CMakeLists.txt b/plugins/LadspaEffect/swh/CMakeLists.txt index c71572bd2e0..203c3168f77 100644 --- a/plugins/LadspaEffect/swh/CMakeLists.txt +++ b/plugins/LadspaEffect/swh/CMakeLists.txt @@ -1,3 +1,5 @@ +set_directory_properties(PROPERTIES SYSTEM TRUE) + # Create blank config.h FILE(WRITE ladspa/config.h "") @@ -9,10 +11,8 @@ ELSE() ENDIF() # Additional compile flags -if(MSVC) - set(COMPILE_FLAGS ${COMPILE_FLAGS} /wd4244 /wd4273 /wd4305) -else() - set(COMPILE_FLAGS ${COMPILE_FLAGS} -O3 -Wall -c +if(NOT MSVC) + set(COMPILE_FLAGS ${COMPILE_FLAGS} -O3 -c -fomit-frame-pointer -funroll-loops -ffast-math -fno-strict-aliasing ${PIC_FLAGS} ) diff --git a/plugins/LadspaEffect/tap/CMakeLists.txt b/plugins/LadspaEffect/tap/CMakeLists.txt index b895c753113..84c4694655f 100644 --- a/plugins/LadspaEffect/tap/CMakeLists.txt +++ b/plugins/LadspaEffect/tap/CMakeLists.txt @@ -1,10 +1,12 @@ +set_directory_properties(PROPERTIES SYSTEM TRUE) + INCLUDE_DIRECTORIES("${CMAKE_SOURCE_DIR}/include") FILE(GLOB PLUGIN_SOURCES tap-plugins/*.c) LIST(SORT PLUGIN_SOURCES) if(MSVC) - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /wd4244 /fp:fast") + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /fp:fast") else() - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -O3 -Wno-write-strings -fomit-frame-pointer -fno-strict-aliasing -funroll-loops -ffast-math") + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -O3 -fomit-frame-pointer -fno-strict-aliasing -funroll-loops -ffast-math") endif() FOREACH(_item ${PLUGIN_SOURCES}) GET_FILENAME_COMPONENT(_plugin "${_item}" NAME_WE) diff --git a/plugins/Lv2Effect/CMakeLists.txt b/plugins/Lv2Effect/CMakeLists.txt index 915751797d1..e0427eaa30a 100644 --- a/plugins/Lv2Effect/CMakeLists.txt +++ b/plugins/Lv2Effect/CMakeLists.txt @@ -1,7 +1,7 @@ IF(LMMS_HAVE_LV2) - INCLUDE_DIRECTORIES(${LV2_INCLUDE_DIRS}) - INCLUDE_DIRECTORIES(${LILV_INCLUDE_DIRS}) - INCLUDE_DIRECTORIES(${SUIL_INCLUDE_DIRS}) + include_directories(SYSTEM ${LV2_INCLUDE_DIRS}) + include_directories(SYSTEM ${LILV_INCLUDE_DIRS}) + include_directories(SYSTEM ${SUIL_INCLUDE_DIRS}) INCLUDE(BuildPlugin) BUILD_PLUGIN(lv2effect Lv2Effect.cpp Lv2FxControls.cpp Lv2FxControlDialog.cpp Lv2Effect.h Lv2FxControls.h Lv2FxControlDialog.h MOCFILES Lv2Effect.h Lv2FxControls.h Lv2FxControlDialog.h diff --git a/plugins/Lv2Instrument/CMakeLists.txt b/plugins/Lv2Instrument/CMakeLists.txt index 290bd84e82e..e10eff69215 100644 --- a/plugins/Lv2Instrument/CMakeLists.txt +++ b/plugins/Lv2Instrument/CMakeLists.txt @@ -1,7 +1,7 @@ IF(LMMS_HAVE_LV2) - INCLUDE_DIRECTORIES(${LV2_INCLUDE_DIRS}) - INCLUDE_DIRECTORIES(${LILV_INCLUDE_DIRS}) - INCLUDE_DIRECTORIES(${SUIL_INCLUDE_DIRS}) + include_directories(SYSTEM ${LV2_INCLUDE_DIRS}) + include_directories(SYSTEM ${LILV_INCLUDE_DIRS}) + include_directories(SYSTEM ${SUIL_INCLUDE_DIRS}) INCLUDE(BuildPlugin) BUILD_PLUGIN(lv2instrument Lv2Instrument.cpp Lv2Instrument.h MOCFILES Lv2Instrument.h EMBEDDED_RESOURCES logo.png) ENDIF(LMMS_HAVE_LV2) diff --git a/plugins/OpulenZ/CMakeLists.txt b/plugins/OpulenZ/CMakeLists.txt index 58f661406a7..fcfce7819ad 100644 --- a/plugins/OpulenZ/CMakeLists.txt +++ b/plugins/OpulenZ/CMakeLists.txt @@ -1,20 +1,16 @@ -INCLUDE(BuildPlugin) +include(BuildPlugin) -# Avoid unused warnings for mididata.h -IF(CMAKE_CXX_COMPILER_ID MATCHES "GNU|Clang") -SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-unused-variable") -ENDIF() - -INCLUDE_DIRECTORIES(adplug/src) +add_library(adplug STATIC + adplug/src/fmopl.c + adplug/src/temuopl.cpp +) +target_include_directories(adplug PUBLIC adplug/src) +set_target_properties(adplug PROPERTIES SYSTEM TRUE) -BUILD_PLUGIN(opulenz +build_plugin(opulenz OpulenZ.cpp OpulenZ.h - adplug/src/opl.h - adplug/src/fmopl.c - adplug/src/fmopl.h - adplug/src/temuopl.cpp - adplug/src/temuopl.h MOCFILES OpulenZ.h EMBEDDED_RESOURCES "${CMAKE_CURRENT_SOURCE_DIR}/*.png" ) +target_link_libraries(opulenz adplug) diff --git a/plugins/OpulenZ/OpulenZ.cpp b/plugins/OpulenZ/OpulenZ.cpp index 260ba353dad..607d408835e 100644 --- a/plugins/OpulenZ/OpulenZ.cpp +++ b/plugins/OpulenZ/OpulenZ.cpp @@ -46,9 +46,9 @@ #include #include -#include "opl.h" -#include "temuopl.h" -#include "mididata.h" +#include +#include +#include #include "embed.h" #include "debug.h" diff --git a/plugins/Sid/SidInstrument.cpp b/plugins/Sid/SidInstrument.cpp index b745075aaf3..0048092ae78 100644 --- a/plugins/Sid/SidInstrument.cpp +++ b/plugins/Sid/SidInstrument.cpp @@ -29,7 +29,7 @@ #include #include -#include "sid.h" +#include #include "SidInstrument.h" #include "AudioEngine.h" diff --git a/plugins/Sid/resid/CMakeLists.txt b/plugins/Sid/resid/CMakeLists.txt index bb39e3d166f..e882679a88c 100644 --- a/plugins/Sid/resid/CMakeLists.txt +++ b/plugins/Sid/resid/CMakeLists.txt @@ -1,3 +1,5 @@ +set_directory_properties(PROPERTIES SYSTEM TRUE) + # These are the defaults set(RESID_INLINING 1) set(RESID_INLINE inline) diff --git a/plugins/SlicerT/CMakeLists.txt b/plugins/SlicerT/CMakeLists.txt index 49a80ca03aa..fa7ce3c11a1 100644 --- a/plugins/SlicerT/CMakeLists.txt +++ b/plugins/SlicerT/CMakeLists.txt @@ -1,10 +1,16 @@ -INCLUDE(BuildPlugin) +include(BuildPlugin) -INCLUDE_DIRECTORIES(${FFTW3F_INCLUDE_DIRS}) -LINK_LIBRARIES(${FFTW3F_LIBRARIES}) +include_directories(SYSTEM ${FFTW3F_INCLUDE_DIRS}) +link_libraries(${FFTW3F_LIBRARIES}) -INCLUDE_DIRECTORIES(${SAMPLERATE_INCLUDE_DIRS}) -LINK_DIRECTORIES(${SAMPLERATE_LIBRARY_DIRS}) -LINK_LIBRARIES(${SAMPLERATE_LIBRARIES}) - -BUILD_PLUGIN(slicert SlicerT.cpp SlicerT.h SlicerTView.cpp SlicerTView.h SlicerTWaveform.cpp SlicerTWaveform.h MOCFILES SlicerT.h SlicerTView.h SlicerTWaveform.h EMBEDDED_RESOURCES "${CMAKE_CURRENT_SOURCE_DIR}/*.png") \ No newline at end of file +build_plugin(slicert + SlicerT.cpp + SlicerT.h + SlicerTView.cpp + SlicerTView.h + SlicerTWaveform.cpp + SlicerTWaveform.h + MOCFILES SlicerT.h SlicerTView.h SlicerTWaveform.h + EMBEDDED_RESOURCES "${CMAKE_CURRENT_SOURCE_DIR}/*.png" +) +target_link_libraries(slicert SampleRate::samplerate) diff --git a/plugins/SpectrumAnalyzer/CMakeLists.txt b/plugins/SpectrumAnalyzer/CMakeLists.txt index 488495a9e3d..4b3d2ed69bd 100644 --- a/plugins/SpectrumAnalyzer/CMakeLists.txt +++ b/plugins/SpectrumAnalyzer/CMakeLists.txt @@ -1,5 +1,5 @@ INCLUDE(BuildPlugin) -INCLUDE_DIRECTORIES(${FFTW3F_INCLUDE_DIRS}) +include_directories(SYSTEM ${FFTW3F_INCLUDE_DIRS}) LINK_LIBRARIES(${FFTW3F_LIBRARIES}) diff --git a/plugins/VstBase/RemoteVstPlugin/CMakeLists.txt b/plugins/VstBase/RemoteVstPlugin/CMakeLists.txt index 5bcf9f065da..a3cd517ff06 100644 --- a/plugins/VstBase/RemoteVstPlugin/CMakeLists.txt +++ b/plugins/VstBase/RemoteVstPlugin/CMakeLists.txt @@ -76,7 +76,7 @@ if(IS_MINGW) " HAS_STD_MUTEX) if(NOT HAS_STD_MUTEX) - target_include_directories(${EXE_NAME} PRIVATE + target_include_directories(${EXE_NAME} SYSTEM PRIVATE "${LMMS_SOURCE_DIR}/src/3rdparty/mingw-std-threads") target_compile_definitions(${EXE_NAME} PRIVATE -DUSE_MINGW_THREADS_REPLACEMENT) diff --git a/plugins/VstBase/VstPlugin.cpp b/plugins/VstBase/VstPlugin.cpp index 0361d4c25d0..5dbe7a698ae 100644 --- a/plugins/VstBase/VstPlugin.cpp +++ b/plugins/VstBase/VstPlugin.cpp @@ -36,7 +36,7 @@ #ifdef LMMS_BUILD_LINUX # include -# include "X11EmbedContainer.h" +# include #endif #include diff --git a/plugins/Xpressive/CMakeLists.txt b/plugins/Xpressive/CMakeLists.txt index 366381e6228..f5f1e71612d 100644 --- a/plugins/Xpressive/CMakeLists.txt +++ b/plugins/Xpressive/CMakeLists.txt @@ -1,6 +1,5 @@ INCLUDE(BuildPlugin) -INCLUDE_DIRECTORIES(exprtk) SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Dexprtk_disable_sc_andor") SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Dexprtk_disable_return_statement") SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Dexprtk_disable_break_continue") @@ -8,7 +7,7 @@ SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Dexprtk_disable_comments") SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Dexprtk_disable_string_capabilities") SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Dexprtk_disable_rtl_io_file") SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Dexprtk_disable_rtl_vecops") -SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${WERROR_FLAGS} -fexceptions") +set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fexceptions") IF(LMMS_BUILD_WIN32 AND NOT MSVC) SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wa,-mbig-obj -Dexprtk_disable_enhanced_features") @@ -16,13 +15,16 @@ ELSEIF(LMMS_BUILD_WIN32 AND MSVC) SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /bigobj") ENDIF() -BUILD_PLUGIN(xpressive +add_library(exprtk INTERFACE) +target_include_directories(exprtk INTERFACE exprtk) +set_target_properties(exprtk PROPERTIES SYSTEM TRUE) + +build_plugin(xpressive Xpressive.cpp ExprSynth.cpp Xpressive.h - exprtk/exprtk.hpp + ExprSynth.h MOCFILES Xpressive.h EMBEDDED_RESOURCES "${CMAKE_CURRENT_SOURCE_DIR}/*.png" ) - - +target_link_libraries(xpressive exprtk) diff --git a/plugins/Xpressive/ExprSynth.cpp b/plugins/Xpressive/ExprSynth.cpp index 736b47598ac..0dde9ff96f6 100644 --- a/plugins/Xpressive/ExprSynth.cpp +++ b/plugins/Xpressive/ExprSynth.cpp @@ -36,7 +36,7 @@ #include "NotePlayHandle.h" -#include "exprtk.hpp" +#include #define WARN_EXPRTK qWarning("ExprTk exception") @@ -820,4 +820,4 @@ void ExprSynth::renderOutput(fpp_t frames, sampleFrame *buf) } -} // namespace lmms \ No newline at end of file +} // namespace lmms diff --git a/plugins/ZynAddSubFx/CMakeLists.txt b/plugins/ZynAddSubFx/CMakeLists.txt index 0f6af20eec0..a0eb6f36ae6 100644 --- a/plugins/ZynAddSubFx/CMakeLists.txt +++ b/plugins/ZynAddSubFx/CMakeLists.txt @@ -12,7 +12,7 @@ set(CMAKE_POSITION_INDEPENDENT_CODE ON) # definitions for ZynAddSubFX IF(LMMS_BUILD_LINUX OR LMMS_BUILD_APPLE OR LMMS_BUILD_OPENBSD OR LMMS_BUILD_FREEBSD) FIND_PACKAGE(X11) - INCLUDE_DIRECTORIES(${X11_INCLUDE_DIR}) + include_directories(SYSTEM ${X11_INCLUDE_DIR}) ADD_DEFINITIONS(-DOS_LINUX) ELSE() ADD_DEFINITIONS(-DOS_WINDOWS) @@ -44,21 +44,21 @@ IF(NOT EXISTS ${FLTK_FLUID_EXECUTABLE}) ENDIF() ENDIF() -include_directories( +include_directories(SYSTEM "${FLTK_INCLUDE_DIR}" - "${CMAKE_CURRENT_SOURCE_DIR}" ${FFTW3F_INCLUDE_DIRS} +) +include_directories( + "${CMAKE_CURRENT_SOURCE_DIR}" "${CMAKE_CURRENT_BINARY_DIR}" "${CMAKE_BINARY_DIR}" - "${CMAKE_SOURCE_DIR}/src/3rdparty/mingw-std-threads" - "${CMAKE_CURRENT_SOURCE_DIR}/zynaddsubfx/src/UI" ) ADD_DEFINITIONS(-DPLUGINVERSION) # removes exit confirmation dialogs etc. in MasterUI.fl add_subdirectory(zynaddsubfx/src/Nio) add_subdirectory(zynaddsubfx/src/UI) -SET(zynaddsubfx_core_SRCS +add_library(zynaddsubfx_synth OBJECT zynaddsubfx/src/DSP/AnalogFilter.cpp zynaddsubfx/src/DSP/FFTwrapper.cpp zynaddsubfx/src/DSP/Filter.cpp @@ -107,13 +107,32 @@ SET(zynaddsubfx_core_SRCS zynaddsubfx/src/Synth/SUBnote.cpp ) -add_library(ZynAddSubFxCoreObjs OBJECT LocalZynAddSubFx.cpp ${zynaddsubfx_core_SRCS}) -add_library(ZynAddSubFxCore INTERFACE) -target_sources(ZynAddSubFxCore INTERFACE - $ - $ -) +set_target_properties(zynaddsubfx_nio PROPERTIES SYSTEM TRUE) +set_target_properties(zynaddsubfx_gui PROPERTIES SYSTEM TRUE) +set_target_properties(zynaddsubfx_synth PROPERTIES SYSTEM TRUE) +if(MINGW) + target_link_libraries(zynaddsubfx_nio PUBLIC mingw_stdthreads) + target_link_libraries(zynaddsubfx_gui PUBLIC mingw_stdthreads) + target_link_libraries(zynaddsubfx_synth PUBLIC mingw_stdthreads) +endif() + +# Relative include paths don't work automatically for the GUI, because the +# generated C++ files aren't in the source directory. Thus, add the expected +# source directory as an additional include directory. +target_include_directories(zynaddsubfx_gui PUBLIC zynaddsubfx/src/UI) + +add_library(ZynAddSubFxCore STATIC + LocalZynAddSubFx.cpp +) +target_include_directories(ZynAddSubFxCore SYSTEM PUBLIC + zynaddsubfx/src + "${CMAKE_CURRENT_BINARY_DIR}/zynaddsubfx/src" +) +target_static_libraries(ZynAddSubFxCore PUBLIC + zynaddsubfx_nio + zynaddsubfx_synth +) target_link_libraries(ZynAddSubFxCore INTERFACE ${FFTW3F_LIBRARIES} ${QT_LIBRARIES} @@ -132,7 +151,7 @@ ELSE() SET(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/${PLUGIN_DIR}") ENDIF() BUILD_PLUGIN(zynaddsubfx ZynAddSubFx.cpp ZynAddSubFx.h MOCFILES ZynAddSubFx.h EMBEDDED_RESOURCES artwork.png logo.png) -target_link_libraries(zynaddsubfx ZynAddSubFxCore) +target_static_libraries(zynaddsubfx ZynAddSubFxCore) if(MSVC) set(WINRC "${CMAKE_CURRENT_BINARY_DIR}/zynaddsubfx.rc") @@ -155,8 +174,8 @@ add_executable(RemoteZynAddSubFx RemoteZynAddSubFx.cpp ${LMMS_COMMON_SRCS} "${WINRC}" - $ ) +target_static_libraries(RemoteZynAddSubFx ZynAddSubFxCore zynaddsubfx_gui) INSTALL(TARGETS RemoteZynAddSubFx RUNTIME DESTINATION "${PLUGIN_DIR}") # Needed to deploy dependencies of RemoteZynAddSubFx SET_PROPERTY(GLOBAL APPEND PROPERTY PLUGINS_BUILT "RemoteZynAddSubFx") @@ -176,7 +195,7 @@ IF(FLTK_CONFIG AND NOT (LMMS_BUILD_APPLE OR LMMS_BUILD_WIN32)) STRING(REPLACE " " ";" FLTK_FILTERED_LDFLAGS ${FLTK_FILTERED_LDFLAGS}) LIST(REMOVE_ITEM FLTK_FILTERED_LDFLAGS -lX11) ENDIF() -target_link_libraries(RemoteZynAddSubFx ZynAddSubFxCore ${FLTK_FILTERED_LDFLAGS}) +target_link_libraries(RemoteZynAddSubFx ${FLTK_FILTERED_LDFLAGS}) if(LMMS_HAVE_LIBRT) target_link_libraries(RemoteZynAddSubFx rt) diff --git a/plugins/ZynAddSubFx/LocalZynAddSubFx.cpp b/plugins/ZynAddSubFx/LocalZynAddSubFx.cpp index 83ef3e9a246..a98cfa1e11b 100644 --- a/plugins/ZynAddSubFx/LocalZynAddSubFx.cpp +++ b/plugins/ZynAddSubFx/LocalZynAddSubFx.cpp @@ -37,10 +37,10 @@ #include "MidiEvent.h" -#include "zynaddsubfx/src/Nio/NulEngine.h" -#include "zynaddsubfx/src/Misc/Master.h" -#include "zynaddsubfx/src/Misc/Part.h" -#include "zynaddsubfx/src/Misc/Util.h" +#include +#include +#include +#include // Global variable in zynaddsubfx/src/globals.h SYNTH_T* synth = nullptr; diff --git a/plugins/ZynAddSubFx/RemoteZynAddSubFx.cpp b/plugins/ZynAddSubFx/RemoteZynAddSubFx.cpp index c4d6b71a16b..104be5cac11 100644 --- a/plugins/ZynAddSubFx/RemoteZynAddSubFx.cpp +++ b/plugins/ZynAddSubFx/RemoteZynAddSubFx.cpp @@ -37,8 +37,8 @@ #include "RemotePluginClient.h" #include "LocalZynAddSubFx.h" -#include "zynaddsubfx/src/Nio/Nio.h" -#include "zynaddsubfx/src/UI/MasterUI.h" +#include +#include using namespace lmms; diff --git a/plugins/ZynAddSubFx/ZynAddSubFx.h b/plugins/ZynAddSubFx/ZynAddSubFx.h index b4f7c434c74..2b30c6a3ead 100644 --- a/plugins/ZynAddSubFx/ZynAddSubFx.h +++ b/plugins/ZynAddSubFx/ZynAddSubFx.h @@ -28,12 +28,12 @@ #include #include +#include + #include "AutomatableModel.h" #include "Instrument.h" #include "InstrumentView.h" #include "RemotePlugin.h" -#include "zynaddsubfx/src/globals.h" - class QPushButton; diff --git a/src/3rdparty/CMakeLists.txt b/src/3rdparty/CMakeLists.txt index 3339eb926a6..4467cd07541 100644 --- a/src/3rdparty/CMakeLists.txt +++ b/src/3rdparty/CMakeLists.txt @@ -1,8 +1,13 @@ +set_directory_properties(PROPERTIES SYSTEM TRUE) + if(LMMS_BUILD_LINUX AND LMMS_HAVE_VST) set(BUILD_SHARED_LIBS OFF) add_subdirectory(qt5-x11embed) ENDIF() +add_library(jack_headers INTERFACE) +target_include_directories(jack_headers INTERFACE jack2/common) + ADD_SUBDIRECTORY(hiir) ADD_SUBDIRECTORY(weakjack) @@ -12,13 +17,22 @@ if(MINGW) set(LMMS_USE_MINGW_STD_THREADS ON PARENT_SCOPE) endif() -# The lockless ring buffer library is compiled as part of the core -SET(RINGBUFFER_DIR "${CMAKE_SOURCE_DIR}/src/3rdparty/ringbuffer/") -SET(RINGBUFFER_DIR ${RINGBUFFER_DIR} PARENT_SCOPE) +# The lockless ring buffer library is linked as part of the core +add_library(ringbuffer OBJECT + ringbuffer/src/lib/ringbuffer.cpp +) +target_compile_features(ringbuffer PUBLIC cxx_std_17) +target_include_directories(ringbuffer PUBLIC + ringbuffer/include + "${CMAKE_CURRENT_BINARY_DIR}" +) # Create a dummy ringbuffer_export.h, since ringbuffer is not compiled as a library -FILE(WRITE ${CMAKE_BINARY_DIR}/src/ringbuffer_export.h - "#include \"${CMAKE_BINARY_DIR}/src/lmms_export.h\"\n - #define RINGBUFFER_EXPORT LMMS_EXPORT") +file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/ringbuffer_export.h.in" [[ + #include "${CMAKE_BINARY_DIR}/src/lmms_export.h" + #define RINGBUFFER_EXPORT LMMS_EXPORT +]]) +configure_file("${CMAKE_CURRENT_BINARY_DIR}/ringbuffer_export.h.in" ringbuffer_export.h) +target_compile_definitions(ringbuffer PRIVATE lmmsobjs_EXPORTS) # Enable MLOCK support for ringbuffer if available INCLUDE(CheckIncludeFiles) CHECK_INCLUDE_FILES(sys/mman.h HAVE_SYS_MMAN) @@ -28,5 +42,5 @@ ELSE() SET(USE_MLOCK OFF) ENDIF() # Generate ringbuffer configuration headers -CONFIGURE_FILE(${RINGBUFFER_DIR}/src/ringbuffer-config.h.in ${CMAKE_BINARY_DIR}/src/ringbuffer-config.h) -CONFIGURE_FILE(${RINGBUFFER_DIR}/src/ringbuffer-version.h.in ${CMAKE_BINARY_DIR}/src/ringbuffer-version.h) +configure_file(ringbuffer/src/ringbuffer-config.h.in ringbuffer-config.h) +configure_file(ringbuffer/src/ringbuffer-version.h.in ringbuffer-version.h) diff --git a/src/3rdparty/weakjack/CMakeLists.txt b/src/3rdparty/weakjack/CMakeLists.txt index 7600c3915ed..15c6d953e73 100644 --- a/src/3rdparty/weakjack/CMakeLists.txt +++ b/src/3rdparty/weakjack/CMakeLists.txt @@ -1,12 +1,14 @@ # Use weak jack library linking -IF(LMMS_HAVE_WEAKJACK) - SET(CMAKE_C_FLAGS "-std=c11") - +if(LMMS_HAVE_WEAKJACK) + add_library(weakjack STATIC + weakjack/weak_libjack.c + ) + target_include_directories(weakjack PUBLIC weakjack) + target_link_libraries(weakjack PUBLIC jack_headers ${CMAKE_DL_LIBS}) + target_compile_features(weakjack PRIVATE c_std_11) # Enable weakjack, disable metadata support - ADD_DEFINITIONS(-DUSE_WEAK_JACK=1 -DNO_JACK_METADATA=1) - - # Library stub for AppImages running on systems without jack - ADD_LIBRARY(weakjack MODULE weakjack/weak_libjack.c weakjack/weak_libjack.h) - TARGET_INCLUDE_DIRECTORIES(weakjack PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/weakjack ${JACK_INCLUDE_DIRS}) - INSTALL(TARGETS weakjack LIBRARY DESTINATION "${PLUGIN_DIR}/optional") -ENDIF() + target_compile_definitions(weakjack PUBLIC + USE_WEAK_JACK=1 + NO_JACK_METADATA=1 + ) +endif() diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 294ae1a076a..940d485f966 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -29,7 +29,6 @@ INCLUDE_DIRECTORIES( "${CMAKE_BINARY_DIR}/include" "${CMAKE_SOURCE_DIR}" "${CMAKE_SOURCE_DIR}/include" - "${RINGBUFFER_DIR}/include" ) IF(WIN32 AND MSVC) @@ -55,39 +54,31 @@ ADD_GEN_QRC(LMMS_RCC_OUT lmms.qrc FILE(RELATIVE_PATH LIB_DIR_RELATIVE "/${BIN_DIR}" "/${LIB_DIR}") FILE(RELATIVE_PATH PLUGIN_DIR_RELATIVE "/${BIN_DIR}" "/${PLUGIN_DIR}") ADD_DEFINITIONS(-DLIB_DIR="${LIB_DIR_RELATIVE}" -DPLUGIN_DIR="${PLUGIN_DIR_RELATIVE}" ${PULSEAUDIO_DEFINITIONS}) -INCLUDE_DIRECTORIES( +include_directories(SYSTEM ${JACK_INCLUDE_DIRS} ${SNDIO_INCLUDE_DIRS} ${FFTW3F_INCLUDE_DIRS} ) IF(NOT LMMS_HAVE_SDL2 AND NOT ("${SDL_INCLUDE_DIR}" STREQUAL "")) - INCLUDE_DIRECTORIES("${SDL_INCLUDE_DIR}") -ENDIF() - -IF(LMMS_HAVE_WEAKJACK) - LIST(APPEND LMMS_SRCS "${WEAKJACK_INCLUDE_DIRS}/weak_libjack.c") - LIST(APPEND LMMS_INCLUDES "${WEAKJACK_INCLUDE_DIRS}/weak_libjack.h") - INCLUDE_DIRECTORIES("${WEAKJACK_INCLUDE_DIRS}") - ADD_DEFINITIONS(-DUSE_WEAK_JACK=1 -DNO_JACK_METADATA=1) + include_directories(SYSTEM "${SDL_INCLUDE_DIR}") ENDIF() IF(NOT ("${PULSEAUDIO_INCLUDE_DIR}" STREQUAL "")) - INCLUDE_DIRECTORIES("${PULSEAUDIO_INCLUDE_DIR}") + include_directories(SYSTEM "${PULSEAUDIO_INCLUDE_DIR}") ENDIF() IF(NOT ("${LV2_INCLUDE_DIRS}" STREQUAL "")) - INCLUDE_DIRECTORIES(${LV2_INCLUDE_DIRS}) + include_directories(SYSTEM ${LV2_INCLUDE_DIRS}) ENDIF() IF(NOT ("${LILV_INCLUDE_DIRS}" STREQUAL "")) - INCLUDE_DIRECTORIES(${LILV_INCLUDE_DIRS}) + include_directories(SYSTEM ${LILV_INCLUDE_DIRS}) ENDIF() IF(NOT ("${SUIL_INCLUDE_DIRS}" STREQUAL "")) - INCLUDE_DIRECTORIES(${SUIL_INCLUDE_DIRS}) + include_directories(SYSTEM ${SUIL_INCLUDE_DIRS}) ENDIF() -LIST(APPEND LMMS_SRCS "${RINGBUFFER_DIR}/src/lib/ringbuffer.cpp") # Use libraries in non-standard directories (e.g., another version of Qt) IF(LMMS_BUILD_LINUX) @@ -108,23 +99,20 @@ GENERATE_EXPORT_HEADER(lmmsobjs ADD_EXECUTABLE(lmms core/main.cpp - $ "${WINRC}" ) TARGET_INCLUDE_DIRECTORIES(lmms PUBLIC ${CMAKE_CURRENT_BINARY_DIR} ) +target_static_libraries(lmms PUBLIC lmmsobjs) # CMake doesn't define target_EXPORTS for OBJECT libraries. # See the documentation of DEFINE_SYMBOL for details. # Also add LMMS_STATIC_DEFINE for targets linking against it. TARGET_COMPILE_DEFINITIONS(lmmsobjs PRIVATE -Dlmmsobjs_EXPORTS - INTERFACE -DLMMS_STATIC_DEFINE -) -TARGET_COMPILE_DEFINITIONS(lmms - PRIVATE $ ) +target_static_definitions(lmmsobjs LMMS_STATIC_DEFINE) # Set Visual Studio startup project to lmms # https://stackoverflow.com/a/37994396/8166701 @@ -189,21 +177,10 @@ SET(LMMS_REQUIRED_LIBS ${LMMS_REQUIRED_LIBS} ${EXTRA_LIBRARIES} ) -# Expose required libs for tests binary -SET(LMMS_REQUIRED_LIBS ${LMMS_REQUIRED_LIBS} PARENT_SCOPE) - -TARGET_LINK_LIBRARIES(lmms +target_link_libraries(lmmsobjs ${LMMS_REQUIRED_LIBS} ) - -FOREACH(LIB ${LMMS_REQUIRED_LIBS}) - IF(TARGET ${LIB}) - GET_TARGET_PROPERTY(INCLUDE_DIRS ${LIB} INTERFACE_INCLUDE_DIRECTORIES) - IF(INCLUDE_DIRS) - TARGET_INCLUDE_DIRECTORIES(lmmsobjs PRIVATE ${INCLUDE_DIRS}) - ENDIF() - ENDIF() -ENDFOREACH() +target_static_libraries(lmmsobjs ringbuffer) set_target_properties(lmms PROPERTIES ENABLE_EXPORTS ON diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 9a609922c2c..625601a3ebb 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -16,18 +16,17 @@ foreach(LMMS_TEST_SRC IN LISTS LMMS_TESTS) # TODO CMake 3.20: Use cmake_path get_filename_component(LMMS_TEST_NAME ${LMMS_TEST_SRC} NAME_WE) - add_executable(${LMMS_TEST_NAME} $ ${LMMS_TEST_SRC}) + add_executable(${LMMS_TEST_NAME} ${LMMS_TEST_SRC}) add_test(NAME ${LMMS_TEST_NAME} COMMAND ${LMMS_TEST_NAME}) # TODO CMake 3.12: Propagate usage requirements by linking to lmmsobjs target_include_directories(${LMMS_TEST_NAME} PRIVATE $) + target_static_libraries("${LMMS_TEST_NAME}" PRIVATE lmmsobjs) target_link_libraries(${LMMS_TEST_NAME} PRIVATE - ${LMMS_REQUIRED_LIBS} ${QT_LIBRARIES} ${QT_QTTEST_LIBRARY} ) target_compile_features(${LMMS_TEST_NAME} PRIVATE cxx_std_17) - target_compile_definitions(${LMMS_TEST_NAME} PRIVATE $) endforeach() From f00f0c080deecd4577c738b00793ad4383d5cc86 Mon Sep 17 00:00:00 2001 From: notaz Date: Tue, 18 Jun 2024 12:21:07 +0300 Subject: [PATCH 36/38] set "child subreaper" process attribute on Linux (#7315) When launching the wine VST process various wrappers may be involved, when they exit the VST process becomes orphaned. This breaks the PollParentThread mechanism which is responsible for cleaning up processes in case of a crash. Because of this 64bit VST process exits prematurely, in other words 64bit VST is currently broken in a typical wine configuration. A solution suggested by Lukas W is to set the PR_SET_CHILD_SUBREAPER flag which makes the kernel reparent such process to lmms and PollParentThread then works as intended. Co-authored-by: Lukas W --- CMakeLists.txt | 1 + src/core/main.cpp | 13 +++++++++++++ src/lmmsconfig.h.in | 1 + 3 files changed, 15 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 6aa53d98211..9da4fc243f6 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -154,6 +154,7 @@ CHECK_INCLUDE_FILES(sys/types.h LMMS_HAVE_SYS_TYPES_H) CHECK_INCLUDE_FILES(sys/ipc.h LMMS_HAVE_SYS_IPC_H) CHECK_INCLUDE_FILES(sys/time.h LMMS_HAVE_SYS_TIME_H) CHECK_INCLUDE_FILES(sys/times.h LMMS_HAVE_SYS_TIMES_H) +CHECK_INCLUDE_FILES(sys/prctl.h LMMS_HAVE_SYS_PRCTL_H) CHECK_INCLUDE_FILES(sched.h LMMS_HAVE_SCHED_H) CHECK_INCLUDE_FILES(sys/soundcard.h LMMS_HAVE_SYS_SOUNDCARD_H) CHECK_INCLUDE_FILES(soundcard.h LMMS_HAVE_SOUNDCARD_H) diff --git a/src/core/main.cpp b/src/core/main.cpp index 650ceab578f..b970997eff5 100644 --- a/src/core/main.cpp +++ b/src/core/main.cpp @@ -55,6 +55,10 @@ #include #endif +#ifdef LMMS_HAVE_SYS_PRCTL_H +#include +#endif + #include #include "MainApplication.h" @@ -293,6 +297,15 @@ int main( int argc, char * * argv ) qInstallMessageHandler(consoleMessageHandler); #endif +#if defined(LMMS_HAVE_SYS_PRCTL_H) && defined(PR_SET_CHILD_SUBREAPER) + // Set the "child subreaper" attribute so that plugin child processes remain as lmms' + // children even when some wrapper process exits, as it may happen with wine + if (prctl(PR_SET_CHILD_SUBREAPER, 1)) + { + perror("prctl(PR_SET_CHILD_SUBREAPER)"); + } +#endif + // initialize memory managers NotePlayHandleManager::init(); diff --git a/src/lmmsconfig.h.in b/src/lmmsconfig.h.in index 89db21a7bfb..1510a36ec05 100644 --- a/src/lmmsconfig.h.in +++ b/src/lmmsconfig.h.in @@ -45,6 +45,7 @@ #cmakedefine LMMS_HAVE_SEMAPHORE_H #cmakedefine LMMS_HAVE_SYS_TIME_H #cmakedefine LMMS_HAVE_SYS_TIMES_H +#cmakedefine LMMS_HAVE_SYS_PRCTL_H #cmakedefine LMMS_HAVE_SCHED_H #cmakedefine LMMS_HAVE_SYS_SOUNDCARD_H #cmakedefine LMMS_HAVE_SOUNDCARD_H From a5e000fdef75fadecb160dd7a7b67800bbe7a52e Mon Sep 17 00:00:00 2001 From: Dominic Clark Date: Tue, 18 Jun 2024 21:56:19 +0100 Subject: [PATCH 37/38] Fix caching for macOS CI jobs (#7326) * Add architecture to macOS cache keys * Only save Homebrew cache if lock file has changed --- .github/workflows/build.yml | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index b80d5df75b8..eee7ae803ba 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -95,19 +95,21 @@ jobs: - name: Clean up Homebrew download cache run: rm -rf ~/Library/Caches/Homebrew/downloads - name: Restore Homebrew download cache + id: cache-homebrew uses: actions/cache/restore@v3 with: key: n/a - only restore from restore-keys restore-keys: | - homebrew- + homebrew-${{ matrix.arch }}- path: ~/Library/Caches/Homebrew/downloads - name: Cache ccache data uses: actions/cache@v3 with: - key: ccache-${{ github.job }}-${{ github.ref }}-${{ github.run_id }} + key: "ccache-${{ github.job }}-${{ matrix.arch }}-${{ github.ref }}\ + -${{ github.run_id }}" restore-keys: | - ccache-${{ github.job }}-${{ github.ref }}- - ccache-${{ github.job }}- + ccache-${{ github.job }}-${{ matrix.arch }}-${{ github.ref }}- + ccache-${{ github.job }}-${{ matrix.arch }}- path: ~/Library/Caches/ccache - name: Install dependencies run: | @@ -154,10 +156,14 @@ jobs: env: CCACHE_MAXSIZE: 500MB - name: Save Homebrew download cache + if: ${{ steps.cache-homebrew.outputs.cache-matched-key != env.key }} uses: actions/cache/save@v3 with: - key: homebrew-${{ hashFiles('Brewfile.lock.json') }} + key: ${{ env.key }} path: ~/Library/Caches/Homebrew/downloads + env: + key: "homebrew-${{ matrix.arch }}\ + -${{ hashFiles('Brewfile.lock.json') }}" mingw: strategy: fail-fast: false From 7d70c8b0900008cc2875521c1ae20c102e29987f Mon Sep 17 00:00:00 2001 From: Rossmaxx Date: Mon, 15 Jul 2024 16:50:32 +0530 Subject: [PATCH 38/38] remnants of master merge --- CMakeLists.txt | 47 ++++++++++++++++++++++-------- plugins/ZynAddSubFx/CMakeLists.txt | 9 ------ src/3rdparty/CMakeLists.txt | 9 ------ 3 files changed, 35 insertions(+), 30 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index dfda7cb7c01..a9dbda4ccbd 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -656,19 +656,42 @@ if(CMAKE_CXX_COMPILER_ID MATCHES "GNU|Clang") ) # Due to a regression in gcc-4.8.X, we need to disable array-bounds check - IF (CMAKE_COMPILER_IS_GNUCXX AND ((CMAKE_CXX_COMPILER_VERSION VERSION_EQUAL "4.8.0") OR (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER "4.8.0") OR LMMS_BUILD_WIN32)) - SET(WERROR_FLAGS "${WERROR_FLAGS} -Wno-array-bounds -Wno-attributes") - ENDIF() -ELSEIF(MSVC) - # Remove any existing /W flags - string(REGEX REPLACE "/W[0-4]" "" CMAKE_C_FLAGS ${CMAKE_C_FLAGS}) - STRING(REGEX REPLACE "/W[0-4]" "" CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS}) - SET(WERROR_FLAGS "/W2") - IF(${USE_WERROR}) - SET(WERROR_FLAGS "${WERROR_FLAGS} /WX") - ENDIF() -ENDIF() + # TODO: Is this still necessary? + if(CMAKE_COMPILER_IS_GNUCXX) + list(APPEND COMPILE_ERROR_FLAGS + "-Wno-array-bounds" # Permit out-of-bounds array subscripts + "-Wno-attributes" # Permit unrecognised attributes + ) + endif() + if(USE_WERROR) + list(APPEND COMPILE_ERROR_FLAGS + "-Werror" # Treat warnings as errors + ) + endif() +elseif(MSVC) + set(COMPILE_ERROR_FLAGS + "/W2" # Enable some warnings by default + "/external:W0" # Don't emit warnings for third-party code + "/external:anglebrackets" # Consider headers included with angle brackets to be third-party + "/external:templates-" # Still emit warnings from first-party instantiations of third-party templates + # Silence "class X needs to have DLL-interface to be used by clients of + # class Y" warnings. These aren't trivial to address, and don't pose a + # problem for us since we build all modules with the same compiler and + # options, and dynamically link the CRT. + "/wd4251" + ) + set(THIRD_PARTY_COMPILE_ERROR_FLAGS + "/W0" # Disable all warnings + ) + + if(USE_WERROR) + list(APPEND COMPILE_ERROR_FLAGS + "/WX" # Treat warnings as errors + ) + endif() +endif() +add_compile_options("$>,${THIRD_PARTY_COMPILE_ERROR_FLAGS},${COMPILE_ERROR_FLAGS}>") IF(NOT CMAKE_BUILD_TYPE) message(STATUS "Setting build type to 'Release' as none was specified.") diff --git a/plugins/ZynAddSubFx/CMakeLists.txt b/plugins/ZynAddSubFx/CMakeLists.txt index d9f723961b9..b3490a50fb1 100644 --- a/plugins/ZynAddSubFx/CMakeLists.txt +++ b/plugins/ZynAddSubFx/CMakeLists.txt @@ -111,15 +111,6 @@ set_target_properties(zynaddsubfx_nio PROPERTIES SYSTEM TRUE) set_target_properties(zynaddsubfx_gui PROPERTIES SYSTEM TRUE) set_target_properties(zynaddsubfx_synth PROPERTIES SYSTEM TRUE) -<<<<<<< HEAD -if(MINGW) - target_link_libraries(zynaddsubfx_nio PUBLIC mingw_stdthreads) - target_link_libraries(zynaddsubfx_gui PUBLIC mingw_stdthreads) - target_link_libraries(zynaddsubfx_synth PUBLIC mingw_stdthreads) -endif() - -======= ->>>>>>> master # Relative include paths don't work automatically for the GUI, because the # generated C++ files aren't in the source directory. Thus, add the expected # source directory as an additional include directory. diff --git a/src/3rdparty/CMakeLists.txt b/src/3rdparty/CMakeLists.txt index e648cfd0355..e5cb6252756 100644 --- a/src/3rdparty/CMakeLists.txt +++ b/src/3rdparty/CMakeLists.txt @@ -11,15 +11,6 @@ target_include_directories(jack_headers INTERFACE jack2/common) ADD_SUBDIRECTORY(hiir) ADD_SUBDIRECTORY(weakjack) -<<<<<<< HEAD -if(MINGW) - option(MINGW_STDTHREADS_GENERATE_STDHEADERS "" ON) - add_subdirectory(mingw-std-threads) - set(LMMS_USE_MINGW_STD_THREADS ON PARENT_SCOPE) -endif() - -======= ->>>>>>> master # The lockless ring buffer library is linked as part of the core add_library(ringbuffer OBJECT ringbuffer/src/lib/ringbuffer.cpp