diff --git a/dom/media/AudioStream.cpp b/dom/media/AudioStream.cpp index 8ed269a7c2ab..7db8f457c878 100644 --- a/dom/media/AudioStream.cpp +++ b/dom/media/AudioStream.cpp @@ -441,7 +441,7 @@ AudioStream::Pause() return; } - if (mState != STARTED && mState != RUNNING) { + if (mState != STARTED) { mState = STOPPED; // which also tells async OpenCubeb not to start, just init return; } @@ -626,11 +626,6 @@ AudioStream::DataCallback(void* aBuffer, long aFrames) // NOTE: wasapi (others?) can call us back *after* stop()/Shutdown() (mState == SHUTDOWN) // Bug 996162 - // callback tells us cubeb succeeded initializing - if (mState == STARTED) { - mState = RUNNING; - } - if (mInRate == mOutRate) { GetUnprocessed(writer); } else { diff --git a/dom/media/AudioStream.h b/dom/media/AudioStream.h index f7e1c08e790b..7942ecc57b60 100644 --- a/dom/media/AudioStream.h +++ b/dom/media/AudioStream.h @@ -363,8 +363,7 @@ private: enum StreamState { INITIALIZED, // Initialized, playback has not begun. - STARTED, // cubeb started, but callbacks haven't started - RUNNING, // DataCallbacks have started after STARTED, or after Resume(). + STARTED, // cubeb started. STOPPED, // Stopped by a call to Pause(). DRAINED, // StateCallback has indicated that the drain is complete. ERRORED, // Stream disabled due to an internal error.