AUGraph Problem
AUGraph Problem
- Subject: AUGraph Problem
- From: "Christopher O'Neill" <email@hidden>
- Date: Sat, 12 Apr 2008 16:27:01 -0700
Hello all,
I am fairly new to CoreAudio, and am learning new tricks all the
time. I wrote a program a few months ago using callbacks and
AudioFileIDs which, in a nutshell, opened 4 different files, changed
their pitches independently, mixed them together, and finally played
them through the default audio source. Although this worked, it was a
pain to write, since I had to mess with all of the raw bytes of audio
data myself to add all of these effects.
Recently, a friend of mine told me I should look into the AUGraph API
to simplify things. I am now rewriting my code to use this API, and
although it is a TON cleaner than my original version, it seems to
have one major problem. I have my graph set up as follows:
AUFilePlayer --> AUPitch --> |
AUFilePlayer --> AUPitch --> |
AUFilePlayer --> AUPitch --> | --> AUMixer --> AUOutput
AUFilePlayer --> AUPitch --> |
If there is only one AUFilePlayer and AUPitch node going into the
mixer, everything works great. However, even if I just increase the
number to 2 there is a lot of crackling and noise, to the point where
the sound is almost inaudible. Also, if I remove the AUPitch nodes,
it sound fine. I constructed the same setup in AULab, with 2-4
generators reading from files, each with an AUPitch effect, and all
being mixed into one output, and it made the same noise. However, it
also came up with a warning triangle telling me that "The audio engine
has received an overload. Mute unneeded tracks and reduce the number
of effects in the document to reduce CPU usage."
Am I trying to do too much? Is there something I can do to simplify
my setup? I am pretty sure all of the nodes I have are necessary to
get the desired result, and it doesn't seem like this is a very
complicated graph, but maybe I am trying to do too much. My original
code was able to manually work with 4 different files just fine, so it
shouldn't be a processor limitation, but just in case it matters I am
on a Macbook 13" with 2 GHz Intel Core Duo, 1.5GB RAM, about a year
and a half old.
Does anyone have any suggestions as to how to fix this? Thank you in
advance.
-Chris
_______________________________________________
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