aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/decoder_internal.h2
-rw-r--r--src/output_init.c2
-rw-r--r--src/output_internal.h2
-rw-r--r--src/pcm_utils.c8
-rw-r--r--src/pcm_utils.h7
5 files changed, 12 insertions, 9 deletions
diff --git a/src/decoder_internal.h b/src/decoder_internal.h
index 174ca019d..ee8f23b8b 100644
--- a/src/decoder_internal.h
+++ b/src/decoder_internal.h
@@ -25,7 +25,7 @@
struct decoder {
struct decoder_plugin *plugin;
- ConvState conv_state;
+ struct pcm_convert_state conv_state;
bool seeking;
};
diff --git a/src/output_init.c b/src/output_init.c
index 6274daa81..cf50db3ad 100644
--- a/src/output_init.c
+++ b/src/output_init.c
@@ -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)) {
diff --git a/src/output_internal.h b/src/output_internal.h
index bb5ee43f5..fc146546a 100644
--- a/src/output_internal.h
+++ b/src/output_internal.h
@@ -65,7 +65,7 @@ struct audio_output {
*/
struct audio_format reqAudioFormat;
- ConvState convState;
+ struct pcm_convert_state convState;
char *convBuffer;
size_t convBufferLen;
diff --git a/src/pcm_utils.c b/src/pcm_utils.c
index 200c657de..d80291088 100644
--- a/src/pcm_utils.c
+++ b/src/pcm_utils.c
@@ -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;
diff --git a/src/pcm_utils.h b/src/pcm_utils.h
index 59ced1331..4041e2f64 100644
--- a/src/pcm_utils.h
+++ b/src/pcm_utils.h
@@ -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);