From: Atwood, R. C <r.a...@im...> - 2005-01-07 23:55:28
|
Sounds good! If anyone wants my quick fix for 0.20.08, here it is; I = don't think this shoudl break anything and it adds very little overhead, = and of course the message can be removed or relaced with g_print = whatever that is... but if you have fixed the cause for the next version = so much the better. on my system it ALWAYS hangs after playback, a = problem that is hard to miss! so it must be system (sound card? driver = module?) dependent if you or anyone has ever played back a selection = without it hanging. I am guessing that it only plays complete blocks and = reports back only integer multiples of the block size. =20 I now understand why the tool buttons do not respond during this loop, = the control never gets back to the gtk routines. Perhaps it would be a = good idea to include something like this in order to ensure that the = loop terminates eventually? or, set a limit on the number of loops?=20 audio_util.c 901 void stop_playback(int force) 902 { 903 if(!force) { 904 /* Robert altered */ 905 int new_playback =3D audio_device_processed_bytes(); 906 int old_playback; 907 while(new_playback < playback_total_bytes) { 908 /* Robert altered */ 909 //g_print("usleep 100\n") ; 910 usleep(250) ; 911 old_playback =3D new_playback; 912 new_playback=3Daudio_device_processed_bytes(); 913 /* check if more samples have been processed, if = not,quit */ 914 if (old_playback=3D=3Dnew_playback){ 915 fprintf(stderr,"Playback appears frozen\n = Breaking\n"); 916 break; 917 } 918 } 919 usleep(100) ; 920 } 921 audio_state =3D NOTHING ; 922 audio_device_close() ; 923 } -----Original Message----- From: Jeff Welty [mailto:we...@ya...] Sent: Fri 1/7/2005 8:41 PM To: Atwood, Robert C Cc: gwc...@li... Subject: Re: [Gwc-general] gwc-0.20.08 -- hangs after playback Thanks for the bug report. I also caught the hanging problem and have a fix when 0.20-09 is=20 released. What I wanted to achieve with that little loop not closing the audio device prematurely, which I think = is one source of a small clicking sound at the end of playback. I think, though, I haven't got the problem=20 licked, because even though the audio device has receieve all the bytes in it's internal buffer, it hasn't=20 played them all. 0.20-09 will also have a fix for snapping to markers when the markers=20 are close to each other, as well as a lowpass iir filter, and amplify can now mix/crossfade from=20 the left/right channels. jw Atwood, Robert C wrote: > gwc certainly looks like it will serve the purpose of removing one=20 > more reason to run Windows on the machine! However, I experienced one=20 > significant problem already -- the program hangs when it reaches the=20 > end of a selected region upon play back. > > I debugged it, which led me to the following subroutine at=20 > audio_util.c:901 > > > ______________________________________ > void stop_playback(int force) > { > if(!force) { > while(audio_device_processed_bytes() < playback_total_bytes) { > //g_print("usleep 100\n") ; > usleep(250) ; > } > usleep(100) ; > } > audio_state =3D NOTHING ; > audio_device_close() ; > } > ________________________________________ > >=20 |