Bug 1276840 - Remove AudioStream::RUNNING. r=kinetik.

MozReview-Commit-ID: 3sCGYifUxJO

--HG--
extra : rebase_source : f20ee5647bb92b7bf1a35fde9bb131f4585cb32c
This commit is contained in:
JW Wang 2016-05-31 11:54:30 +08:00
Родитель 420b8a9b0e
Коммит f587ac226e
2 изменённых файлов: 2 добавлений и 8 удалений

Просмотреть файл

@ -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 {

Просмотреть файл

@ -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.