fixes sample muting bug for sampletrack (#3591)
* fixes sample muting bug for sampletrack * simplify SampleTrack::updateTcos
This commit is contained in:
committed by
GitHub
parent
567898143b
commit
143571761f
@@ -153,6 +153,7 @@ public:
|
||||
|
||||
public slots:
|
||||
void updateTcos();
|
||||
void setPlayingTcos( bool isPlaying );
|
||||
|
||||
private:
|
||||
FloatModel m_volumeModel;
|
||||
|
||||
@@ -166,7 +166,8 @@ void SampleTCO::toggleRecord()
|
||||
void SampleTCO::playbackPositionChanged()
|
||||
{
|
||||
Engine::mixer()->removePlayHandlesOfTypes( getTrack(), PlayHandle::TypeSamplePlayHandle );
|
||||
m_isPlaying = false;
|
||||
SampleTrack * st = dynamic_cast<SampleTrack*>( getTrack() );
|
||||
st->setPlayingTcos( false );
|
||||
}
|
||||
|
||||
|
||||
@@ -707,12 +708,21 @@ void SampleTrack::loadTrackSpecificSettings( const QDomElement & _this )
|
||||
|
||||
|
||||
void SampleTrack::updateTcos()
|
||||
{
|
||||
Engine::mixer()->removePlayHandlesOfTypes( this, PlayHandle::TypeSamplePlayHandle );
|
||||
setPlayingTcos( false );
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
void SampleTrack::setPlayingTcos( bool isPlaying )
|
||||
{
|
||||
for( int i = 0; i < numOfTCOs(); ++i )
|
||||
{
|
||||
TrackContentObject * tco = getTCO( i );
|
||||
SampleTCO * sTco = dynamic_cast<SampleTCO*>( tco );
|
||||
sTco->playbackPositionChanged();
|
||||
sTco->setIsPlaying( isPlaying );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user