Re: VariSpeed and Timestamps
Re: VariSpeed and Timestamps
- Subject: Re: VariSpeed and Timestamps
- From: Ethan Funk <email@hidden>
- Date: Fri, 26 Nov 2004 20:21:29 -0700
I have a couple of doubts you might help me with about your project.
1.- Why do you set the Mixer Master Output to 0.707? where did this
value came from?
main.cpp >
setMixerMasterVolume(0.707);
setMixerOutputVolume(0, 1.0);
Vin * 0.707 = Vin * sqrt(1/2) = 3 dB reduction of audio POWER.
Basically I wanted to run everything down 3 dB ("down one notch" in
audio terms) so that there would be a little amplitude margin for
segueing from one player to the next with out clipping.
2.- I would like to connect each of the players to a VariSpeed, and a
Equalizer AudioUnits, before the mixer.
Should I create a graph for each player, from the converter,
connected to varispeed, connected, finally, to an equalizer, and THEN
connect the equalizer to the mixer, just as the converter is connected
now?
That's how I would do it... each player object would contain your
processing and not the mixer it self. Then you can connect your
players (which could all have different processing stacks) directly to
the appropriate mixer input which will never change.
3.- Your matrix currently sets up one output. Can it be connected to
more than one output? How can I do this?
For example, I'm interested in connecting also to the
kAudioUnitSubType_SystemOutput as the second output.
Ah, yes... we all want that! The problem is, different devices run at
slightly different speeds, so they don't all want the next set of
samples, or the same number of samples at the same time. One device
will be reading slightly faster or slower than the other. This is due
to the fact that different devices, at the hardware level, could be
running their Digital to Analog converters on different time references
(crystal oscillators). It's like trying to keep two turntables playing
a copy of the same record exactly in sync using the speed control.
Thats fun for about a minute.
I plan to get multiple output device support from AudioRack/arplayer
this way:
One output device will be designated the "master." This device will
pull on the matrix mixer through a call back that will pass the devices
request to fill a sample buffer directly on the the Matrix mixer.
However, once the Matrix mixer fills the buffer, my call back will copy
the samples into a private ring buffer and note the sample time stamp
before returning the buffer to the output device.
Any other output "slave" devices will be directed to another callback,
that will fill the requested buffer with samples from the
aforementioned ring buffer. The filling will occur back some sample
offset from where it was last filled by the "Master" to allow for OS
delays, device hardware delays, and sample rate conversion through a
VariSpeed AU. A VariSpeed AU is required in the slave devices chain to
do the "turntable speed control" to keep the "records" form getting out
of sync. Notice that all the slave devices will have a bit more delay
added due to the ring buffer offset and VariSpeed conversion, so only
the Master output should be used where you care about latency... i.e.
monitoring in headphones.
Trouble is, I can't get the VariSpeed to work right, so It's all in my
head at the moment, and not in the project! Anyone else care to help?
Ethan...
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Coreaudio-api mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden