// Automatically generated by clay-bindgen
// language: c

import libc.*;
import unix.*;
import cocoa.corefoundation.*;

private alias OpaquePointer = RawPointer;
private alias UnknownType = Int;
private alias AUnionType = Int;


alias kAudio_UnimplementedError = 4294967292;
alias kAudio_ParamError = 4294967246;
alias kAudio_MemFullError = 4294967188;

record Struct_AudioValueRange (
    mMinimum : Double,
    mMaximum : Double,
);

alias AudioValueRange = Struct_AudioValueRange;

record Struct_AudioValueTranslation (
    mInputData : RawPointer,
    mInputDataSize : CULong,
    mOutputData : RawPointer,
    mOutputDataSize : CULong,
);

alias AudioValueTranslation = Struct_AudioValueTranslation;

record Struct_AudioBuffer (
    mNumberChannels : CULong,
    mDataByteSize : CULong,
    mData : RawPointer,
);

alias AudioBuffer = Struct_AudioBuffer;

record Struct_AudioBufferList (
    mNumberBuffers : CULong,
    mBuffers : Array[AudioBuffer,1],
);

alias AudioBufferList = Struct_AudioBufferList;

alias AudioSampleType = Short;

alias AudioUnitSampleType = CLong;

record Struct_AudioStreamBasicDescription (
    mSampleRate : Double,
    mFormatID : CULong,
    mFormatFlags : CULong,
    mBytesPerPacket : CULong,
    mFramesPerPacket : CULong,
    mBytesPerFrame : CULong,
    mChannelsPerFrame : CULong,
    mBitsPerChannel : CULong,
    mReserved : CULong,
);

alias AudioStreamBasicDescription = Struct_AudioStreamBasicDescription;

alias kAudioStreamAnyRate = 0;

alias kAudioFormatLinearPCM = 1819304813;
alias kAudioFormatAC3 = 1633889587;
alias kAudioFormat60958AC3 = 1667326771;
alias kAudioFormatAppleIMA4 = 1768775988;
alias kAudioFormatMPEG4AAC = 1633772320;
alias kAudioFormatMPEG4CELP = 1667591280;
alias kAudioFormatMPEG4HVXC = 1752594531;
alias kAudioFormatMPEG4TwinVQ = 1953986161;
alias kAudioFormatMACE3 = 1296122675;
alias kAudioFormatMACE6 = 1296122678;
alias kAudioFormatULaw = 1970037111;
alias kAudioFormatALaw = 1634492791;
alias kAudioFormatQDesign = 1363430723;
alias kAudioFormatQDesign2 = 1363430706;
alias kAudioFormatQUALCOMM = 1365470320;
alias kAudioFormatMPEGLayer1 = 778924081;
alias kAudioFormatMPEGLayer2 = 778924082;
alias kAudioFormatMPEGLayer3 = 778924083;
alias kAudioFormatTimeCode = 1953066341;
alias kAudioFormatMIDIStream = 1835623529;
alias kAudioFormatParameterValueStream = 1634760307;
alias kAudioFormatAppleLossless = 1634492771;
alias kAudioFormatMPEG4AAC_HE = 1633772392;
alias kAudioFormatMPEG4AAC_LD = 1633772396;
alias kAudioFormatMPEG4AAC_ELD = 1633772389;
alias kAudioFormatMPEG4AAC_HE_V2 = 1633772400;
alias kAudioFormatMPEG4AAC_Spatial = 1633772403;
alias kAudioFormatAMR = 1935764850;
alias kAudioFormatAudible = 1096107074;
alias kAudioFormatiLBC = 1768710755;
alias kAudioFormatDVIIntelIMA = 1836253201;
alias kAudioFormatMicrosoftGSM = 1836253233;
alias kAudioFormatAES3 = 1634038579;

alias kAudioFormatFlagIsFloat = 1;
alias kAudioFormatFlagIsBigEndian = 2;
alias kAudioFormatFlagIsSignedInteger = 4;
alias kAudioFormatFlagIsPacked = 8;
alias kAudioFormatFlagIsAlignedHigh = 16;
alias kAudioFormatFlagIsNonInterleaved = 32;
alias kAudioFormatFlagIsNonMixable = 64;
alias kAudioFormatFlagsAreAllClear = 2147483648;
alias kLinearPCMFormatFlagIsFloat = 1;
alias kLinearPCMFormatFlagIsBigEndian = 2;
alias kLinearPCMFormatFlagIsSignedInteger = 4;
alias kLinearPCMFormatFlagIsPacked = 8;
alias kLinearPCMFormatFlagIsAlignedHigh = 16;
alias kLinearPCMFormatFlagIsNonInterleaved = 32;
alias kLinearPCMFormatFlagIsNonMixable = 64;
alias kLinearPCMFormatFlagsSampleFractionShift = 7;
alias kLinearPCMFormatFlagsSampleFractionMask = 8064;
alias kLinearPCMFormatFlagsAreAllClear = 2147483648;
alias kAppleLosslessFormatFlag_16BitSourceData = 1;
alias kAppleLosslessFormatFlag_20BitSourceData = 2;
alias kAppleLosslessFormatFlag_24BitSourceData = 3;
alias kAppleLosslessFormatFlag_32BitSourceData = 4;

alias kAudioFormatFlagsNativeEndian = 0;
alias kAudioFormatFlagsCanonical = 12;
alias kAudioFormatFlagsAudioUnitCanonical = 3116;
alias kAudioFormatFlagsNativeFloatPacked = 9;

record Struct_AudioStreamPacketDescription (
    mStartOffset : Int64,
    mVariableFramesInPacket : CULong,
    mDataByteSize : CULong,
);

alias AudioStreamPacketDescription = Struct_AudioStreamPacketDescription;

record Struct_SMPTETime (
    mSubframes : Short,
    mSubframeDivisor : Short,
    mCounter : CULong,
    mType : CULong,
    mFlags : CULong,
    mHours : Short,
    mMinutes : Short,
    mSeconds : Short,
    mFrames : Short,
);

alias SMPTETime = Struct_SMPTETime;

alias kSMPTETimeType24 = 0;
alias kSMPTETimeType25 = 1;
alias kSMPTETimeType30Drop = 2;
alias kSMPTETimeType30 = 3;
alias kSMPTETimeType2997 = 4;
alias kSMPTETimeType2997Drop = 5;
alias kSMPTETimeType60 = 6;
alias kSMPTETimeType5994 = 7;
alias kSMPTETimeType60Drop = 8;
alias kSMPTETimeType5994Drop = 9;
alias kSMPTETimeType50 = 10;
alias kSMPTETimeType2398 = 11;

alias kSMPTETimeValid = 1;
alias kSMPTETimeRunning = 2;

record Struct_AudioTimeStamp (
    mSampleTime : Double,
    mHostTime : UInt64,
    mRateScalar : Double,
    mWordClockTime : UInt64,
    mSMPTETime : SMPTETime,
    mFlags : CULong,
    mReserved : CULong,
);

alias AudioTimeStamp = Struct_AudioTimeStamp;

alias kAudioTimeStampSampleTimeValid = 1;
alias kAudioTimeStampHostTimeValid = 2;
alias kAudioTimeStampRateScalarValid = 4;
alias kAudioTimeStampWordClockTimeValid = 8;
alias kAudioTimeStampSMPTETimeValid = 16;

alias kAudioTimeStampSampleHostTimeValid = 3;

record Struct_AudioClassDescription (
    mType : CULong,
    mSubType : CULong,
    mManufacturer : CULong,
);

alias AudioClassDescription = Struct_AudioClassDescription;

alias AudioChannelLabel = CULong;

alias AudioChannelLayoutTag = CULong;

record Struct_AudioChannelDescription (
    mChannelLabel : CULong,
    mChannelFlags : CULong,
    mCoordinates : Array[Float,3],
);

alias AudioChannelDescription = Struct_AudioChannelDescription;

record Struct_AudioChannelLayout (
    mChannelLayoutTag : CULong,
    mChannelBitmap : CULong,
    mNumberChannelDescriptions : CULong,
    mChannelDescriptions : Array[AudioChannelDescription,1],
);

alias AudioChannelLayout = Struct_AudioChannelLayout;

alias kAudioChannelLabel_Unknown = 4294967295;
alias kAudioChannelLabel_Unused = 0;
alias kAudioChannelLabel_UseCoordinates = 100;
alias kAudioChannelLabel_Left = 1;
alias kAudioChannelLabel_Right = 2;
alias kAudioChannelLabel_Center = 3;
alias kAudioChannelLabel_LFEScreen = 4;
alias kAudioChannelLabel_LeftSurround = 5;
alias kAudioChannelLabel_RightSurround = 6;
alias kAudioChannelLabel_LeftCenter = 7;
alias kAudioChannelLabel_RightCenter = 8;
alias kAudioChannelLabel_CenterSurround = 9;
alias kAudioChannelLabel_LeftSurroundDirect = 10;
alias kAudioChannelLabel_RightSurroundDirect = 11;
alias kAudioChannelLabel_TopCenterSurround = 12;
alias kAudioChannelLabel_VerticalHeightLeft = 13;
alias kAudioChannelLabel_VerticalHeightCenter = 14;
alias kAudioChannelLabel_VerticalHeightRight = 15;
alias kAudioChannelLabel_TopBackLeft = 16;
alias kAudioChannelLabel_TopBackCenter = 17;
alias kAudioChannelLabel_TopBackRight = 18;
alias kAudioChannelLabel_RearSurroundLeft = 33;
alias kAudioChannelLabel_RearSurroundRight = 34;
alias kAudioChannelLabel_LeftWide = 35;
alias kAudioChannelLabel_RightWide = 36;
alias kAudioChannelLabel_LFE2 = 37;
alias kAudioChannelLabel_LeftTotal = 38;
alias kAudioChannelLabel_RightTotal = 39;
alias kAudioChannelLabel_HearingImpaired = 40;
alias kAudioChannelLabel_Narration = 41;
alias kAudioChannelLabel_Mono = 42;
alias kAudioChannelLabel_DialogCentricMix = 43;
alias kAudioChannelLabel_CenterSurroundDirect = 44;
alias kAudioChannelLabel_Haptic = 45;
alias kAudioChannelLabel_Ambisonic_W = 200;
alias kAudioChannelLabel_Ambisonic_X = 201;
alias kAudioChannelLabel_Ambisonic_Y = 202;
alias kAudioChannelLabel_Ambisonic_Z = 203;
alias kAudioChannelLabel_MS_Mid = 204;
alias kAudioChannelLabel_MS_Side = 205;
alias kAudioChannelLabel_XY_X = 206;
alias kAudioChannelLabel_XY_Y = 207;
alias kAudioChannelLabel_HeadphonesLeft = 301;
alias kAudioChannelLabel_HeadphonesRight = 302;
alias kAudioChannelLabel_ClickTrack = 304;
alias kAudioChannelLabel_ForeignLanguage = 305;
alias kAudioChannelLabel_Discrete = 400;
alias kAudioChannelLabel_Discrete_0 = 65536;
alias kAudioChannelLabel_Discrete_1 = 65537;
alias kAudioChannelLabel_Discrete_2 = 65538;
alias kAudioChannelLabel_Discrete_3 = 65539;
alias kAudioChannelLabel_Discrete_4 = 65540;
alias kAudioChannelLabel_Discrete_5 = 65541;
alias kAudioChannelLabel_Discrete_6 = 65542;
alias kAudioChannelLabel_Discrete_7 = 65543;
alias kAudioChannelLabel_Discrete_8 = 65544;
alias kAudioChannelLabel_Discrete_9 = 65545;
alias kAudioChannelLabel_Discrete_10 = 65546;
alias kAudioChannelLabel_Discrete_11 = 65547;
alias kAudioChannelLabel_Discrete_12 = 65548;
alias kAudioChannelLabel_Discrete_13 = 65549;
alias kAudioChannelLabel_Discrete_14 = 65550;
alias kAudioChannelLabel_Discrete_15 = 65551;
alias kAudioChannelLabel_Discrete_65535 = 131071;

alias kAudioChannelBit_Left = 1;
alias kAudioChannelBit_Right = 2;
alias kAudioChannelBit_Center = 4;
alias kAudioChannelBit_LFEScreen = 8;
alias kAudioChannelBit_LeftSurround = 16;
alias kAudioChannelBit_RightSurround = 32;
alias kAudioChannelBit_LeftCenter = 64;
alias kAudioChannelBit_RightCenter = 128;
alias kAudioChannelBit_CenterSurround = 256;
alias kAudioChannelBit_LeftSurroundDirect = 512;
alias kAudioChannelBit_RightSurroundDirect = 1024;
alias kAudioChannelBit_TopCenterSurround = 2048;
alias kAudioChannelBit_VerticalHeightLeft = 4096;
alias kAudioChannelBit_VerticalHeightCenter = 8192;
alias kAudioChannelBit_VerticalHeightRight = 16384;
alias kAudioChannelBit_TopBackLeft = 32768;
alias kAudioChannelBit_TopBackCenter = 65536;
alias kAudioChannelBit_TopBackRight = 131072;

alias kAudioChannelFlags_AllOff = 0;
alias kAudioChannelFlags_RectangularCoordinates = 1;
alias kAudioChannelFlags_SphericalCoordinates = 2;
alias kAudioChannelFlags_Meters = 4;

alias kAudioChannelCoordinates_LeftRight = 0;
alias kAudioChannelCoordinates_BackFront = 1;
alias kAudioChannelCoordinates_DownUp = 2;
alias kAudioChannelCoordinates_Azimuth = 0;
alias kAudioChannelCoordinates_Elevation = 1;
alias kAudioChannelCoordinates_Distance = 2;

alias kAudioChannelLayoutTag_UseChannelDescriptions = 0;
alias kAudioChannelLayoutTag_UseChannelBitmap = 65536;
alias kAudioChannelLayoutTag_Mono = 6553601;
alias kAudioChannelLayoutTag_Stereo = 6619138;
alias kAudioChannelLayoutTag_StereoHeadphones = 6684674;
alias kAudioChannelLayoutTag_MatrixStereo = 6750210;
alias kAudioChannelLayoutTag_MidSide = 6815746;
alias kAudioChannelLayoutTag_XY = 6881282;
alias kAudioChannelLayoutTag_Binaural = 6946818;
alias kAudioChannelLayoutTag_Ambisonic_B_Format = 7012356;
alias kAudioChannelLayoutTag_Quadraphonic = 7077892;
alias kAudioChannelLayoutTag_Pentagonal = 7143429;
alias kAudioChannelLayoutTag_Hexagonal = 7208966;
alias kAudioChannelLayoutTag_Octagonal = 7274504;
alias kAudioChannelLayoutTag_Cube = 7340040;
alias kAudioChannelLayoutTag_MPEG_1_0 = 6553601;
alias kAudioChannelLayoutTag_MPEG_2_0 = 6619138;
alias kAudioChannelLayoutTag_MPEG_3_0_A = 7405571;
alias kAudioChannelLayoutTag_MPEG_3_0_B = 7471107;
alias kAudioChannelLayoutTag_MPEG_4_0_A = 7536644;
alias kAudioChannelLayoutTag_MPEG_4_0_B = 7602180;
alias kAudioChannelLayoutTag_MPEG_5_0_A = 7667717;
alias kAudioChannelLayoutTag_MPEG_5_0_B = 7733253;
alias kAudioChannelLayoutTag_MPEG_5_0_C = 7798789;
alias kAudioChannelLayoutTag_MPEG_5_0_D = 7864325;
alias kAudioChannelLayoutTag_MPEG_5_1_A = 7929862;
alias kAudioChannelLayoutTag_MPEG_5_1_B = 7995398;
alias kAudioChannelLayoutTag_MPEG_5_1_C = 8060934;
alias kAudioChannelLayoutTag_MPEG_5_1_D = 8126470;
alias kAudioChannelLayoutTag_MPEG_6_1_A = 8192007;
alias kAudioChannelLayoutTag_MPEG_7_1_A = 8257544;
alias kAudioChannelLayoutTag_MPEG_7_1_B = 8323080;
alias kAudioChannelLayoutTag_MPEG_7_1_C = 8388616;
alias kAudioChannelLayoutTag_Emagic_Default_7_1 = 8454152;
alias kAudioChannelLayoutTag_SMPTE_DTV = 8519688;
alias kAudioChannelLayoutTag_ITU_1_0 = 6553601;
alias kAudioChannelLayoutTag_ITU_2_0 = 6619138;
alias kAudioChannelLayoutTag_ITU_2_1 = 8585219;
alias kAudioChannelLayoutTag_ITU_2_2 = 8650756;
alias kAudioChannelLayoutTag_ITU_3_0 = 7405571;
alias kAudioChannelLayoutTag_ITU_3_1 = 7536644;
alias kAudioChannelLayoutTag_ITU_3_2 = 7667717;
alias kAudioChannelLayoutTag_ITU_3_2_1 = 7929862;
alias kAudioChannelLayoutTag_ITU_3_4_1 = 8388616;
alias kAudioChannelLayoutTag_DVD_0 = 6553601;
alias kAudioChannelLayoutTag_DVD_1 = 6619138;
alias kAudioChannelLayoutTag_DVD_2 = 8585219;
alias kAudioChannelLayoutTag_DVD_3 = 8650756;
alias kAudioChannelLayoutTag_DVD_4 = 8716291;
alias kAudioChannelLayoutTag_DVD_5 = 8781828;
alias kAudioChannelLayoutTag_DVD_6 = 8847365;
alias kAudioChannelLayoutTag_DVD_7 = 7405571;
alias kAudioChannelLayoutTag_DVD_8 = 7536644;
alias kAudioChannelLayoutTag_DVD_9 = 7667717;
alias kAudioChannelLayoutTag_DVD_10 = 8912900;
alias kAudioChannelLayoutTag_DVD_11 = 8978437;
alias kAudioChannelLayoutTag_DVD_12 = 7929862;
alias kAudioChannelLayoutTag_DVD_13 = 7536644;
alias kAudioChannelLayoutTag_DVD_14 = 7667717;
alias kAudioChannelLayoutTag_DVD_15 = 8912900;
alias kAudioChannelLayoutTag_DVD_16 = 8978437;
alias kAudioChannelLayoutTag_DVD_17 = 7929862;
alias kAudioChannelLayoutTag_DVD_18 = 9043973;
alias kAudioChannelLayoutTag_DVD_19 = 7733253;
alias kAudioChannelLayoutTag_DVD_20 = 7995398;
alias kAudioChannelLayoutTag_AudioUnit_4 = 7077892;
alias kAudioChannelLayoutTag_AudioUnit_5 = 7143429;
alias kAudioChannelLayoutTag_AudioUnit_6 = 7208966;
alias kAudioChannelLayoutTag_AudioUnit_8 = 7274504;
alias kAudioChannelLayoutTag_AudioUnit_5_0 = 7733253;
alias kAudioChannelLayoutTag_AudioUnit_6_0 = 9109510;
alias kAudioChannelLayoutTag_AudioUnit_7_0 = 9175047;
alias kAudioChannelLayoutTag_AudioUnit_7_0_Front = 9699335;
alias kAudioChannelLayoutTag_AudioUnit_5_1 = 7929862;
alias kAudioChannelLayoutTag_AudioUnit_6_1 = 8192007;
alias kAudioChannelLayoutTag_AudioUnit_7_1 = 8388616;
alias kAudioChannelLayoutTag_AudioUnit_7_1_Front = 8257544;
alias kAudioChannelLayoutTag_AAC_3_0 = 7471107;
alias kAudioChannelLayoutTag_AAC_Quadraphonic = 7077892;
alias kAudioChannelLayoutTag_AAC_4_0 = 7602180;
alias kAudioChannelLayoutTag_AAC_5_0 = 7864325;
alias kAudioChannelLayoutTag_AAC_5_1 = 8126470;
alias kAudioChannelLayoutTag_AAC_6_0 = 9240582;
alias kAudioChannelLayoutTag_AAC_6_1 = 9306119;
alias kAudioChannelLayoutTag_AAC_7_0 = 9371655;
alias kAudioChannelLayoutTag_AAC_7_1 = 8323080;
alias kAudioChannelLayoutTag_AAC_Octagonal = 9437192;
alias kAudioChannelLayoutTag_TMH_10_2_std = 9502736;
alias kAudioChannelLayoutTag_TMH_10_2_full = 9568277;
alias kAudioChannelLayoutTag_AC3_1_0_1 = 9764866;
alias kAudioChannelLayoutTag_AC3_3_0 = 9830403;
alias kAudioChannelLayoutTag_AC3_3_1 = 9895940;
alias kAudioChannelLayoutTag_AC3_3_0_1 = 9961476;
alias kAudioChannelLayoutTag_AC3_2_1_1 = 10027012;
alias kAudioChannelLayoutTag_AC3_3_1_1 = 10092549;
alias kAudioChannelLayoutTag_EAC_6_0_A = 10158086;
alias kAudioChannelLayoutTag_EAC_7_0_A = 10223623;
alias kAudioChannelLayoutTag_EAC3_6_1_A = 10289159;
alias kAudioChannelLayoutTag_EAC3_6_1_B = 10354695;
alias kAudioChannelLayoutTag_EAC3_6_1_C = 10420231;
alias kAudioChannelLayoutTag_EAC3_7_1_A = 10485768;
alias kAudioChannelLayoutTag_EAC3_7_1_B = 10551304;
alias kAudioChannelLayoutTag_EAC3_7_1_C = 10616840;
alias kAudioChannelLayoutTag_EAC3_7_1_D = 10682376;
alias kAudioChannelLayoutTag_EAC3_7_1_E = 10747912;
alias kAudioChannelLayoutTag_EAC3_7_1_F = 10813448;
alias kAudioChannelLayoutTag_EAC3_7_1_G = 10878984;
alias kAudioChannelLayoutTag_EAC3_7_1_H = 10944520;
alias kAudioChannelLayoutTag_DTS_3_1 = 11010052;
alias kAudioChannelLayoutTag_DTS_4_1 = 11075589;
alias kAudioChannelLayoutTag_DTS_6_0_A = 11141126;
alias kAudioChannelLayoutTag_DTS_6_0_B = 11206662;
alias kAudioChannelLayoutTag_DTS_6_0_C = 11272198;
alias kAudioChannelLayoutTag_DTS_6_1_A = 11337735;
alias kAudioChannelLayoutTag_DTS_6_1_B = 11403271;
alias kAudioChannelLayoutTag_DTS_6_1_C = 11468807;
alias kAudioChannelLayoutTag_DTS_7_0 = 11534343;
alias kAudioChannelLayoutTag_DTS_7_1 = 11599880;
alias kAudioChannelLayoutTag_DTS_8_0_A = 11665416;
alias kAudioChannelLayoutTag_DTS_8_0_B = 11730952;
alias kAudioChannelLayoutTag_DTS_8_1_A = 11796489;
alias kAudioChannelLayoutTag_DTS_8_1_B = 11862025;
alias kAudioChannelLayoutTag_DTS_6_1_D = 11927559;
alias kAudioChannelLayoutTag_DiscreteInOrder = 9633792;
alias kAudioChannelLayoutTag_Unknown = 4294901760;

alias kMPEG4Object_AAC_Main = 1;
alias kMPEG4Object_AAC_LC = 2;
alias kMPEG4Object_AAC_SSR = 3;
alias kMPEG4Object_AAC_LTP = 4;
alias kMPEG4Object_AAC_SBR = 5;
alias kMPEG4Object_AAC_Scalable = 6;
alias kMPEG4Object_TwinVQ = 7;
alias kMPEG4Object_CELP = 8;
alias kMPEG4Object_HVXC = 9;
