diff options
author | Max Kellermann <max@duempel.org> | 2008-11-30 14:21:40 +0100 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2008-11-30 14:21:40 +0100 |
commit | a7b692a1df0a064350b6746f3ca207e1f288822c (patch) | |
tree | 29ec7de495f5d4c116b59c89290fac806c5c1e5c /src | |
parent | 655ba6a637b218d22adf5f4f3fe38c8a737dd62e (diff) | |
download | mpd-a7b692a1df0a064350b6746f3ca207e1f288822c.tar.gz mpd-a7b692a1df0a064350b6746f3ca207e1f288822c.tar.xz mpd-a7b692a1df0a064350b6746f3ca207e1f288822c.zip |
shout_mp3: cast input buffer to int16_t*
It's easier to work with an int16_t* pointer here.
Diffstat (limited to 'src')
-rw-r--r-- | src/output/shout_mp3.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/output/shout_mp3.c b/src/output/shout_mp3.c index c6b451953..5063470d7 100644 --- a/src/output/shout_mp3.c +++ b/src/output/shout_mp3.c @@ -131,6 +131,7 @@ static int shout_mp3_encoder_send_metadata(struct shout_data *sd, static int shout_mp3_encoder_encode(struct shout_data *sd, const char * chunk, size_t len) { + const int16_t *src = (const int16_t*)chunk; unsigned int i; int j; float (*lamebuf)[2]; @@ -148,8 +149,7 @@ static int shout_mp3_encoder_encode(struct shout_data *sd, for (i = 0; i < samples; i++) { for (j = 0; j < sd->audio_format.channels; j++) { - lamebuf[j][i] = *((const int16_t *) chunk); - chunk += bytes; + lamebuf[j][i] = *src++; } } |