MPD: CrossFadeSettings Struct Reference

MPD 0.20.15

Public Member Functions | Data Fields
CrossFadeSettings Struct Reference

`#include <CrossFade.hxx>`

## Public Member Functions
| CrossFadeSettings ()
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. More...

## Data Fields
float | duration
| The configured cross fade duration [s]. More...
float | mixramp_db
float | mixramp_delay
| The configured MixRapm delay [s]. More...

## Detailed Description

Definition at line 28 of file CrossFade.hxx.

## Constructor & Destructor Documentation

## ◆ CrossFadeSettings()

CrossFadeSettings::CrossFadeSettings | ( |  | ) |
| inline

Definition at line 42 of file CrossFade.hxx.

## Member Function Documentation

## ◆ Calculate()

gcc_pure unsigned CrossFadeSettings::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.

Parameters

  total_time | total_time the duration of the new song
  replay_gain_db | the ReplayGain adjustment used for this song
  replay_gain_prev_db | the ReplayGain adjustment used on the last song
  mixramp_start | the next songs mixramp_start tag
  mixramp_prev_end | the last songs mixramp_end setting
  af | the audio format of the new song
  old_format | the audio format of the current song
  max_chunks | the maximum number of chunks

Returns
  the number of chunks for crossfading, or 0 if cross fading should be disabled for this song change

## Field Documentation

## ◆ duration

float CrossFadeSettings::duration

The configured cross fade duration [s].

Definition at line 32 of file CrossFade.hxx.

## ◆ mixramp_db

float CrossFadeSettings::mixramp_db

Definition at line 34 of file CrossFade.hxx.

## ◆ mixramp_delay

float CrossFadeSettings::mixramp_delay

The configured MixRapm delay [s].

A non-positive value disables MixRamp.

Definition at line 40 of file CrossFade.hxx.

The documentation for this struct was generated from the following file:

- player/CrossFade.hxx