src/crossfade.h File Reference
Go to the source code of this file.
Function Documentation
Applies cross fading to two chunks, i.e.
mixes these chunks. Internally, this calls pcm_mix().
- Parameters:
-
| a | the chunk in the current song (and the destination chunk) |
| b | the according chunk in the new song |
| format | the audio format of both chunks (must be the same) |
| current_chunk | the relative index of the current chunk |
| num_chunks | the number of chunks used for cross fading |
unsigned cross_fade_calc |
( |
float |
duration, |
|
|
float |
total_time, |
|
|
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:
-
| duration | the requested crossfade duration |
| total_time | total_time the duration of the new song |
| 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