OpenSolaris picked up OSS support not too long ago. I tried building
XEmacs on an OSS-capable OpenSolaris box, and the configuration code
picked up that there was OSS support. But the build failed with
linuxplay.c: In function `audio_init':
linuxplay.c:183: error: `SOUND_PCM_READ_CHANNELS' undeclared (first
use in this function)
linuxplay.c:183: error: (Each undeclared identifier is reported only once
linuxplay.c:183: error: for each function it appears in.)
linuxplay.c:231: error: `SOUND_PCM_READ_RATE' undeclared (first use in
this function)
I asked the kernel engineer who did the OSS integration about this.
After looking at linuxplay.c, he said it was not using the standard
OSS API. Apparently Linux had its own API, or extensions to the OSSv3
API.
Quoting from an email he sent me:
These definitions are not part of the portable OSS stack.
It would be straight-forward to fix the code to use standard OSS
API calls. SNDCTL_DSP_SPEED can be used to get the rate, and
SNDCTL_DSP_CHANNELS can be used to return the number of channels.
|