aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2009-02-10 21:50:51 +0100
committerMax Kellermann <max@duempel.org>2009-02-10 21:50:51 +0100
commit61e30759812e6996eb02bacf58607ec53cb0f577 (patch)
tree47599b984c3f87a404daa70a2159477f08afae9b /src
parent744702f266e52defb896b220c7e4eda97cf64b2d (diff)
downloadmpd-61e30759812e6996eb02bacf58607ec53cb0f577.tar.gz
mpd-61e30759812e6996eb02bacf58607ec53cb0f577.tar.xz
mpd-61e30759812e6996eb02bacf58607ec53cb0f577.zip
output_api: no CamelCase in struct audio_output
Renamed audio_output struct members.
Diffstat (limited to 'src')
-rw-r--r--src/output_control.c16
-rw-r--r--src/output_init.c9
-rw-r--r--src/output_internal.h12
-rw-r--r--src/output_thread.c16
4 files changed, 27 insertions, 26 deletions
diff --git a/src/output_control.c b/src/output_control.c
index db3ab5622..323ed1276 100644
--- a/src/output_control.c
+++ b/src/output_control.c
@@ -56,22 +56,22 @@ audio_output_open(struct audio_output *audioOutput,
audioOutput->reopen_after = 0;
if (audioOutput->open &&
- audio_format_equals(audioFormat, &audioOutput->inAudioFormat)) {
+ audio_format_equals(audioFormat, &audioOutput->in_audio_format)) {
return true;
}
- audioOutput->inAudioFormat = *audioFormat;
+ audioOutput->in_audio_format = *audioFormat;
- if (audio_format_defined(&audioOutput->reqAudioFormat)) {
- /* copy reqAudioFormat to outAudioFormat only if the
+ if (audio_format_defined(&audioOutput->config_audio_format)) {
+ /* copy config_audio_format to out_audio_format only if the
device is not yet open; if it is already open,
- plugin->open() may have modified outAudioFormat,
+ plugin->open() may have modified out_audio_format,
and the value is already ok */
if (!audioOutput->open)
- audioOutput->outAudioFormat =
- audioOutput->reqAudioFormat;
+ audioOutput->out_audio_format =
+ audioOutput->config_audio_format;
} else {
- audioOutput->outAudioFormat = audioOutput->inAudioFormat;
+ audioOutput->out_audio_format = audioOutput->in_audio_format;
if (audioOutput->open)
audio_output_close(audioOutput);
}
diff --git a/src/output_init.c b/src/output_init.c
index 6d974bdb8..a3231f4d2 100644
--- a/src/output_init.c
+++ b/src/output_init.c
@@ -91,20 +91,21 @@ audio_output_init(struct audio_output *ao, const struct config_param *param)
ao->open = false;
ao->reopen_after = 0;
- pcm_convert_init(&ao->convState);
+ pcm_convert_init(&ao->convert_state);
if (format) {
- if (0 != parseAudioConfig(&ao->reqAudioFormat, format)) {
+ if (0 != parseAudioConfig(&ao->config_audio_format, format)) {
g_error("error parsing format at line %i\n", bp->line);
}
} else
- audio_format_clear(&ao->reqAudioFormat);
+ audio_format_clear(&ao->config_audio_format);
ao->thread = NULL;
notify_init(&ao->notify);
ao->command = AO_COMMAND_NONE;
- ao->data = plugin->init(ao, format ? &ao->reqAudioFormat : NULL, param);
+ ao->data = plugin->init(ao, format ? &ao->config_audio_format : NULL,
+ param);
if (ao->data == NULL)
return 0;
diff --git a/src/output_internal.h b/src/output_internal.h
index e53fc6a61..d2b6e41b2 100644
--- a/src/output_internal.h
+++ b/src/output_internal.h
@@ -63,23 +63,23 @@ struct audio_output {
* The audio_format in which audio data is received from the
* player thread (which in turn receives it from the decoder).
*/
- struct audio_format inAudioFormat;
+ struct audio_format in_audio_format;
/**
* The audio_format which is really sent to the device. This
- * is basically reqAudioFormat (if configured) or
- * inAudioFormat, but may have been modified by
+ * is basically config_audio_format (if configured) or
+ * in_audio_format, but may have been modified by
* plugin->open().
*/
- struct audio_format outAudioFormat;
+ struct audio_format out_audio_format;
/**
* The audio_format which was configured. Only set if
* convertAudioFormat is true.
*/
- struct audio_format reqAudioFormat;
+ struct audio_format config_audio_format;
- struct pcm_convert_state convState;
+ struct pcm_convert_state convert_state;
/**
* The thread handle, or NULL if the output thread isn't
diff --git a/src/output_thread.c b/src/output_thread.c
index 883dddcaf..ef636180f 100644
--- a/src/output_thread.c
+++ b/src/output_thread.c
@@ -46,10 +46,10 @@ static void ao_play(struct audio_output *ao)
assert(size > 0);
- if (!audio_format_equals(&ao->inAudioFormat, &ao->outAudioFormat)) {
- data = pcm_convert(&ao->convState,
- &ao->inAudioFormat, data, size,
- &ao->outAudioFormat, &size);
+ if (!audio_format_equals(&ao->in_audio_format, &ao->out_audio_format)) {
+ data = pcm_convert(&ao->convert_state,
+ &ao->in_audio_format, data, size,
+ &ao->out_audio_format, &size);
/* under certain circumstances, pcm_convert() may
return an empty buffer - this condition should be
@@ -63,7 +63,7 @@ static void ao_play(struct audio_output *ao)
if (!ret) {
ao->plugin->cancel(ao->data);
ao->plugin->close(ao->data);
- pcm_convert_deinit(&ao->convState);
+ pcm_convert_deinit(&ao->convert_state);
ao->open = false;
}
@@ -84,7 +84,7 @@ static void ao_pause(struct audio_output *ao)
ret = ao->plugin->pause(ao->data);
if (!ret) {
ao->plugin->close(ao->data);
- pcm_convert_deinit(&ao->convState);
+ pcm_convert_deinit(&ao->convert_state);
ao->open = false;
}
} while (ao->command == AO_COMMAND_NONE);
@@ -109,9 +109,9 @@ static gpointer audio_output_task(gpointer arg)
case AO_COMMAND_OPEN:
assert(!ao->open);
- pcm_convert_init(&ao->convState);
+ pcm_convert_init(&ao->convert_state);
ret = ao->plugin->open(ao->data,
- &ao->outAudioFormat);
+ &ao->out_audio_format);
assert(!ao->open);
if (ret == true)