decoder/{dsf,dsdiff}: fix displayed bit rate

The formula did not consider the channel count.

Closes https://github.com/MusicPlayerDaemon/MPD/issues/639
This commit is contained in:
Max Kellermann 2019-09-08 12:45:05 +02:00
parent 193e637dd9
commit 0da9c91af2
3 changed files with 4 additions and 2 deletions

2
NEWS
View File

@ -1,4 +1,6 @@
ver 0.21.15 (not yet released)
* decoder
- dsdiff, dsf: fix displayed bit rate
ver 0.21.14 (2019/08/21)
* decoder

View File

@ -408,7 +408,7 @@ dsdiff_decode_chunk(DecoderClient &client, InputStream &is,
bit_reverse_buffer(buffer, buffer + nbytes);
cmd = client.SubmitData(is, buffer, nbytes,
sample_rate / 1000);
channels * sample_rate / 1000);
}
return true;

View File

@ -291,7 +291,7 @@ dsf_decode_chunk(DecoderClient &client, InputStream &is,
cmd = client.SubmitData(is,
interleaved_buffer, block_size,
sample_rate / 1000);
channels * sample_rate / 1000);
++i;
}