Re: [AD] kcm audio segfault

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


On 2009-08-03, Peter Wang <novalazy@xxxxxxxxxx> wrote:
> On 2009-08-02, Trent Gamblin <trent@xxxxxxxxxx> wrote:
> > I tried tracking this one down myself but I'm having problems. I've attached the example, it
> > doesn't really matter what oggs you use but if you want I can upload them somewhere if you want to
> > test. This simple example causes a segfault. There seems to be some sort of memory corruption
> > going on somewhere. I've tested it on Wiz (OSS) and OS X (OpenAL) and it fails on both.
...
> 
> Which seems to be a simple case of the sample still being played
> when al_destroy_sample is called.  Obviously that should be fixed

Actually, it's not obvious at all.  A sample can be referenced by
multiple sample instances so it will be quite complicated to do that.

The user should probably be responsible for stopping sample instances
before destroying samples which might be referenced.  Often it will
just be a matter of calling al_stop_samples() before destroying
samples at the end of a program.

Peter




Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/