[quake2] memory allocation in snd_alsa.c
Brendan Burns
brendanburns at attbi.com
Mon Feb 2 10:40:11 EST 2004
Hmm, snd_alsa works for me, but I've had crash reports too, that's
probably the reason... I'll look into that tonight and fix it...
thanks!
--brendan
On Sunday, February 1, 2004, at 09:20 AM, Jamie Wilkinson wrote:
> I wrote a libao output driver last night, and was looking at snd_alsa
> for clues, but noticed that despite dma.buffer being pointed to buffer,
> neither of them were actually getting allocated. I then looked at
> snd_arts.c, which it looks like snd_alsa.c was derived from, and that
> actually does malloc some space for buffer. There's also a free in
> SNDDMA_Shutdown which will probably crash.
>
> Does snd_alsa.c actually work? I haven't tried it but it looks like
> the
> first attempt to fill the buffer will crash.
>
> Also, the buffer size is hardcoded to be dma.samples * 2 big, with the
> #define snf_buf at the start. The snd_linux.c and other OS specific
> audio code use dma.samples * dma.samplebits / 8 for the size of the
> buffer, as they can take 8 or 16 bit samples. Just pointing that out
> in
> case someone wanted to use 24 or 32 bit samples in the future.
>
> --
> finger jaq at gozer.quakeforge.net
> http://www.quakeforge.net/
>
More information about the quake2
mailing list