Simple Audio Playback
Simple Audio Playback
- Subject: Simple Audio Playback
- From: "" <email@hidden>
- Date: Tue, 29 Jun 2004 16:24:13 -0300
Hi all,
I am new to this list - have been using the Carbon-Dev list for a while.
I need help finding my way through the CoreAudio Documentation. I4ve read just
about everything there is in the Apple site about Audio (CoreAudio.PDF,
samples, Q&As, TechNotes, headers, ..., even searched through dozens of old
messages in your archives).
All I need to do is to send a buffer of audio data to the default output, but I
couldn4t find any document that made it clear what APIs I do need. So I would
appreciate it if anyone could point me out some info (maybe an old,
comprehensive posting) about what each group of APIs should be used for. Like,
do I need an AudioUnit or a an AUGraph? Some examples make use of HAL. Do I
need it?
I have simple playback needs, because due to the nature of my application I
handle all mixing and processing before hand. All I want to do is to send two
buffers (left and right channels) to the Default audio output. Every example I
found (such as PlayAudioFileLite) are full of features I don4t really need,
which makes it more complicated to understand the basics. (sorry I am probably
too slow to get this stuff...).I managed to get "some" playback working using
and AudioUnit in a manner similar to that found in PlayAudioFileLite (see
below) but the app crashes right after playing with a BAD_ACCESS exception. I
want to know if I am going in the right direction or if I am totally off track
with this core audio stuff.
Here is a summary of what I am doing:
FindNextComponent();// to fin correct component
OpenAComponent(); // to acces the audio unit
AudioUnitSetProperty(); // to install the input callback
AudioUnitInitialize(); // tp prepare the audio unit
AudioOutputUnitStart(); // to begin pulling the audio stream from my buffers
One of the things that confused the most was the way we are supposed to fill the
AudioBufferList. Isn't it strange to use something declared as a static array
as if it were a pointer? (please I am not criticizing anything, I am jsut
confused, probably out of my lack of expertise with the C language). I mean,
how exactly am I supposed to pass my buffers to the callback, assuming the data
is previously allocated and filled with a valid audio buffer?
Sorry about the length of this message. Any help would be appreciated
Carlos.
-------------------------------------------------
Mail enviado atravis do WebMail/UnB
CPD - Centro de Informatica
_______________________________________________
coreaudio-api mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/coreaudio-api
Do not post admin requests to the list. They will be ignored.