NewbieQuestion: _IODevices!
NewbieQuestion: _IODevices!
- Subject: NewbieQuestion: _IODevices!
- From: email@hidden
- Date: Tue, 13 May 2003 12:28:38 +0200
Hi all!
I've been programming Port Audio for some time now, and experimented
with other languages and API's like Tcl/Tk, Renderware Audio and
Matlab. However, my main goal has been to learn Core Audio and Audio
Units. I've been going through a few examples and the peaces are slowly
falling into the right places, I hope. I have no tutor or anyone to ask
about my questions and therefor I'm rushing slowly. As I progress I
intend to post my questions here (I frankly don't know were else to get
the tutor-ship I most definitely will need) and hope you will have
patience with my Newbie-questions.
First off:
I want to make a simple sine-wave generator and I started looking at
the CoreAudioExample found at Apples developer site. In the
audioDeviceSetup - method there is among others a call to the
AudioHardwareGetProperty function to get the default output device for
the HAL. See below:
// get the default output device for the HAL
count = sizeof(AudioDeviceID);
err =
AudioHardwareGetProperty(kAudioHardwarePropertyDefaultOutputDevice,
&count, (void *) &device);
if (err != noErr) return;
One parameter sent is kAudioHardwarePropertyDefaultOutputDevice. I
don't think I have understood what the device really is, or how to
really relate to them. Here I ask for the default output device.
However in the OSStatus sineIOProc (...) function I still get an
AudioBufferList of inputdata. In a try to understand the API I simply
copied the input buffer to the output buffer and it worked perfectly.
When speaking in the microphone I heard it in my speakers.
So my questions are:
1. What is the audioDevice (are there any real life similarity like a
channel strip or bus or whatever)?
2. What is the difference between the default input device and the
default output device? The output device seems to handle input buffers
and vice verse (not tried the later though).
3. Assume I have the MOTU 896 as well as the built-in sound card on my
iMac DV. Is it the built in sound card that is to be considered as the
default device (given my definition of a device being the sound card in
use) or is it the one chosen from the system preferences?
Thanks in advance!
/Jont Olof Lyttkens
Audio engineer, Sweden.
_______________________________________________
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.