Fixed DirectSoundOut pause functionality.

This commit is contained in:
casey langen 2017-02-24 00:01:09 -08:00
parent aa92aaf475
commit 1c448e0f8e

View File

@ -184,13 +184,13 @@ void DirectSoundOut::Stop() {
int DirectSoundOut::Play(IBuffer *buffer, IBufferProvider *provider) {
Lock lock(this->stateMutex);
if (this->state == StateStopped) {
return OutputFormatError;
if (this->state != StatePlaying) {
return OutputInvalidState;
}
if (!this->Configure(buffer)) {
this->Reset();
return OutputInvalidState;
return OutputFormatError;
}
unsigned char *dst1 = nullptr, *dst2 = nullptr;