pcm/PcmMix: improved dithering

Use the existing PcmDither library.
This commit is contained in:
Max Kellermann
2013-12-28 17:42:03 +01:00
parent afcf0795c4
commit da29298d4d
5 changed files with 48 additions and 25 deletions

View File

@@ -392,7 +392,7 @@ ao_filter_chunk(struct audio_output *ao, const struct music_chunk *chunk,
void *dest = ao->cross_fade_buffer.Get(other_length);
memcpy(dest, other_data, other_length);
if (!pcm_mix(dest, data, length,
if (!pcm_mix(ao->cross_fade_dither, dest, data, length,
ao->in_audio_format.format,
1.0 - chunk->mix_ratio)) {
FormatError(output_domain,