mirror of
https://github.com/clangen/musikcube.git
synced 2025-04-17 17:43:17 +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();
|
this->transport->ReloadOutput();
|
||||||
|
|
||||||
if (index != NO_POSITION) {
|
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) {
|
if (time > 0.0f) {
|
||||||
this->transport->SetPosition(time);
|
this->transport->SetPosition(time);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (state == PlaybackPaused) {
|
if (startMode == ITransport::StartMode::Wait) {
|
||||||
this->transport->Pause();
|
this->transport->Pause();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user