output: renamed the functions in output_control.c

Getting rid of CamcelCase, again.
This commit is contained in:
Max Kellermann 2008-09-09 10:03:24 +02:00
parent e2c916e6ca
commit f9316fbbbe
4 changed files with 34 additions and 34 deletions

View File

@ -103,7 +103,7 @@ void initAudioDriver(void)
/* only allow param to be NULL if there just one audioOutput */ /* only allow param to be NULL if there just one audioOutput */
assert(param || (audioOutputArraySize == 1)); assert(param || (audioOutputArraySize == 1));
if (!initAudioOutput(output, param)) { if (!audio_output_init(output, param)) {
if (param) if (param)
{ {
FATAL("problems configuring output device " FATAL("problems configuring output device "
@ -229,7 +229,7 @@ void finishAudioDriver(void)
unsigned int i; unsigned int i;
for (i = 0; i < audioOutputArraySize; i++) { for (i = 0; i < audioOutputArraySize; i++) {
finishAudioOutput(&audioOutputArray[i]); audio_output_finish(&audioOutputArray[i]);
} }
free(audioOutputArray); free(audioOutputArray);
@ -263,16 +263,16 @@ static void syncAudioDeviceStates(void)
break; break;
case DEVICE_ON: case DEVICE_ON:
/* This will reopen only if the audio format changed */ /* This will reopen only if the audio format changed */
if (openAudioOutput(audioOutput, &audio_format) < 0) if (audio_output_open(audioOutput, &audio_format) < 0)
audioDeviceStates[i] = DEVICE_ENABLE; audioDeviceStates[i] = DEVICE_ENABLE;
break; break;
case DEVICE_ENABLE: case DEVICE_ENABLE:
if (openAudioOutput(audioOutput, &audio_format) == 0) if (audio_output_open(audioOutput, &audio_format) == 0)
audioDeviceStates[i] = DEVICE_ON; audioDeviceStates[i] = DEVICE_ON;
break; break;
case DEVICE_DISABLE: case DEVICE_DISABLE:
dropBufferedAudioOutput(audioOutput); audio_output_cancel(audioOutput);
closeAudioOutput(audioOutput); audio_output_close(audioOutput);
audioDeviceStates[i] = DEVICE_OFF; audioDeviceStates[i] = DEVICE_OFF;
} }
} }
@ -291,8 +291,8 @@ static int flushAudioBuffer(void)
for (i = 0; i < audioOutputArraySize; ++i) { for (i = 0; i < audioOutputArraySize; ++i) {
if (audioDeviceStates[i] != DEVICE_ON) if (audioDeviceStates[i] != DEVICE_ON)
continue; continue;
err = playAudioOutput(&audioOutputArray[i], audioBuffer, err = audio_output_play(&audioOutputArray[i], audioBuffer,
audioBufferPos); audioBufferPos);
if (!err) if (!err)
ret = 0; ret = 0;
else if (err < 0) else if (err < 0)
@ -335,7 +335,7 @@ int openAudioDevice(const struct audio_format *audioFormat)
else { else {
/* close all devices if there was an error */ /* close all devices if there was an error */
for (i = 0; i < audioOutputArraySize; ++i) { for (i = 0; i < audioOutputArraySize; ++i) {
closeAudioOutput(&audioOutputArray[i]); audio_output_close(&audioOutputArray[i]);
} }
audioOpened = 0; audioOpened = 0;
@ -380,7 +380,7 @@ void dropBufferedAudio(void)
for (i = 0; i < audioOutputArraySize; ++i) { for (i = 0; i < audioOutputArraySize; ++i) {
if (audioDeviceStates[i] == DEVICE_ON) if (audioDeviceStates[i] == DEVICE_ON)
dropBufferedAudioOutput(&audioOutputArray[i]); audio_output_cancel(&audioOutputArray[i]);
} }
} }
@ -397,7 +397,7 @@ void closeAudioDevice(void)
for (i = 0; i < audioOutputArraySize; ++i) { for (i = 0; i < audioOutputArraySize; ++i) {
if (audioDeviceStates[i] == DEVICE_ON) if (audioDeviceStates[i] == DEVICE_ON)
audioDeviceStates[i] = DEVICE_ENABLE; audioDeviceStates[i] = DEVICE_ENABLE;
closeAudioOutput(&audioOutputArray[i]); audio_output_close(&audioOutputArray[i]);
} }
audioOpened = 0; audioOpened = 0;
@ -408,7 +408,7 @@ void sendMetadataToAudioDevice(const struct tag *tag)
unsigned int i; unsigned int i;
for (i = 0; i < audioOutputArraySize; ++i) { for (i = 0; i < audioOutputArraySize; ++i) {
sendMetadataToAudioOutput(&audioOutputArray[i], tag); audio_output_send_tag(&audioOutputArray[i], tag);
} }
} }

View File

@ -22,8 +22,8 @@
#include "utils.h" #include "utils.h"
#include "audio.h" #include "audio.h"
int openAudioOutput(struct audio_output *audioOutput, int audio_output_open(struct audio_output *audioOutput,
const struct audio_format *audioFormat) const struct audio_format *audioFormat)
{ {
int ret = 0; int ret = 0;
@ -41,7 +41,7 @@ int openAudioOutput(struct audio_output *audioOutput,
copyAudioFormat(&audioOutput->outAudioFormat, copyAudioFormat(&audioOutput->outAudioFormat,
&audioOutput->inAudioFormat); &audioOutput->inAudioFormat);
if (audioOutput->open) if (audioOutput->open)
closeAudioOutput(audioOutput); audio_output_close(audioOutput);
} }
if (!audioOutput->open) if (!audioOutput->open)
@ -77,8 +77,8 @@ static void convertAudioFormat(struct audio_output *audioOutput,
*chunkArgPtr = audioOutput->convBuffer; *chunkArgPtr = audioOutput->convBuffer;
} }
int playAudioOutput(struct audio_output *audioOutput, int audio_output_play(struct audio_output *audioOutput,
const char *playChunk, size_t size) const char *playChunk, size_t size)
{ {
int ret; int ret;
@ -94,29 +94,29 @@ int playAudioOutput(struct audio_output *audioOutput,
return ret; return ret;
} }
void dropBufferedAudioOutput(struct audio_output *audioOutput) void audio_output_cancel(struct audio_output *audioOutput)
{ {
if (audioOutput->open) if (audioOutput->open)
audioOutput->plugin->cancel(audioOutput); audioOutput->plugin->cancel(audioOutput);
} }
void closeAudioOutput(struct audio_output *audioOutput) void audio_output_close(struct audio_output *audioOutput)
{ {
if (audioOutput->open) if (audioOutput->open)
audioOutput->plugin->close(audioOutput); audioOutput->plugin->close(audioOutput);
} }
void finishAudioOutput(struct audio_output *audioOutput) void audio_output_finish(struct audio_output *audioOutput)
{ {
closeAudioOutput(audioOutput); audio_output_close(audioOutput);
if (audioOutput->plugin->finish) if (audioOutput->plugin->finish)
audioOutput->plugin->finish(audioOutput); audioOutput->plugin->finish(audioOutput);
if (audioOutput->convBuffer) if (audioOutput->convBuffer)
free(audioOutput->convBuffer); free(audioOutput->convBuffer);
} }
void sendMetadataToAudioOutput(struct audio_output *audioOutput, void audio_output_send_tag(struct audio_output *audioOutput,
const struct tag *tag) const struct tag *tag)
{ {
if (audioOutput->plugin->send_tag) if (audioOutput->plugin->send_tag)
audioOutput->plugin->send_tag(audioOutput, tag); audioOutput->plugin->send_tag(audioOutput, tag);

View File

@ -27,15 +27,15 @@ struct audio_output_plugin;
struct audio_format; struct audio_format;
struct tag; struct tag;
int initAudioOutput(struct audio_output *, ConfigParam * param); int audio_output_init(struct audio_output *, ConfigParam * param);
int openAudioOutput(struct audio_output *audioOutput, int audio_output_open(struct audio_output *audioOutput,
const struct audio_format *audioFormat); const struct audio_format *audioFormat);
int playAudioOutput(struct audio_output *audioOutput, int audio_output_play(struct audio_output *audioOutput,
const char *playChunk, size_t size); const char *playChunk, size_t size);
void dropBufferedAudioOutput(struct audio_output *audioOutput); void audio_output_cancel(struct audio_output *audioOutput);
void closeAudioOutput(struct audio_output *audioOutput); void audio_output_close(struct audio_output *audioOutput);
void finishAudioOutput(struct audio_output *audioOutput); void audio_output_finish(struct audio_output *audioOutput);
void sendMetadataToAudioOutput(struct audio_output *audioOutput, void audio_output_send_tag(struct audio_output *audioOutput,
const struct tag *tag); const struct tag *tag);
#endif #endif

View File

@ -36,7 +36,7 @@
if(bp) str = bp->value; \ if(bp) str = bp->value; \
} }
int initAudioOutput(struct audio_output *ao, ConfigParam * param) int audio_output_init(struct audio_output *ao, ConfigParam * param)
{ {
const char *name = NULL; const char *name = NULL;
char *format = NULL; char *format = NULL;