Instrument: also render sound for MIDI-based instruments when muted
In order to provide smooth muting functionality (i.e. immediate proper sound when unmuting) always render audio buffers for MIDI-based instruments. This is more important than potentially reduced CPU usage while muted. Closes #69.
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
* Instrument.h - declaration of class Instrument, which provides a
|
||||
* standard interface for all instrument plugins
|
||||
*
|
||||
* Copyright (c) 2005-2009 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
* Copyright (c) 2005-2014 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
*
|
||||
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
|
||||
*
|
||||
@@ -117,8 +117,6 @@ public:
|
||||
|
||||
virtual bool isFromTrack( const track * _track ) const;
|
||||
|
||||
bool isMuted() const;
|
||||
|
||||
|
||||
protected:
|
||||
inline InstrumentTrack * instrumentTrack() const
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
* InstrumentPlayHandle.h - play-handle for driving an instrument
|
||||
*
|
||||
* Copyright (c) 2005-2009 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
* Copyright (c) 2005-2014 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
*
|
||||
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
|
||||
*
|
||||
@@ -45,10 +45,7 @@ public:
|
||||
|
||||
virtual void play( sampleFrame * _working_buffer )
|
||||
{
|
||||
if( !m_instrument->isMuted() )
|
||||
{
|
||||
m_instrument->play( _working_buffer );
|
||||
}
|
||||
m_instrument->play( _working_buffer );
|
||||
}
|
||||
|
||||
virtual bool done() const
|
||||
|
||||
Reference in New Issue
Block a user