diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/OutputList.cxx | 2 | ||||
-rw-r--r-- | src/output/NullOutputPlugin.cxx (renamed from src/output/null_output_plugin.c) | 43 | ||||
-rw-r--r-- | src/output/NullOutputPlugin.hxx (renamed from src/output/null_output_plugin.h) | 6 |
3 files changed, 29 insertions, 22 deletions
diff --git a/src/OutputList.cxx b/src/OutputList.cxx index f50f5ceea..72f241bdd 100644 --- a/src/OutputList.cxx +++ b/src/OutputList.cxx @@ -27,7 +27,7 @@ #include "output/HttpdOutputPlugin.hxx" #include "output/jack_output_plugin.h" #include "output/mvp_output_plugin.h" -#include "output/null_output_plugin.h" +#include "output/NullOutputPlugin.hxx" #include "output/openal_output_plugin.h" #include "output/OssOutputPlugin.hxx" #include "output/OSXOutputPlugin.hxx" diff --git a/src/output/null_output_plugin.c b/src/output/NullOutputPlugin.cxx index 9d7588fff..3596cbdcb 100644 --- a/src/output/null_output_plugin.c +++ b/src/output/NullOutputPlugin.cxx @@ -1,5 +1,5 @@ /* - * Copyright (C) 2003-2011 The Music Player Daemon Project + * Copyright (C) 2003-2013 The Music Player Daemon Project * http://www.musicpd.org * * This program is free software; you can redistribute it and/or modify @@ -18,7 +18,7 @@ */ #include "config.h" -#include "null_output_plugin.h" +#include "NullOutputPlugin.hxx" #include "output_api.h" #include "timer.h" @@ -26,7 +26,7 @@ #include <assert.h> -struct null_data { +struct NullOutput { struct audio_output base; bool sync; @@ -37,7 +37,7 @@ struct null_data { static struct audio_output * null_init(const struct config_param *param, GError **error_r) { - struct null_data *nd = g_new(struct null_data, 1); + NullOutput *nd = g_new(NullOutput, 1); if (!ao_base_init(&nd->base, &null_output_plugin, param, error_r)) { g_free(nd); @@ -52,7 +52,7 @@ null_init(const struct config_param *param, GError **error_r) static void null_finish(struct audio_output *ao) { - struct null_data *nd = (struct null_data *)ao; + NullOutput *nd = (NullOutput *)ao; ao_base_finish(&nd->base); g_free(nd); @@ -62,7 +62,7 @@ static bool null_open(struct audio_output *ao, struct audio_format *audio_format, G_GNUC_UNUSED GError **error) { - struct null_data *nd = (struct null_data *)ao; + NullOutput *nd = (NullOutput *)ao; if (nd->sync) nd->timer = timer_new(audio_format); @@ -73,7 +73,7 @@ null_open(struct audio_output *ao, struct audio_format *audio_format, static void null_close(struct audio_output *ao) { - struct null_data *nd = (struct null_data *)ao; + NullOutput *nd = (NullOutput *)ao; if (nd->sync) timer_free(nd->timer); @@ -82,7 +82,7 @@ null_close(struct audio_output *ao) static unsigned null_delay(struct audio_output *ao) { - struct null_data *nd = (struct null_data *)ao; + NullOutput *nd = (NullOutput *)ao; return nd->sync && nd->timer->started ? timer_delay(nd->timer) @@ -93,7 +93,7 @@ static size_t null_play(struct audio_output *ao, G_GNUC_UNUSED const void *chunk, size_t size, G_GNUC_UNUSED GError **error) { - struct null_data *nd = (struct null_data *)ao; + NullOutput *nd = (NullOutput *)ao; struct timer *timer = nd->timer; if (!nd->sync) @@ -109,7 +109,7 @@ null_play(struct audio_output *ao, G_GNUC_UNUSED const void *chunk, size_t size, static void null_cancel(struct audio_output *ao) { - struct null_data *nd = (struct null_data *)ao; + NullOutput *nd = (NullOutput *)ao; if (!nd->sync) return; @@ -118,12 +118,19 @@ null_cancel(struct audio_output *ao) } const struct audio_output_plugin null_output_plugin = { - .name = "null", - .init = null_init, - .finish = null_finish, - .open = null_open, - .close = null_close, - .delay = null_delay, - .play = null_play, - .cancel = null_cancel, + "null", + nullptr, + null_init, + null_finish, + nullptr, + nullptr, + null_open, + null_close, + null_delay, + nullptr, + null_play, + nullptr, + null_cancel, + nullptr, + nullptr, }; diff --git a/src/output/null_output_plugin.h b/src/output/NullOutputPlugin.hxx index 392bf0aa3..a58f1cb13 100644 --- a/src/output/null_output_plugin.h +++ b/src/output/NullOutputPlugin.hxx @@ -1,5 +1,5 @@ /* - * Copyright (C) 2003-2011 The Music Player Daemon Project + * Copyright (C) 2003-2013 The Music Player Daemon Project * http://www.musicpd.org * * This program is free software; you can redistribute it and/or modify @@ -17,8 +17,8 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ -#ifndef MPD_NULL_OUTPUT_PLUGIN_H -#define MPD_NULL_OUTPUT_PLUGIN_H +#ifndef MPD_NULL_OUTPUT_PLUGIN_HXX +#define MPD_NULL_OUTPUT_PLUGIN_HXX extern const struct audio_output_plugin null_output_plugin; |