aboutsummaryrefslogtreecommitdiffstats
path: root/src/audioOutputs
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2008-09-07 22:41:22 +0200
committerMax Kellermann <max@duempel.org>2008-09-07 22:41:22 +0200
commit3b09c54b6769c7e0c8152dde2850a88f51e2f3d9 (patch)
tree30f28b2bfb230ce6674a08231ead1d3eac032164 /src/audioOutputs
parentbed2a49fe97b8f070ace2dd37909bb06540c66bd (diff)
downloadmpd-3b09c54b6769c7e0c8152dde2850a88f51e2f3d9.tar.gz
mpd-3b09c54b6769c7e0c8152dde2850a88f51e2f3d9.tar.xz
mpd-3b09c54b6769c7e0c8152dde2850a88f51e2f3d9.zip
output: renamed typedef AudioOutput to struct audio_output
Also rename AudioOutputPlugin to struct audio_output_plugin, and use forward declarations to reduce include dependencies.
Diffstat (limited to 'src/audioOutputs')
-rw-r--r--src/audioOutputs/audioOutput_alsa.c15
-rw-r--r--src/audioOutputs/audioOutput_ao.c14
-rw-r--r--src/audioOutputs/audioOutput_fifo.c15
-rw-r--r--src/audioOutputs/audioOutput_jack.c24
-rw-r--r--src/audioOutputs/audioOutput_mvp.c15
-rw-r--r--src/audioOutputs/audioOutput_null.c12
-rw-r--r--src/audioOutputs/audioOutput_oss.c21
-rw-r--r--src/audioOutputs/audioOutput_osx.c15
-rw-r--r--src/audioOutputs/audioOutput_pulse.c15
-rw-r--r--src/audioOutputs/audioOutput_shout.c20
10 files changed, 87 insertions, 79 deletions
diff --git a/src/audioOutputs/audioOutput_alsa.c b/src/audioOutputs/audioOutput_alsa.c
index 3021d59da..9917c4629 100644
--- a/src/audioOutputs/audioOutput_alsa.c
+++ b/src/audioOutputs/audioOutput_alsa.c
@@ -72,7 +72,8 @@ static void freeAlsaData(AlsaData * ad)
free(ad);
}
-static int alsa_initDriver(AudioOutput * audioOutput, ConfigParam * param)
+static int alsa_initDriver(struct audio_output *audioOutput,
+ ConfigParam * param)
{
AlsaData *ad = newAlsaData();
@@ -94,7 +95,7 @@ static int alsa_initDriver(AudioOutput * audioOutput, ConfigParam * param)
return 0;
}
-static void alsa_finishDriver(AudioOutput * audioOutput)
+static void alsa_finishDriver(struct audio_output *audioOutput)
{
AlsaData *ad = audioOutput->data;
@@ -119,7 +120,7 @@ static int alsa_testDefault(void)
return 0;
}
-static int alsa_openDevice(AudioOutput * audioOutput)
+static int alsa_openDevice(struct audio_output *audioOutput)
{
AlsaData *ad = audioOutput->data;
struct audio_format *audioFormat = &audioOutput->outAudioFormat;
@@ -358,14 +359,14 @@ static int alsa_errorRecovery(AlsaData * ad, int err)
return err;
}
-static void alsa_dropBufferedAudio(AudioOutput * audioOutput)
+static void alsa_dropBufferedAudio(struct audio_output *audioOutput)
{
AlsaData *ad = audioOutput->data;
alsa_errorRecovery(ad, snd_pcm_drop(ad->pcmHandle));
}
-static void alsa_closeDevice(AudioOutput * audioOutput)
+static void alsa_closeDevice(struct audio_output *audioOutput)
{
AlsaData *ad = audioOutput->data;
@@ -380,7 +381,7 @@ static void alsa_closeDevice(AudioOutput * audioOutput)
audioOutput->open = 0;
}
-static int alsa_playAudio(AudioOutput * audioOutput,
+static int alsa_playAudio(struct audio_output *audioOutput,
const char *playChunk, size_t size)
{
AlsaData *ad = audioOutput->data;
@@ -412,7 +413,7 @@ static int alsa_playAudio(AudioOutput * audioOutput,
return 0;
}
-AudioOutputPlugin alsaPlugin = {
+struct audio_output_plugin alsaPlugin = {
"alsa",
alsa_testDefault,
alsa_initDriver,
diff --git a/src/audioOutputs/audioOutput_ao.c b/src/audioOutputs/audioOutput_ao.c
index 8c049fb2f..b02884751 100644
--- a/src/audioOutputs/audioOutput_ao.c
+++ b/src/audioOutputs/audioOutput_ao.c
@@ -54,7 +54,7 @@ static void audioOutputAo_error(void)
}
}
-static int audioOutputAo_initDriver(AudioOutput * audioOutput,
+static int audioOutputAo_initDriver(struct audio_output *audioOutput,
ConfigParam * param)
{
ao_info *ai;
@@ -146,7 +146,7 @@ static void freeAoData(AoData * ad)
free(ad);
}
-static void audioOutputAo_finishDriver(AudioOutput * audioOutput)
+static void audioOutputAo_finishDriver(struct audio_output *audioOutput)
{
AoData *ad = (AoData *) audioOutput->data;
freeAoData(ad);
@@ -157,12 +157,12 @@ static void audioOutputAo_finishDriver(AudioOutput * audioOutput)
ao_shutdown();
}
-static void audioOutputAo_dropBufferedAudio(mpd_unused AudioOutput * audioOutput)
+static void audioOutputAo_dropBufferedAudio(mpd_unused struct audio_output *audioOutput)
{
/* not supported by libao */
}
-static void audioOutputAo_closeDevice(AudioOutput * audioOutput)
+static void audioOutputAo_closeDevice(struct audio_output *audioOutput)
{
AoData *ad = (AoData *) audioOutput->data;
@@ -174,7 +174,7 @@ static void audioOutputAo_closeDevice(AudioOutput * audioOutput)
audioOutput->open = 0;
}
-static int audioOutputAo_openDevice(AudioOutput * audioOutput)
+static int audioOutputAo_openDevice(struct audio_output *audioOutput)
{
ao_sample_format format;
AoData *ad = (AoData *) audioOutput->data;
@@ -215,7 +215,7 @@ static int ao_play_deconst(ao_device *device, const void *output_samples,
return ao_play(device, u.out, num_bytes);
}
-static int audioOutputAo_play(AudioOutput * audioOutput,
+static int audioOutputAo_play(struct audio_output *audioOutput,
const char *playChunk, size_t size)
{
size_t chunk_size;
@@ -242,7 +242,7 @@ static int audioOutputAo_play(AudioOutput * audioOutput,
return 0;
}
-AudioOutputPlugin aoPlugin = {
+struct audio_output_plugin aoPlugin = {
"ao",
NULL,
audioOutputAo_initDriver,
diff --git a/src/audioOutputs/audioOutput_fifo.c b/src/audioOutputs/audioOutput_fifo.c
index a539856c1..60c951387 100644
--- a/src/audioOutputs/audioOutput_fifo.c
+++ b/src/audioOutputs/audioOutput_fifo.c
@@ -151,7 +151,8 @@ static int openFifo(FifoData *fd)
return 0;
}
-static int fifo_initDriver(AudioOutput *audioOutput, ConfigParam *param)
+static int fifo_initDriver(struct audio_output *audioOutput,
+ ConfigParam *param)
{
FifoData *fd;
BlockParam *blockParam;
@@ -181,7 +182,7 @@ static int fifo_initDriver(AudioOutput *audioOutput, ConfigParam *param)
return 0;
}
-static void fifo_finishDriver(AudioOutput *audioOutput)
+static void fifo_finishDriver(struct audio_output *audioOutput)
{
FifoData *fd = (FifoData *)audioOutput->data;
@@ -189,7 +190,7 @@ static void fifo_finishDriver(AudioOutput *audioOutput)
freeFifoData(fd);
}
-static int fifo_openDevice(AudioOutput *audioOutput)
+static int fifo_openDevice(struct audio_output *audioOutput)
{
FifoData *fd = (FifoData *)audioOutput->data;
@@ -203,7 +204,7 @@ static int fifo_openDevice(AudioOutput *audioOutput)
return 0;
}
-static void fifo_closeDevice(AudioOutput *audioOutput)
+static void fifo_closeDevice(struct audio_output *audioOutput)
{
FifoData *fd = (FifoData *)audioOutput->data;
@@ -215,7 +216,7 @@ static void fifo_closeDevice(AudioOutput *audioOutput)
audioOutput->open = 0;
}
-static void fifo_dropBufferedAudio(AudioOutput *audioOutput)
+static void fifo_dropBufferedAudio(struct audio_output *audioOutput)
{
FifoData *fd = (FifoData *)audioOutput->data;
char buf[FIFO_BUFFER_SIZE];
@@ -232,7 +233,7 @@ static void fifo_dropBufferedAudio(AudioOutput *audioOutput)
}
}
-static int fifo_playAudio(AudioOutput *audioOutput,
+static int fifo_playAudio(struct audio_output *audioOutput,
const char *playChunk, size_t size)
{
FifoData *fd = (FifoData *)audioOutput->data;
@@ -271,7 +272,7 @@ static int fifo_playAudio(AudioOutput *audioOutput,
return 0;
}
-AudioOutputPlugin fifoPlugin = {
+struct audio_output_plugin fifoPlugin = {
"fifo",
NULL, /* testDefaultDeviceFunc */
fifo_initDriver,
diff --git a/src/audioOutputs/audioOutput_jack.c b/src/audioOutputs/audioOutput_jack.c
index 9fef6f439..884a3d197 100644
--- a/src/audioOutputs/audioOutput_jack.c
+++ b/src/audioOutputs/audioOutput_jack.c
@@ -87,7 +87,7 @@ static void freeJackClient(JackData *jd)
pthread_cond_destroy(&jd->play_audio);
}
-static void freeJackData(AudioOutput *audioOutput)
+static void freeJackData(struct audio_output *audioOutput)
{
JackData *jd = audioOutput->data;
int i;
@@ -108,7 +108,7 @@ static void freeJackData(AudioOutput *audioOutput)
free(jd);
}
-static void jack_finishDriver(AudioOutput *audioOutput)
+static void jack_finishDriver(struct audio_output *audioOutput)
{
freeJackData(audioOutput);
DEBUG("disconnect_jack (pid=%d)\n", getpid ());
@@ -116,8 +116,8 @@ static void jack_finishDriver(AudioOutput *audioOutput)
static int srate(mpd_unused jack_nframes_t rate, void *data)
{
- JackData *jd = (JackData *) ((AudioOutput*) data)->data;
- struct audio_format *audioFormat = &(((AudioOutput*) data)->outAudioFormat);
+ JackData *jd = (JackData *) ((struct audio_output *) data)->data;
+ struct audio_format *audioFormat = &(((struct audio_output *) data)->outAudioFormat);
audioFormat->sampleRate = (int)jack_get_sample_rate(jd->client);
@@ -179,7 +179,7 @@ static void shutdown_callback(void *arg)
jd->shutdown = 1;
}
-static void set_audioformat(AudioOutput *audioOutput)
+static void set_audioformat(struct audio_output *audioOutput)
{
JackData *jd = audioOutput->data;
struct audio_format *audioFormat = &audioOutput->outAudioFormat;
@@ -198,7 +198,7 @@ static void error_callback(const char *msg)
ERROR("jack: %s\n", msg);
}
-static int jack_initDriver(AudioOutput *audioOutput, ConfigParam *param)
+static int jack_initDriver(struct audio_output *audioOutput, ConfigParam *param)
{
JackData *jd;
BlockParam *bp;
@@ -264,7 +264,7 @@ static int jack_testDefault(void)
return 0;
}
-static int connect_jack(AudioOutput *audioOutput)
+static int connect_jack(struct audio_output *audioOutput)
{
JackData *jd = audioOutput->data;
const char **jports;
@@ -345,7 +345,7 @@ static int connect_jack(AudioOutput *audioOutput)
return 1;
}
-static int jack_openDevice(AudioOutput *audioOutput)
+static int jack_openDevice(struct audio_output *audioOutput)
{
JackData *jd = audioOutput->data;
@@ -365,18 +365,18 @@ static int jack_openDevice(AudioOutput *audioOutput)
}
-static void jack_closeDevice(AudioOutput * audioOutput)
+static void jack_closeDevice(struct audio_output *audioOutput)
{
/*jack_finishDriver(audioOutput);*/
audioOutput->open = 0;
DEBUG("jack_closeDevice (pid=%d)\n", getpid());
}
-static void jack_dropBufferedAudio (mpd_unused AudioOutput * audioOutput)
+static void jack_dropBufferedAudio (mpd_unused struct audio_output *audioOutput)
{
}
-static int jack_playAudio(AudioOutput * audioOutput,
+static int jack_playAudio(struct audio_output *audioOutput,
const char *buff, size_t size)
{
JackData *jd = audioOutput->data;
@@ -430,7 +430,7 @@ static int jack_playAudio(AudioOutput * audioOutput,
return 0;
}
-AudioOutputPlugin jackPlugin = {
+struct audio_output_plugin jackPlugin = {
"jack",
jack_testDefault,
jack_initDriver,
diff --git a/src/audioOutputs/audioOutput_mvp.c b/src/audioOutputs/audioOutput_mvp.c
index 59e40f472..c232b73b1 100644
--- a/src/audioOutputs/audioOutput_mvp.c
+++ b/src/audioOutputs/audioOutput_mvp.c
@@ -93,7 +93,8 @@ static int mvp_testDefault(void)
return -1;
}
-static int mvp_initDriver(AudioOutput * audioOutput, ConfigParam * param)
+static int mvp_initDriver(struct audio_output *audioOutput,
+ ConfigParam * param)
{
MvpData *md = xmalloc(sizeof(MvpData));
md->fd = -1;
@@ -102,7 +103,7 @@ static int mvp_initDriver(AudioOutput * audioOutput, ConfigParam * param)
return 0;
}
-static void mvp_finishDriver(AudioOutput * audioOutput)
+static void mvp_finishDriver(struct audio_output *audioOutput)
{
MvpData *md = audioOutput->data;
free(md);
@@ -171,7 +172,7 @@ static int mvp_setPcmParams(MvpData * md, unsigned long rate, int channels,
return 0;
}
-static int mvp_openDevice(AudioOutput * audioOutput)
+static int mvp_openDevice(struct audio_output *audioOutput)
{
long long int stc = 0;
MvpData *md = audioOutput->data;
@@ -210,7 +211,7 @@ static int mvp_openDevice(AudioOutput * audioOutput)
return 0;
}
-static void mvp_closeDevice(AudioOutput * audioOutput)
+static void mvp_closeDevice(struct audio_output *audioOutput)
{
MvpData *md = audioOutput->data;
if (md->fd >= 0)
@@ -219,7 +220,7 @@ static void mvp_closeDevice(AudioOutput * audioOutput)
audioOutput->open = 0;
}
-static void mvp_dropBufferedAudio(AudioOutput * audioOutput)
+static void mvp_dropBufferedAudio(struct audio_output *audioOutput)
{
MvpData *md = audioOutput->data;
if (md->fd >= 0) {
@@ -230,7 +231,7 @@ static void mvp_dropBufferedAudio(AudioOutput * audioOutput)
}
}
-static int mvp_playAudio(AudioOutput * audioOutput,
+static int mvp_playAudio(struct audio_output *audioOutput,
const char *playChunk, size_t size)
{
MvpData *md = audioOutput->data;
@@ -256,7 +257,7 @@ static int mvp_playAudio(AudioOutput * audioOutput,
return 0;
}
-AudioOutputPlugin mvpPlugin = {
+struct audio_output_plugin mvpPlugin = {
"mvp",
mvp_testDefault,
mvp_initDriver,
diff --git a/src/audioOutputs/audioOutput_null.c b/src/audioOutputs/audioOutput_null.c
index ed4c46309..eea1cfcbe 100644
--- a/src/audioOutputs/audioOutput_null.c
+++ b/src/audioOutputs/audioOutput_null.c
@@ -19,21 +19,21 @@
#include "../output_api.h"
#include "../timer.h"
-static int null_initDriver(AudioOutput *audioOutput,
+static int null_initDriver(struct audio_output *audioOutput,
mpd_unused ConfigParam *param)
{
audioOutput->data = NULL;
return 0;
}
-static int null_openDevice(AudioOutput *audioOutput)
+static int null_openDevice(struct audio_output *audioOutput)
{
audioOutput->data = timer_new(&audioOutput->outAudioFormat);
audioOutput->open = 1;
return 0;
}
-static void null_closeDevice(AudioOutput *audioOutput)
+static void null_closeDevice(struct audio_output *audioOutput)
{
if (audioOutput->data) {
timer_free(audioOutput->data);
@@ -43,7 +43,7 @@ static void null_closeDevice(AudioOutput *audioOutput)
audioOutput->open = 0;
}
-static int null_playAudio(AudioOutput *audioOutput,
+static int null_playAudio(struct audio_output *audioOutput,
mpd_unused const char *playChunk, size_t size)
{
Timer *timer = audioOutput->data;
@@ -58,12 +58,12 @@ static int null_playAudio(AudioOutput *audioOutput,
return 0;
}
-static void null_dropBufferedAudio(AudioOutput *audioOutput)
+static void null_dropBufferedAudio(struct audio_output *audioOutput)
{
timer_reset(audioOutput->data);
}
-AudioOutputPlugin nullPlugin = {
+struct audio_output_plugin nullPlugin = {
"null",
NULL,
null_initDriver,
diff --git a/src/audioOutputs/audioOutput_oss.c b/src/audioOutputs/audioOutput_oss.c
index aea33be82..a6c385c71 100644
--- a/src/audioOutputs/audioOutput_oss.c
+++ b/src/audioOutputs/audioOutput_oss.c
@@ -333,8 +333,8 @@ static int oss_testDefault(void)
return -1;
}
-static int oss_open_default(mpd_unused AudioOutput *ao, ConfigParam *param,
- OssData *od)
+static int oss_open_default(mpd_unused struct audio_output *ao,
+ ConfigParam *param, OssData *od)
{
int i;
int err[ARRAY_SIZE(default_devices)];
@@ -374,7 +374,8 @@ static int oss_open_default(mpd_unused AudioOutput *ao, ConfigParam *param,
return 0; /* some compilers can be dumb... */
}
-static int oss_initDriver(AudioOutput * audioOutput, ConfigParam * param)
+static int oss_initDriver(struct audio_output *audioOutput,
+ ConfigParam * param)
{
OssData *od = newOssData();
audioOutput->data = od;
@@ -388,7 +389,7 @@ static int oss_initDriver(AudioOutput * audioOutput, ConfigParam * param)
return oss_open_default(audioOutput, param, od);
}
-static void oss_finishDriver(AudioOutput * audioOutput)
+static void oss_finishDriver(struct audio_output *audioOutput)
{
OssData *od = audioOutput->data;
@@ -432,7 +433,7 @@ static void oss_close(OssData * od)
od->fd = -1;
}
-static int oss_open(AudioOutput * audioOutput)
+static int oss_open(struct audio_output *audioOutput)
{
int tmp;
OssData *od = audioOutput->data;
@@ -479,7 +480,7 @@ fail:
return -1;
}
-static int oss_openDevice(AudioOutput * audioOutput)
+static int oss_openDevice(struct audio_output *audioOutput)
{
int ret;
OssData *od = audioOutput->data;
@@ -502,7 +503,7 @@ static int oss_openDevice(AudioOutput * audioOutput)
return ret;
}
-static void oss_closeDevice(AudioOutput * audioOutput)
+static void oss_closeDevice(struct audio_output *audioOutput)
{
OssData *od = audioOutput->data;
@@ -511,7 +512,7 @@ static void oss_closeDevice(AudioOutput * audioOutput)
audioOutput->open = 0;
}
-static void oss_dropBufferedAudio(AudioOutput * audioOutput)
+static void oss_dropBufferedAudio(struct audio_output *audioOutput)
{
OssData *od = audioOutput->data;
@@ -521,7 +522,7 @@ static void oss_dropBufferedAudio(AudioOutput * audioOutput)
}
}
-static int oss_playAudio(AudioOutput * audioOutput,
+static int oss_playAudio(struct audio_output *audioOutput,
const char *playChunk, size_t size)
{
OssData *od = audioOutput->data;
@@ -548,7 +549,7 @@ static int oss_playAudio(AudioOutput * audioOutput,
return 0;
}
-AudioOutputPlugin ossPlugin = {
+struct audio_output_plugin ossPlugin = {
"oss",
oss_testDefault,
oss_initDriver,
diff --git a/src/audioOutputs/audioOutput_osx.c b/src/audioOutputs/audioOutput_osx.c
index f0fee15e9..1cdcb473c 100644
--- a/src/audioOutputs/audioOutput_osx.c
+++ b/src/audioOutputs/audioOutput_osx.c
@@ -80,7 +80,8 @@ static int osx_testDefault()
return 0;
}
-static int osx_initDriver(AudioOutput * audioOutput, ConfigParam * param)
+static int osx_initDriver(struct audio_output *audioOutput,
+ ConfigParam * param)
{
OsxData *od = newOsxData();
@@ -98,13 +99,13 @@ static void freeOsxData(OsxData * od)
free(od);
}
-static void osx_finishDriver(AudioOutput * audioOutput)
+static void osx_finishDriver(struct audio_output *audioOutput)
{
OsxData *od = (OsxData *) audioOutput->data;
freeOsxData(od);
}
-static void osx_dropBufferedAudio(AudioOutput * audioOutput)
+static void osx_dropBufferedAudio(struct audio_output *audioOutput)
{
OsxData *od = (OsxData *) audioOutput->data;
@@ -113,7 +114,7 @@ static void osx_dropBufferedAudio(AudioOutput * audioOutput)
pthread_mutex_unlock(&od->mutex);
}
-static void osx_closeDevice(AudioOutput * audioOutput)
+static void osx_closeDevice(struct audio_output *audioOutput)
{
OsxData *od = (OsxData *) audioOutput->data;
@@ -215,7 +216,7 @@ static OSStatus osx_render(void *vdata,
return 0;
}
-static int osx_openDevice(AudioOutput * audioOutput)
+static int osx_openDevice(struct audio_output *audioOutput)
{
OsxData *od = (OsxData *) audioOutput->data;
ComponentDescription desc;
@@ -295,7 +296,7 @@ static int osx_openDevice(AudioOutput * audioOutput)
return 0;
}
-static int osx_play(AudioOutput * audioOutput,
+static int osx_play(struct audio_output *audioOutput,
const char *playChunk, size_t size)
{
OsxData *od = (OsxData *) audioOutput->data;
@@ -354,7 +355,7 @@ static int osx_play(AudioOutput * audioOutput,
return 0;
}
-AudioOutputPlugin osxPlugin = {
+struct audio_output_plugin osxPlugin = {
"osx",
osx_testDefault,
osx_initDriver,
diff --git a/src/audioOutputs/audioOutput_pulse.c b/src/audioOutputs/audioOutput_pulse.c
index 6151787f0..6d9b385ca 100644
--- a/src/audioOutputs/audioOutput_pulse.c
+++ b/src/audioOutputs/audioOutput_pulse.c
@@ -61,7 +61,8 @@ static void freePulseData(PulseData * pd)
free(pd);
}
-static int pulse_initDriver(AudioOutput * audioOutput, ConfigParam * param)
+static int pulse_initDriver(struct audio_output *audioOutput,
+ ConfigParam * param)
{
BlockParam *server = NULL;
BlockParam *sink = NULL;
@@ -80,7 +81,7 @@ static int pulse_initDriver(AudioOutput * audioOutput, ConfigParam * param)
return 0;
}
-static void pulse_finishDriver(AudioOutput * audioOutput)
+static void pulse_finishDriver(struct audio_output *audioOutput)
{
freePulseData((PulseData *) audioOutput->data);
}
@@ -108,7 +109,7 @@ static int pulse_testDefault(void)
return 0;
}
-static int pulse_openDevice(AudioOutput * audioOutput)
+static int pulse_openDevice(struct audio_output *audioOutput)
{
PulseData *pd;
struct audio_format *audioFormat;
@@ -157,7 +158,7 @@ static int pulse_openDevice(AudioOutput * audioOutput)
return 0;
}
-static void pulse_dropBufferedAudio(AudioOutput * audioOutput)
+static void pulse_dropBufferedAudio(struct audio_output *audioOutput)
{
PulseData *pd;
int error;
@@ -168,7 +169,7 @@ static void pulse_dropBufferedAudio(AudioOutput * audioOutput)
audioOutput->name, pa_strerror(error));
}
-static void pulse_closeDevice(AudioOutput * audioOutput)
+static void pulse_closeDevice(struct audio_output *audioOutput)
{
PulseData *pd;
@@ -181,7 +182,7 @@ static void pulse_closeDevice(AudioOutput * audioOutput)
audioOutput->open = 0;
}
-static int pulse_playAudio(AudioOutput * audioOutput,
+static int pulse_playAudio(struct audio_output *audioOutput,
const char *playChunk, size_t size)
{
PulseData *pd;
@@ -199,7 +200,7 @@ static int pulse_playAudio(AudioOutput * audioOutput,
return 0;
}
-AudioOutputPlugin pulsePlugin = {
+struct audio_output_plugin pulsePlugin = {
"pulse",
pulse_testDefault,
pulse_initDriver,
diff --git a/src/audioOutputs/audioOutput_shout.c b/src/audioOutputs/audioOutput_shout.c
index c7677555c..ee21fabe6 100644
--- a/src/audioOutputs/audioOutput_shout.c
+++ b/src/audioOutputs/audioOutput_shout.c
@@ -107,7 +107,8 @@ static void freeShoutData(ShoutData * sd)
} \
}
-static int myShout_initDriver(AudioOutput * audioOutput, ConfigParam * param)
+static int myShout_initDriver(struct audio_output *audioOutput,
+ ConfigParam * param)
{
ShoutData *sd;
char *test;
@@ -351,7 +352,7 @@ static void myShout_closeShoutConn(ShoutData * sd)
sd->opened = 0;
}
-static void myShout_finishDriver(AudioOutput * audioOutput)
+static void myShout_finishDriver(struct audio_output *audioOutput)
{
ShoutData *sd = (ShoutData *) audioOutput->data;
@@ -365,7 +366,7 @@ static void myShout_finishDriver(AudioOutput * audioOutput)
shout_shutdown();
}
-static void myShout_dropBufferedAudio(AudioOutput * audioOutput)
+static void myShout_dropBufferedAudio(struct audio_output *audioOutput)
{
ShoutData *sd = (ShoutData *)audioOutput->data;
timer_reset(sd->timer);
@@ -373,7 +374,7 @@ static void myShout_dropBufferedAudio(AudioOutput * audioOutput)
/* needs to be implemented for shout */
}
-static void myShout_closeDevice(AudioOutput * audioOutput)
+static void myShout_closeDevice(struct audio_output *audioOutput)
{
ShoutData *sd = (ShoutData *) audioOutput->data;
@@ -509,7 +510,7 @@ static int myShout_connect(ShoutData *sd)
}
}
-static int myShout_openShoutConn(AudioOutput * audioOutput)
+static int myShout_openShoutConn(struct audio_output *audioOutput)
{
ShoutData *sd = (ShoutData *) audioOutput->data;
int status;
@@ -550,7 +551,7 @@ static int myShout_openShoutConn(AudioOutput * audioOutput)
return 0;
}
-static int myShout_openDevice(AudioOutput * audioOutput)
+static int myShout_openDevice(struct audio_output *audioOutput)
{
ShoutData *sd = (ShoutData *) audioOutput->data;
@@ -598,7 +599,7 @@ static void myShout_sendMetadata(ShoutData * sd)
sd->tagToSend = 0;
}
-static int myShout_play(AudioOutput * audioOutput,
+static int myShout_play(struct audio_output *audioOutput,
const char *playChunk, size_t size)
{
unsigned int i;
@@ -662,7 +663,8 @@ static int myShout_play(AudioOutput * audioOutput,
return 0;
}
-static void myShout_setTag(AudioOutput * audioOutput, const struct tag *tag)
+static void myShout_setTag(struct audio_output *audioOutput,
+ const struct tag *tag)
{
ShoutData *sd = (ShoutData *) audioOutput->data;
@@ -678,7 +680,7 @@ static void myShout_setTag(AudioOutput * audioOutput, const struct tag *tag)
sd->tagToSend = 1;
}
-AudioOutputPlugin shoutPlugin = {
+struct audio_output_plugin shoutPlugin = {
"shout",
NULL,
myShout_initDriver,