aboutsummaryrefslogtreecommitdiffstats
path: root/src/output
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/output/null_plugin.c31
-rw-r--r--src/output_list.c4
2 files changed, 20 insertions, 15 deletions
diff --git a/src/output/null_plugin.c b/src/output/null_plugin.c
index 077764308..139921a3f 100644
--- a/src/output/null_plugin.c
+++ b/src/output/null_plugin.c
@@ -26,25 +26,29 @@ struct null_data {
};
static void *
-null_initDriver(G_GNUC_UNUSED struct audio_output *audioOutput,
- G_GNUC_UNUSED const struct audio_format *audio_format,
- G_GNUC_UNUSED struct config_param *param)
+null_init(G_GNUC_UNUSED struct audio_output *audio_output,
+ G_GNUC_UNUSED const struct audio_format *audio_format,
+ G_GNUC_UNUSED struct config_param *param)
{
struct null_data *nd = g_new(struct null_data, 1);
+
nd->timer = NULL;
+
return nd;
}
static bool
-null_openDevice(void *data, struct audio_format *audio_format)
+null_open(void *data, struct audio_format *audio_format)
{
struct null_data *nd = data;
nd->timer = timer_new(audio_format);
+
return true;
}
-static void null_closeDevice(void *data)
+static void
+null_close(void *data)
{
struct null_data *nd = data;
@@ -55,7 +59,7 @@ static void null_closeDevice(void *data)
}
static bool
-null_playAudio(void *data, G_GNUC_UNUSED const char *playChunk, size_t size)
+null_play(void *data, G_GNUC_UNUSED const char *chunk, size_t size)
{
struct null_data *nd = data;
Timer *timer = nd->timer;
@@ -70,18 +74,19 @@ null_playAudio(void *data, G_GNUC_UNUSED const char *playChunk, size_t size)
return true;
}
-static void null_dropBufferedAudio(void *data)
+static void
+null_cancel(void *data)
{
struct null_data *nd = data;
timer_reset(nd->timer);
}
-const struct audio_output_plugin nullPlugin = {
+const struct audio_output_plugin null_output_plugin = {
.name = "null",
- .init = null_initDriver,
- .open = null_openDevice,
- .play = null_playAudio,
- .cancel = null_dropBufferedAudio,
- .close = null_closeDevice,
+ .init = null_init,
+ .open = null_open,
+ .close = null_close,
+ .play = null_play,
+ .cancel = null_cancel,
};
diff --git a/src/output_list.c b/src/output_list.c
index 0f5540dd8..36ef5cd2c 100644
--- a/src/output_list.c
+++ b/src/output_list.c
@@ -21,7 +21,7 @@
#include "config.h"
extern const struct audio_output_plugin shoutPlugin;
-extern const struct audio_output_plugin nullPlugin;
+extern const struct audio_output_plugin null_output_plugin;
extern const struct audio_output_plugin fifoPlugin;
extern const struct audio_output_plugin alsaPlugin;
extern const struct audio_output_plugin aoPlugin;
@@ -35,7 +35,7 @@ const struct audio_output_plugin *audio_output_plugins[] = {
#ifdef HAVE_SHOUT
&shoutPlugin,
#endif
- &nullPlugin,
+ &null_output_plugin,
#ifdef HAVE_FIFO
&fifoPlugin,
#endif