All of lore.kernel.org
 help / color / mirror / Atom feed
* How to properly handle variable samplerate?
@ 2014-09-05 16:20 Petr Kulhavy
  2014-09-06 10:33 ` Alexander E. Patrakov
  0 siblings, 1 reply; 2+ messages in thread
From: Petr Kulhavy @ 2014-09-05 16:20 UTC (permalink / raw)
  To: alsa-devel

Hi,

I'm developing an audio stream player application with ALSA output, the 
player has a large software buffer. The trouble is that the stream can 
potentially change the sampling rate (e.g. streaming RTP from a VLC 
playlist created from different MP3 songs). How to properly handle this?

I'm thinking of the following concept:
The codec feeds data into the software buffer together with markers for 
sample rate changes. The ALSA playback is asynchronous, using a callback 
function feeding the data from the software buffer into ALSA. If a 
samplerate marker is hit the new rate is set.

Can the sample rate be set from a callback? What other constraints are 
there? And how does the HW FIFO handle samplerate changes?
Or is there a better way of implementing?

Thanks a lot!
Petr

-- 
Petr Kulhavy, MSc
System Architect

*BARIX*

petr@barix.com <mailto:petr@barix.com> | Skype: brain.barix

Barix AG, Seefeldstrasse 303 | 8008 Zurich, Switzerland
T +41 43 43322 11 | www.barix.com <http://www.barix.com>

You have received this email because of your relationship Barix AG and
its affiliated companies. Barix AG and its affiliated companies do not
sell or exchange email addresses, or any other personal contact
information provided by you with any third parties. All email
distributions are managed and controlled by Barix AG and its affiliated
companies.
Barix AG, Seefeldstr. 303, 8008 Zürich, Switzerland. Company Reg. No:
CH-020.3.023.869-8, VAT Reg. No: CHE-105.687.663.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-09-06 10:33 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-09-05 16:20 How to properly handle variable samplerate? Petr Kulhavy
2014-09-06 10:33 ` Alexander E. Patrakov

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.