Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 03 Sep 2001 23:58:19 -0700
From:      Terry Lambert <tlambert2@mindspring.com>
To:        Faried Nawaz <fn@hungry.org>
Cc:        freebsd-hackers@freebsd.org
Subject:   Re: .so and threads, and stereo /dev/dsp, freebsd 4.3-stable.
Message-ID:  <3B947B8B.54D0ED7A@mindspring.com>
References:  <m3zo8dc1pc.fsf@localhost.nilpotent.org>

next in thread | previous in thread | raw e-mail | index | archive | help
Faried Nawaz wrote:
> Next: the OSS plugin builds but doesn't seem to work properly.  At
> some point, it tries to set /dev/dsp to stereo, and fails:
> 
>         tmp = 0;
>         if (shm->channels == 2)
>                 tmp = 1;
>         rc = ioctl (audio_fd, SNDCTL_DSP_STEREO, &tmp);
>         if (rc < 0) {
>                 perror (snd_dev);
>                 Con_Printf ("Could not set %s to stereo=%d", snd_dev, shm->chann
> els);
>                 close (audio_fd);
>                 return 0;
>         }
> 
> I have a Creative 128 card which identifies itself as
> 
> pcm0: <AudioPCI ES1373-8> port 0x6800-0x683f irq 10 at device 10.0 on pci0
> 
> What can I do here to make quakeforge use the sound card?

I've seen something like this before.

The cause was the sourd card being opened twice, and the second
open failing, without the programmer checking the open return
code in the second case.

The fix was to use the already open fd, instead of reopening
the card.

-- Terry

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3B947B8B.54D0ED7A>