output: rename struct audio_output to AudioOutput

This commit is contained in:
Max Kellermann
2014-01-28 11:34:09 +01:00
parent e0dc721324
commit 815d72065c
36 changed files with 278 additions and 277 deletions

View File

@@ -44,7 +44,7 @@ typedef snd_pcm_sframes_t alsa_writei_t(snd_pcm_t * pcm, const void *buffer,
snd_pcm_uframes_t size);
struct AlsaOutput {
struct audio_output base;
AudioOutput base;
Manual<PcmExport> pcm_export;
@@ -169,7 +169,7 @@ alsa_configure(AlsaOutput *ad, const config_param &param)
#endif
}
static struct audio_output *
static AudioOutput *
alsa_init(const config_param &param, Error &error)
{
AlsaOutput *ad = new AlsaOutput();
@@ -185,7 +185,7 @@ alsa_init(const config_param &param, Error &error)
}
static void
alsa_finish(struct audio_output *ao)
alsa_finish(AudioOutput *ao)
{
AlsaOutput *ad = (AlsaOutput *)ao;
@@ -197,7 +197,7 @@ alsa_finish(struct audio_output *ao)
}
static bool
alsa_output_enable(struct audio_output *ao, gcc_unused Error &error)
alsa_output_enable(AudioOutput *ao, gcc_unused Error &error)
{
AlsaOutput *ad = (AlsaOutput *)ao;
@@ -206,7 +206,7 @@ alsa_output_enable(struct audio_output *ao, gcc_unused Error &error)
}
static void
alsa_output_disable(struct audio_output *ao)
alsa_output_disable(AudioOutput *ao)
{
AlsaOutput *ad = (AlsaOutput *)ao;
@@ -671,7 +671,7 @@ alsa_setup_or_dsd(AlsaOutput *ad, AudioFormat &audio_format,
}
static bool
alsa_open(struct audio_output *ao, AudioFormat &audio_format, Error &error)
alsa_open(AudioOutput *ao, AudioFormat &audio_format, Error &error)
{
AlsaOutput *ad = (AlsaOutput *)ao;
@@ -774,7 +774,7 @@ alsa_recover(AlsaOutput *ad, int err)
}
static void
alsa_drain(struct audio_output *ao)
alsa_drain(AudioOutput *ao)
{
AlsaOutput *ad = (AlsaOutput *)ao;
@@ -795,7 +795,7 @@ alsa_drain(struct audio_output *ao)
}
static void
alsa_cancel(struct audio_output *ao)
alsa_cancel(AudioOutput *ao)
{
AlsaOutput *ad = (AlsaOutput *)ao;
@@ -805,7 +805,7 @@ alsa_cancel(struct audio_output *ao)
}
static void
alsa_close(struct audio_output *ao)
alsa_close(AudioOutput *ao)
{
AlsaOutput *ad = (AlsaOutput *)ao;
@@ -814,7 +814,7 @@ alsa_close(struct audio_output *ao)
}
static size_t
alsa_play(struct audio_output *ao, const void *chunk, size_t size,
alsa_play(AudioOutput *ao, const void *chunk, size_t size,
Error &error)
{
AlsaOutput *ad = (AlsaOutput *)ao;

View File

@@ -35,7 +35,7 @@ static ao_sample_format OUR_AO_FORMAT_INITIALIZER;
static unsigned ao_output_ref;
struct AoOutput {
struct audio_output base;
AudioOutput base;
size_t write_size;
int driver;
@@ -152,7 +152,7 @@ AoOutput::Configure(const config_param &param, Error &error)
return true;
}
static struct audio_output *
static AudioOutput *
ao_output_init(const config_param &param, Error &error)
{
AoOutput *ad = new AoOutput();
@@ -172,7 +172,7 @@ ao_output_init(const config_param &param, Error &error)
}
static void
ao_output_finish(struct audio_output *ao)
ao_output_finish(AudioOutput *ao)
{
AoOutput *ad = (AoOutput *)ao;
@@ -187,7 +187,7 @@ ao_output_finish(struct audio_output *ao)
}
static void
ao_output_close(struct audio_output *ao)
ao_output_close(AudioOutput *ao)
{
AoOutput *ad = (AoOutput *)ao;
@@ -195,7 +195,7 @@ ao_output_close(struct audio_output *ao)
}
static bool
ao_output_open(struct audio_output *ao, AudioFormat &audio_format,
ao_output_open(AudioOutput *ao, AudioFormat &audio_format,
Error &error)
{
ao_sample_format format = OUR_AO_FORMAT_INITIALIZER;
@@ -251,7 +251,7 @@ static int ao_play_deconst(ao_device *device, const void *output_samples,
}
static size_t
ao_output_play(struct audio_output *ao, const void *chunk, size_t size,
ao_output_play(AudioOutput *ao, const void *chunk, size_t size,
Error &error)
{
AoOutput *ad = (AoOutput *)ao;

View File

@@ -36,7 +36,7 @@
#define FIFO_BUFFER_SIZE 65536 /* pipe capacity on Linux >= 2.6.11 */
struct FifoOutput {
struct audio_output base;
AudioOutput base;
AllocatedPath path;
std::string path_utf8;
@@ -172,7 +172,7 @@ fifo_open(FifoOutput *fd, Error &error)
return fd->Open(error);
}
static struct audio_output *
static AudioOutput *
fifo_output_init(const config_param &param, Error &error)
{
FifoOutput *fd = new FifoOutput();
@@ -204,7 +204,7 @@ fifo_output_init(const config_param &param, Error &error)
}
static void
fifo_output_finish(struct audio_output *ao)
fifo_output_finish(AudioOutput *ao)
{
FifoOutput *fd = (FifoOutput *)ao;
@@ -214,7 +214,7 @@ fifo_output_finish(struct audio_output *ao)
}
static bool
fifo_output_open(struct audio_output *ao, AudioFormat &audio_format,
fifo_output_open(AudioOutput *ao, AudioFormat &audio_format,
gcc_unused Error &error)
{
FifoOutput *fd = (FifoOutput *)ao;
@@ -225,7 +225,7 @@ fifo_output_open(struct audio_output *ao, AudioFormat &audio_format,
}
static void
fifo_output_close(struct audio_output *ao)
fifo_output_close(AudioOutput *ao)
{
FifoOutput *fd = (FifoOutput *)ao;
@@ -233,7 +233,7 @@ fifo_output_close(struct audio_output *ao)
}
static void
fifo_output_cancel(struct audio_output *ao)
fifo_output_cancel(AudioOutput *ao)
{
FifoOutput *fd = (FifoOutput *)ao;
char buf[FIFO_BUFFER_SIZE];
@@ -252,7 +252,7 @@ fifo_output_cancel(struct audio_output *ao)
}
static unsigned
fifo_output_delay(struct audio_output *ao)
fifo_output_delay(AudioOutput *ao)
{
FifoOutput *fd = (FifoOutput *)ao;
@@ -262,7 +262,7 @@ fifo_output_delay(struct audio_output *ao)
}
static size_t
fifo_output_play(struct audio_output *ao, const void *chunk, size_t size,
fifo_output_play(AudioOutput *ao, const void *chunk, size_t size,
Error &error)
{
FifoOutput *fd = (FifoOutput *)ao;

View File

@@ -51,7 +51,7 @@ struct Encoder;
struct Tag;
class HttpdOutput final : ServerSocket, DeferredMonitor {
struct audio_output base;
AudioOutput base;
/**
* True if the audio output is open and accepts client
@@ -157,7 +157,7 @@ public:
#pragma GCC diagnostic ignored "-Winvalid-offsetof"
#endif
static constexpr HttpdOutput *Cast(audio_output *ao) {
static constexpr HttpdOutput *Cast(AudioOutput *ao) {
return ContainerCast(ao, HttpdOutput, base);
}
@@ -175,7 +175,7 @@ public:
bool Configure(const config_param &param, Error &error);
audio_output *InitAndConfigure(const config_param &param,
AudioOutput *InitAndConfigure(const config_param &param,
Error &error) {
if (!Init(param, error))
return nullptr;

View File

@@ -139,12 +139,12 @@ HttpdOutput::Init(const config_param &param, Error &error)
return ao_base_init(&base, &httpd_output_plugin, param, error);
}
static struct audio_output *
static AudioOutput *
httpd_output_init(const config_param &param, Error &error)
{
HttpdOutput *httpd = new HttpdOutput(io_thread_get());
audio_output *result = httpd->InitAndConfigure(param, error);
AudioOutput *result = httpd->InitAndConfigure(param, error);
if (result == nullptr)
delete httpd;
@@ -152,7 +152,7 @@ httpd_output_init(const config_param &param, Error &error)
}
static void
httpd_output_finish(struct audio_output *ao)
httpd_output_finish(AudioOutput *ao)
{
HttpdOutput *httpd = HttpdOutput::Cast(ao);
@@ -276,7 +276,7 @@ HttpdOutput::ReadPage()
}
static bool
httpd_output_enable(struct audio_output *ao, Error &error)
httpd_output_enable(AudioOutput *ao, Error &error)
{
HttpdOutput *httpd = HttpdOutput::Cast(ao);
@@ -284,7 +284,7 @@ httpd_output_enable(struct audio_output *ao, Error &error)
}
static void
httpd_output_disable(struct audio_output *ao)
httpd_output_disable(AudioOutput *ao)
{
HttpdOutput *httpd = HttpdOutput::Cast(ao);
@@ -329,7 +329,7 @@ HttpdOutput::Open(AudioFormat &audio_format, Error &error)
}
static bool
httpd_output_open(struct audio_output *ao, AudioFormat &audio_format,
httpd_output_open(AudioOutput *ao, AudioFormat &audio_format,
Error &error)
{
HttpdOutput *httpd = HttpdOutput::Cast(ao);
@@ -358,7 +358,7 @@ HttpdOutput::Close()
}
static void
httpd_output_close(struct audio_output *ao)
httpd_output_close(AudioOutput *ao)
{
HttpdOutput *httpd = HttpdOutput::Cast(ao);
@@ -411,7 +411,7 @@ HttpdOutput::Delay() const
}
static unsigned
httpd_output_delay(struct audio_output *ao)
httpd_output_delay(AudioOutput *ao)
{
HttpdOutput *httpd = HttpdOutput::Cast(ao);
@@ -476,7 +476,7 @@ HttpdOutput::Play(const void *chunk, size_t size, Error &error)
}
static size_t
httpd_output_play(struct audio_output *ao, const void *chunk, size_t size,
httpd_output_play(AudioOutput *ao, const void *chunk, size_t size,
Error &error)
{
HttpdOutput *httpd = HttpdOutput::Cast(ao);
@@ -485,7 +485,7 @@ httpd_output_play(struct audio_output *ao, const void *chunk, size_t size,
}
static bool
httpd_output_pause(struct audio_output *ao)
httpd_output_pause(AudioOutput *ao)
{
HttpdOutput *httpd = HttpdOutput::Cast(ao);
@@ -548,7 +548,7 @@ HttpdOutput::SendTag(const Tag *tag)
}
static void
httpd_output_tag(struct audio_output *ao, const Tag *tag)
httpd_output_tag(AudioOutput *ao, const Tag *tag)
{
HttpdOutput *httpd = HttpdOutput::Cast(ao);
@@ -573,7 +573,7 @@ HttpdOutput::CancelAllClients()
}
static void
httpd_output_cancel(struct audio_output *ao)
httpd_output_cancel(AudioOutput *ao)
{
HttpdOutput *httpd = HttpdOutput::Cast(ao);

View File

@@ -42,7 +42,7 @@ enum {
static const size_t jack_sample_size = sizeof(jack_default_audio_sample_t);
struct JackOutput {
struct audio_output base;
AudioOutput base;
/**
* libjack options passed to jack_client_open().
@@ -310,7 +310,7 @@ parse_port_list(const char *source, char **dest, Error &error)
return n;
}
static struct audio_output *
static AudioOutput *
mpd_jack_init(const config_param &param, Error &error)
{
JackOutput *jd = new JackOutput();
@@ -389,7 +389,7 @@ mpd_jack_init(const config_param &param, Error &error)
}
static void
mpd_jack_finish(struct audio_output *ao)
mpd_jack_finish(AudioOutput *ao)
{
JackOutput *jd = (JackOutput *)ao;
@@ -404,7 +404,7 @@ mpd_jack_finish(struct audio_output *ao)
}
static bool
mpd_jack_enable(struct audio_output *ao, Error &error)
mpd_jack_enable(AudioOutput *ao, Error &error)
{
JackOutput *jd = (JackOutput *)ao;
@@ -415,7 +415,7 @@ mpd_jack_enable(struct audio_output *ao, Error &error)
}
static void
mpd_jack_disable(struct audio_output *ao)
mpd_jack_disable(AudioOutput *ao)
{
JackOutput *jd = (JackOutput *)ao;
@@ -579,7 +579,7 @@ mpd_jack_start(JackOutput *jd, Error &error)
}
static bool
mpd_jack_open(struct audio_output *ao, AudioFormat &audio_format,
mpd_jack_open(AudioOutput *ao, AudioFormat &audio_format,
Error &error)
{
JackOutput *jd = (JackOutput *)ao;
@@ -604,7 +604,7 @@ mpd_jack_open(struct audio_output *ao, AudioFormat &audio_format,
}
static void
mpd_jack_close(gcc_unused struct audio_output *ao)
mpd_jack_close(gcc_unused AudioOutput *ao)
{
JackOutput *jd = (JackOutput *)ao;
@@ -612,7 +612,7 @@ mpd_jack_close(gcc_unused struct audio_output *ao)
}
static unsigned
mpd_jack_delay(struct audio_output *ao)
mpd_jack_delay(AudioOutput *ao)
{
JackOutput *jd = (JackOutput *)ao;
@@ -689,7 +689,7 @@ mpd_jack_write_samples(JackOutput *jd, const void *src,
}
static size_t
mpd_jack_play(struct audio_output *ao, const void *chunk, size_t size,
mpd_jack_play(AudioOutput *ao, const void *chunk, size_t size,
Error &error)
{
JackOutput *jd = (JackOutput *)ao;
@@ -734,7 +734,7 @@ mpd_jack_play(struct audio_output *ao, const void *chunk, size_t size,
}
static bool
mpd_jack_pause(struct audio_output *ao)
mpd_jack_pause(AudioOutput *ao)
{
JackOutput *jd = (JackOutput *)ao;

View File

@@ -23,7 +23,7 @@
#include "Timer.hxx"
struct NullOutput {
struct audio_output base;
AudioOutput base;
bool sync;
@@ -39,7 +39,7 @@ struct NullOutput {
}
};
static struct audio_output *
static AudioOutput *
null_init(const config_param &param, Error &error)
{
NullOutput *nd = new NullOutput();
@@ -55,7 +55,7 @@ null_init(const config_param &param, Error &error)
}
static void
null_finish(struct audio_output *ao)
null_finish(AudioOutput *ao)
{
NullOutput *nd = (NullOutput *)ao;
@@ -64,7 +64,7 @@ null_finish(struct audio_output *ao)
}
static bool
null_open(struct audio_output *ao, AudioFormat &audio_format,
null_open(AudioOutput *ao, AudioFormat &audio_format,
gcc_unused Error &error)
{
NullOutput *nd = (NullOutput *)ao;
@@ -76,7 +76,7 @@ null_open(struct audio_output *ao, AudioFormat &audio_format,
}
static void
null_close(struct audio_output *ao)
null_close(AudioOutput *ao)
{
NullOutput *nd = (NullOutput *)ao;
@@ -85,7 +85,7 @@ null_close(struct audio_output *ao)
}
static unsigned
null_delay(struct audio_output *ao)
null_delay(AudioOutput *ao)
{
NullOutput *nd = (NullOutput *)ao;
@@ -95,7 +95,7 @@ null_delay(struct audio_output *ao)
}
static size_t
null_play(struct audio_output *ao, gcc_unused const void *chunk, size_t size,
null_play(AudioOutput *ao, gcc_unused const void *chunk, size_t size,
gcc_unused Error &error)
{
NullOutput *nd = (NullOutput *)ao;
@@ -112,7 +112,7 @@ null_play(struct audio_output *ao, gcc_unused const void *chunk, size_t size,
}
static void
null_cancel(struct audio_output *ao)
null_cancel(AudioOutput *ao)
{
NullOutput *nd = (NullOutput *)ao;

View File

@@ -33,7 +33,7 @@
#include <CoreServices/CoreServices.h>
struct OSXOutput {
struct audio_output base;
AudioOutput base;
/* configuration settings */
OSType component_subtype;
@@ -77,7 +77,7 @@ osx_output_configure(OSXOutput *oo, const config_param &param)
}
}
static struct audio_output *
static AudioOutput *
osx_output_init(const config_param &param, Error &error)
{
OSXOutput *oo = new OSXOutput();
@@ -92,7 +92,7 @@ osx_output_init(const config_param &param, Error &error)
}
static void
osx_output_finish(struct audio_output *ao)
osx_output_finish(AudioOutput *ao)
{
OSXOutput *oo = (OSXOutput *)ao;
@@ -231,7 +231,7 @@ osx_render(void *vdata,
}
static bool
osx_output_enable(struct audio_output *ao, Error &error)
osx_output_enable(AudioOutput *ao, Error &error)
{
OSXOutput *oo = (OSXOutput *)ao;
@@ -282,7 +282,7 @@ osx_output_enable(struct audio_output *ao, Error &error)
}
static void
osx_output_disable(struct audio_output *ao)
osx_output_disable(AudioOutput *ao)
{
OSXOutput *oo = (OSXOutput *)ao;
@@ -290,7 +290,7 @@ osx_output_disable(struct audio_output *ao)
}
static void
osx_output_cancel(struct audio_output *ao)
osx_output_cancel(AudioOutput *ao)
{
OSXOutput *od = (OSXOutput *)ao;
@@ -299,7 +299,7 @@ osx_output_cancel(struct audio_output *ao)
}
static void
osx_output_close(struct audio_output *ao)
osx_output_close(AudioOutput *ao)
{
OSXOutput *od = (OSXOutput *)ao;
@@ -310,7 +310,7 @@ osx_output_close(struct audio_output *ao)
}
static bool
osx_output_open(struct audio_output *ao, AudioFormat &audio_format,
osx_output_open(AudioOutput *ao, AudioFormat &audio_format,
Error &error)
{
OSXOutput *od = (OSXOutput *)ao;
@@ -383,7 +383,7 @@ osx_output_open(struct audio_output *ao, AudioFormat &audio_format,
}
static size_t
osx_output_play(struct audio_output *ao, const void *chunk, size_t size,
osx_output_play(AudioOutput *ao, const void *chunk, size_t size,
gcc_unused Error &error)
{
OSXOutput *od = (OSXOutput *)ao;

View File

@@ -37,7 +37,7 @@
#define NUM_BUFFERS 16
struct OpenALOutput {
struct audio_output base;
AudioOutput base;
const char *device_name;
ALCdevice *device;
@@ -133,7 +133,7 @@ openal_setup_context(OpenALOutput *od, Error &error)
return true;
}
static struct audio_output *
static AudioOutput *
openal_init(const config_param &param, Error &error)
{
const char *device_name = param.GetBlockValue("device");
@@ -153,7 +153,7 @@ openal_init(const config_param &param, Error &error)
}
static void
openal_finish(struct audio_output *ao)
openal_finish(AudioOutput *ao)
{
OpenALOutput *od = (OpenALOutput *)ao;
@@ -162,7 +162,7 @@ openal_finish(struct audio_output *ao)
}
static bool
openal_open(struct audio_output *ao, AudioFormat &audio_format,
openal_open(AudioOutput *ao, AudioFormat &audio_format,
Error &error)
{
OpenALOutput *od = (OpenALOutput *)ao;
@@ -196,7 +196,7 @@ openal_open(struct audio_output *ao, AudioFormat &audio_format,
}
static void
openal_close(struct audio_output *ao)
openal_close(AudioOutput *ao)
{
OpenALOutput *od = (OpenALOutput *)ao;
@@ -208,7 +208,7 @@ openal_close(struct audio_output *ao)
}
static unsigned
openal_delay(struct audio_output *ao)
openal_delay(AudioOutput *ao)
{
OpenALOutput *od = (OpenALOutput *)ao;
@@ -221,7 +221,7 @@ openal_delay(struct audio_output *ao)
}
static size_t
openal_play(struct audio_output *ao, const void *chunk, size_t size,
openal_play(AudioOutput *ao, const void *chunk, size_t size,
gcc_unused Error &error)
{
OpenALOutput *od = (OpenALOutput *)ao;
@@ -253,7 +253,7 @@ openal_play(struct audio_output *ao, const void *chunk, size_t size,
}
static void
openal_cancel(struct audio_output *ao)
openal_cancel(AudioOutput *ao)
{
OpenALOutput *od = (OpenALOutput *)ao;

View File

@@ -57,7 +57,7 @@
#endif
struct OssOutput {
struct audio_output base;
AudioOutput base;
#ifdef AFMT_S24_PACKED
Manual<PcmExport> pcm_export;
@@ -149,7 +149,7 @@ oss_output_test_default_device(void)
return false;
}
static struct audio_output *
static AudioOutput *
oss_open_default(Error &error)
{
int err[ARRAY_SIZE(default_devices)];
@@ -199,7 +199,7 @@ oss_open_default(Error &error)
return NULL;
}
static struct audio_output *
static AudioOutput *
oss_output_init(const config_param &param, Error &error)
{
const char *device = param.GetBlockValue("device");
@@ -218,7 +218,7 @@ oss_output_init(const config_param &param, Error &error)
}
static void
oss_output_finish(struct audio_output *ao)
oss_output_finish(AudioOutput *ao)
{
OssOutput *od = (OssOutput *)ao;
@@ -229,7 +229,7 @@ oss_output_finish(struct audio_output *ao)
#ifdef AFMT_S24_PACKED
static bool
oss_output_enable(struct audio_output *ao, gcc_unused Error &error)
oss_output_enable(AudioOutput *ao, gcc_unused Error &error)
{
OssOutput *od = (OssOutput *)ao;
@@ -238,7 +238,7 @@ oss_output_enable(struct audio_output *ao, gcc_unused Error &error)
}
static void
oss_output_disable(struct audio_output *ao)
oss_output_disable(AudioOutput *ao)
{
OssOutput *od = (OssOutput *)ao;
@@ -680,7 +680,7 @@ oss_reopen(OssOutput *od, Error &error)
}
static bool
oss_output_open(struct audio_output *ao, AudioFormat &audio_format,
oss_output_open(AudioOutput *ao, AudioFormat &audio_format,
Error &error)
{
OssOutput *od = (OssOutput *)ao;
@@ -702,7 +702,7 @@ oss_output_open(struct audio_output *ao, AudioFormat &audio_format,
}
static void
oss_output_close(struct audio_output *ao)
oss_output_close(AudioOutput *ao)
{
OssOutput *od = (OssOutput *)ao;
@@ -710,7 +710,7 @@ oss_output_close(struct audio_output *ao)
}
static void
oss_output_cancel(struct audio_output *ao)
oss_output_cancel(AudioOutput *ao)
{
OssOutput *od = (OssOutput *)ao;
@@ -721,7 +721,7 @@ oss_output_cancel(struct audio_output *ao)
}
static size_t
oss_output_play(struct audio_output *ao, const void *chunk, size_t size,
oss_output_play(AudioOutput *ao, const void *chunk, size_t size,
Error &error)
{
OssOutput *od = (OssOutput *)ao;

View File

@@ -29,7 +29,7 @@
#include <stdio.h>
struct PipeOutput {
struct audio_output base;
AudioOutput base;
std::string cmd;
FILE *fh;
@@ -61,7 +61,7 @@ PipeOutput::Configure(const config_param &param, Error &error)
return true;
}
static struct audio_output *
static AudioOutput *
pipe_output_init(const config_param &param, Error &error)
{
PipeOutput *pd = new PipeOutput();
@@ -81,7 +81,7 @@ pipe_output_init(const config_param &param, Error &error)
}
static void
pipe_output_finish(struct audio_output *ao)
pipe_output_finish(AudioOutput *ao)
{
PipeOutput *pd = (PipeOutput *)ao;
@@ -90,7 +90,7 @@ pipe_output_finish(struct audio_output *ao)
}
static bool
pipe_output_open(struct audio_output *ao,
pipe_output_open(AudioOutput *ao,
gcc_unused AudioFormat &audio_format,
Error &error)
{
@@ -107,7 +107,7 @@ pipe_output_open(struct audio_output *ao,
}
static void
pipe_output_close(struct audio_output *ao)
pipe_output_close(AudioOutput *ao)
{
PipeOutput *pd = (PipeOutput *)ao;
@@ -115,7 +115,7 @@ pipe_output_close(struct audio_output *ao)
}
static size_t
pipe_output_play(struct audio_output *ao, const void *chunk, size_t size,
pipe_output_play(AudioOutput *ao, const void *chunk, size_t size,
Error &error)
{
PipeOutput *pd = (PipeOutput *)ao;

View File

@@ -42,7 +42,7 @@
#define MPD_PULSE_NAME "Music Player Daemon"
struct PulseOutput {
struct audio_output base;
AudioOutput base;
const char *name;
const char *server;
@@ -323,7 +323,7 @@ pulse_output_setup_context(PulseOutput *po, Error &error)
return true;
}
static struct audio_output *
static AudioOutput *
pulse_output_init(const config_param &param, Error &error)
{
PulseOutput *po;
@@ -349,7 +349,7 @@ pulse_output_init(const config_param &param, Error &error)
}
static void
pulse_output_finish(struct audio_output *ao)
pulse_output_finish(AudioOutput *ao)
{
PulseOutput *po = (PulseOutput *)ao;
@@ -358,7 +358,7 @@ pulse_output_finish(struct audio_output *ao)
}
static bool
pulse_output_enable(struct audio_output *ao, Error &error)
pulse_output_enable(AudioOutput *ao, Error &error)
{
PulseOutput *po = (PulseOutput *)ao;
@@ -404,7 +404,7 @@ pulse_output_enable(struct audio_output *ao, Error &error)
}
static void
pulse_output_disable(struct audio_output *ao)
pulse_output_disable(AudioOutput *ao)
{
PulseOutput *po = (PulseOutput *)ao;
@@ -548,7 +548,7 @@ pulse_output_setup_stream(PulseOutput *po, const pa_sample_spec *ss,
}
static bool
pulse_output_open(struct audio_output *ao, AudioFormat &audio_format,
pulse_output_open(AudioOutput *ao, AudioFormat &audio_format,
Error &error)
{
PulseOutput *po = (PulseOutput *)ao;
@@ -616,7 +616,7 @@ pulse_output_open(struct audio_output *ao, AudioFormat &audio_format,
}
static void
pulse_output_close(struct audio_output *ao)
pulse_output_close(AudioOutput *ao)
{
PulseOutput *po = (PulseOutput *)ao;
pa_operation *o;
@@ -702,7 +702,7 @@ pulse_output_stream_pause(PulseOutput *po, bool pause,
}
static unsigned
pulse_output_delay(struct audio_output *ao)
pulse_output_delay(AudioOutput *ao)
{
PulseOutput *po = (PulseOutput *)ao;
unsigned result = 0;
@@ -720,7 +720,7 @@ pulse_output_delay(struct audio_output *ao)
}
static size_t
pulse_output_play(struct audio_output *ao, const void *chunk, size_t size,
pulse_output_play(AudioOutput *ao, const void *chunk, size_t size,
Error &error)
{
PulseOutput *po = (PulseOutput *)ao;
@@ -785,7 +785,7 @@ pulse_output_play(struct audio_output *ao, const void *chunk, size_t size,
}
static void
pulse_output_cancel(struct audio_output *ao)
pulse_output_cancel(AudioOutput *ao)
{
PulseOutput *po = (PulseOutput *)ao;
pa_operation *o;
@@ -818,7 +818,7 @@ pulse_output_cancel(struct audio_output *ao)
}
static bool
pulse_output_pause(struct audio_output *ao)
pulse_output_pause(AudioOutput *ao)
{
PulseOutput *po = (PulseOutput *)ao;

View File

@@ -35,7 +35,7 @@
#include <errno.h>
struct RecorderOutput {
struct audio_output base;
AudioOutput base;
/**
* The configured encoder plugin.
@@ -107,7 +107,7 @@ RecorderOutput::Configure(const config_param &param, Error &error)
return true;
}
static audio_output *
static AudioOutput *
recorder_output_init(const config_param &param, Error &error)
{
RecorderOutput *recorder = new RecorderOutput();
@@ -127,7 +127,7 @@ recorder_output_init(const config_param &param, Error &error)
}
static void
recorder_output_finish(struct audio_output *ao)
recorder_output_finish(AudioOutput *ao)
{
RecorderOutput *recorder = (RecorderOutput *)ao;
@@ -181,7 +181,7 @@ RecorderOutput::EncoderToFile(Error &error)
}
static bool
recorder_output_open(struct audio_output *ao,
recorder_output_open(AudioOutput *ao,
AudioFormat &audio_format,
Error &error)
{
@@ -216,7 +216,7 @@ recorder_output_open(struct audio_output *ao,
}
static void
recorder_output_close(struct audio_output *ao)
recorder_output_close(AudioOutput *ao)
{
RecorderOutput *recorder = (RecorderOutput *)ao;
@@ -233,7 +233,7 @@ recorder_output_close(struct audio_output *ao)
}
static size_t
recorder_output_play(struct audio_output *ao, const void *chunk, size_t size,
recorder_output_play(AudioOutput *ao, const void *chunk, size_t size,
Error &error)
{
RecorderOutput *recorder = (RecorderOutput *)ao;

View File

@@ -36,7 +36,7 @@
#undef new
class RoarOutput {
struct audio_output base;
AudioOutput base;
std::string host, name;
@@ -52,7 +52,7 @@ public:
RoarOutput()
:err(ROAR_ERROR_NONE) {}
operator audio_output *() {
operator AudioOutput *() {
return &base;
}
@@ -136,7 +136,7 @@ RoarOutput::Configure(const config_param &param)
: ROAR_ROLE_MUSIC;
}
static struct audio_output *
static AudioOutput *
roar_init(const config_param &param, Error &error)
{
RoarOutput *self = new RoarOutput();
@@ -151,7 +151,7 @@ roar_init(const config_param &param, Error &error)
}
static void
roar_finish(struct audio_output *ao)
roar_finish(AudioOutput *ao)
{
RoarOutput *self = (RoarOutput *)ao;
@@ -227,7 +227,7 @@ RoarOutput::Open(AudioFormat &audio_format, Error &error)
}
static bool
roar_open(struct audio_output *ao, AudioFormat &audio_format, Error &error)
roar_open(AudioOutput *ao, AudioFormat &audio_format, Error &error)
{
RoarOutput *self = (RoarOutput *)ao;
@@ -248,7 +248,7 @@ RoarOutput::Close()
}
static void
roar_close(struct audio_output *ao)
roar_close(AudioOutput *ao)
{
RoarOutput *self = (RoarOutput *)ao;
self->Close();
@@ -283,7 +283,7 @@ RoarOutput::Cancel()
}
static void
roar_cancel(struct audio_output *ao)
roar_cancel(AudioOutput *ao)
{
RoarOutput *self = (RoarOutput *)ao;
@@ -308,7 +308,7 @@ RoarOutput::Play(const void *chunk, size_t size, Error &error)
}
static size_t
roar_play(struct audio_output *ao, const void *chunk, size_t size,
roar_play(AudioOutput *ao, const void *chunk, size_t size,
Error &error)
{
RoarOutput *self = (RoarOutput *)ao;
@@ -403,7 +403,7 @@ RoarOutput::SendTag(const Tag &tag)
}
static void
roar_send_tag(struct audio_output *ao, const Tag *meta)
roar_send_tag(AudioOutput *ao, const Tag *meta)
{
RoarOutput *self = (RoarOutput *)ao;
self->SendTag(*meta);

View File

@@ -39,7 +39,7 @@
static constexpr unsigned DEFAULT_CONN_TIMEOUT = 2;
struct ShoutOutput final {
struct audio_output base;
AudioOutput base;
shout_t *shout_conn;
shout_metadata_t *shout_meta;
@@ -275,7 +275,7 @@ ShoutOutput::Configure(const config_param &param, Error &error)
return true;
}
static struct audio_output *
static AudioOutput *
my_shout_init_driver(const config_param &param, Error &error)
{
ShoutOutput *sd = new ShoutOutput();
@@ -363,7 +363,7 @@ static void close_shout_conn(ShoutOutput * sd)
}
static void
my_shout_finish_driver(struct audio_output *ao)
my_shout_finish_driver(AudioOutput *ao)
{
ShoutOutput *sd = (ShoutOutput *)ao;
@@ -379,7 +379,7 @@ my_shout_finish_driver(struct audio_output *ao)
}
static void
my_shout_drop_buffered_audio(struct audio_output *ao)
my_shout_drop_buffered_audio(AudioOutput *ao)
{
gcc_unused
ShoutOutput *sd = (ShoutOutput *)ao;
@@ -388,7 +388,7 @@ my_shout_drop_buffered_audio(struct audio_output *ao)
}
static void
my_shout_close_device(struct audio_output *ao)
my_shout_close_device(AudioOutput *ao)
{
ShoutOutput *sd = (ShoutOutput *)ao;
@@ -414,7 +414,7 @@ shout_connect(ShoutOutput *sd, Error &error)
}
static bool
my_shout_open_device(struct audio_output *ao, AudioFormat &audio_format,
my_shout_open_device(AudioOutput *ao, AudioFormat &audio_format,
Error &error)
{
ShoutOutput *sd = (ShoutOutput *)ao;
@@ -437,7 +437,7 @@ my_shout_open_device(struct audio_output *ao, AudioFormat &audio_format,
}
static unsigned
my_shout_delay(struct audio_output *ao)
my_shout_delay(AudioOutput *ao)
{
ShoutOutput *sd = (ShoutOutput *)ao;
@@ -449,7 +449,7 @@ my_shout_delay(struct audio_output *ao)
}
static size_t
my_shout_play(struct audio_output *ao, const void *chunk, size_t size,
my_shout_play(AudioOutput *ao, const void *chunk, size_t size,
Error &error)
{
ShoutOutput *sd = (ShoutOutput *)ao;
@@ -461,7 +461,7 @@ my_shout_play(struct audio_output *ao, const void *chunk, size_t size,
}
static bool
my_shout_pause(struct audio_output *ao)
my_shout_pause(AudioOutput *ao)
{
static char silence[1020];
@@ -494,7 +494,7 @@ shout_tag_to_metadata(const Tag *tag, char *dest, size_t size)
snprintf(dest, size, "%s - %s", artist, title);
}
static void my_shout_set_tag(struct audio_output *ao,
static void my_shout_set_tag(AudioOutput *ao,
const Tag *tag)
{
ShoutOutput *sd = (ShoutOutput *)ao;

View File

@@ -50,7 +50,7 @@ struct audio_info {
#endif
struct SolarisOutput {
struct audio_output base;
AudioOutput base;
/* configuration */
const char *device;
@@ -76,7 +76,7 @@ solaris_output_test_default_device(void)
access("/dev/audio", W_OK) == 0;
}
static struct audio_output *
static AudioOutput *
solaris_output_init(const config_param &param, Error &error_r)
{
SolarisOutput *so = new SolarisOutput();
@@ -91,7 +91,7 @@ solaris_output_init(const config_param &param, Error &error_r)
}
static void
solaris_output_finish(struct audio_output *ao)
solaris_output_finish(AudioOutput *ao)
{
SolarisOutput *so = (SolarisOutput *)ao;
@@ -100,7 +100,7 @@ solaris_output_finish(struct audio_output *ao)
}
static bool
solaris_output_open(struct audio_output *ao, AudioFormat &audio_format,
solaris_output_open(AudioOutput *ao, AudioFormat &audio_format,
Error &error)
{
SolarisOutput *so = (SolarisOutput *)ao;
@@ -151,7 +151,7 @@ solaris_output_open(struct audio_output *ao, AudioFormat &audio_format,
}
static void
solaris_output_close(struct audio_output *ao)
solaris_output_close(AudioOutput *ao)
{
SolarisOutput *so = (SolarisOutput *)ao;
@@ -159,7 +159,7 @@ solaris_output_close(struct audio_output *ao)
}
static size_t
solaris_output_play(struct audio_output *ao, const void *chunk, size_t size,
solaris_output_play(AudioOutput *ao, const void *chunk, size_t size,
Error &error)
{
SolarisOutput *so = (SolarisOutput *)ao;
@@ -175,7 +175,7 @@ solaris_output_play(struct audio_output *ao, const void *chunk, size_t size,
}
static void
solaris_output_cancel(struct audio_output *ao)
solaris_output_cancel(AudioOutput *ao)
{
SolarisOutput *so = (SolarisOutput *)ao;

View File

@@ -38,7 +38,7 @@ struct WinmmBuffer {
};
struct WinmmOutput {
struct audio_output base;
AudioOutput base;
UINT device_id;
HWAVEOUT handle;
@@ -108,7 +108,7 @@ fail:
return false;
}
static struct audio_output *
static AudioOutput *
winmm_output_init(const config_param &param, Error &error)
{
WinmmOutput *wo = new WinmmOutput();
@@ -128,7 +128,7 @@ winmm_output_init(const config_param &param, Error &error)
}
static void
winmm_output_finish(struct audio_output *ao)
winmm_output_finish(AudioOutput *ao)
{
WinmmOutput *wo = (WinmmOutput *)ao;
@@ -137,7 +137,7 @@ winmm_output_finish(struct audio_output *ao)
}
static bool
winmm_output_open(struct audio_output *ao, AudioFormat &audio_format,
winmm_output_open(AudioOutput *ao, AudioFormat &audio_format,
Error &error)
{
WinmmOutput *wo = (WinmmOutput *)ao;
@@ -194,7 +194,7 @@ winmm_output_open(struct audio_output *ao, AudioFormat &audio_format,
}
static void
winmm_output_close(struct audio_output *ao)
winmm_output_close(AudioOutput *ao)
{
WinmmOutput *wo = (WinmmOutput *)ao;
@@ -263,7 +263,7 @@ winmm_drain_buffer(WinmmOutput *wo, WinmmBuffer *buffer,
}
static size_t
winmm_output_play(struct audio_output *ao, const void *chunk, size_t size, Error &error)
winmm_output_play(AudioOutput *ao, const void *chunk, size_t size, Error &error)
{
WinmmOutput *wo = (WinmmOutput *)ao;
@@ -318,7 +318,7 @@ winmm_stop(WinmmOutput *wo)
}
static void
winmm_output_drain(struct audio_output *ao)
winmm_output_drain(AudioOutput *ao)
{
WinmmOutput *wo = (WinmmOutput *)ao;
@@ -327,7 +327,7 @@ winmm_output_drain(struct audio_output *ao)
}
static void
winmm_output_cancel(struct audio_output *ao)
winmm_output_cancel(AudioOutput *ao)
{
WinmmOutput *wo = (WinmmOutput *)ao;