Date: Wed, 07 Jul 1999 04:32:19 -0700 From: Chris Doherty <cdoherty@nttmcl.com> To: freebsd-multimedia@freebsd.org Subject: SB Vibra16: more joy and rapture Message-ID: <3.0.6.32.19990707043219.007cae90@alicia.nttmcl.com>
next in thread | raw e-mail | index | archive | help
hi-- so I've gotten the card up and running, playing sound, recording and playing back sound for the most part (it's choppy and slow, but I also haven't looked into fixing it, so it's nothing to complain about yet). the first fun thing I found out is that while you can open it O_RDWR without an error, it doesn't work. :-) the next thing is a little more bothersome. for most of the ioctl() calls, it alters the 3rd argument, so that if you set the sample rate too high, it returns the highest possible rate in the 3rd argument. according to the OSS docs, if you try to set the card to an unsupported sound format (e.g. AFMT_S16_LE), it will/might return either something funky, or a supported format you can use. if it was successful, the 3rd argument should be left alone. here's what's happening: I called SNDCTL_DSP_GETFMTS and discovered that it allegedly supports AFMT_S16_LE. so I do the following (Ioctl() is just a wrapper function): int format = AFMT_S16_LE; Ioctl( fd, SNDCTL_DSP_SETFMT, &format ); at which point format == 0. disturbed, I then did Ioctl( fd, AFMT_QUERY, &format ); thinking I might get the current format; and ioctl() failed! is this a characteristic of SB cards? can I safely assume if ioctl() returns ok from SNDCTL_DSP_SETFMT, that the format has been set? if AFMT_QUERY doesn't work, I have no way of knowing if any of the other options work (AFMT_U8 didn't, really, or it did but the quality was insufferable). and SNDCTL_DSP_GETFMTS may have been lying as well. the card tested positive for AFMT_WEIRD; is this what that means? :-) Chris --------------- I don't speak for NTT MCL. I'm an intern. Chris Doherty cdoherty@nttmcl.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-multimedia" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3.0.6.32.19990707043219.007cae90>