pcm_utils: renamed ConvState to struct pcm_convert_state

No CamelCase, and a struct instead of a typedef.
This commit is contained in:
Max Kellermann 2008-10-21 21:59:43 +02:00
parent a7888c4998
commit fb416964d6
5 changed files with 12 additions and 9 deletions

View File

@ -25,7 +25,7 @@
struct decoder {
struct decoder_plugin *plugin;
ConvState conv_state;
struct pcm_convert_state conv_state;
bool seeking;
};

View File

@ -90,7 +90,7 @@ int audio_output_init(struct audio_output *ao, ConfigParam * param)
ao->convBuffer = NULL;
ao->convBufferLen = 0;
memset(&ao->convState, 0, sizeof(ConvState));
memset(&ao->convState, 0, sizeof(ao->convState));
if (format) {
if (0 != parseAudioConfig(&ao->reqAudioFormat, format)) {

View File

@ -65,7 +65,7 @@ struct audio_output {
*/
struct audio_format reqAudioFormat;
ConvState convState;
struct pcm_convert_state convState;
char *convBuffer;
size_t convBufferLen;

View File

@ -247,7 +247,8 @@ out:
static size_t pcm_convertSampleRate(int8_t channels, uint32_t inSampleRate,
const int16_t *inBuffer, size_t inSize,
uint32_t outSampleRate, int16_t *outBuffer,
size_t outSize, ConvState *convState)
size_t outSize,
struct pcm_convert_state *convState)
{
static int convalgo = -1;
SRC_DATA *data = &convState->data;
@ -325,7 +326,7 @@ static size_t pcm_convertSampleRate(int8_t channels, uint32_t inSampleRate,
mpd_unused size_t inSize,
uint32_t outSampleRate, char *outBuffer,
size_t outSize,
mpd_unused ConvState *convState)
mpd_unused struct pcm_convert_state *convState)
{
uint32_t rd_dat = 0;
uint32_t wr_dat = 0;
@ -509,7 +510,8 @@ pcm_convertTo16bit(uint8_t bits, const void *inBuffer,
size_t pcm_convertAudioFormat(const struct audio_format *inFormat,
const char *inBuffer, size_t inSize,
const struct audio_format *outFormat,
char *outBuffer, ConvState *convState)
char *outBuffer,
struct pcm_convert_state *convState)
{
const int16_t *buf;
size_t len = 0;

View File

@ -30,7 +30,7 @@
struct audio_format;
typedef struct _ConvState {
struct pcm_convert_state {
#ifdef HAVE_LIBSAMPLERATE
SRC_STATE *state;
SRC_DATA data;
@ -42,7 +42,7 @@ typedef struct _ConvState {
#endif
/* Strict C99 doesn't allow empty structs */
int error;
} ConvState;
};
void pcm_volumeChange(char *buffer, int bufferSize, const struct audio_format *format,
int volume);
@ -53,7 +53,8 @@ void pcm_mix(char *buffer1, const char *buffer2, size_t size,
size_t pcm_convertAudioFormat(const struct audio_format *inFormat,
const char *inBuffer, size_t inSize,
const struct audio_format *outFormat,
char *outBuffer, ConvState *convState);
char *outBuffer,
struct pcm_convert_state *convState);
size_t pcm_sizeOfConvBuffer(const struct audio_format *inFormat, size_t inSize,
const struct audio_format *outFormat);