aboutsummaryrefslogtreecommitdiffstats
path: root/src/PlayerThread.cxx
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2013-10-29 00:14:27 +0100
committerMax Kellermann <max@duempel.org>2013-10-29 00:14:27 +0100
commit03747ba93e29d76e664dcc493a21f320117d62d8 (patch)
treeca18def718b109554df01ca4a65ec7a0c8ba9b4e /src/PlayerThread.cxx
parent095c390df736ebff74a0e2a982ef4a1220dea135 (diff)
downloadmpd-03747ba93e29d76e664dcc493a21f320117d62d8.tar.gz
mpd-03747ba93e29d76e664dcc493a21f320117d62d8.tar.xz
mpd-03747ba93e29d76e664dcc493a21f320117d62d8.zip
PlayerControl: move attributes to struct CrossFadeSettings
Diffstat (limited to '')
-rw-r--r--src/PlayerThread.cxx22
1 files changed, 10 insertions, 12 deletions
diff --git a/src/PlayerThread.cxx b/src/PlayerThread.cxx
index 7273a3300..79efe7a9d 100644
--- a/src/PlayerThread.cxx
+++ b/src/PlayerThread.cxx
@@ -779,7 +779,7 @@ Player::PlayNextChunk()
other_chunk->tag);
other_chunk->tag = nullptr;
- if (std::isnan(pc.mixramp_delay_seconds)) {
+ if (std::isnan(pc.cross_fade.mixramp_delay)) {
chunk->mix_ratio = ((float)cross_fade_position)
/ cross_fade_chunks;
} else {
@@ -999,17 +999,15 @@ Player::Run()
calculate how many chunks will be required
for it */
cross_fade_chunks =
- cross_fade_calc(pc.cross_fade_seconds, dc.total_time,
- pc.mixramp_db,
- pc.mixramp_delay_seconds,
- dc.replay_gain_db,
- dc.replay_gain_prev_db,
- dc.GetMixRampStart(),
- dc.GetMixRampPreviousEnd(),
- dc.out_audio_format,
- play_audio_format,
- buffer.GetSize() -
- pc.buffered_before_play);
+ pc.cross_fade.Calculate(dc.total_time,
+ dc.replay_gain_db,
+ dc.replay_gain_prev_db,
+ dc.GetMixRampStart(),
+ dc.GetMixRampPreviousEnd(),
+ dc.out_audio_format,
+ play_audio_format,
+ buffer.GetSize() -
+ pc.buffered_before_play);
if (cross_fade_chunks > 0) {
xfade_state = CrossFadeState::ENABLED;
cross_fading = false;