Skip to content

Commit

Permalink
Ignore release frames for single-streamed instruments
Browse files Browse the repository at this point in the history
  • Loading branch information
PhysSong committed Oct 22, 2017
1 parent fbfcb43 commit f7af370
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions src/core/InstrumentSoundShaping.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -299,13 +299,18 @@ f_cnt_t InstrumentSoundShaping::envFrames( const bool _only_vol ) const

f_cnt_t InstrumentSoundShaping::releaseFrames() const
{
f_cnt_t ret_val = m_instrumentTrack->instrument()
? m_instrumentTrack->instrument()->desiredReleaseFrames()
: 0;
if( !m_instrumentTrack->instrument()->flags().testFlag( Instrument::IsSingleStreamed ) )
{
return ret_val;
}

if( m_envLfoParameters[Volume]->isUsed() )
{
return m_envLfoParameters[Volume]->releaseFrames();
}
f_cnt_t ret_val = m_instrumentTrack->instrument()
? m_instrumentTrack->instrument()->desiredReleaseFrames()
: 0;

for( int i = Volume+1; i < NumTargets; ++i )
{
Expand Down

0 comments on commit f7af370

Please sign in to comment.