3- ioctls does not seem to work properly.
At some point in the code, I call the ioctls:
> if (ioctl(fd, SOUND_PCM_READ_CHANNELS, ¶ms->r_channels))
> err(1, "ioctl for read channels failed");
> if (ioctl(fd, SOUND_PCM_WRITE_CHANNELS, ¶ms->w_channels))
> err(1, "ioctl for write channels failed");
>
>(for example). Now the value of params->*_channels is 2 in both cases.
>The output of the program, however, is:
>
> read write units
>DSP device : /dev/dspW /dev/dspW
>Rate : 8000 44100 Hz
>Channels : 1 2
>Size : 16 16 bits
>
>ie, params->r_channels is *changed* from 2 to 1. Same goes for r_rate. I
>do not understand that behavior.
the SNDCTL_READ_*/SNDCTL_WRITE* ioctls do not do what you think they do.
the oss api does not support asymmetric settings for record and play.
SNDCTL_READ_* return the current settings; SNDCTL_WRITE* change the
settings. these ioctls are deprecated. the Right way to use the oss api is
documented in http://www.opensound.com/pguide/oss.pdf
-cg
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-multimedia" in the body of the message