diff options
Diffstat (limited to '')
-rw-r--r-- | src/audioOutputs/audioOutput_jack.c | 2 | ||||
-rw-r--r-- | src/output_api.c | 8 | ||||
-rw-r--r-- | src/output_api.h | 2 |
3 files changed, 11 insertions, 1 deletions
diff --git a/src/audioOutputs/audioOutput_jack.c b/src/audioOutputs/audioOutput_jack.c index 46b879f64..14b1e92e4 100644 --- a/src/audioOutputs/audioOutput_jack.c +++ b/src/audioOutputs/audioOutput_jack.c @@ -398,7 +398,7 @@ static int jack_playAudio(struct audio_output *audioOutput, if ( jd->shutdown ) { ERROR("Refusing to play, because there is no client thread.\n"); freeJackClient(jd); - audioOutput->open = 0; + audio_output_closed(audioOutput); return 0; } diff --git a/src/output_api.c b/src/output_api.c index e9ac1be06..eabc0bb80 100644 --- a/src/output_api.c +++ b/src/output_api.c @@ -22,3 +22,11 @@ const char *audio_output_get_name(const struct audio_output *ao) { return ao->name; } + +void audio_output_closed(struct audio_output *ao) +{ + assert(ao->open); + + ao->open = 0; +} + diff --git a/src/output_api.h b/src/output_api.h index b76da5cde..c8869c47b 100644 --- a/src/output_api.h +++ b/src/output_api.h @@ -101,4 +101,6 @@ extern struct notify audio_output_client_notify; const char *audio_output_get_name(const struct audio_output *ao); +void audio_output_closed(struct audio_output *ao); + #endif |