diff options
author | Max Kellermann <max@duempel.org> | 2008-11-12 07:02:06 +0100 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2008-11-12 07:02:06 +0100 |
commit | 1414a3de4c67a1295a2149554c1759bc213d901e (patch) | |
tree | f086f95f4ef41b0d28035250b9bc73f68277650d /src | |
parent | 06c60888dc982ad66526fbe14aa21318e7d62958 (diff) | |
download | mpd-1414a3de4c67a1295a2149554c1759bc213d901e.tar.gz mpd-1414a3de4c67a1295a2149554c1759bc213d901e.tar.xz mpd-1414a3de4c67a1295a2149554c1759bc213d901e.zip |
mpc: declare buffer as int32_t[]
The buffer is always casted to int32_t* anyway; declare it as int32_t
array, and remove the cast.
Diffstat (limited to 'src')
-rw-r--r-- | src/decoder/mpc_plugin.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/decoder/mpc_plugin.c b/src/decoder/mpc_plugin.c index 2496f51a9..c4142555b 100644 --- a/src/decoder/mpc_plugin.c +++ b/src/decoder/mpc_plugin.c @@ -110,10 +110,10 @@ mpc_decode(struct decoder *mpd_decoder, struct input_stream *inStream) long ret; #define MPC_CHUNK_SIZE 4096 - char chunk[MPC_CHUNK_SIZE]; + int32_t chunk[MPC_CHUNK_SIZE / sizeof(int32_t)]; int chunkpos = 0; long bitRate = 0; - int32_t *dest = (int32_t *) chunk; + int32_t *dest = chunk; unsigned long samplePos = 0; mpc_uint32_t vbrUpdateAcc; mpc_uint32_t vbrUpdateBits; @@ -166,7 +166,7 @@ mpc_decode(struct decoder *mpd_decoder, struct input_stream *inStream) samplePos = decoder_seek_where(mpd_decoder) * audio_format.sample_rate; if (mpc_decoder_seek_sample(&decoder, samplePos)) { - dest = (int32_t *)chunk; + dest = chunk; chunkpos = 0; decoder_command_finished(mpd_decoder); } else @@ -203,7 +203,7 @@ mpc_decode(struct decoder *mpd_decoder, struct input_stream *inStream) bitRate, replayGainInfo); chunkpos = 0; - dest = (int32_t *)chunk; + dest = chunk; if (decoder_get_command(mpd_decoder) == DECODE_COMMAND_STOP) break; } |