* replaced instrument::notePlayHandleBased() with instrument::isMidiBased()

* renamed bendable() to isBendable()
* if the instrument is MIDI based and instrument-track's volume is below 100, adjust velocity of MIDI events and scaling factor when mixing sound



git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/trunk/lmms@1715 0778d3d1-df1d-0410-868b-ea421aaaa00d
This commit is contained in:
Tobias Doerffel
2008-09-29 19:29:04 +00:00
parent 8a3d31464c
commit 880c322cf6
7 changed files with 37 additions and 23 deletions

View File

@@ -87,19 +87,21 @@ public:
return( 0 );
}
// instrument-play-handle-based instruments should return FALSE
inline virtual bool notePlayHandleBased( void ) const
// return false if instrument is not bendable
inline virtual bool isBendable( void ) const
{
return( true );
}
inline virtual bool bendable( void ) const
// return true if instruments reacts to MIDI events passed to
// handleMidiEvent() rather than playNote() & Co
inline virtual bool isMidiBased( void ) const
{
return( true );
return( false );
}
// sub-classes can re-implement this for receiving all incoming
// MIDI-events except NoteOn and NoteOff
// MIDI-events
inline virtual bool handleMidiEvent( const midiEvent & _me,
const midiTime & _time )
{

View File

@@ -245,11 +245,12 @@ public:
&&
// we must not parallelize note-play-handles, which
// belong to instruments that are instrument-play-
// handle-driven, because then waitForWorkerThread()
// handle-driven (i.e. react to MIDI events),
// because then waitForWorkerThread()
// would be additionally called for each
// note-play-handle which results in hangups
m_instrumentTrack->getInstrument()->
notePlayHandleBased() );
isMidiBased() );
}
virtual void waitForWorkerThread( void )