From 8b19c74e8eb0036c697010d56ed1ee9b92facb72 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Wed, 7 Jan 2009 18:19:22 +0100 Subject: pcm_format: pass struct pcm_dither_24 to pcm_convert_to_16() The function does not need the full pcm_convert_state struct. --- src/pcm_format.c | 6 +++--- src/pcm_format.h | 4 ++-- src/pcm_utils.c | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) (limited to 'src') diff --git a/src/pcm_format.c b/src/pcm_format.c index 9e6f42265..16d9673d4 100644 --- a/src/pcm_format.c +++ b/src/pcm_format.c @@ -17,7 +17,7 @@ */ #include "pcm_format.h" -#include "pcm_utils.h" +#include "pcm_dither.h" #include @@ -40,7 +40,7 @@ pcm_convert_24_to_16(struct pcm_dither_24 *dither, } const int16_t * -pcm_convert_to_16(struct pcm_convert_state *convert, +pcm_convert_to_16(struct pcm_dither_24 *dither, uint8_t bits, const void *src, size_t src_size, size_t *dest_size_r) { @@ -74,7 +74,7 @@ pcm_convert_to_16(struct pcm_convert_state *convert, buf = g_realloc(buf, len); } - pcm_convert_24_to_16(&convert->dither, + pcm_convert_24_to_16(dither, (int16_t *)buf, (const int32_t *)src, num_samples); diff --git a/src/pcm_format.h b/src/pcm_format.h index 2c52adea3..7304963f4 100644 --- a/src/pcm_format.h +++ b/src/pcm_format.h @@ -22,10 +22,10 @@ #include #include -struct pcm_convert_state; +struct pcm_dither_24; const int16_t * -pcm_convert_to_16(struct pcm_convert_state *convert, +pcm_convert_to_16(struct pcm_dither_24 *dither, uint8_t bits, const void *src, size_t src_size, size_t *dest_size_r); diff --git a/src/pcm_utils.c b/src/pcm_utils.c index 3e66edef2..69add6073 100644 --- a/src/pcm_utils.c +++ b/src/pcm_utils.c @@ -51,7 +51,7 @@ pcm_convert_16(const struct audio_format *src_format, assert(dest_format->bits == 16); - buf = pcm_convert_to_16(state, src_format->bits, + buf = pcm_convert_to_16(&state->dither, src_format->bits, src_buffer, src_size, &len); if (!buf) g_error("pcm_convert_to_16() failed"); -- cgit v1.2.3