diff --git a/src/contrib/directsoundout/DirectSoundOut.cpp b/src/contrib/directsoundout/DirectSoundOut.cpp index 06366829a..ca1b48d07 100644 --- a/src/contrib/directsoundout/DirectSoundOut.cpp +++ b/src/contrib/directsoundout/DirectSoundOut.cpp @@ -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;