Re: Understanding _snd_pcm_channel_area Struct (PCM Interface)!

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



At Tue, 30 Jun 2009 12:01:53 -0300,
Guilherme wrote:
> 
> Hum...
> 
> so .. the code
> 
> if ((areas[chn].step % 16) !=0 )
> 
> is because a 16bits format's been used.
> 
> If I wanted a 32bits sample format I should change that for
> if ((areas[chn].step % 32) !=0 ) ??

Depends.

The step field doesn't specify the sample format.  It specifies
the bits to the next sample of the given channel.

For such a purpose, checking the sample format bits via
snd_pcm_format_width() or snd_pcm_format_physical_width() would be
more suitable.

> and the offset for the first doen's need any changes, is it?
> 
> Just a opinion about all this, I think that alsa developers should design graphs for these things, as has in gstreamer documentation. 
> It is a lot easer to understand that way. 
> 
> It is because I dont understand very well yet, but as I am going to work with sound stuff especially in linux environment, Ill be very soon offering help for this!

Well, usually you don't have to care about the channel_info.  It's
just for mmap, and unless you really do want it inevitably, the mmap
access isn't needed.


Takashi
_______________________________________________
Alsa-devel mailing list
Alsa-devel@xxxxxxxxxxxxxxxx
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux