* C API, usage of function _snd_pcm_file_open()
[not found] <21273028.14.1297352791843.JavaMail.jon@TT-WS-002>
@ 2011-02-10 15:49 ` Jon Harald Øymyr
2011-02-11 11:00 ` Clemens Ladisch
0 siblings, 1 reply; 2+ messages in thread
From: Jon Harald Øymyr @ 2011-02-10 15:49 UTC (permalink / raw)
To: alsa-devel
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).
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)
The function is found here:
http://www.alsa-project.org/alsa-doc/alsa-lib/pcm__file_8c.html#94d0dc725e55a974d792e16f8abdc60a
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.
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.
Can anybody help me with this?
I'm not very experienced with either C programming or streaming, but I would really like to make this work.
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: C API, usage of function _snd_pcm_file_open()
2011-02-10 15:49 ` C API, usage of function _snd_pcm_file_open() Jon Harald Øymyr
@ 2011-02-11 11:00 ` Clemens Ladisch
0 siblings, 0 replies; 2+ messages in thread
From: Clemens Ladisch @ 2011-02-11 11:00 UTC (permalink / raw)
To: Jon Harald Øymyr; +Cc: alsa-devel
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
_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2011-02-11 10:59 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <21273028.14.1297352791843.JavaMail.jon@TT-WS-002>
2011-02-10 15:49 ` C API, usage of function _snd_pcm_file_open() Jon Harald Øymyr
2011-02-11 11:00 ` Clemens Ladisch
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.