diff options
author | Max Kellermann <max@duempel.org> | 2008-09-29 16:43:55 +0200 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2008-09-29 16:43:55 +0200 |
commit | 6e21e24caed1a9497e876e4b89b12687aa73d6ad (patch) | |
tree | dd1fe746cdd61eafc82117421cf3633e014a9bef /src/output_control.c | |
parent | c13e8b5146993999a87373a98b5a3da4b6cf599a (diff) | |
download | mpd-6e21e24caed1a9497e876e4b89b12687aa73d6ad.tar.gz mpd-6e21e24caed1a9497e876e4b89b12687aa73d6ad.tar.xz mpd-6e21e24caed1a9497e876e4b89b12687aa73d6ad.zip |
audio_output: added method pause()
pause() puts the audio output into pause mode: if supported, it may
perform a special action, which keeps the device open, but does not
play anything. Output plugins like "shout" might want to play 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.
This pach includes an implementation for the shout plugin, which
sends silence chunks.
Diffstat (limited to 'src/output_control.c')
-rw-r--r-- | src/output_control.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/output_control.c b/src/output_control.c index ac9394bd7..4724aeeea 100644 --- a/src/output_control.c +++ b/src/output_control.c @@ -103,6 +103,11 @@ void audio_output_play(struct audio_output *audioOutput, ao_command_async(audioOutput, AO_COMMAND_PLAY); } +void audio_output_pause(struct audio_output *audioOutput) +{ + ao_command_async(audioOutput, AO_COMMAND_PAUSE); +} + void audio_output_cancel(struct audio_output *audioOutput) { ao_command_async(audioOutput, AO_COMMAND_CANCEL); |