PortAudio 2.0
|
00001 #ifndef PA_MAC_CORE_H 00002 #define PA_MAC_CORE_H 00003 /* 00004 * PortAudio Portable Real-Time Audio Library 00005 * Macintosh Core Audio specific extensions 00006 * portaudio.h should be included before this file. 00007 * 00008 * Copyright (c) 2005-2006 Bjorn Roche 00009 * 00010 * Permission is hereby granted, free of charge, to any person obtaining 00011 * a copy of this software and associated documentation files 00012 * (the "Software"), to deal in the Software without restriction, 00013 * including without limitation the rights to use, copy, modify, merge, 00014 * publish, distribute, sublicense, and/or sell copies of the Software, 00015 * and to permit persons to whom the Software is furnished to do so, 00016 * subject to the following conditions: 00017 * 00018 * The above copyright notice and this permission notice shall be 00019 * included in all copies or substantial portions of the Software. 00020 * 00021 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 00022 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 00023 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 00024 * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR 00025 * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF 00026 * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 00027 * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 00028 */ 00029 00030 /* 00031 * The text above constitutes the entire PortAudio license; however, 00032 * the PortAudio community also makes the following non-binding requests: 00033 * 00034 * Any person wishing to distribute modifications to the Software is 00035 * requested to send the modifications to the original developer so that 00036 * they can be incorporated into the canonical version. It is also 00037 * requested that these non-binding requests be included along with the 00038 * license above. 00039 */ 00040 00046 #include "portaudio.h" 00047 00048 #include <AudioUnit/AudioUnit.h> 00049 //#include <AudioToolbox/AudioToolbox.h> 00050 00051 #ifdef __cplusplus 00052 extern "C" { 00053 #endif 00054 00055 00063 typedef struct 00064 { 00065 unsigned long size; 00066 PaHostApiTypeId hostApiType; 00067 unsigned long version; 00068 unsigned long flags; 00069 SInt32 const * channelMap; 00070 unsigned long channelMapSize; 00071 } PaMacCoreStreamInfo; 00072 00084 void PaMacCore_SetupStreamInfo( PaMacCoreStreamInfo *data, unsigned long flags ); 00085 00091 void PaMacCore_SetupChannelMap( PaMacCoreStreamInfo *data, const SInt32 * const channelMap, unsigned long channelMapSize ); 00092 00100 AudioDeviceID PaMacCore_GetStreamInputDevice( PaStream* s ); 00101 00109 AudioDeviceID PaMacCore_GetStreamOutputDevice( PaStream* s ); 00110 00125 const char *PaMacCore_GetChannelName( int device, int channelIndex, bool input ); 00126 00141 #define paMacCoreChangeDeviceParameters (0x01) 00142 00146 #define paMacCoreFailIfConversionRequired (0x02) 00147 00150 #define paMacCoreConversionQualityMin (0x0100) 00151 #define paMacCoreConversionQualityMedium (0x0200) 00152 #define paMacCoreConversionQualityLow (0x0300) 00153 #define paMacCoreConversionQualityHigh (0x0400) 00154 #define paMacCoreConversionQualityMax (0x0000) 00155 00164 #define paMacCorePlayNice (0x00) 00165 00167 #define paMacCorePro (0x01) 00168 00169 #define paMacCoreMinimizeCPUButPlayNice (0x0100) 00170 00171 #define paMacCoreMinimizeCPU (0x0101) 00172 00173 00174 #ifdef __cplusplus 00175 } 00176 #endif 00178 #endif