On Thu, 2004-02-26 at 19:38, Jaroslav Kysela wrote:
> On Thu, 26 Feb 2004, Michel DÃnzer wrote:
>
> > The problem occurs when the ALSA_OSS_WRAPPER environment variable isn't
> > set. initialize() returns early, so the public functions segfault when
> > they try to dereference the uninitialized fds.
> >
> > Is there a reason why ALSA_OSS_WRAPPER must be set? Even if so, I think
> > it should cope more gracefully otherwise. :)
>
> No reason. I ommited to remove this hack when I separated the wrapper
> code from the API emulation code. You can remove the lines without any
> side effect.
Okay, thanks.
Unfortunately, bzflag now fails doing
ioctl(5, SNDCTL_DSP_SETFRAGMENT, 0x7ffff308[4000c])
even with the attached patch, which used to be enough to get it working.
Adam's ('small and cosmetic'??? :) patch doesn't help either.
Luckily, bzflag is switching to SDL...
--
Earthling Michel DÃnzer | Debian (powerpc), X and DRI developer
Libre software enthusiast | http://svcs.affero.net/rm.php?r=daenzer
? build-arch-stamp
? debian
? local.diff
Index: alsa/pcm.c
===================================================================
RCS file: /cvsroot/alsa/alsa-oss/alsa/pcm.c,v
retrieving revision 1.9
diff -p -u -r1.9 pcm.c
--- alsa/pcm.c 26 Feb 2004 15:31:46 -0000 1.9
+++ alsa/pcm.c 27 Feb 2004 12:13:33 -0000
@@ -261,7 +261,9 @@ static int oss_dsp_hw_params(oss_dsp_t *
if (err < 0)
return err;
if (dsp->maxfrags > 0) {
- unsigned int periods_max = dsp->maxfrags;
+ unsigned int periods_max = periods_min > dsp->maxfrags
+ ? periods_min
+ : dsp->maxfrags;
err = snd_pcm_hw_params_set_periods_max(pcm, hw,
&periods_max, 0);
if (err < 0)