InstrumentPlayHandle: do not process if InstrumentTrack is muted

While regular instruments were excluded from processing when muted
this did not happen for InstrumentPlayHandle-based instruments. Muting
for exampling tracks with VSTi's inside did not decrease CPU usage.
Checking whether related InstrumentTrack is muted before calling
Instrument::play() fixes this issue.

Closes #2857426.
(cherry picked from commit 6940d19969)
This commit is contained in:
Tobias Doerffel
2009-09-15 10:10:02 +02:00
parent 3c9dd294dc
commit f7da4a0f7e
8 changed files with 41 additions and 22 deletions

View File

@@ -95,6 +95,15 @@ bool Instrument::isFromTrack( const track * _track ) const
bool Instrument::isMuted() const
{
return m_instrumentTrack->isMuted();
}
void Instrument::applyRelease( sampleFrame * buf, const notePlayHandle * _n )
{
const fpp_t frames = _n->framesLeftForCurrentPeriod();