Fixed issue where switching output device while paused would start

playback again.
This commit is contained in:
casey langen 2020-08-30 13:41:40 -07:00
parent d56fc1158c
commit 95b928665d

View File

@ -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();
}
}