MPD
Functions
crossfade.h File Reference

Go to the source code of this file.

Functions

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, unsigned max_chunks)
 Calculate how many music pipe chunks should be used for crossfading.
 

Function Documentation

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,
unsigned  max_chunks 
)

Calculate how many music pipe chunks should be used for crossfading.

Parameters
durationthe requested crossfade duration
total_timetotal_time the duration of the new song
mixramp_dbthe current mixramp_db setting
mixramp_delaythe current mixramp_delay setting
replay_gain_dbthe ReplayGain adjustment used for this song
replay_gain_prev_dbthe ReplayGain adjustment used on the last song
mixramp_startthe next songs mixramp_start tag
mixramp_prev_endthe last songs mixramp_end setting
afthe audio format of the new song
old_formatthe audio format of the current song
max_chunksthe maximum number of chunks
Returns
the number of chunks for crossfading, or 0 if cross fading should be disabled for this song change