Takashi Iwai wrote:

I changed it to this (very small change).

> 
> well, just write a few codes...
> 
> #include <alsa/asoundlib.h>
> 
> int main()
> {
>       snd_pcm_t *pcm;
>       int err;
>       snd_pcm_hw_params_t hw; <<<<----
> 
>       err = snd_pcm_open(&pcm, "hw:2,1", SND_PCM_STREAM_PLAYBACK, 0);
>       snd_pcm_hw_params_alloca(&hw);
>       err = snd_pcm_hw_params_any(pcm, hw);
>       err = snd_pcm_hw_params_set_access(pcm, hw, SND_PCM_ACCESS_RW_INTERLEAVED);
>       err = snd_pcm_hw_params_set_format(pcm, hw, SND_PCM_FORMAT_S16_LE);
>       err = snd_pcm_hw_params_set_rate(pcm, hw, 48000, 0);
>       err = snd_pcm_hw_params_set_channels(pcm, hw, 2);
>       err = snd_pcm_hw_params_set_period_size(pcm, hw, 512, 0);
>       err = snd_pcm_hw_params_set_buffer_size(pcm, hw, 1024, 0); <<<<----
>       err = snd_pcm_hw_params(pcm, hw);
>       return err;
> }
> 
> 
> (not tested at all ;)
> 
> 
> Takashi
> 
> 

It doesn't quite compile.

----
#gcc -c -o qinit qinit.c
qinit.c: In function `main':
qinit.c:7: storage size of `hw' isn't known
qinit.c:17: too many arguments to function 
`snd_pcm_hw_params_set_buffer_size'
----

-- 
Patrick Shirkey - Boost Hardware Ltd.
For the discerning hardware connoisseur
Http://www.boosthardware.com
Http://www.boosthardware.com/LAU/guide/
========================================

"Um...symbol_get and symbol_put... They're
kindof like does anyone remember like get_symbol
and put_symbol I think we used to have..."
- Rusty Russell in his talk on the module subsystem



-------------------------------------------------------
This sf.net email is sponsored by: OSDN - Tired of that same old
cell phone?  Get a new here for FREE!
https://www.inphonic.com/r.asp?r=sourceforge1&refcode1=vs3390
_______________________________________________
Alsa-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-devel

Reply via email to