Subject: Re: [alsa-devel] Re: [linux-audio-dev] MMAP + RTC excellent performance , 2.9ms latency during playback !
From: Benno Senoner (sbenno_AT_gardena.net)
Date: Mon Mar 13 2000 - 10:27:33 EST
On Mon, 13 Mar 2000, maarten de boer wrote:
>
> When I try to use a SB Live at 44100, I have a problem that
> read and write seem to get out of sync. Jaroslav said this is
> a hardware issue of the SB Live.
> But it seems that Benno doesn't have that problem. How come?
> Is mmap more reliable than read/write ?
I made playback-only experiments for now.
(but I will not stop here :-) )
As Jaroslav and others said, seems that the emu10k and other cards
are unable to provide synched input and audio streams.
If this is the case, then it's up to the software to keep them in sync,
either by dropping samples or doing some kind of interpolation.
This will be an interesting exercise.
:-)
The reference code should include such an example too.
The added benefit of this code , is that you can sync different
soundcards together (capture from soundcard A and play the
data on soundcard B, A and B may have some samplerate drift,
which is corrected by an adaptive algorithm)
(look at the difference of playback and capture pointer, and
resample or drop/add samples in the data)
>
> > - write some docs how to use high-performance realtime audio under ALSA
> > (of course with working examples)
> >
> > - write a new version of latencytest (almost from scratch) which will support
> > OSS , ALSA and the benchmarking of timers like RTC and others.
>
> In addition to that, I think it would be great to provide some template
> applications, that people can use as a base for RT audio IO applications.
> What features should go into these template apps? I thought of
>
> - OSS and ALSA support
> - demonstrate the use of multithreading (pthread) with different priorities
> - standard set of command line options for sample rate, fragment size, etc
> - midi control of the audio processing
>
> For now, the alsa latency.c test is what comes closest to this.
I agree,
especially it would be nice to show how a simple soft-synth (soft-sampler)
works, using one thread for MIDI input and the other (higher priority) thread
for audio rendering.
Benno.
This archive was generated by hypermail 2b28 : Mon Mar 13 2000 - 18:36:43 EST