crossfade: don't use isCurrentAudioFormat()

The crossfading code shouldn't depend on the audio output code.  Pass
the current audio format to cross_fade_calc() and let it compare
directly, instead of using isCurrentAudioFormat().
This commit is contained in:
Max Kellermann
2009-02-10 18:51:29 +01:00
parent 34244398d0
commit 2a388c2aa7
3 changed files with 5 additions and 2 deletions

View File

@@ -403,6 +403,7 @@ static void do_play(void)
crossFadeChunks =
cross_fade_calc(pc.cross_fade_seconds, dc.total_time,
&dc.out_audio_format,
&play_audio_format,
music_pipe_size() -
pc.buffered_before_play);
if (crossFadeChunks > 0) {