Re: Silence after handling xrun (sometimes) - best way to handle?

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

 



Thanks for the quick reply.

> Application can choose between two methods:
>
> 1) enable xrun (set stop_threshold to buffer_size or less) - you are
>   using this method now
> 2) disable xrun (set stop_threshold to boundary)
>
> If you disable xrun checking in the driver and if application does not
> update the ring buffer contents in time, the old samples from the ring
> buffer will be replayed (clicks). Additionaly to reduce clicks, you may
> force the driver to fill the ring buffer with silence - see
> silence_threshold).

Disabling xrun will have to do for now - dirty audio is better than no audio!

I had a look at silence_threshold, but the wording in the API is
slightly confusing to me, I'm not sure how that and silence_size work.
I read to/write from buffers of 256 frames. I set alsa's buffer size
to 256, and its period size to half of that. So I figure if I want
absolutely no data re-transmitted because I've not filled up the ring
buffer in time, I should set silence_threshold to 0 and silence_size
to the buffer size? Or should silence_threshold be the size of a
period and silence_size be (buffer size - period size)?

John G

------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Alsa-user mailing list
Alsa-user@xxxxxxxxxxxxxxxxxxxxx
https://lists.sourceforge.net/lists/listinfo/alsa-user


[Index of Archives]     [ALSA Devel]     [Linux Audio Users]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]

  Powered by Linux