[oss-devel] OSS API
Alex Ivasyuv
siegerstein at pochta.ru
Fri Nov 2 22:09:17 EET 2007
В сообщении от Friday 02 November 2007 20:25:08 Hannu Savolainen написал(а):
> Alex Ivasyuv wrote:
> > Hi! I have some question about new OSS API.
> >
> > In old API version it was possible to use SOUND_MIXER_*, but now in new
> > API is obsolete.
>
> The old API is obsolete and latest OSS drivers don't implement it.
>
> > How to get for example all devices from my mixer, name of device by id
> > and the contrary?
> >
> > // example
> > ioctl(mixer_fd, MIXER_READ(i), &level);
> >
> > // list of all dev
> > for (int i = 0; i < SOUND_MIXER_NRDEVICES; i++) {
> > ALL_MIX_DEV[sound_device_names[i]] = i;
> > }
>
> At this moment documentation for the new mixer API is under
> constructiuon. It will be improved within next few months. However the
> ossxmix program is the ultimate documentation. All applications that use
> the new API should behave 101% identical way with ossxmix.
>
> However unlike the "legacy" API the new API is not designed to be used
> by ordinary applications. Instead in OSS 4.x the policy is that only
> "authorized" applications should touch the mixer/control panel settings.
> At this monent THE mixer application is ossxmix but it will be replaced
> by a better one in the future.
>
> Instead applications like audio/media players should use new DSP ioctl
> calls such as SNDCTL_DSP_SETPLAYVOL if they need to do any volume changes.
>
> Best regards,
>
> Hannu
> _______________________________________________
> oss-devel mailing list
> oss-devel at mailman.opensound.com
> http://mailman.opensound.com/mailman/listinfo/oss-devel
Understood, thanks Hannu!
Bests,
---
Alex Ivasyuv aka SIEGERSTEIN
More information about the oss-devel
mailing list