wavpack: redo using audio_format_frame_size()

Somehow we lost 600e1322 after renaming some variables in ed6f6046.
This commit is contained in:
Laszlo Ashin 2008-11-19 00:02:06 +01:00
parent 362ca300d6
commit 05f4629fa3
1 changed files with 1 additions and 6 deletions

View File

@ -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);