From 600e13228020d34b8f32826e25c222566a1fdeda Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Wed, 12 Nov 2008 21:25:02 +0100 Subject: wavpack: calculate outsamplesize with audio_format_frame_size() --- src/decoder/wavpack_plugin.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'src/decoder') diff --git a/src/decoder/wavpack_plugin.c b/src/decoder/wavpack_plugin.c index 7d649a940..2051da0ad 100644 --- a/src/decoder/wavpack_plugin.c +++ b/src/decoder/wavpack_plugin.c @@ -158,11 +158,7 @@ wavpack_decode(struct decoder * decoder, WavpackContext *wpc, bool canseek, allsamples = WavpackGetNumSamples(wpc); bytes_per_sample = WavpackGetBytesPerSample(wpc); - outsamplesize = bytes_per_sample; - if (outsamplesize == 3) { - outsamplesize = 4; - } - outsamplesize *= audio_format.channels; + outsamplesize = audio_format_frame_size(&audio_format); /* wavpack gives us all kind of samples in a 32-bit space */ samplesreq = sizeof(chunk) / (4 * audio_format.channels); -- cgit v1.2.3