support for more special instrument-properties (monophonic, own number of release-frames)

git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/trunk/lmms@436 0778d3d1-df1d-0410-868b-ea421aaaa00d
This commit is contained in:
Tobias Doerffel
2006-12-09 23:34:57 +00:00
parent 26393dab8d
commit b91c607651
9 changed files with 83 additions and 11 deletions

View File

@@ -97,6 +97,7 @@ public:
private:
tabWidget * m_targetsTabWidget;
envelopeAndLFOWidget * m_envLFOWidgets[TARGET_COUNT];
instrumentTrack * m_instrumentTrack;
// filter-stuff
groupBox * m_filterGroupBox;

View File

@@ -87,6 +87,22 @@ public:
virtual f_cnt_t FASTCALL beatLen( notePlayHandle * _n ) const;
// some instruments need a certain number of release-frames even
// if no envelope is active - such instruments can re-implement this
// method for returning how many frames they at least like to have for
// release
virtual f_cnt_t desiredReleaseFrames( void ) const
{
return( 0 );
}
// monophonic instruments can re-implement this indicate that they do
// not allow more then one note being played at the same time
virtual bool isMonophonic( void ) const
{
return( FALSE );
}
// instrument-play-handles use this for checking whether they can mark
// themselves as done, so that mixer trashes them
inline virtual bool valid( void ) const

View File

@@ -107,6 +107,11 @@ public:
void FASTCALL playNote( notePlayHandle * _n, bool _try_parallelizing );
QString instrumentName( void ) const;
inline const instrument * getInstrument( void ) const
{
return( m_instrument );
}
void FASTCALL deleteNotePluginData( notePlayHandle * _n );
// name-stuff

View File

@@ -172,7 +172,7 @@ public:
return( FALSE );
}
inline void removePlayHandle( playHandle * _ph )
inline void removePlayHandle( const playHandle * _ph )
{
m_playHandlesToRemove.push_back( _ph );
}
@@ -287,6 +287,7 @@ public slots:
void setHighQuality( bool _hq_on = FALSE );
void setClipScaling( bool _state );
signals:
void sampleRateChanged( void );
void nextAudioBuffer( const surroundSampleFrame *, int _frames );
@@ -294,7 +295,7 @@ signals:
private:
mixer( engine * _engine );
~mixer();
virtual ~mixer();
void startProcessing( void );
void stopProcessing( void );
@@ -341,7 +342,7 @@ private:
int m_parallelizingLevel;
playHandleVector m_playHandles;
playHandleVector m_playHandlesToRemove;
constPlayHandleVector m_playHandlesToRemove;
qualityLevels m_qualityLevel;
float m_masterGain;