diff options
author | Max Kellermann <max@duempel.org> | 2014-01-28 11:34:09 +0100 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2014-01-28 11:34:09 +0100 |
commit | 815d72065c1f2c690228e66b74b8a303cfe33fca (patch) | |
tree | 0c6698d1c3d3066036020a367531116cc8c334ce | |
parent | e0dc721324f34d8b3803dce64545871aec42e537 (diff) | |
download | mpd-815d72065c1f2c690228e66b74b8a303cfe33fca.tar.gz mpd-815d72065c1f2c690228e66b74b8a303cfe33fca.tar.xz mpd-815d72065c1f2c690228e66b74b8a303cfe33fca.zip |
output: rename struct audio_output to AudioOutput
36 files changed, 278 insertions, 277 deletions
diff --git a/src/PlayerControl.hxx b/src/PlayerControl.hxx index a7237167c..4eeccdb6c 100644 --- a/src/PlayerControl.hxx +++ b/src/PlayerControl.hxx @@ -47,7 +47,7 @@ enum class PlayerCommand : uint8_t { CLOSE_AUDIO, /** - * At least one audio_output.enabled flag has been modified; + * At least one AudioOutput.enabled flag has been modified; * commit those changes to the output threads. */ UPDATE_AUDIO, diff --git a/src/config/ConfigTemplates.cxx b/src/config/ConfigTemplates.cxx index 8eaa22bdd..640a93aa2 100644 --- a/src/config/ConfigTemplates.cxx +++ b/src/config/ConfigTemplates.cxx @@ -42,7 +42,7 @@ const ConfigTemplate config_templates[] = { { "zeroconf_enabled", false, false }, { "password", true, false }, { "default_permissions", false, false }, - { "audio_output", true, true }, + { "AudioOutput", true, true }, { "audio_output_format", false, false }, { "mixer_type", false, false }, { "replaygain", false, false }, diff --git a/src/mixer/MixerAll.cxx b/src/mixer/MixerAll.cxx index 483660a45..c2fa903f2 100644 --- a/src/mixer/MixerAll.cxx +++ b/src/mixer/MixerAll.cxx @@ -33,7 +33,7 @@ static constexpr Domain mixer_domain("mixer"); static int -output_mixer_get_volume(const audio_output &ao) +output_mixer_get_volume(const AudioOutput &ao) { if (!ao.enabled) return -1; @@ -73,7 +73,7 @@ MultipleOutputs::GetVolume() const } static bool -output_mixer_set_volume(audio_output &ao, unsigned volume) +output_mixer_set_volume(AudioOutput &ao, unsigned volume) { assert(volume <= 100); @@ -108,7 +108,7 @@ MultipleOutputs::SetVolume(unsigned volume) } static int -output_mixer_get_software_volume(const audio_output &ao) +output_mixer_get_software_volume(const AudioOutput &ao) { if (!ao.enabled) return -1; diff --git a/src/mixer/MixerControl.hxx b/src/mixer/MixerControl.hxx index caa1c3054..3f8e11e86 100644 --- a/src/mixer/MixerControl.hxx +++ b/src/mixer/MixerControl.hxx @@ -46,7 +46,7 @@ mixer_close(Mixer *mixer); /** * Close the mixer unless the plugin's "global" flag is set. This is - * called when the #audio_output is closed. + * called when the #AudioOutput is closed. */ void mixer_auto_close(Mixer *mixer); diff --git a/src/output/MultipleOutputs.cxx b/src/output/MultipleOutputs.cxx index 50f686843..7df89cc55 100644 --- a/src/output/MultipleOutputs.cxx +++ b/src/output/MultipleOutputs.cxx @@ -50,11 +50,11 @@ MultipleOutputs::~MultipleOutputs() } } -static audio_output * +static AudioOutput * LoadOutput(PlayerControl &pc, const config_param ¶m) { Error error; - audio_output *output = audio_output_new(param, pc, error); + AudioOutput *output = audio_output_new(param, pc, error); if (output == nullptr) { if (param.line > 0) FormatFatalError("line %i: %s", @@ -89,7 +89,7 @@ MultipleOutputs::Configure(PlayerControl &pc) } } -audio_output * +AudioOutput * MultipleOutputs::FindByName(const char *name) const { for (auto i : outputs) @@ -146,7 +146,7 @@ MultipleOutputs::AllowPlay() } static void -audio_output_reset_reopen(struct audio_output *ao) +audio_output_reset_reopen(AudioOutput *ao) { const ScopeLock protect(ao->mutex); @@ -259,7 +259,7 @@ MultipleOutputs::Open(const AudioFormat audio_format, */ gcc_pure static bool -chunk_is_consumed_in(const struct audio_output *ao, +chunk_is_consumed_in(const AudioOutput *ao, gcc_unused const MusicPipe *pipe, const struct music_chunk *chunk) { @@ -299,7 +299,7 @@ MultipleOutputs::ClearTailChunk(gcc_unused const struct music_chunk *chunk, assert(pipe->Contains(chunk)); for (unsigned i = 0, n = outputs.size(); i != n; ++i) { - audio_output *ao = outputs[i]; + AudioOutput *ao = outputs[i]; /* this mutex will be unlocked by the caller when it's ready */ diff --git a/src/output/MultipleOutputs.hxx b/src/output/MultipleOutputs.hxx index e1a8602a9..7790f83a4 100644 --- a/src/output/MultipleOutputs.hxx +++ b/src/output/MultipleOutputs.hxx @@ -39,11 +39,11 @@ class MusicBuffer; class MusicPipe; struct music_chunk; struct PlayerControl; -struct audio_output; +struct AudioOutput; class Error; class MultipleOutputs { - std::vector<audio_output *> outputs; + std::vector<AudioOutput *> outputs; AudioFormat input_audio_format; @@ -86,13 +86,13 @@ public: /** * Returns the "i"th audio output device. */ - const audio_output &Get(unsigned i) const { + const AudioOutput &Get(unsigned i) const { assert(i < Size()); return *outputs[i]; } - audio_output &Get(unsigned i) { + AudioOutput &Get(unsigned i) { assert(i < Size()); return *outputs[i]; @@ -103,7 +103,7 @@ public: * Returns nullptr if the name does not exist. */ gcc_pure - audio_output *FindByName(const char *name) const; + AudioOutput *FindByName(const char *name) const; /** * Checks the "enabled" flag of all audio outputs, and if one has diff --git a/src/output/OutputCommand.cxx b/src/output/OutputCommand.cxx index d4c1d844d..6d5690575 100644 --- a/src/output/OutputCommand.cxx +++ b/src/output/OutputCommand.cxx @@ -40,7 +40,7 @@ audio_output_enable_index(MultipleOutputs &outputs, unsigned idx) if (idx >= outputs.Size()) return false; - audio_output &ao = outputs.Get(idx); + AudioOutput &ao = outputs.Get(idx); if (ao.enabled) return true; @@ -60,7 +60,7 @@ audio_output_disable_index(MultipleOutputs &outputs, unsigned idx) if (idx >= outputs.Size()) return false; - audio_output &ao = outputs.Get(idx); + AudioOutput &ao = outputs.Get(idx); if (!ao.enabled) return true; @@ -86,7 +86,7 @@ audio_output_toggle_index(MultipleOutputs &outputs, unsigned idx) if (idx >= outputs.Size()) return false; - audio_output &ao = outputs.Get(idx); + AudioOutput &ao = outputs.Get(idx); const bool enabled = ao.enabled = !ao.enabled; idle_add(IDLE_OUTPUT); diff --git a/src/output/OutputControl.cxx b/src/output/OutputControl.cxx index 1532dbd83..f6844911f 100644 --- a/src/output/OutputControl.cxx +++ b/src/output/OutputControl.cxx @@ -41,9 +41,9 @@ struct notify audio_output_client_notify; /** * Waits for command completion. * - * @param ao the #audio_output instance; must be locked + * @param ao the #AudioOutput instance; must be locked */ -static void ao_command_wait(struct audio_output *ao) +static void ao_command_wait(AudioOutput *ao) { while (ao->command != AO_COMMAND_NONE) { ao->mutex.unlock(); @@ -53,12 +53,12 @@ static void ao_command_wait(struct audio_output *ao) } /** - * Sends a command to the #audio_output object, but does not wait for + * Sends a command to the #AudioOutput object, but does not wait for * completion. * - * @param ao the #audio_output instance; must be locked + * @param ao the #AudioOutput instance; must be locked */ -static void ao_command_async(struct audio_output *ao, +static void ao_command_async(AudioOutput *ao, enum audio_output_command cmd) { assert(ao->command == AO_COMMAND_NONE); @@ -67,31 +67,31 @@ static void ao_command_async(struct audio_output *ao, } /** - * Sends a command to the #audio_output object and waits for + * Sends a command to the #AudioOutput object and waits for * completion. * - * @param ao the #audio_output instance; must be locked + * @param ao the #AudioOutput instance; must be locked */ static void -ao_command(struct audio_output *ao, enum audio_output_command cmd) +ao_command(AudioOutput *ao, enum audio_output_command cmd) { ao_command_async(ao, cmd); ao_command_wait(ao); } /** - * Lock the #audio_output object and execute the command + * Lock the #AudioOutput object and execute the command * synchronously. */ static void -ao_lock_command(struct audio_output *ao, enum audio_output_command cmd) +ao_lock_command(AudioOutput *ao, enum audio_output_command cmd) { const ScopeLock protect(ao->mutex); ao_command(ao, cmd); } void -audio_output_set_replay_gain_mode(struct audio_output *ao, +audio_output_set_replay_gain_mode(AudioOutput *ao, ReplayGainMode mode) { if (ao->replay_gain_filter != nullptr) @@ -101,7 +101,7 @@ audio_output_set_replay_gain_mode(struct audio_output *ao, } void -audio_output_enable(struct audio_output *ao) +audio_output_enable(AudioOutput *ao) { if (!ao->thread.IsDefined()) { if (ao->plugin->enable == nullptr) { @@ -119,7 +119,7 @@ audio_output_enable(struct audio_output *ao) } void -audio_output_disable(struct audio_output *ao) +audio_output_disable(AudioOutput *ao) { if (!ao->thread.IsDefined()) { if (ao->plugin->disable == nullptr) @@ -139,7 +139,7 @@ audio_output_disable(struct audio_output *ao) * Object must be locked (and unlocked) by the caller. */ static bool -audio_output_open(struct audio_output *ao, +audio_output_open(AudioOutput *ao, const AudioFormat audio_format, const MusicPipe &mp) { @@ -199,7 +199,7 @@ audio_output_open(struct audio_output *ao, * the caller. */ static void -audio_output_close_locked(struct audio_output *ao) +audio_output_close_locked(AudioOutput *ao) { assert(ao != nullptr); assert(ao->allow_play); @@ -216,7 +216,7 @@ audio_output_close_locked(struct audio_output *ao) } bool -audio_output_update(struct audio_output *ao, +audio_output_update(AudioOutput *ao, const AudioFormat audio_format, const MusicPipe &mp) { @@ -233,7 +233,7 @@ audio_output_update(struct audio_output *ao, } void -audio_output_play(struct audio_output *ao) +audio_output_play(AudioOutput *ao) { const ScopeLock protect(ao->mutex); @@ -246,7 +246,7 @@ audio_output_play(struct audio_output *ao) } } -void audio_output_pause(struct audio_output *ao) +void audio_output_pause(AudioOutput *ao) { if (ao->mixer != nullptr && ao->plugin->pause == nullptr) /* the device has no pause mode: close the mixer, @@ -262,7 +262,7 @@ void audio_output_pause(struct audio_output *ao) } void -audio_output_drain_async(struct audio_output *ao) +audio_output_drain_async(AudioOutput *ao) { const ScopeLock protect(ao->mutex); @@ -271,7 +271,7 @@ audio_output_drain_async(struct audio_output *ao) ao_command_async(ao, AO_COMMAND_DRAIN); } -void audio_output_cancel(struct audio_output *ao) +void audio_output_cancel(AudioOutput *ao) { const ScopeLock protect(ao->mutex); @@ -282,7 +282,7 @@ void audio_output_cancel(struct audio_output *ao) } void -audio_output_allow_play(struct audio_output *ao) +audio_output_allow_play(AudioOutput *ao) { const ScopeLock protect(ao->mutex); @@ -292,7 +292,7 @@ audio_output_allow_play(struct audio_output *ao) } void -audio_output_release(struct audio_output *ao) +audio_output_release(AudioOutput *ao) { if (ao->always_on) audio_output_pause(ao); @@ -300,7 +300,7 @@ audio_output_release(struct audio_output *ao) audio_output_close(ao); } -void audio_output_close(struct audio_output *ao) +void audio_output_close(AudioOutput *ao) { assert(ao != nullptr); assert(!ao->open || !ao->fail_timer.IsDefined()); @@ -309,7 +309,7 @@ void audio_output_close(struct audio_output *ao) audio_output_close_locked(ao); } -void audio_output_finish(struct audio_output *ao) +void audio_output_finish(AudioOutput *ao) { audio_output_close(ao); diff --git a/src/output/OutputControl.hxx b/src/output/OutputControl.hxx index 7195412ef..08d1cbd24 100644 --- a/src/output/OutputControl.hxx +++ b/src/output/OutputControl.hxx @@ -24,26 +24,26 @@ #include <stddef.h> -struct audio_output; +struct AudioOutput; struct AudioFormat; struct config_param; class MusicPipe; void -audio_output_set_replay_gain_mode(audio_output *ao, +audio_output_set_replay_gain_mode(AudioOutput *ao, ReplayGainMode mode); /** * Enables the device. */ void -audio_output_enable(audio_output *ao); +audio_output_enable(AudioOutput *ao); /** * Disables the device. */ void -audio_output_disable(audio_output *ao); +audio_output_disable(AudioOutput *ao); /** * Opens or closes the device, depending on the "enabled" flag. @@ -51,18 +51,18 @@ audio_output_disable(audio_output *ao); * @return true if the device is open */ bool -audio_output_update(audio_output *ao, +audio_output_update(AudioOutput *ao, AudioFormat audio_format, const MusicPipe &mp); void -audio_output_play(audio_output *ao); +audio_output_play(AudioOutput *ao); void -audio_output_pause(audio_output *ao); +audio_output_pause(AudioOutput *ao); void -audio_output_drain_async(audio_output *ao); +audio_output_drain_async(AudioOutput *ao); /** * Clear the "allow_play" flag and send the "CANCEL" command @@ -70,25 +70,25 @@ audio_output_drain_async(audio_output *ao); * audio_output_allow_play(). */ void -audio_output_cancel(audio_output *ao); +audio_output_cancel(AudioOutput *ao); /** * Set the "allow_play" and signal the thread. */ void -audio_output_allow_play(audio_output *ao); +audio_output_allow_play(AudioOutput *ao); void -audio_output_close(audio_output *ao); +audio_output_close(AudioOutput *ao); /** * Closes the audio output, but if the "always_on" flag is set, put it * into pause mode instead. */ void -audio_output_release(audio_output *ao); +audio_output_release(AudioOutput *ao); void -audio_output_finish(audio_output *ao); +audio_output_finish(AudioOutput *ao); #endif diff --git a/src/output/OutputFinish.cxx b/src/output/OutputFinish.cxx index 16b16f5ce..1f405aaf9 100644 --- a/src/output/OutputFinish.cxx +++ b/src/output/OutputFinish.cxx @@ -26,7 +26,7 @@ #include <assert.h> void -ao_base_finish(struct audio_output *ao) +ao_base_finish(AudioOutput *ao) { assert(!ao->open); assert(!ao->fail_timer.IsDefined()); @@ -41,7 +41,7 @@ ao_base_finish(struct audio_output *ao) } void -audio_output_free(struct audio_output *ao) +audio_output_free(AudioOutput *ao) { assert(!ao->open); assert(!ao->fail_timer.IsDefined()); diff --git a/src/output/OutputInit.cxx b/src/output/OutputInit.cxx index 9783b36ed..f91e5b5e3 100644 --- a/src/output/OutputInit.cxx +++ b/src/output/OutputInit.cxx @@ -93,7 +93,7 @@ audio_output_mixer_type(const config_param ¶m) } static Mixer * -audio_output_load_mixer(struct audio_output *ao, +audio_output_load_mixer(AudioOutput *ao, const config_param ¶m, const struct mixer_plugin *plugin, Filter &filter_chain, @@ -128,7 +128,7 @@ audio_output_load_mixer(struct audio_output *ao, } bool -ao_base_init(struct audio_output *ao, +ao_base_init(AudioOutput *ao, const AudioOutputPlugin *plugin, const config_param ¶m, Error &error) { @@ -214,7 +214,7 @@ ao_base_init(struct audio_output *ao, } static bool -audio_output_setup(struct audio_output *ao, const config_param ¶m, +audio_output_setup(AudioOutput *ao, const config_param ¶m, Error &error) { @@ -279,7 +279,7 @@ audio_output_setup(struct audio_output *ao, const config_param ¶m, return true; } -struct audio_output * +AudioOutput * audio_output_new(const config_param ¶m, PlayerControl &pc, Error &error) @@ -304,7 +304,7 @@ audio_output_new(const config_param ¶m, } } else { LogWarning(output_domain, - "No 'audio_output' defined in config file"); + "No 'AudioOutput' defined in config file"); plugin = audio_output_detect(error); if (plugin == nullptr) @@ -315,7 +315,7 @@ audio_output_new(const config_param ¶m, plugin->name); } - struct audio_output *ao = ao_plugin_init(plugin, param, error); + AudioOutput *ao = ao_plugin_init(plugin, param, error); if (ao == nullptr) return nullptr; diff --git a/src/output/OutputInternal.hxx b/src/output/OutputInternal.hxx index 67b6ea644..31b6fd7c7 100644 --- a/src/output/OutputInternal.hxx +++ b/src/output/OutputInternal.hxx @@ -60,7 +60,7 @@ enum audio_output_command { AO_COMMAND_KILL }; -struct audio_output { +struct AudioOutput { /** * The device's configured display name. */ @@ -272,31 +272,31 @@ struct audio_output { extern struct notify audio_output_client_notify; static inline bool -audio_output_is_open(const struct audio_output *ao) +audio_output_is_open(const AudioOutput *ao) { return ao->open; } static inline bool -audio_output_command_is_finished(const struct audio_output *ao) +audio_output_command_is_finished(const AudioOutput *ao) { return ao->command == AO_COMMAND_NONE; } -struct audio_output * +AudioOutput * audio_output_new(const config_param ¶m, PlayerControl &pc, Error &error); bool -ao_base_init(struct audio_output *ao, +ao_base_init(AudioOutput *ao, const AudioOutputPlugin *plugin, const config_param ¶m, Error &error); void -ao_base_finish(struct audio_output *ao); +ao_base_finish(AudioOutput *ao); void -audio_output_free(struct audio_output *ao); +audio_output_free(AudioOutput *ao); #endif diff --git a/src/output/OutputPlugin.cxx b/src/output/OutputPlugin.cxx index 60c5681ec..1c8d3bb48 100644 --- a/src/output/OutputPlugin.cxx +++ b/src/output/OutputPlugin.cxx @@ -21,7 +21,7 @@ #include "OutputPlugin.hxx" #include "OutputInternal.hxx" -struct audio_output * +AudioOutput * ao_plugin_init(const AudioOutputPlugin *plugin, const config_param ¶m, Error &error) @@ -33,13 +33,13 @@ ao_plugin_init(const AudioOutputPlugin *plugin, } void -ao_plugin_finish(struct audio_output *ao) +ao_plugin_finish(AudioOutput *ao) { ao->plugin->finish(ao); } bool -ao_plugin_enable(struct audio_output *ao, Error &error_r) +ao_plugin_enable(AudioOutput *ao, Error &error_r) { return ao->plugin->enable != nullptr ? ao->plugin->enable(ao, error_r) @@ -47,27 +47,27 @@ ao_plugin_enable(struct audio_output *ao, Error &error_r) } void -ao_plugin_disable(struct audio_output *ao) +ao_plugin_disable(AudioOutput *ao) { if (ao->plugin->disable != nullptr) ao->plugin->disable(ao); } bool -ao_plugin_open(struct audio_output *ao, AudioFormat &audio_format, +ao_plugin_open(AudioOutput *ao, AudioFormat &audio_format, Error &error) { return ao->plugin->open(ao, audio_format, error); } void -ao_plugin_close(struct audio_output *ao) +ao_plugin_close(AudioOutput *ao) { ao->plugin->close(ao); } unsigned -ao_plugin_delay(struct audio_output *ao) +ao_plugin_delay(AudioOutput *ao) { return ao->plugin->delay != nullptr ? ao->plugin->delay(ao) @@ -75,35 +75,35 @@ ao_plugin_delay(struct audio_output *ao) } void -ao_plugin_send_tag(struct audio_output *ao, const Tag *tag) +ao_plugin_send_tag(AudioOutput *ao, const Tag *tag) { if (ao->plugin->send_tag != nullptr) ao->plugin->send_tag(ao, tag); } size_t -ao_plugin_play(struct audio_output *ao, const void *chunk, size_t size, +ao_plugin_play(AudioOutput *ao, const void *chunk, size_t size, Error &error) { return ao->plugin->play(ao, chunk, size, error); } void -ao_plugin_drain(struct audio_output *ao) +ao_plugin_drain(AudioOutput *ao) { if (ao->plugin->drain != nullptr) ao->plugin->drain(ao); } void -ao_plugin_cancel(struct audio_output *ao) +ao_plugin_cancel(AudioOutput *ao) { if (ao->plugin->cancel != nullptr) ao->plugin->cancel(ao); } bool -ao_plugin_pause(struct audio_output *ao) +ao_plugin_pause(AudioOutput *ao) { return ao->plugin->pause != nullptr && ao->plugin->pause(ao); } diff --git a/src/output/OutputPlugin.hxx b/src/output/OutputPlugin.hxx index f9f65cad6..3ae35ea3d 100644 --- a/src/output/OutputPlugin.hxx +++ b/src/output/OutputPlugin.hxx @@ -27,6 +27,7 @@ struct config_param; struct AudioFormat; struct Tag; +struct AudioOutput; class Error; /** @@ -53,13 +54,13 @@ struct AudioOutputPlugin { * @return nullptr on error, or an opaque pointer to the plugin's * data */ - struct audio_output *(*init)(const config_param ¶m, + AudioOutput *(*init)(const config_param ¶m, Error &error); /** * Free resources allocated by this device. */ - void (*finish)(struct audio_output *data); + void (*finish)(AudioOutput *data); /** * Enable the device. This may allocate resources, preparing @@ -69,13 +70,13 @@ struct AudioOutputPlugin { * * @return true on success, false on error */ - bool (*enable)(struct audio_output *data, Error &error); + bool (*enable)(AudioOutput *data, Error &error); /** * Disables the device. It is closed before this method is * called. */ - void (*disable)(struct audio_output *data); + void (*disable)(AudioOutput *data); /** * Really open the device. @@ -83,13 +84,13 @@ struct AudioOutputPlugin { * @param audio_format the audio format in which data is going * to be delivered; may be modified by the plugin */ - bool (*open)(struct audio_output *data, AudioFormat &audio_format, + bool (*open)(AudioOutput *data, AudioFormat &audio_format, Error &error); /** * Close the device. */ - void (*close)(struct audio_output *data); + void (*close)(AudioOutput *data); /** * Returns a positive number if the output thread shall delay @@ -99,33 +100,33 @@ struct AudioOutputPlugin { * * @return the number of milliseconds to wait */ - unsigned (*delay)(struct audio_output *data); + unsigned (*delay)(AudioOutput *data); /** * Display metadata for the next chunk. Optional method, * because not all devices can display metadata. */ - void (*send_tag)(struct audio_output *data, const Tag *tag); + void (*send_tag)(AudioOutput *data, const Tag *tag); /** * Play a chunk of audio data. * * @return the number of bytes played, or 0 on error */ - size_t (*play)(struct audio_output *data, + size_t (*play)(AudioOutput *data, const void *chunk, size_t size, Error &error); /** * Wait until the device has finished playing. */ - void (*drain)(struct audio_output *data); + void (*drain)(AudioOutput *data); /** * Try to cancel data which may still be in the device's * buffers. */ - void (*cancel)(struct audio_output *data); + void (*cancel)(AudioOutput *data); /** * Pause the device. If supported, it may perform a special @@ -138,7 +139,7 @@ struct AudioOutputPlugin { * @return false on error (output will be closed then), true * for continue to pause */ - bool (*pause)(struct audio_output *data); + bool (*pause)(AudioOutput *data); /** * The mixer plugin associated with this output plugin. This @@ -158,45 +159,45 @@ ao_plugin_test_default_device(const AudioOutputPlugin *plugin) } gcc_malloc -struct audio_output * +AudioOutput * ao_plugin_init(const AudioOutputPlugin *plugin, const config_param ¶m, Error &error); void -ao_plugin_finish(struct audio_output *ao); +ao_plugin_finish(AudioOutput *ao); bool -ao_plugin_enable(struct audio_output *ao, Error &error); +ao_plugin_enable(AudioOutput *ao, Error &error); void -ao_plugin_disable(struct audio_output *ao); +ao_plugin_disable(AudioOutput *ao); bool -ao_plugin_open(struct audio_output *ao, AudioFormat &audio_format, +ao_plugin_open(AudioOutput *ao, AudioFormat &audio_format, Error &error); void -ao_plugin_close(struct audio_output *ao); +ao_plugin_close(AudioOutput *ao); gcc_pure unsigned -ao_plugin_delay(struct audio_output *ao); +ao_plugin_delay(AudioOutput *ao); void -ao_plugin_send_tag(struct audio_output *ao, const Tag *tag); +ao_plugin_send_tag(AudioOutput *ao, const Tag *tag); size_t -ao_plugin_play(struct audio_output *ao, const void *chunk, size_t size, +ao_plugin_play(AudioOutput *ao, const void *chunk, size_t size, Error &error); void -ao_plugin_drain(struct audio_output *ao); +ao_plugin_drain(AudioOutput *ao); void -ao_plugin_cancel(struct audio_output *ao); +ao_plugin_cancel(AudioOutput *ao); bool -ao_plugin_pause(struct audio_output *ao); +ao_plugin_pause(AudioOutput *ao); #endif diff --git a/src/output/OutputPrint.cxx b/src/output/OutputPrint.cxx index 7e0536bf5..b9fb79607 100644 --- a/src/output/OutputPrint.cxx +++ b/src/output/OutputPrint.cxx @@ -32,7 +32,7 @@ void printAudioDevices(Client &client, const MultipleOutputs &outputs) { for (unsigned i = 0, n = outputs.Size(); i != n; ++i) { - const audio_output &ao = outputs.Get(i); + const AudioOutput &ao = outputs.Get(i); client_printf(client, "outputid: %i\n" diff --git a/src/output/OutputState.cxx b/src/output/OutputState.cxx index abd5dd2ae..f717e3cbb 100644 --- a/src/output/OutputState.cxx +++ b/src/output/OutputState.cxx @@ -41,7 +41,7 @@ void audio_output_state_save(FILE *fp, const MultipleOutputs &outputs) { for (unsigned i = 0, n = outputs.Size(); i != n; ++i) { - const audio_output &ao = outputs.Get(i); + const AudioOutput &ao = outputs.Get(i); fprintf(fp, AUDIO_DEVICE_STATE "%d:%s\n", ao.enabled, ao.name); @@ -69,7 +69,7 @@ audio_output_state_read(const char *line, MultipleOutputs &outputs) return true; name = endptr + 1; - audio_output *ao = outputs.FindByName(name); + AudioOutput *ao = outputs.FindByName(name); if (ao == NULL) { FormatDebug(output_domain, "Ignoring device state for '%s'", name); diff --git a/src/output/OutputThread.cxx b/src/output/OutputThread.cxx index 52dfc63ef..f2ea048df 100644 --- a/src/output/OutputThread.cxx +++ b/src/output/OutputThread.cxx @@ -40,7 +40,7 @@ #include <assert.h> #include <string.h> -static void ao_command_finished(struct audio_output *ao) +static void ao_command_finished(AudioOutput *ao) { assert(ao->command != AO_COMMAND_NONE); ao->command = AO_COMMAND_NONE; @@ -51,7 +51,7 @@ static void ao_command_finished(struct audio_output *ao) } static bool -ao_enable(struct audio_output *ao) +ao_enable(AudioOutput *ao) { Error error; bool success; @@ -74,10 +74,10 @@ ao_enable(struct audio_output *ao) } static void -ao_close(struct audio_output *ao, bool drain); +ao_close(AudioOutput *ao, bool drain); static void -ao_disable(struct audio_output *ao) +ao_disable(AudioOutput *ao) { if (ao->open) ao_close(ao, false); @@ -92,7 +92,7 @@ ao_disable(struct audio_output *ao) } static AudioFormat -ao_filter_open(struct audio_output *ao, AudioFormat &format, +ao_filter_open(AudioOutput *ao, AudioFormat &format, Error &error_r) { assert(format.IsValid()); @@ -121,7 +121,7 @@ ao_filter_open(struct audio_output *ao, AudioFormat &format, } static void -ao_filter_close(struct audio_output *ao) +ao_filter_close(AudioOutput *ao) { if (ao->replay_gain_filter != nullptr) ao->replay_gain_filter->Close(); @@ -132,7 +132,7 @@ ao_filter_close(struct audio_output *ao) } static void -ao_open(struct audio_output *ao) +ao_open(AudioOutput *ao) { bool success; Error error; @@ -207,7 +207,7 @@ ao_open(struct audio_output *ao) } static void -ao_close(struct audio_output *ao, bool drain) +ao_close(AudioOutput *ao, bool drain) { assert(ao->open); @@ -233,7 +233,7 @@ ao_close(struct audio_output *ao, bool drain) } static void -ao_reopen_filter(struct audio_output *ao) +ao_reopen_filter(AudioOutput *ao) { Error error; @@ -266,7 +266,7 @@ ao_reopen_filter(struct audio_output *ao) } static void -ao_reopen(struct audio_output *ao) +ao_reopen(AudioOutput *ao) { if (!ao->config_audio_format.IsFullyDefined()) { if (ao->open) { @@ -297,7 +297,7 @@ ao_reopen(struct audio_output *ao) * was issued */ static bool -ao_wait(struct audio_output *ao) +ao_wait(AudioOutput *ao) { while (true) { unsigned delay = ao_plugin_delay(ao); @@ -312,7 +312,7 @@ ao_wait(struct audio_output *ao) } static const void * -ao_chunk_data(struct audio_output *ao, const struct music_chunk *chunk, +ao_chunk_data(AudioOutput *ao, const struct music_chunk *chunk, Filter *replay_gain_filter, unsigned *replay_gain_serial_p, size_t *length_r) @@ -352,7 +352,7 @@ ao_chunk_data(struct audio_output *ao, const struct music_chunk *chunk, } static const void * -ao_filter_chunk(struct audio_output *ao, const struct music_chunk *chunk, +ao_filter_chunk(AudioOutput *ao, const struct music_chunk *chunk, size_t *length_r) { size_t length; @@ -422,7 +422,7 @@ ao_filter_chunk(struct audio_output *ao, const struct music_chunk *chunk, } static bool -ao_play_chunk(struct audio_output *ao, const struct music_chunk *chunk) +ao_play_chunk(AudioOutput *ao, const struct music_chunk *chunk) { assert(ao != nullptr); assert(ao->filter != nullptr); @@ -485,7 +485,7 @@ ao_play_chunk(struct audio_output *ao, const struct music_chunk *chunk) } static const struct music_chunk * -ao_next_chunk(struct audio_output *ao) +ao_next_chunk(AudioOutput *ao) { return ao->chunk != nullptr /* continue the previous play() call */ @@ -503,7 +503,7 @@ ao_next_chunk(struct audio_output *ao) * tail of the pipe was already reached */ static bool -ao_play(struct audio_output *ao) +ao_play(AudioOutput *ao) { bool success; const struct music_chunk *chunk; @@ -547,7 +547,7 @@ ao_play(struct audio_output *ao) return true; } -static void ao_pause(struct audio_output *ao) +static void ao_pause(AudioOutput *ao) { bool ret; @@ -578,7 +578,7 @@ static void ao_pause(struct audio_output *ao) static void audio_output_task(void *arg) { - struct audio_output *ao = (struct audio_output *)arg; + AudioOutput *ao = (AudioOutput *)arg; FormatThreadName("output:%s", ao->name); @@ -680,7 +680,7 @@ audio_output_task(void *arg) } } -void audio_output_thread_start(struct audio_output *ao) +void audio_output_thread_start(AudioOutput *ao) { assert(ao->command == AO_COMMAND_NONE); diff --git a/src/output/OutputThread.hxx b/src/output/OutputThread.hxx index 1cdbd65f2..716fe8319 100644 --- a/src/output/OutputThread.hxx +++ b/src/output/OutputThread.hxx @@ -20,9 +20,9 @@ #ifndef MPD_OUTPUT_THREAD_HXX #define MPD_OUTPUT_THREAD_HXX -struct audio_output; +struct AudioOutput; void -audio_output_thread_start(audio_output *ao); +audio_output_thread_start(AudioOutput *ao); #endif diff --git a/src/output/plugins/AlsaOutputPlugin.cxx b/src/output/plugins/AlsaOutputPlugin.cxx index fac94a13d..d88fe9f5e 100644 --- a/src/output/plugins/AlsaOutputPlugin.cxx +++ b/src/output/plugins/AlsaOutputPlugin.cxx @@ -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 ¶m) #endif } -static struct audio_output * +static AudioOutput * alsa_init(const config_param ¶m, Error &error) { AlsaOutput *ad = new AlsaOutput(); @@ -185,7 +185,7 @@ alsa_init(const config_param ¶m, 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; diff --git a/src/output/plugins/AoOutputPlugin.cxx b/src/output/plugins/AoOutputPlugin.cxx index 37b216f90..8205e2fd6 100644 --- a/src/output/plugins/AoOutputPlugin.cxx +++ b/src/output/plugins/AoOutputPlugin.cxx @@ -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 ¶m, Error &error) return true; } -static struct audio_output * +static AudioOutput * ao_output_init(const config_param ¶m, Error &error) { AoOutput *ad = new AoOutput(); @@ -172,7 +172,7 @@ ao_output_init(const config_param ¶m, 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; diff --git a/src/output/plugins/FifoOutputPlugin.cxx b/src/output/plugins/FifoOutputPlugin.cxx index 27b8e4192..2f839af22 100644 --- a/src/output/plugins/FifoOutputPlugin.cxx +++ b/src/output/plugins/FifoOutputPlugin.cxx @@ -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 ¶m, Error &error) { FifoOutput *fd = new FifoOutput(); @@ -204,7 +204,7 @@ fifo_output_init(const config_param ¶m, 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; diff --git a/src/output/plugins/HttpdInternal.hxx b/src/output/plugins/HttpdInternal.hxx index 506730d11..1d48c3ad5 100644 --- a/src/output/plugins/HttpdInternal.hxx +++ b/src/output/plugins/HttpdInternal.hxx @@ -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 ¶m, Error &error); - audio_output *InitAndConfigure(const config_param ¶m, + AudioOutput *InitAndConfigure(const config_param ¶m, Error &error) { if (!Init(param, error)) return nullptr; diff --git a/src/output/plugins/HttpdOutputPlugin.cxx b/src/output/plugins/HttpdOutputPlugin.cxx index f1e1e3701..042b040a1 100644 --- a/src/output/plugins/HttpdOutputPlugin.cxx +++ b/src/output/plugins/HttpdOutputPlugin.cxx @@ -139,12 +139,12 @@ HttpdOutput::Init(const config_param ¶m, Error &error) return ao_base_init(&base, &httpd_output_plugin, param, error); } -static struct audio_output * +static AudioOutput * httpd_output_init(const config_param ¶m, 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 ¶m, 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); diff --git a/src/output/plugins/JackOutputPlugin.cxx b/src/output/plugins/JackOutputPlugin.cxx index f5e039a17..fcbe2b75b 100644 --- a/src/output/plugins/JackOutputPlugin.cxx +++ b/src/output/plugins/JackOutputPlugin.cxx @@ -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 ¶m, Error &error) { JackOutput *jd = new JackOutput(); @@ -389,7 +389,7 @@ mpd_jack_init(const config_param ¶m, 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; diff --git a/src/output/plugins/NullOutputPlugin.cxx b/src/output/plugins/NullOutputPlugin.cxx index 8d7f4e6e5..c5dff894c 100644 --- a/src/output/plugins/NullOutputPlugin.cxx +++ b/src/output/plugins/NullOutputPlugin.cxx @@ -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 ¶m, Error &error) { NullOutput *nd = new NullOutput(); @@ -55,7 +55,7 @@ null_init(const config_param ¶m, 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; diff --git a/src/output/plugins/OSXOutputPlugin.cxx b/src/output/plugins/OSXOutputPlugin.cxx index c58701e0e..249f61144 100644 --- a/src/output/plugins/OSXOutputPlugin.cxx +++ b/src/output/plugins/OSXOutputPlugin.cxx @@ -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 ¶m) } } -static struct audio_output * +static AudioOutput * osx_output_init(const config_param ¶m, Error &error) { OSXOutput *oo = new OSXOutput(); @@ -92,7 +92,7 @@ osx_output_init(const config_param ¶m, 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; diff --git a/src/output/plugins/OpenALOutputPlugin.cxx b/src/output/plugins/OpenALOutputPlugin.cxx index 7e8df66ea..13b4ec209 100644 --- a/src/output/plugins/OpenALOutputPlugin.cxx +++ b/src/output/plugins/OpenALOutputPlugin.cxx @@ -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 ¶m, Error &error) { const char *device_name = param.GetBlockValue("device"); @@ -153,7 +153,7 @@ openal_init(const config_param ¶m, 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; diff --git a/src/output/plugins/OssOutputPlugin.cxx b/src/output/plugins/OssOutputPlugin.cxx index 384637a13..001f97463 100644 --- a/src/output/plugins/OssOutputPlugin.cxx +++ b/src/output/plugins/OssOutputPlugin.cxx @@ -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 ¶m, Error &error) { const char *device = param.GetBlockValue("device"); @@ -218,7 +218,7 @@ oss_output_init(const config_param ¶m, 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; diff --git a/src/output/plugins/PipeOutputPlugin.cxx b/src/output/plugins/PipeOutputPlugin.cxx index 9aa36f1ed..b872614ea 100644 --- a/src/output/plugins/PipeOutputPlugin.cxx +++ b/src/output/plugins/PipeOutputPlugin.cxx @@ -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 ¶m, Error &error) return true; } -static struct audio_output * +static AudioOutput * pipe_output_init(const config_param ¶m, Error &error) { PipeOutput *pd = new PipeOutput(); @@ -81,7 +81,7 @@ pipe_output_init(const config_param ¶m, 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; diff --git a/src/output/plugins/PulseOutputPlugin.cxx b/src/output/plugins/PulseOutputPlugin.cxx index b46774f71..b8957a563 100644 --- a/src/output/plugins/PulseOutputPlugin.cxx +++ b/src/output/plugins/PulseOutputPlugin.cxx @@ -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 ¶m, Error &error) { PulseOutput *po; @@ -349,7 +349,7 @@ pulse_output_init(const config_param ¶m, 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; diff --git a/src/output/plugins/RecorderOutputPlugin.cxx b/src/output/plugins/RecorderOutputPlugin.cxx index bcc1fb33b..632f2b718 100644 --- a/src/output/plugins/RecorderOutputPlugin.cxx +++ b/src/output/plugins/RecorderOutputPlugin.cxx @@ -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 ¶m, Error &error) return true; } -static audio_output * +static AudioOutput * recorder_output_init(const config_param ¶m, Error &error) { RecorderOutput *recorder = new RecorderOutput(); @@ -127,7 +127,7 @@ recorder_output_init(const config_param ¶m, 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; diff --git a/src/output/plugins/RoarOutputPlugin.cxx b/src/output/plugins/RoarOutputPlugin.cxx index d2de95e77..9b7a342e5 100644 --- a/src/output/plugins/RoarOutputPlugin.cxx +++ b/src/output/plugins/RoarOutputPlugin.cxx @@ -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 ¶m) : ROAR_ROLE_MUSIC; } -static struct audio_output * +static AudioOutput * roar_init(const config_param ¶m, Error &error) { RoarOutput *self = new RoarOutput(); @@ -151,7 +151,7 @@ roar_init(const config_param ¶m, 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); diff --git a/src/output/plugins/ShoutOutputPlugin.cxx b/src/output/plugins/ShoutOutputPlugin.cxx index 761f701c5..8682226b9 100644 --- a/src/output/plugins/ShoutOutputPlugin.cxx +++ b/src/output/plugins/ShoutOutputPlugin.cxx @@ -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 ¶m, Error &error) return true; } -static struct audio_output * +static AudioOutput * my_shout_init_driver(const config_param ¶m, 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; diff --git a/src/output/plugins/SolarisOutputPlugin.cxx b/src/output/plugins/SolarisOutputPlugin.cxx index fafea3e26..70c3b7493 100644 --- a/src/output/plugins/SolarisOutputPlugin.cxx +++ b/src/output/plugins/SolarisOutputPlugin.cxx @@ -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 ¶m, Error &error_r) { SolarisOutput *so = new SolarisOutput(); @@ -91,7 +91,7 @@ solaris_output_init(const config_param ¶m, 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; diff --git a/src/output/plugins/WinmmOutputPlugin.cxx b/src/output/plugins/WinmmOutputPlugin.cxx index d1436d673..699993905 100644 --- a/src/output/plugins/WinmmOutputPlugin.cxx +++ b/src/output/plugins/WinmmOutputPlugin.cxx @@ -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 ¶m, Error &error) { WinmmOutput *wo = new WinmmOutput(); @@ -128,7 +128,7 @@ winmm_output_init(const config_param ¶m, 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; diff --git a/test/run_output.cxx b/test/run_output.cxx index fe377158d..04f9b9d63 100644 --- a/test/run_output.cxx +++ b/test/run_output.cxx @@ -80,7 +80,7 @@ PlayerControl::PlayerControl(gcc_unused MultipleOutputs &_outputs, :outputs(_outputs) {} PlayerControl::~PlayerControl() {} -static struct audio_output * +static AudioOutput * load_audio_output(const char *name) { const struct config_param *param; @@ -95,7 +95,7 @@ load_audio_output(const char *name) 32, 4); Error error; - struct audio_output *ao = + AudioOutput *ao = audio_output_new(*param, dummy_player_control, error); if (ao == nullptr) LogError(error); @@ -104,7 +104,7 @@ load_audio_output(const char *name) } static bool -run_output(struct audio_output *ao, AudioFormat audio_format) +run_output(AudioOutput *ao, AudioFormat audio_format) { /* open the audio output */ @@ -197,7 +197,7 @@ int main(int argc, char **argv) /* initialize the audio output */ - struct audio_output *ao = load_audio_output(argv[2]); + AudioOutput *ao = load_audio_output(argv[2]); if (ao == NULL) return 1; |