[alsa-devel] C API, usage of function _snd_pcm_file_open()

Clemens Ladisch clemens at ladisch.de
Fri Feb 11 12:00:24 CET 2011


Jon Harald Øymyr wrote:
> I had a look at the Spotify C API, and found that they were using the
> following code to output music from Spotify:
> snd_pcm_open(&h, dev, SND_PCM_STREAM_PLAYBACK, 0).

All applications that use ALSA PCM use this function.

> I want use this function instead: 
> int _snd_pcm_file_open(snd_pcm_t **pcmp, const char *name, snd_config_t *root, snd_config_t *conf, snd_pcm_stream_t stream, int mode)
> 
> I'm not able to find anything in the documentation explaining what the
> two parameters snd_config_t *root and snd_config_t *conf is.

This is an internal function.

> What I'm trying to achieve is to write the stream to a file, and then
> read it from another application. But it would be even better if I
> could make the C application write to standard output.

Like arecord when you run it without parameters?


Regards,
Clemens


More information about the Alsa-devel mailing list