Re: [linux-audio-dev] Laaga multiple sample rates (Re: LAAGA: updates, laaga-0.2.0 tarball available)

New Message Reply About this list Date view Thread view Subject view Author view Other groups

Subject: Re: [linux-audio-dev] Laaga multiple sample rates (Re: LAAGA: updates, laaga-0.2.0 tarball available)
From: Tom Pincince (stillone_AT_snowcrest.net)
Date: Mon Jul 09 2001 - 22:58:26 EEST


> having skimmed through the source, at least one thing that should be added
> came into my mind: support for per-port sample rates.

Some degree of this should exist, particularly for playback, since the
dvd-a spec requires that each channel of a 5.1 recording be allowed to
have its own sample rate, with each channel's rate being related to the
others by a factor of 2. This means that simultaneous playback of
streams at 44.1/88.2/176.4 khz or 48/96/192 khz are allowed but
simultaneous playback of one stream at 44.1 and another at 48 are not
allowed. I don't know if any soundcards support this right now, but
they will have to if we want the ability to author dvd-a discs on our
daw, or even if we simply want to playback dvd-a disks on a computer.

Recording is more complicated, maybe impossible.

First, if two or more digital sources are to be recorded simultaneously,
they must be sync'ed to the same master clock. If these sources run at
different rates, the master clock must provide sync signals at different
rates simultaneously. I don't know if any clock sources offer this
option.

Second, if the first condition is met, the soundcard must then be able
to receive digital signals of different rates on each of its input ports
simultaneously. I don't know if any soundcards offer this option.

Third, the audio engine is driven by soundcard interrupts, so if the
first two conditions are met, the soundcard must send interrupts based
on the highest sampling rate entering the card, and the driver must
convert all lower rate streams to the highest rate. This third
condition is probably possible, but it is meaningless if the first two
conditions do not exist.

Now if we relax the requirements by eliminating the ability to record at
multiple rates simultaneously, and simply require the ability to overdub
at different rates, then it becomes possible, but the system must still
function at the highest sample rate. If a 96 khz project receives an
overdub at 48 khz, the soundcard will be driving the engine at 48 khz.
I don't want to see the entire project converted to 48 khz, I would
rather see the server provide a buffer between the interrupts and the
audio engine to provide the engine with a clock that is 2x the interrupt
rate, and have the driver convert the 48 khz stream to 96khz.

> P.S. one thing about LAAGA terminology: I was really mislead by the use of the
> word "frame" in the sources; I've always assumed that a frame of audio is
> something like 100 ms of a mono signal, but the sources use that to refer to
> an audio sample (e.g. nframes_t). I don't see why a sample is not called a
> sample?

A frame, just like a picture frame hanging on a wall, is a two
dimensional representation of a single instance in time. The x axis
represents the number of simultaneous channels (or streams), and the y
axis represents the number of bytes per sample. I would like to see a
standard word that defines the three dimensional condition, with the z
axis representing time, or number of samples. I have seen words like
block, chunk, fragment, and even frame used to describe a unit of data
that contains multiple contiguous frames. The word that comes to my
mind is superframe.

Tom


New Message Reply About this list Date view Thread view Subject view Author view Other groups

This archive was generated by hypermail 2b28 : Mon Jul 09 2001 - 22:58:59 EEST