Re: [proaudio] Real-Time for audio playback?

[ Thread Index | Date Index | More lists.tuxfamily.org/proaudio Archives ]


On Tue, Jan 5, 2010 at 8:59 AM, Grant <emailgrant@xxxxxxxxx> wrote:
>>>>>>>> <SNIP>
>>>> Where the rt-kernel helps is that when the sound card asks for data
>>>> there should be a much lower 'latency' from the sound card raising a
>>>> hardware flag to the ALSA driver requesting data to the kernel
>>>> supplying this data to the ALSA driver sending it out to the card.
>>>> Lower latency in the rt-kernel helps the buffer not run dry, but the
>>>> truth is that the audio is identical and all that matters is that the
>>>> buffer not run dry.
>>>
>>> Excellent description, thank you.  So the question becomes, does the
>>> card's buffer ever run dry?  Is there a way to find out?
>>
>> Using JAck - yes. It's called an xrun and Jack reports them clearly.
>> To the best of my knowledge when not using Jack the answer is no.
>
> I thought jack set up a buffer of its own.  Does jack report on the
> sound card's buffer?
>
<SNIP>

Correct - Jack reports it's own buffer - not the sound card's. The
filling of the sound card's buffer is managed by the card talking to
the Alsa driver.

The one place where the card is in control is the *frequency* this all
occurs at. The card's internal crystal is used as the overall
controlling clock for Jack and is delivered through the Alsa driver.
This way Jack keeps the audio data flowing at the rate the sound card
requires. All of the audio apps then respond to Jack with the correct
number of samples per second.

The issue about resampling to 48K occurs when you have a sound card
that won't allow Alsa (or you through some external hardware method
like a clock input or switch on the back panel) to set it's frequency
to 44.1K. (Assuming you are listening to lossless CD-type audio...)
What can you do? the data was recorded at 44.1K and the sound card
requires that audio be played at 48K. Either you resample it or play
it one whole note too high by playing it at 48K. This is a key problem
with LOTS of cheap sound cards.

That said, be careful about thinking that your system can work without
resampling as the case eventually shows up where you have 44.1K data
and 48K data you need to play at the same time. In that case something
has to bend.

Also, be VERY careful changing Jack sound card frequencies on the fly
as some sound cards create loud ugly noise until the buffers get
stabilized...

Hope this helps,
Mark



Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/