aboutsummaryrefslogtreecommitdiffstats
path: root/src/output
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2009-02-10 21:30:28 +0100
committerMax Kellermann <max@duempel.org>2009-02-10 21:30:28 +0100
commit744702f266e52defb896b220c7e4eda97cf64b2d (patch)
treeee25c6af2e4d82483cc6b040a5159bfbe3f08fc0 /src/output
parentb27d9e055bb51a4e5eff04c6e9237009d4578c7b (diff)
downloadmpd-744702f266e52defb896b220c7e4eda97cf64b2d.tar.gz
mpd-744702f266e52defb896b220c7e4eda97cf64b2d.tar.xz
mpd-744702f266e52defb896b220c7e4eda97cf64b2d.zip
shout_mp3: use audio_format_frame_size()
Use audio_format_frame_size() instead of channels*audio_format_sample_size().
Diffstat (limited to 'src/output')
-rw-r--r--src/output/shout_mp3.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/output/shout_mp3.c b/src/output/shout_mp3.c
index 0e5d778f7..a4ed37a14 100644
--- a/src/output/shout_mp3.c
+++ b/src/output/shout_mp3.c
@@ -142,11 +142,10 @@ shout_mp3_encoder_encode(struct shout_data *sd, const void *chunk, size_t len)
float *left, *right;
struct shout_buffer *buf = &(sd->buf);
unsigned int samples;
- int bytes = audio_format_sample_size(&sd->audio_format);
struct lame_data *ld = (struct lame_data *)sd->encoder_data;
int bytes_out;
- samples = len / (bytes * sd->audio_format.channels);
+ samples = len / audio_format_sample_size(&sd->audio_format);
left = g_malloc(sizeof(left[0]) * samples);
if (sd->audio_format.channels > 1)
right = g_malloc(sizeof(left[0]) * samples);