Playing a sound file
Is there really no Linux API to just play a file?
id = cache_file("foo.ogg"); // cache the sample play(id); // play to default device
libcanberra seems to only support playing stuff from a sound theme, not a file. PulseAudio seems to require setting up a main loop thing, creating a context, converting the file to a stream object in the right format, uploading the sample, and then finally playing it.
This should be a two-liner (with caching) and a one-liner without!
Which API should I know about?
(Is there at least an example of doing it with PulseAudio that can be quickly copied?)