Cider Isn't Darwin Emulation, Really
Something went wrong. Try again.
4.2 kB · 126 lines
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127/*This file is part of Darling.
Copyright (C) 2020 Lubos Dolezel
Darling is free software: you can redistribute it and/or modifyit under the terms of the GNU General Public License as published bythe Free Software Foundation, either version 3 of the License, or(at your option) any later version.
Darling is distributed in the hope that it will be useful,but WITHOUT ANY WARRANTY; without even the implied warranty ofMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See theGNU General Public License for more details.
You should have received a copy of the GNU General Public Licensealong with Darling. If not, see <http://www.gnu.org/licenses/>.*/
#ifndef _AT_AUDIO_COMPONENT_H#define _AT_AUDIO_COMPONENT_H#include <CoreFoundation/CFString.h>#include <CoreFoundation/CFDictionary.h>#include <CoreServices/MacTypes.h>
#ifdef __cplusplusextern "C" {#endif
enum { kAudioComponentFlag_Unsearchable = 1, kAudioComponentFlag_SandboxSafe = 2, kAudioComponentFlag_IsV3AudioUnit = 3, kAudioComponentFlag_RequiresAsyncInstantiation = 4, kAudioComponentFlag_CanLoadInProcess = 8,};typedef UInt32 AudioComponentFlags;
enum { kAudioComponentInstantiation_LoadOutOfProcess = 1, kAudioComponentInstantiation_LoadInProcess = 2,};typedef UInt32 AudioComponentInstantiationOptions;
#pragma pack(push, 4)typedef struct { OSType componentType; OSType componentSubType; OSType componentManufacturer; UInt32 componentFlags; UInt32 componentFlagsMask;} AudioComponentDescription;#pragma pack(pop)
typedef struct OpaqueAudioComponent* AudioComponent;typedef struct ComponentInstanceRecord* AudioComponentInstance;
typedef OSStatus (*AudioComponentMethod)(void* self, ...);
typedef struct AudioComponentPlugInInterface { OSStatus (*Open)(void* self, AudioComponentInstance inst); OSStatus (*Close)(void* self); AudioComponentMethod (*Lookup)(SInt16 sel); void* reserved;} AudioComponentPlugInInterface;
typedef AudioComponentPlugInInterface * (*AudioComponentFactoryFunction)(const AudioComponentDescription*);
AudioComponent AudioComponentRegister(const AudioComponentDescription *inDesc, CFStringRef inName, UInt32 inVersion, AudioComponentFactoryFunction inFactory);
AudioComponent AudioComponentFindNext(AudioComponent inComponent, const AudioComponentDescription* desc);
UInt32 AudioComponentCount(const AudioComponentDescription* desc);
OSStatus AudioComponentCopyName(AudioComponent component, CFStringRef* outName);
OSStatus AudioComponentGetDescription(AudioComponent component, AudioComponentDescription* outDesc);
OSStatus AudioComponentGetVersion(AudioComponent component, UInt32* outVersion);
#if defined(__OBJC__)#if !TARGET_OS_IPHONE
@class NSImage;NSImage* AudioComponentGetIcon(AudioComponent component);
#else
@class UIImage;UIImage* AudioComponentGetIcon(AudioComponent component, float desiredPointSize);
#endif#endif
OSStatus AudioComponentInstanceNew(AudioComponent component, AudioComponentInstance* outInstance);void AudioComponentInstantiate(AudioComponent component, AudioComponentInstantiationOptions opts, void(^handler)(AudioComponentInstance, OSStatus));
OSStatus AudioComponentInstanceDispose(AudioComponentInstance inst);AudioComponent AudioComponentInstanceGetComponent(AudioComponentInstance inst);
Boolean AudioComponentInstanceCanDo(AudioComponentInstance inst, SInt16 sel);
OSStatus AudioComponentCopyConfigurationInfo(AudioComponent component, CFDictionaryRef* outInfo);
enum { kAudioComponentValidationResult_Unknown = 0, kAudioComponentValidationResult_Passed, kAudioComponentValidationResult_Failed, kAudioComponentValidationResult_TimedOut, kAudioComponentValidationResult_UnauthorizedError_Open, kAudioComponentValidationResult_UnauthorizedError_Init,};typedef UInt32 AudioComponentValidationResult;
#define kAudioComponentConfigurationInfo_ValidationResult "ValidationResult"#define kAudioComponentValidationParameter_TimeOut "TimeOut"#define kAudioComponentValidationParameter_ForceValidation "ForceValidation"
OSStatus AudioComponentValidate(AudioComponent component, CFDictionaryRef validationParams, AudioComponentValidationResult* result);
#ifdef __cplusplus}#endif
#endif