aboutsummaryrefslogtreecommitdiffstats
path: root/src/decoder
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/decoder/wavpack_plugin.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/src/decoder/wavpack_plugin.c b/src/decoder/wavpack_plugin.c
index 224895f25..377174e51 100644
--- a/src/decoder/wavpack_plugin.c
+++ b/src/decoder/wavpack_plugin.c
@@ -157,12 +157,7 @@ wavpack_decode(struct decoder *decoder, WavpackContext *wpc, bool can_seek,
total_time = WavpackGetNumSamples(wpc);
total_time /= audio_format.sample_rate;
bytes_per_sample = WavpackGetBytesPerSample(wpc);
-
- output_sample_size = bytes_per_sample;
- if (output_sample_size == 3) {
- output_sample_size = 4;
- }
- output_sample_size *= audio_format.channels;
+ output_sample_size = audio_format_frame_size(&audio_format);
/* wavpack gives us all kind of samples in a 32-bit space */
samples_requested = sizeof(chunk) / (4 * audio_format.channels);