diff options
author | Max Kellermann <max@duempel.org> | 2008-10-29 20:40:27 +0100 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2008-10-29 20:40:27 +0100 |
commit | 58c5bee9f0bcb46da7d113b66a4e1e2d7add9837 (patch) | |
tree | 4517d2156aa3643247e7f2fc886af86d3dfd8791 /src/output/jack_plugin.c | |
parent | 03390d8be1cb8983778faf6eedb9bcfd26a6dbce (diff) | |
download | mpd-58c5bee9f0bcb46da7d113b66a4e1e2d7add9837.tar.gz mpd-58c5bee9f0bcb46da7d113b66a4e1e2d7add9837.tar.xz mpd-58c5bee9f0bcb46da7d113b66a4e1e2d7add9837.zip |
output: use bool for return values and flags
Don't return 0/-1 on success/error, but true/false. Instead of int,
use bool for storing flags.
Diffstat (limited to 'src/output/jack_plugin.c')
-rw-r--r-- | src/output/jack_plugin.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/output/jack_plugin.c b/src/output/jack_plugin.c index 7f10db976..1e6c81b75 100644 --- a/src/output/jack_plugin.c +++ b/src/output/jack_plugin.c @@ -242,10 +242,10 @@ mpd_jack_init(struct audio_output *ao, return jd; } -static int +static bool mpd_jack_test_default_device(void) { - return 0; + return true; } static int @@ -328,7 +328,7 @@ mpd_jack_connect(struct jack_data *jd, struct audio_format *audio_format) return 1; } -static int +static bool mpd_jack_open(void *data, struct audio_format *audio_format) { struct jack_data *jd = data; @@ -337,12 +337,12 @@ mpd_jack_open(void *data, struct audio_format *audio_format) if (jd->client == NULL && mpd_jack_connect(jd, audio_format) < 0) { mpd_jack_client_free(jd); - return -1; + return false; } set_audioformat(jd, audio_format); - return 0; + return true; } static void @@ -422,7 +422,7 @@ mpd_jack_write_samples(struct jack_data *jd, const void *src, } } -static int +static bool mpd_jack_play(void *data, const char *buff, size_t size) { struct jack_data *jd = data; @@ -433,7 +433,7 @@ mpd_jack_play(void *data, const char *buff, size_t size) ERROR("Refusing to play, because there is no client thread.\n"); mpd_jack_client_free(jd); audio_output_closed(jd->ao); - return 0; + return true; } assert(size % frame_size == 0); @@ -462,7 +462,7 @@ mpd_jack_play(void *data, const char *buff, size_t size) } - return 0; + return true; } const struct audio_output_plugin jackPlugin = { |