pipe: added music_buffer, rewrite music_pipe
Turn the music_pipe into a simple music_chunk queue. The music_chunk allocation code is moved to music_buffer, and is now managed with a linked list instead of a ring buffer. Two separate music_pipe objects are used by the decoder for the "current" and the "next" song, which greatly simplifies the cross-fading code.
This commit is contained in:
@@ -66,6 +66,12 @@ struct decoder_control {
|
||||
struct song *current_song;
|
||||
struct song *next_song;
|
||||
float total_time;
|
||||
|
||||
/** the #music_chunk allocator */
|
||||
struct music_buffer *buffer;
|
||||
|
||||
/** the destination pipe for decoded chunks */
|
||||
struct music_pipe *pipe;
|
||||
};
|
||||
|
||||
extern struct decoder_control dc;
|
||||
|
Reference in New Issue
Block a user