Re: Frame-based access (via mmap) and cross-device synchronisation

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

 



Metathronius Galabant wrote:
> At any given time x0, x1, ... xn I'd like to take some kind of
> "snapshot" of both devices, ask them "how many frame do you have?".
> This MUST NOT be restricted to the period, but it should be like
> device1 has 80 frames, device2 only has 78 frames.

Call snd_pcm_avail().  The granlarity of its return value is device
specific; e.g., chips like Emu10k1 or DS-1 move data in blocks of 256
or 512 samples, and USB uses 1-ms frames.  You are not guaranteed to
get a result that is more recent than the last period boundary,
although most devices can do better.


Best regards,
Clemens
_______________________________________________
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