[XMP] Fixed issues with lack of state change and premature audio cut
This commit is contained in:
parent
3ac98ebfba
commit
35cc2ccd7a
|
@ -255,7 +255,7 @@ void AudioMediaPlayer::Play() {
|
||||||
|
|
||||||
// We need to stop playback only if it wasn't
|
// We need to stop playback only if it wasn't
|
||||||
if (result != ProcessAudioResult::ForcedFinish) {
|
if (result != ProcessAudioResult::ForcedFinish) {
|
||||||
Stop();
|
Stop(true, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
// We're waiting for dangling samples to finish playing.
|
// We're waiting for dangling samples to finish playing.
|
||||||
|
@ -270,10 +270,10 @@ void AudioMediaPlayer::Play() {
|
||||||
avio_context_free(&formatContext->pb);
|
avio_context_free(&formatContext->pb);
|
||||||
avformat_close_input(&formatContext);
|
avformat_close_input(&formatContext);
|
||||||
|
|
||||||
DeleteDriver();
|
|
||||||
processing_end_fence_.Signal();
|
processing_end_fence_.Signal();
|
||||||
|
|
||||||
if (result == ProcessAudioResult::ForcedFinish) {
|
if (result == ProcessAudioResult::ForcedFinish) {
|
||||||
|
DeleteDriver();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue