aboutsummaryrefslogtreecommitdiffstats
path: root/src/inputPlugins
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2008-08-26 08:27:13 +0200
committerMax Kellermann <max@duempel.org>2008-08-26 08:27:13 +0200
commit9c823d67a74e694c961faff0f1f35fb196e78887 (patch)
tree91658d3d1ae2d6ca4b3a6b4fa5903061304b197c /src/inputPlugins
parent2a9608536c83373ae43c395176c5b41c5a5b5dec (diff)
downloadmpd-9c823d67a74e694c961faff0f1f35fb196e78887.tar.gz
mpd-9c823d67a74e694c961faff0f1f35fb196e78887.tar.xz
mpd-9c823d67a74e694c961faff0f1f35fb196e78887.zip
mp3: changed outputBuffer's type to mpd_sint16[]
The output buffer always contains mpd_sint16; declaring it with that type saves several casts.
Diffstat (limited to '')
-rw-r--r--src/inputPlugins/mp3_plugin.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/inputPlugins/mp3_plugin.c b/src/inputPlugins/mp3_plugin.c
index beb59ea7e..2aa7798f1 100644
--- a/src/inputPlugins/mp3_plugin.c
+++ b/src/inputPlugins/mp3_plugin.c
@@ -142,7 +142,7 @@ static int mp3_plugin_init(void)
/* decoder stuff is based on madlld */
-#define MP3_DATA_OUTPUT_BUFFER_SIZE 4096
+#define MP3_DATA_OUTPUT_BUFFER_SIZE 2048
typedef struct _mp3DecodeData {
struct mad_stream stream;
@@ -150,7 +150,7 @@ typedef struct _mp3DecodeData {
struct mad_synth synth;
mad_timer_t timer;
unsigned char readBuffer[READ_BUFFER_SIZE];
- char outputBuffer[MP3_DATA_OUTPUT_BUFFER_SIZE];
+ mpd_sint16 outputBuffer[MP3_DATA_OUTPUT_BUFFER_SIZE];
float totalTime;
float elapsedTime;
int muteFrame;
@@ -933,7 +933,7 @@ static int mp3Read(mp3DecodeData * data, struct decoder *decoder,
i += num_samples;
- num_samples = dither_buffer((mpd_sint16 *) data->outputBuffer,
+ num_samples = dither_buffer(data->outputBuffer,
&data->synth, &data->dither,
i - num_samples, i,
MAD_NCHANNELS(&(data->frame).header));