diff options
Diffstat (limited to 'src/CrossFade.cxx')
-rw-r--r-- | src/CrossFade.cxx | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/CrossFade.cxx b/src/CrossFade.cxx index 253038b26..4f5ff32ca 100644 --- a/src/CrossFade.cxx +++ b/src/CrossFade.cxx @@ -20,7 +20,7 @@ #include "config.h" #include "CrossFade.hxx" #include "MusicChunk.hxx" -#include "audio_format.h" +#include "AudioFormat.hxx" #include "Tag.hxx" #include <cmath> @@ -97,8 +97,8 @@ unsigned cross_fade_calc(float duration, float total_time, float mixramp_db, float mixramp_delay, float replay_gain_db, float replay_gain_prev_db, char *mixramp_start, char *mixramp_prev_end, - const struct audio_format *af, - const struct audio_format *old_format, + const AudioFormat af, + const AudioFormat old_format, unsigned max_chunks) { unsigned int chunks = 0; @@ -107,13 +107,13 @@ unsigned cross_fade_calc(float duration, float total_time, if (duration < 0 || duration >= total_time || /* we can't crossfade when the audio formats are different */ - !audio_format_equals(af, old_format)) + af != old_format) return 0; assert(duration >= 0); - assert(audio_format_valid(af)); + assert(af.IsValid()); - chunks_f = (float)audio_format_time_to_size(af) / (float)CHUNK_SIZE; + chunks_f = (float)af.GetTimeToSize() / (float)CHUNK_SIZE; if (std::isnan(mixramp_delay) || !mixramp_start || !mixramp_prev_end) { chunks = (chunks_f * duration + 0.5); |