# HG changeset patch # User nenolod # Date 1130910820 28800 # Node ID 4b2b964a7694869a0e1798ea811a9a207e8db987 # Parent e42694a283319bdcb3ffa2e9ee026afc2f2e77b1 [svn] What i have right now is this. diff -r e42694a28331 -r 4b2b964a7694 Plugins/Input/console/Audacious_Driver.cpp --- a/Plugins/Input/console/Audacious_Driver.cpp Tue Nov 01 21:34:11 2005 -0800 +++ b/Plugins/Input/console/Audacious_Driver.cpp Tue Nov 01 21:53:40 2005 -0800 @@ -55,6 +55,8 @@ title = g_strdup(header.song); + printf("song title is: %s\n", title); + return title; } @@ -62,6 +64,8 @@ { (*title) = get_title(filename); (*length) = -1; + + printf("get_song_info() finished\n"); } static void play_file(char *filename) @@ -77,7 +81,9 @@ spc->load(header, reader); spc->start_track(0); - decode_thread = g_thread_create(play_loop, NULL, FALSE, NULL); + decode_thread = g_thread_create(play_loop, spc, TRUE, NULL); + + printf("decode_thread started.\n"); } static void seek(gint time) @@ -136,15 +142,22 @@ static void *play_loop(gpointer arg) { + Spc_Emu *my_spc = (Spc_Emu *) arg; Music_Emu::sample_t buf[1024]; - while (spc->play(1024, buf)) + printf("inside decode_thread, my_spc = %p, spc = %p\n", my_spc, spc); + + do { + printf("buf = %s\n", buf); produce_audio(console_ip.output->written_time(), FMT_S16_LE, 2, 1024, (char *) buf, NULL); + printf("writing audio to output device\n"); xmms_usleep(100000); - } + } while (my_spc->play(1024, buf)); + + printf("we're through in decode_thread, cleaning up\n"); delete spc; g_thread_exit(NULL);