aboutsummaryrefslogtreecommitdiffstats
path: root/src/player_control.c
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2009-03-06 00:42:03 +0100
committerMax Kellermann <max@duempel.org>2009-03-06 00:42:03 +0100
commit01cf7feac7bef8b28605b98ef1e7438a995fc554 (patch)
treee1c4b7f5d0550d60d7fda8b4909353a47490fa4e /src/player_control.c
parent000b2d4f3a9c4f761ab918aaff4705621bb8559f (diff)
downloadmpd-01cf7feac7bef8b28605b98ef1e7438a995fc554.tar.gz
mpd-01cf7feac7bef8b28605b98ef1e7438a995fc554.tar.xz
mpd-01cf7feac7bef8b28605b98ef1e7438a995fc554.zip
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.
Diffstat (limited to 'src/player_control.c')
-rw-r--r--src/player_control.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/player_control.c b/src/player_control.c
index 5d95fb093..4dfc810c1 100644
--- a/src/player_control.c
+++ b/src/player_control.c
@@ -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;