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:
@@ -30,8 +30,9 @@
|
||||
|
||||
struct player_control pc;
|
||||
|
||||
void pc_init(unsigned int buffered_before_play)
|
||||
void pc_init(unsigned buffer_chunks, unsigned int buffered_before_play)
|
||||
{
|
||||
pc.buffer_chunks = buffer_chunks;
|
||||
pc.buffered_before_play = buffered_before_play;
|
||||
notify_init(&pc.notify);
|
||||
pc.command = PLAYER_COMMAND_NONE;
|
||||
|
||||
Reference in New Issue
Block a user