mirror of
https://github.com/clangen/musikcube.git
synced 2025-03-30 04:20:47 +00:00
Fixed issue where switching output device while paused would start
playback again.
This commit is contained in:
parent
d56fc1158c
commit
95b928665d
@ -445,12 +445,15 @@ void PlaybackService::ProcessMessage(IMessage &message) {
|
||||
this->transport->ReloadOutput();
|
||||
|
||||
if (index != NO_POSITION) {
|
||||
this->Play(index);
|
||||
auto startMode = (state != PlaybackPaused && state != PlaybackPrepared)
|
||||
? ITransport::StartMode::Immediate : ITransport::StartMode::Wait;
|
||||
|
||||
this->PlayAt(index, startMode);
|
||||
if (time > 0.0f) {
|
||||
this->transport->SetPosition(time);
|
||||
}
|
||||
|
||||
if (state == PlaybackPaused) {
|
||||
if (startMode == ITransport::StartMode::Wait) {
|
||||
this->transport->Pause();
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user