Re: [AD] get_audio_stream_buffer |
[ Thread Index |
Date Index
| More lists.liballeg.org/allegro-developers Archives
]
On Sun, 2004-07-25 at 15:32 +0300, Serge Semashko wrote:
> Chris wrote:
>
> >> As nobody else can reproduce the problem, that could probably be
> >> compiler optimization bugs.
> >
> > What happens if you just use plain audio streams? If there isn't a
> > problem with using just them, then the problem is with DUMB/DUMBOGG
> > (BTW, Ben Davis said there might be some problems between the latest
> > DUMB and DUMBOGG.. that could be the problem too)..
>
> A good suggestion. I have tested 'exstream.c' example included in
> Allegro distributive. After running it for a very long time, this
> problem shows up here too, so it is not related with DUMB or DUMBOGG.
> Sympthoms are the same, the sound changes to noise and this demo example
> stops reacting at keyboard input (it can't be stopped using ESC key as
> usually).
>
> Once again, I would like anybody who is running Linux try to check if
> this bug affects him too, or I'm just fighting with the windmills. Just
> start exstream.c example in the evening, turn off speakers and go to
> sleep. When you wake up in the morning, turn the speakers on and check
> if you have the symptoms described above.
>
> I made a quick look at Allegro sources. There is a function oss_update
> in uoss.c. If I get it right, it is periodically called to feed data to
> oss to produce sound. Maybe there are some race conditions and if this
> function is called when my code is inside of get_audio_stream_buffer,
> something bad can happen? I did not see any thread synchronization code
> in get_audio_stream_buffer function.
>
Could be, it sounds a lot like a race condition. Which means, it is hard
to track down. Since it seems you are the only one who can reproduce it,
coud you try a debug build, then run it in gdb, and when the problem
occurs, gdb might give some useful information.
Once the problem occurs, get into gdb with ctrl-c, and I don't know, try
"info threads" and "bt" - maybe something gives a hint what is wrong.
(I let your last example run for 5 hours btw, and no change.)
--
Elias Pschernig