diff options
Diffstat (limited to 'src/crossfade.c')
-rw-r--r-- | src/crossfade.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/crossfade.c b/src/crossfade.c index 01552bf65..57a6c0d13 100644 --- a/src/crossfade.c +++ b/src/crossfade.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2003-2009 The Music Player Daemon Project + * Copyright (C) 2003-2010 The Music Player Daemon Project * http://www.musicpd.org * * This program is free software; you can redistribute it and/or modify @@ -17,6 +17,7 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ +#include "config.h" #include "crossfade.h" #include "pcm_mix.h" #include "chunk.h" @@ -39,9 +40,7 @@ unsigned cross_fade_calc(float duration, float total_time, return 0; assert(duration > 0); - assert(af->bits > 0); - assert(af->channels > 0); - assert(af->sample_rate > 0); + assert(audio_format_valid(af)); chunks = audio_format_time_to_size(af) / CHUNK_SIZE; chunks = (chunks * duration + 0.5); |