aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2014-11-10 09:00:38 +0100
committerMax Kellermann <max@duempel.org>2014-11-10 09:00:38 +0100
commit2e47cb12c4f1ee54f37ac2b72bfde23e864b3cbd (patch)
treeb18890e9b93c7099ba7077578d01433dcfb94170 /test
parentff6f1655f0441f2fa8a1947bf242ea2cce6ba7a7 (diff)
downloadmpd-2e47cb12c4f1ee54f37ac2b72bfde23e864b3cbd.tar.gz
mpd-2e47cb12c4f1ee54f37ac2b72bfde23e864b3cbd.tar.xz
mpd-2e47cb12c4f1ee54f37ac2b72bfde23e864b3cbd.zip
test/FakeDecoderAPI: dump bit rate
Diffstat (limited to 'test')
-rw-r--r--test/FakeDecoderAPI.cxx6
1 files changed, 6 insertions, 0 deletions
diff --git a/test/FakeDecoderAPI.cxx b/test/FakeDecoderAPI.cxx
index dcc78125b..3c7453a4f 100644
--- a/test/FakeDecoderAPI.cxx
+++ b/test/FakeDecoderAPI.cxx
@@ -132,6 +132,12 @@ decoder_data(gcc_unused Decoder &decoder,
const void *data, size_t datalen,
gcc_unused uint16_t kbit_rate)
{
+ static uint16_t prev_kbit_rate;
+ if (kbit_rate != prev_kbit_rate) {
+ prev_kbit_rate = kbit_rate;
+ fprintf(stderr, "%u kbit/s\n", kbit_rate);
+ }
+
gcc_unused ssize_t nbytes = write(1, data, datalen);
return DecoderCommand::NONE;
}