diff options
author | 2009-07-09 01:34:10 +0200 | |
---|---|---|
committer | 2009-07-09 01:34:10 +0200 | |
commit | 05a29e994a6ab12dfd851cdb2cfb693054f4410f (patch) | |
tree | 205924e7614bbcad573cf2b980b40145065e2ce6 /main.c | |
parent | 6c8c844fb6fdce96b4adbb3d0d174571311951c9 (diff) |
async prebuffering
fixed several critical bugs
fixed playback of some bad mp3s
Diffstat (limited to 'main.c')
-rw-r--r-- | main.c | 13 |
1 files changed, 8 insertions, 5 deletions
@@ -11,6 +11,7 @@ #include "messages.h" #include "gtkplaylist.h" #include "codec.h" +#include "streamer.h" GtkWidget *mainwin; @@ -18,8 +19,6 @@ int psdl_terminate = 0; void psdl_thread (uintptr_t ctx) { - codec_init_locking (); - psdl_init (); psdl_play (); while (!psdl_terminate) { uint32_t msg; @@ -84,14 +83,14 @@ psdl_thread (uintptr_t ctx) { gtkps_update_songinfo (); // handle message pump here } - psdl_free (); - codec_free_locking (); - ps_free (); } int main (int argc, char *argv[]) { messagepump_init (); + codec_init_locking (); + streamer_init (); + psdl_init (); thread_start (psdl_thread, 0); g_thread_init (NULL); @@ -111,5 +110,9 @@ main (int argc, char *argv[]) { gdk_threads_leave (); messagepump_free (); psdl_terminate = 1; + psdl_free (); + streamer_free (); + codec_free_locking (); + ps_free (); return 0; } |