Re: usage of AUTimePitch in an AUGraph
Re: usage of AUTimePitch in an AUGraph
- Subject: Re: usage of AUTimePitch in an AUGraph
- From: Doug Wyatt <email@hidden>
- Date: Mon, 29 Aug 2005 18:19:39 -0700
On Aug 29, 2005, at 2:22 PM, thomas rettich wrote:
some points I forgot in my last mail:
1.>Make sure that the sample rates are consistent
the timepitch au changes the sample rate ... so how can I keep the
output of autimepitch consistent with the ouput as far as sample
rate is concerned ?
Just meaning to be sure that you're not passing unexpected values if
you're setting the rates/formats of the AUs.
When a time/pitch unit is in the chain, the input and output sample
rates are still pertinent -- if for example you set the input sample
rate to 44100 Hz and the output to 48000 Hz, that rate conversion
will be factored into the time/pitch's rate.
2. in my application I've made the thread sleep (usleep()) for the
duration of the file. isn't there another way to let the fileplayer
au play the file until the end of file is reached ?
You can get a notification when the region you scheduled has been
completely *read*, but it's trickier to find out when it has been
completely *played*. You do know how many frames long the file is
(because you scheduled the region), and when it started playing (if
you said "-1" then you have to fetch the property after start to find
out when it actually began). And you can find out what time it is now
by observing the timestamps on a pre/post-render notification to the
file player.
3. Through which call can make a CocoaUIView of an audio unit
appear in a cocoa application ?
I don't know offhand ... will research this tomorrow if no one else
has answered.
Offlist I'm sending you a short vanilla-C command-line app which
successfully plays an audio file through a time/pitch unit. So it
definitely works....
Doug
thanks again,
Thomas
From: Doug Wyatt <email@hidden>
To: thomas rettich <email@hidden>
CC: email@hidden
Subject: Re: usage of AUTimePitch in an AUGraph
Date: Mon, 29 Aug 2005 12:59:19 -0700
On Aug 27, 2005, at 14:38, thomas rettich wrote:
I've used the aufileplayer au to play the file and connected it
the default output which worked fine. but when I try to add a
node for autimepiotch in the graph (bewteen the fileplayer and
the ouput units) it wouldn't work (i.e. aufileplayer ->
autimepitch -> outputunit). can anybody help ?? do I have to set
a different format for the input bus of the output unit since
autimepitch converts the format.. if so what exactly do I have
to do ?
That should work. That's the same chain you get in AULab when you
connect a file player to a time/pitch (minus the mixers).
So you have a file player going to an output unit and that works,
and when you add the time/pitch it stops working? When you say
it "wouldn't work" -- exactly what happens when?
Make sure that you've got a canonical deinterleaved float32
format through the chain and that the sample rates are
consistent (especially that none are zero).
Exactly how are you specifying the start time to the file player?
one more thing I was trying to figure out ... if an audio unit
is using a callback to obtain audio data and in the callback
function the data is retrieved from an audio file, which buffer
do i have to write the data into, where do I have to allocate
the memory for the buffer and what size should it be ?
An AU's input callback proc is responsible for copying samples
into the supplied AudioBufferList. The samples must in the format
of the AU's input element (usually deinterleaved float32).
Presumably at some earlier point you have read samples from a
file and converted them to float. If you want to do this yourself
without an AUAudioFilePlayer then you'll need to create a
separate read thread and some reasonably large disk I/O buffers.
--
Doug Wyatt
Core Audio, Apple
_________________________________________________________________
Sie suchen E-Mails, Dokumente oder Fotos? Die neue MSN Suche
Toolbar mit Windows-Desktopsuche liefert in sekundenschnelle
Ergebnisse. Jetzt neu! http://desktop.msn.de/ Jetzt gratis downloaden!
_______________________________________________
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