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:
Max Kellermann
2009-03-06 00:42:03 +01:00
parent 000b2d4f3a
commit 01cf7feac7
15 changed files with 433 additions and 417 deletions

View File

@@ -31,7 +31,6 @@
#include "conf.h"
#include "path.h"
#include "mapper.h"
#include "pipe.h"
#include "chunk.h"
#include "decoder_control.h"
#include "player_control.h"
@@ -179,8 +178,7 @@ initialize_decoder_and_player(void)
if (buffered_before_play > buffered_chunks)
buffered_before_play = buffered_chunks;
pc_init(buffered_before_play);
music_pipe_init(buffered_chunks, &pc.notify);
pc_init(buffered_chunks, buffered_before_play);
dc_init();
}
@@ -333,7 +331,6 @@ int main(int argc, char *argv[])
#ifdef ENABLE_ARCHIVE
archive_plugin_deinit_all();
#endif
music_pipe_free();
config_global_finish();
tag_pool_deinit();
songvec_deinit();