#pragma once
#if PLATFORM(COCOA)
#if USE(APPLE_INTERNAL_SDK)
#include <CoreAudio/AudioHardwarePriv.h>
#else
#if PLATFORM(MAC)
#include <CoreAudio/AudioHardware.h>
CF_ENUM(AudioObjectPropertySelector)
{
kAudioDevicePropertyTapEnabled = 'tapd',
};
#else
WTF_EXTERN_C_BEGIN
typedef UInt32 AudioObjectPropertySelector;
typedef UInt32 AudioObjectPropertyScope;
typedef UInt32 AudioObjectPropertyElement;
struct AudioObjectPropertyAddress {
AudioObjectPropertySelector mSelector;
AudioObjectPropertyScope mScope;
AudioObjectPropertyElement mElement;
};
typedef struct AudioObjectPropertyAddress AudioObjectPropertyAddress;
CF_ENUM(AudioObjectPropertyScope)
{
kAudioObjectPropertyScopeGlobal = 'glob'
};
CF_ENUM(AudioObjectPropertySelector)
{
kAudioHardwarePropertyDefaultInputDevice = 'dIn ',
kAudioDevicePropertyTapEnabled = 'tapd',
};
CF_ENUM(int)
{
kAudioObjectSystemObject = 1
};
typedef UInt32 AudioObjectID;
typedef AudioObjectID AudioDeviceID;
extern Boolean AudioObjectHasProperty(AudioObjectID inObjectID, const AudioObjectPropertyAddress* __nullable inAddress);
extern OSStatus AudioObjectGetPropertyData(AudioObjectID inObjectID, const AudioObjectPropertyAddress* __nullable inAddress, UInt32 inQualifierDataSize, const void* __nullable inQualifierData, UInt32* __nullable ioDataSize, void* __nullable outData);
WTF_EXTERN_C_END
#endif
#endif
WTF_EXTERN_C_BEGIN
extern OSStatus AudioDeviceDuck(AudioDeviceID inDevice, Float32 inDuckedLevel, const AudioTimeStamp* __nullable inStartTime, Float32 inRampDuration);
WTF_EXTERN_C_END
#endif // PLATFORM(COCOA)