null: no CamelCase
Renamed functions and variables.
This commit is contained in:
parent
eefe97bdb1
commit
e1707c7ba3
@ -26,25 +26,29 @@ struct null_data {
|
|||||||
};
|
};
|
||||||
|
|
||||||
static void *
|
static void *
|
||||||
null_initDriver(G_GNUC_UNUSED struct audio_output *audioOutput,
|
null_init(G_GNUC_UNUSED struct audio_output *audio_output,
|
||||||
G_GNUC_UNUSED const struct audio_format *audio_format,
|
G_GNUC_UNUSED const struct audio_format *audio_format,
|
||||||
G_GNUC_UNUSED struct config_param *param)
|
G_GNUC_UNUSED struct config_param *param)
|
||||||
{
|
{
|
||||||
struct null_data *nd = g_new(struct null_data, 1);
|
struct null_data *nd = g_new(struct null_data, 1);
|
||||||
|
|
||||||
nd->timer = NULL;
|
nd->timer = NULL;
|
||||||
|
|
||||||
return nd;
|
return nd;
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool
|
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;
|
struct null_data *nd = data;
|
||||||
|
|
||||||
nd->timer = timer_new(audio_format);
|
nd->timer = timer_new(audio_format);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void null_closeDevice(void *data)
|
static void
|
||||||
|
null_close(void *data)
|
||||||
{
|
{
|
||||||
struct null_data *nd = data;
|
struct null_data *nd = data;
|
||||||
|
|
||||||
@ -55,7 +59,7 @@ static void null_closeDevice(void *data)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static bool
|
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;
|
struct null_data *nd = data;
|
||||||
Timer *timer = nd->timer;
|
Timer *timer = nd->timer;
|
||||||
@ -70,18 +74,19 @@ null_playAudio(void *data, G_GNUC_UNUSED const char *playChunk, size_t size)
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void null_dropBufferedAudio(void *data)
|
static void
|
||||||
|
null_cancel(void *data)
|
||||||
{
|
{
|
||||||
struct null_data *nd = data;
|
struct null_data *nd = data;
|
||||||
|
|
||||||
timer_reset(nd->timer);
|
timer_reset(nd->timer);
|
||||||
}
|
}
|
||||||
|
|
||||||
const struct audio_output_plugin nullPlugin = {
|
const struct audio_output_plugin null_output_plugin = {
|
||||||
.name = "null",
|
.name = "null",
|
||||||
.init = null_initDriver,
|
.init = null_init,
|
||||||
.open = null_openDevice,
|
.open = null_open,
|
||||||
.play = null_playAudio,
|
.close = null_close,
|
||||||
.cancel = null_dropBufferedAudio,
|
.play = null_play,
|
||||||
.close = null_closeDevice,
|
.cancel = null_cancel,
|
||||||
};
|
};
|
||||||
|
@ -21,7 +21,7 @@
|
|||||||
#include "config.h"
|
#include "config.h"
|
||||||
|
|
||||||
extern const struct audio_output_plugin shoutPlugin;
|
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 fifoPlugin;
|
||||||
extern const struct audio_output_plugin alsaPlugin;
|
extern const struct audio_output_plugin alsaPlugin;
|
||||||
extern const struct audio_output_plugin aoPlugin;
|
extern const struct audio_output_plugin aoPlugin;
|
||||||
@ -35,7 +35,7 @@ const struct audio_output_plugin *audio_output_plugins[] = {
|
|||||||
#ifdef HAVE_SHOUT
|
#ifdef HAVE_SHOUT
|
||||||
&shoutPlugin,
|
&shoutPlugin,
|
||||||
#endif
|
#endif
|
||||||
&nullPlugin,
|
&null_output_plugin,
|
||||||
#ifdef HAVE_FIFO
|
#ifdef HAVE_FIFO
|
||||||
&fifoPlugin,
|
&fifoPlugin,
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user