diff options
author | Max Kellermann <max@duempel.org> | 2009-01-30 20:12:38 +0100 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2009-01-30 20:12:38 +0100 |
commit | 231636b9eb2ecd7d8669d309a74c3a51cd5ddfae (patch) | |
tree | ec70993f5ce903e37dee4a49578c4c16bde222e7 /src/output_api.h | |
parent | 6aa734dc355ee3d8d3deb03adb4013dddc45694f (diff) | |
download | mpd-231636b9eb2ecd7d8669d309a74c3a51cd5ddfae.tar.gz mpd-231636b9eb2ecd7d8669d309a74c3a51cd5ddfae.tar.xz mpd-231636b9eb2ecd7d8669d309a74c3a51cd5ddfae.zip |
output_api: moved the command check out of method pause()
Move the "while" loop which checks for commands to the caller
ao_pause(). This simplifies the pause() method, and lets us remove
audio_output_is_pending().
Diffstat (limited to 'src/output_api.h')
-rw-r--r-- | src/output_api.h | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/src/output_api.h b/src/output_api.h index a5d7e2006..c3be48a27 100644 --- a/src/output_api.h +++ b/src/output_api.h @@ -84,8 +84,11 @@ struct audio_output_plugin { * silence during pause, so their clients won't be * disconnected. Plugins which do not support pausing will * simply be closed, and have to be reopened when unpaused. + * + * @return false on error (output will be closed then), true + * for continue to pause */ - void (*pause)(void *data); + bool (*pause)(void *data); /** * Try to cancel data which may still be in the device's @@ -131,9 +134,4 @@ struct audio_output; const char *audio_output_get_name(const struct audio_output *ao); -/** - * Returns true if there is a command pending. - */ -bool audio_output_is_pending(const struct audio_output *ao); - #endif |