Work around not implemented ioctl in BSD.

This commit is contained in:
Eric Pouech 2003-04-05 05:09:57 +00:00 committed by Alexandre Julliard
parent 7b007b47ae
commit f5554c3236
1 changed files with 5 additions and 1 deletions

View File

@ -278,7 +278,11 @@ static DWORD OSS_RawOpenDevice(OSS_DEVICE* ossdev, int strict_format)
/* turn full duplex on if it has been requested */
if (ossdev->open_access == O_RDWR && ossdev->full_duplex) {
rc = ioctl(fd, SNDCTL_DSP_SETDUPLEX, 0);
if (rc != 0) {
/* on *BSD, as full duplex is always enabled by default, this ioctl
* will fail with EINVAL
* so, we don't consider EINVAL an error here
*/
if (rc != 0 && errno != EINVAL) {
ERR("ioctl(%s, SNDCTL_DSP_SETDUPLEX) failed (%s)\n", ossdev->dev_name, strerror(errno));
goto error;
}