XMA: Use a threadsafe bitmap to acquire/release contexts

Support Pausing/Resuming
This commit is contained in:
Dr. Chat
2016-07-28 21:11:12 -05:00
parent 69bb6aacef
commit f81a99e83a
3 changed files with 52 additions and 14 deletions

View File

@@ -301,6 +301,8 @@ void AudioSystem::Pause() {
// Kind of a hack, but it works.
shutdown_event_->Set();
pause_fence_.Wait();
xma_decoder_->Pause();
}
void AudioSystem::Resume() {
@@ -310,6 +312,8 @@ void AudioSystem::Resume() {
paused_ = false;
resume_event_->Set();
xma_decoder_->Resume();
}
} // namespace apu