diff --git a/devices/sound/soundserver.cpp b/devices/sound/soundserver.cpp index 42b48a9..ebcd2a9 100644 --- a/devices/sound/soundserver.cpp +++ b/devices/sound/soundserver.cpp @@ -117,6 +117,8 @@ void SoundServer::shutdown() case SND_STREAM_OPENED: close_out_stream(); /* fall through */ + case SND_STREAM_CLOSED: + /* fall through */ case SND_SERVER_UP: /* fall through */ case SND_API_READY: @@ -219,5 +221,6 @@ void SoundServer::close_out_stream() { cubeb_stream_stop(this->out_stream); cubeb_stream_destroy(this->out_stream); + this->status = SND_STREAM_CLOSED; LOG_F(9, "Sound output stream closed."); } diff --git a/devices/sound/soundserver.h b/devices/sound/soundserver.h index 71f3bed..2b0dd7a 100644 --- a/devices/sound/soundserver.h +++ b/devices/sound/soundserver.h @@ -41,7 +41,8 @@ enum { SND_SERVER_DOWN = 0, SND_API_READY, SND_SERVER_UP, - SND_STREAM_OPENED + SND_STREAM_OPENED, + SND_STREAM_CLOSED };