RFC - a casual sound API on fd.o?
Marc-André Lureau
marcandre.lureau at gmail.com
Tue Jan 9 11:15:55 PST 2007
hello xdg,
I propose here a sound API for casual use, playing events and writing very
simple audio players.
There is no std API that address this, and it would be good to have one on
fd.o, no?
Doxydoc is here
http://etudiant.epita.fr/~lureau_m/ds-0.1/doc/html/index.html<http://etudiant.epita.fr/%7Elureau_m/ds-0.1/doc/html/index.html>
.
It could be implemented freely for different backends, this is similar/close
to PortAudio design choices - in a way. Thus, implementation is not
discussed here. This API avoid all the current workarounds/features
specifics for each API (such as esd, that I would like to get rid of in
GNOME [1]).
By casual, it means it does not cover advanced functions. It makes the
assumption that concurrent playbacks are available (mixed hw/sw).
Nevertheless, errors should be reported if the device is locked or mixing of
sounds is not possible. The interface should hide the fact of sound caching
mechanism (this can be done transparently by the library or at a lower
level). The introspection of device/host is only a low level issue,
dependent on the backend. Anyway, most of the lower level APIs seems to be
able to use or map a string representation to identify a
device/driver/pipeline. I am not sure if such API should provide a way to
query the available outputs and their representations.
Initialization of the driver/sound backend should not be a user concern
(this is argueable).
Simple crossfading between sounds can be implemented. Nice desktop things
should be possible (see documentation).
Design choice take care of a future "sound manager" ([2] and/or [3]), and a
themable sound specs (see [4] and [5]).
Pb. It is asynchronous and depend on a common event/mainloop API/vtable.
That is a big issue for such library, that try to be concise and flexible
(if no solution, it might end up with a "once-again" vtable facilities)
[1] http://live.gnome.org/PulseAudio (and sekretly kill libgnome-sound and
libesd).
[2] http://www.pulseaudio.org
[3] http://live.gnome.org/GSmartMix
[4] Hopefully Coming Sound Event Spec
http://lists.freedesktop.org/archives/xdg/2006-November/008706.html
[5] Bango http://www.freedesktop.org/wiki/Bango
--
Marc-André Lureau, GSmartMix
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freedesktop.org/archives/xdg/attachments/20070109/25e0ea52/attachment.htm
More information about the xdg
mailing list