# HG changeset patch # User nenolod # Date 1159682949 25200 # Node ID d435a3abc035e533b53a78bc9057baa9a44d0a20 # Parent 41e2dc106f4e11ea67d6ac1954dc6d8197d5ab24 [svn] - set alac::going before we fork the decoder thread off, this stops the core from getting confused diff -r 41e2dc106f4e -r d435a3abc035 ChangeLog --- a/ChangeLog Sat Sep 30 22:57:56 2006 -0700 +++ b/ChangeLog Sat Sep 30 23:09:09 2006 -0700 @@ -1,3 +1,12 @@ +2006-10-01 05:57:56 +0000 William Pitcock + revision [134] + - remove spurious debugging notices + + trunk/src/alac/demux.c | 88 +++--------------------------------------------- + trunk/src/alac/plugin.c | 27 +------------- + 2 files changed, 9 insertions(+), 106 deletions(-) + + 2006-10-01 05:44:36 +0000 William Pitcock revision [132] - get_time() implementation diff -r 41e2dc106f4e -r d435a3abc035 src/alac/plugin.c --- a/src/alac/plugin.c Sat Sep 30 22:57:56 2006 -0700 +++ b/src/alac/plugin.c Sat Sep 30 23:09:09 2006 -0700 @@ -88,11 +88,13 @@ static void play_file(char *filename) { + going = 1; playback_thread = g_thread_create(decode_thread, filename, TRUE, NULL); } static void stop(void) { + going = 0; g_thread_join(playback_thread); output_close_audio(); } @@ -179,7 +181,7 @@ buffer = malloc(buffer_size); - for (i = 0; i < demux_res->num_sample_byte_sizes; i++) + for (i = 0; i < demux_res->num_sample_byte_sizes && going == 1; i++) { uint32_t sample_duration; uint32_t sample_byte_size; @@ -239,8 +241,6 @@ alac_ip.output->open_audio(FMT_S16_LE, demux_res.sample_rate, demux_res.num_channels); alac_ip.set_info((char *) args, -1, -1, demux_res.sample_rate, demux_res.num_channels); - going = 1; - /* will convert the entire buffer */ GetBuffer(&demux_res);