MPD: player/CrossFade.hxx Source File

MPD 0.20.15

CrossFade.hxx
Go to the documentation of this file.
1 /*
2 * Copyright 2003-2017 The Music Player Daemon Project
3 * http://www.musicpd.org
4 *
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2 of the License, or
8 * (at your option) any later version.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License along
16 * with this program; if not, write to the Free Software Foundation, Inc.,
17 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
18 */
19
20 #ifndef MPD_CROSSFADE_HXX
21 #define MPD_CROSSFADE_HXX
22
23 #include "Compiler.h"
24
25 struct AudioFormat;
26 class SignedSongTime;
27
28 struct CrossFadeSettings {
32 float duration;
33
34 float mixramp_db;
35
40 float mixramp_delay;
41
42 CrossFadeSettings()
43 :duration(0),
44 mixramp_db(0),
45 mixramp_delay(-1)
46 {}
47
48
63 gcc_pure
64 unsigned Calculate(SignedSongTime total_time,
65 float replay_gain_db, float replay_gain_prev_db,
66 const char *mixramp_start,
67 const char *mixramp_prev_end,
68 AudioFormat af, AudioFormat old_format,
69 unsigned max_chunks) const noexcept;
70 };
71
72 #endif
AudioFormat
This structure describes the format of a raw PCM stream.
Definition: AudioFormat.hxx:37
CrossFadeSettings::Calculate
gcc_pure unsigned Calculate(SignedSongTime total_time, float replay_gain_db, float replay_gain_prev_db, const char *mixramp_start, const char *mixramp_prev_end, AudioFormat af, AudioFormat old_format, unsigned max_chunks) const noexcept
Calculate how many music pipe chunks should be used for crossfading.
CrossFadeSettings
Definition: CrossFade.hxx:28
CrossFadeSettings::CrossFadeSettings
CrossFadeSettings()
Definition: CrossFade.hxx:42
Compiler.h
CrossFadeSettings::mixramp_db
float mixramp_db
Definition: CrossFade.hxx:34
SignedSongTime
A variant of SongTime that is based on a signed integer.
Definition: Chrono.hxx:115
CrossFadeSettings::duration
float duration
The configured cross fade duration [s].
Definition: CrossFade.hxx:32
CrossFadeSettings::mixramp_delay
float mixramp_delay
The configured MixRapm delay [s].
Definition: CrossFade.hxx:40
gcc_pure
#define gcc_pure
Definition: Compiler.h:116