11
11
pa_mac_core.c with pa_mac_core_old.c (eg. "cp pa_mac_core_auhal.c
12
12
pa_mac_core.c"), then run configure and make as usual.
14
----------------------------------------
16
Notes on Original implementation:
18
by Phil Burk and Darren Gibbs
20
Last updated March 20, 2002
24
Output with very low latency, <10 msec.
25
Half duplex input or output.
26
Full duplex on the same CoreAudio device.
27
The paFLoat32, paInt16, paInt8, paUInt8 sample formats.
31
KNOWN BUGS OR LIMITATIONS
33
We do not yet support simultaneous input and output on different
34
devices. Note that some CoreAudio devices like the Roland UH30 look
35
like one device but are actually two different CoreAudio devices. The
36
Built-In audio is typically one CoreAudio device.
42
CoreAudio devices can support both input and output. But the sample
43
rates supported may be different. So we have map one or two PortAudio
44
device to each CoreAudio device depending on whether it supports
45
input, output or both.
47
When we query devices, we first get a list of CoreAudio devices. Then
48
we scan the list and add a PortAudio device for each CoreAudio device
49
that supports input. Then we make a scan for output devices.
51
14
-------------------------------------------
53
16
Notes on Newer/Default AUHAL implementation:
130
98
unnecessary. Apple clarifies its AudioOutputUnitStop() call here:
131
99
http://lists.apple.com/archives/coreaudio-api/2005/Dec/msg00055.html
133
- blocking interface: Not implemented.
101
- blocking interface: should work fine.
135
103
- multichannel: It has been tested successfully on multichannel hardware
136
from MOTU: traveler and 896HD.
104
from MOTU: traveler and 896HD. Also Presonus firepod and others. It is
105
believed to work with all Core Audio devices, including virtual devices
138
108
- sample rate conversion quality: By default, SR conversion is the maximum
139
109
available. This can be tweaked using flags pa_mac_core.h. Note that the AU
140
render quyality property is used to set the sample rat conversion quality
110
render quyality property is used to set the sample rate conversion quality
141
111
as "documented" here:
142
112
http://lists.apple.com/archives/coreaudio-api/2004/Jan/msg00141.html
144
- x86: I haven't tested it on an x86 Mac myself, but users have reported
145
being able to comiple and run it.
114
- x86/Universal Binary: to build a universal binary, be sure to use
115
the darwin makefile and not the usual configure && make combo.
119
Creating a channel map:
121
How to create the map array - Text taken From AUHAL.rtfd :
123
Clients can tell the AUHAL units which channels of the device they are interested in. For example, the client may be processing stereo data, but outputting to a six-channel device. This is done by using the kAudioOutputUnitProperty_ChannelMap property. To use this property:
126
Create an array of SInt32 that is the size of the number of channels of the device (Get the Format of the AUHAL's output Element == 0)
127
Initialize each of the array's values to -1 (-1 indicates that that channel is NOT to be presented in the conversion.)
129
Next, for each channel of your app's output, set:
130
channelMapArray[deviceOutputChannel] = desiredAppOutputChannel.
132
For example: we have a 6 channel output device and our application has a stereo source it wants to provide to the device. Suppose we want that stereo source to go to the 3rd and 4th channels of the device. The channel map would look like this: { -1, -1, 0, 1, -1, -1 }
134
Where the formats are:
135
Input Element == 0: 2 channels (- client format - settable)
136
Output Element == 0: 6 channels (- device format - NOT settable)
138
So channel 2 (zero-based) of the device will take the first channel of output and channel 3 will take the second channel of output. (This translates to the 3rd and 4th plugs of the 6 output plugs of the device of course!)
141
Create an array of SInt32 that is the size of the number of channels of the format you require for input. Get (or Set in this case as needed) the AUHAL's output Element == 1.
143
Next, for each channel of input you require, set:
144
channelMapArray[desiredAppInputChannel] = deviceOutputChannel;
146
For example: we have a 6 channel input device from which we wish to receive stereo input from the 3rd and 4th channels. The channel map looks like this: { 2, 3 }
148
Where the formats are:
149
Input Element == 0: 2 channels (- device format - NOT settable)
150
Output Element == 0: 6 channels (- client format - settable)
154
----------------------------------------
156
Notes on Original implementation:
158
by Phil Burk and Darren Gibbs
160
Last updated March 20, 2002
164
Output with very low latency, <10 msec.
165
Half duplex input or output.
166
Full duplex on the same CoreAudio device.
167
The paFLoat32, paInt16, paInt8, paUInt8 sample formats.
171
KNOWN BUGS OR LIMITATIONS
173
We do not yet support simultaneous input and output on different
174
devices. Note that some CoreAudio devices like the Roland UH30 look
175
like one device but are actually two different CoreAudio devices. The
176
Built-In audio is typically one CoreAudio device.
182
CoreAudio devices can support both input and output. But the sample
183
rates supported may be different. So we have map one or two PortAudio
184
device to each CoreAudio device depending on whether it supports
185
input, output or both.
187
When we query devices, we first get a list of CoreAudio devices. Then
188
we scan the list and add a PortAudio device for each CoreAudio device
189
that supports input. Then we make a scan for output devices.