aboutsummaryrefslogtreecommitdiffstats
path: root/src/CrossFade.cxx
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/CrossFade.cxx10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/CrossFade.cxx b/src/CrossFade.cxx
index 601d74dc2..e3cc95b0d 100644
--- a/src/CrossFade.cxx
+++ b/src/CrossFade.cxx
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2003-2013 The Music Player Daemon Project
+ * Copyright (C) 2003-2014 The Music Player Daemon Project
* http://www.musicpd.org
*
* This program is free software; you can redistribute it and/or modify
@@ -19,6 +19,7 @@
#include "config.h"
#include "CrossFade.hxx"
+#include "Chrono.hxx"
#include "MusicChunk.hxx"
#include "AudioFormat.hxx"
#include "util/NumberParser.hxx"
@@ -26,8 +27,6 @@
#include "Log.hxx"
#include <assert.h>
-#include <string.h>
-#include <stdlib.h>
static constexpr Domain cross_fade_domain("cross_fade");
@@ -87,7 +86,7 @@ mixramp_interpolate(const char *ramp_list, float required_db)
}
unsigned
-CrossFadeSettings::Calculate(float total_time,
+CrossFadeSettings::Calculate(SignedSongTime total_time,
float replay_gain_db, float replay_gain_prev_db,
const char *mixramp_start, const char *mixramp_prev_end,
const AudioFormat af,
@@ -97,7 +96,8 @@ CrossFadeSettings::Calculate(float total_time,
unsigned int chunks = 0;
float chunks_f;
- if (duration < 0 || duration >= total_time ||
+ if (total_time.IsNegative() ||
+ duration < 0 || duration >= total_time.ToDoubleS() ||
/* we can't crossfade when the audio formats are different */
af != old_format)
return 0;