From 44d9f62f34e0561d83ea32941f0ea1b529b1490d Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Sat, 16 Aug 2008 09:28:15 -0700 Subject: core rewrite (decode,player,outputBuffer,playlist) This is a huge refactoring of the core mpd process. The queueing/buffering mechanism is heavily reworked. The player.c code has been merged into outputBuffer (the actual ring buffering logic is handled by ringbuf.c); and decode.c actually handles decoding stuff. The end result is several hundreds of lines shorter, even though we still have a lot of DEBUG statements left in there for tracing and a lot of assertions, too. --- src/main.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'src/main.c') diff --git a/src/main.c b/src/main.c index a838d0349..e02085294 100644 --- a/src/main.c +++ b/src/main.c @@ -20,7 +20,6 @@ #include "command.h" #include "playlist.h" #include "directory.h" -#include "player.h" #include "listen.h" #include "conf.h" #include "path.h" @@ -45,6 +44,7 @@ #include "zeroconf.h" #include "main_notify.h" #include "os_compat.h" +#include "outputBuffer.h" #define SYSTEM_CONFIG_FILE_LOCATION "/etc/mpd.conf" #define USER_CONFIG_FILE_LOCATION "/.mpdconf" @@ -431,8 +431,7 @@ int main(int argc, char *argv[]) initZeroconf(); openVolumeDevice(); - decoderInit(); - playerInit(); + decoder_init(); read_state_file(); while (COMMAND_RETURN_KILL != doIOForInterfaces() && @@ -443,7 +442,7 @@ int main(int argc, char *argv[]) } write_state_file(); - playerKill(); + ob_trigger_action(OB_ACTION_PAUSE_SET); finishZeroconf(); freeAllInterfaces(); closeAllListenSockets(); -- cgit v1.2.3