From 5399a72ec1141307e79970993e4a90a8d643ac50 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Sun, 2 May 2010 15:31:31 +0200 Subject: player_thread: move cross-fading to output thread Remove cross_fade_apply(), and call pcm_mix() in the output thread, mixing the chunk and chunk->other together. --- src/chunk.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/chunk.h') diff --git a/src/chunk.h b/src/chunk.h index a5fdda429..02e7b3650 100644 --- a/src/chunk.h +++ b/src/chunk.h @@ -50,6 +50,12 @@ struct music_chunk { */ struct music_chunk *other; + /** + * The current mix ratio for cross-fading: 1.0 means play 100% + * of this chunk, 0.0 means play 100% of the "other" chunk. + */ + float mix_ratio; + /** number of bytes stored in this chunk */ uint16_t length; -- cgit v1.2.3