Merge remote-tracking branch 'upstream/master' into dynamic-effect-dialog-merge_upstream_20230923

This commit is contained in:
Michael Gregorius
2023-09-23 10:18:57 +02:00
57 changed files with 506 additions and 241 deletions

View File

@@ -126,6 +126,8 @@ private:
void upgrade_defaultTripleOscillatorHQ();
void upgrade_mixerRename();
void upgrade_bbTcoRename();
void upgrade_sampleAndHold();
void upgrade_midiCCIndexing();
// List of all upgrade methods
static const std::vector<UpgradeMethod> UPGRADE_METHODS;

View File

@@ -75,8 +75,7 @@ public:
private slots:
void reloadTree();
void expandItems( QTreeWidgetItem * item=nullptr, QList<QString> expandedDirs = QList<QString>() );
// call with item=NULL to filter the entire tree
bool filterItems( const QString & filter, QTreeWidgetItem * item=nullptr );
bool filterAndExpandItems(const QString & filter, QTreeWidgetItem * item = nullptr);
void giveFocusToFilter();
private:
@@ -84,6 +83,9 @@ private:
void addItems( const QString & path );
void saveDirectoriesStates();
void restoreDirectoriesStates();
FileBrowserTreeWidget * m_fileBrowserTreeWidget;
QLineEdit * m_filterEdit;
@@ -99,6 +101,8 @@ private:
QCheckBox* m_showFactoryContent = nullptr;
QString m_userDir;
QString m_factoryDir;
QList<QString> m_savedExpandedDirs;
QString m_previousFilterValue;
} ;
@@ -115,7 +119,6 @@ public:
//! that are expanded in the tree.
QList<QString> expandedDirs( QTreeWidgetItem * item = nullptr ) const;
protected:
void contextMenuEvent( QContextMenuEvent * e ) override;
void mousePressEvent( QMouseEvent * me ) override;

View File

@@ -26,62 +26,33 @@
#define LMMS_INSTRUMENT_PLAY_HANDLE_H
#include "PlayHandle.h"
#include "Instrument.h"
#include "NotePlayHandle.h"
#include "lmms_export.h"
namespace lmms
{
class Instrument;
class InstrumentTrack;
class LMMS_EXPORT InstrumentPlayHandle : public PlayHandle
{
public:
InstrumentPlayHandle( Instrument * instrument, InstrumentTrack* instrumentTrack );
InstrumentPlayHandle(Instrument * instrument, InstrumentTrack* instrumentTrack);
~InstrumentPlayHandle() override = default;
void play( sampleFrame * _working_buffer ) override
{
// ensure that all our nph's have been processed first
ConstNotePlayHandleList nphv = NotePlayHandle::nphsOfInstrumentTrack( m_instrument->instrumentTrack(), true );
bool nphsLeft;
do
{
nphsLeft = false;
for( const NotePlayHandle * constNotePlayHandle : nphv )
{
NotePlayHandle * notePlayHandle = const_cast<NotePlayHandle *>( constNotePlayHandle );
if( notePlayHandle->state() != ThreadableJob::ProcessingState::Done &&
!notePlayHandle->isFinished())
{
nphsLeft = true;
notePlayHandle->process();
}
}
}
while( nphsLeft );
m_instrument->play( _working_buffer );
}
void play(sampleFrame * working_buffer) override;
bool isFinished() const override
{
return false;
}
bool isFromTrack( const Track* _track ) const override
{
return m_instrument->isFromTrack( _track );
}
bool isFromTrack(const Track* track) const override;
private:
Instrument* m_instrument;
} ;
};
} // namespace lmms

View File

@@ -86,6 +86,7 @@ protected:
sample_t (*m_sampleFunction)( const float );
private:
float m_heldSample;
SampleBuffer * m_userDefSampleBuffer;
protected slots:

View File

@@ -48,6 +48,7 @@ class MidiController : public Controller, public MidiEventProcessor
{
Q_OBJECT
public:
static constexpr int NONE = -1;
MidiController( Model * _parent );
~MidiController() override = default;

View File

@@ -77,7 +77,7 @@ public:
public slots:
void setSampleBuffer( lmms::SampleBuffer* sb );
void setSampleFile( const QString & _sf );
void setSampleFile( const QString & sf );
void updateLength();
void toggleRecord();
void playbackPositionChanged();