aboutsummaryrefslogtreecommitdiffstats
path: root/src/player_thread.c
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2008-11-13 02:06:58 +0100
committerMax Kellermann <max@duempel.org>2008-11-13 02:06:58 +0100
commit66ce1495f07cd065346cdc2067b034e142a0fa96 (patch)
treeec22214c5fa70395b38310c0722db97b9f0c362c /src/player_thread.c
parent998d9a822535e3cb88801487e95acef296cae9a3 (diff)
downloadmpd-66ce1495f07cd065346cdc2067b034e142a0fa96.tar.gz
mpd-66ce1495f07cd065346cdc2067b034e142a0fa96.tar.xz
mpd-66ce1495f07cd065346cdc2067b034e142a0fa96.zip
music_pipe: continuously check the sample format of all chunks
Provide a debug function which asserts on the sample format of all chunks. Call this function in each iteration of the player main loop.
Diffstat (limited to 'src/player_thread.c')
-rw-r--r--src/player_thread.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/player_thread.c b/src/player_thread.c
index 21bb61da6..9a606d7d9 100644
--- a/src/player_thread.c
+++ b/src/player_thread.c
@@ -344,6 +344,12 @@ static void do_play(void)
}
}
+#ifndef NDEBUG
+ music_pipe_check_format(&play_audio_format,
+ player.next_song_chunk,
+ &dc.out_audio_format);
+#endif
+
if (decoder_is_idle() && !player.queued &&
pc.next_song != NULL &&
pc.command == PLAYER_COMMAND_NONE) {