Fix sound while playing from piano roll, when BB tracks are muted (#3804)

* Don't set BB track for tracks not in the BB

* Don't check for BB track mute state if we're playing a single pattern
This commit is contained in:
Hyunjin Song
2017-09-28 09:55:16 +09:00
committed by GitHub
parent f23cf4e0bf
commit e5db27542b
2 changed files with 10 additions and 3 deletions

View File

@@ -157,7 +157,8 @@ InstrumentTrack::~InstrumentTrack()
void InstrumentTrack::processAudioBuffer( sampleFrame* buf, const fpp_t frames, NotePlayHandle* n )
{
// we must not play the sound if this InstrumentTrack is muted...
if( isMuted() || ( n && n->isBbTrackMuted() ) || ! m_instrument )
if( isMuted() || ( Engine::getSong()->playMode() != Song::Mode_PlayPattern &&
n && n->isBbTrackMuted() ) || ! m_instrument )
{
return;
}
@@ -613,7 +614,10 @@ bool InstrumentTrack::play( const MidiTime & _start, const fpp_t _frames,
{
TrackContentObject * tco = getTCO( _tco_num );
tcos.push_back( tco );
bb_track = BBTrack::findBBTrack( _tco_num );
if (trackContainer() == (TrackContainer*)Engine::getBBTrackContainer())
{
bb_track = BBTrack::findBBTrack( _tco_num );
}
}
else
{

View File

@@ -587,7 +587,10 @@ bool SampleTrack::play( const MidiTime & _start, const fpp_t _frames,
return false;
}
tcos.push_back( getTCO( _tco_num ) );
bb_track = BBTrack::findBBTrack( _tco_num );
if (trackContainer() == (TrackContainer*)Engine::getBBTrackContainer())
{
bb_track = BBTrack::findBBTrack( _tco_num );
}
}
else
{