Mercurial > audlegacy-plugins
changeset 852:421d5587b761 trunk
[svn] - remove unnecessary sleep code so that out_lame can encode at full speed.
author | yaz |
---|---|
date | Wed, 14 Mar 2007 06:07:57 -0700 |
parents | 712df386597e |
children | def1af87ae1f |
files | ChangeLog src/tta/aud-tta.c |
diffstat | 2 files changed, 17 insertions(+), 12 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog Wed Mar 14 03:16:45 2007 -0700 +++ b/ChangeLog Wed Mar 14 06:07:57 2007 -0700 @@ -1,3 +1,13 @@ +2007-03-14 10:16:45 +0000 Yoshiki Yazawa <yaz@cc.rim.or.jp> + revision [1802] + - add support for mseek. + - fix inaccurate seek position calculation. this bug prevented tta working with cuesheet. + - move to GThread API and make use of GCond signaling. + + trunk/src/tta/aud-tta.c | 188 +++++++++++++++++++++++++++++------------------- + 1 file changed, 117 insertions(+), 71 deletions(-) + + 2007-03-14 06:26:25 +0000 Yoshiki Yazawa <yaz@cc.rim.or.jp> revision [1800] - fix a silly typedef bug.
--- a/src/tta/aud-tta.c Wed Mar 14 03:16:45 2007 -0700 +++ b/src/tta/aud-tta.c Wed Mar 14 06:07:57 2007 -0700 @@ -228,6 +228,9 @@ goto DONE; } + if (!playing) + goto DONE; + if (seek_position == -1) { produce_audio(playback->output->written_time(), ((info.BPS == 8) ? FMT_U8 : FMT_S16_LE), @@ -241,15 +244,6 @@ playback->output->flush (seek_position); seek_position = -1; } - - // sleep for a while - g_get_current_time(&sleep_time); - g_time_val_add(&sleep_time, 10000); - g_mutex_lock(play_mutex); - g_cond_timed_wait(play_cond, play_mutex, &sleep_time); - g_mutex_unlock(play_mutex); - if (!playing) - goto DONE; } // process remaining data @@ -581,7 +575,9 @@ g_cond_signal(play_cond); decode_thread = g_thread_create(play_loop, (gpointer)playback, TRUE, NULL); +#ifdef DEBUG printf("decode_thread = %p\n", decode_thread); +#endif } static void @@ -593,14 +589,13 @@ static void stop (InputPlayback *playback) { - printf("tta: f: stop:\n"); - g_mutex_lock(play_mutex); playing = FALSE; g_mutex_unlock(play_mutex); g_cond_signal(play_cond); +#ifdef DEBUG printf("tta: i: stop: stop signaled\n"); - +#endif if (decode_thread) { g_thread_join(decode_thread); }