this repo has no description
1#ifndef AUDIOUNITPROPERTIES_H
2#define AUDIOUNITPROPERTIES_H
3#include <CoreAudio/CoreAudioTypes.h>
4#include <AudioToolbox/AUComponent.h>
5#include <CoreFoundation/CoreFoundation.h>
6
7enum {
8 kAudioUnitScope_Global = 0,
9 kAudioUnitScope_Input = 1,
10 kAudioUnitScope_Output = 2,
11 kAudioUnitScope_Group = 3,
12 kAudioUnitScope_Part = 4,
13 kAudioUnitScope_Note = 5,
14 kAudioUnitScope_Layer = 6,
15 kAudioUnitScope_LayerItem = 7
16};
17
18enum
19{
20
21 kAudioUnitProperty_ClassInfo = 0,
22 kAudioUnitProperty_MakeConnection = 1,
23 kAudioUnitProperty_SampleRate = 2,
24 kAudioUnitProperty_ParameterList = 3,
25 kAudioUnitProperty_ParameterInfo = 4,
26 kAudioUnitProperty_CPULoad = 6,
27 kAudioUnitProperty_StreamFormat = 8,
28 kAudioUnitProperty_ElementCount = 11,
29 kAudioUnitProperty_Latency = 12,
30 kAudioUnitProperty_SupportedNumChannels = 13,
31 kAudioUnitProperty_MaximumFramesPerSlice = 14,
32 kAudioUnitProperty_ParameterValueStrings = 16,
33 kAudioUnitProperty_AudioChannelLayout = 19,
34 kAudioUnitProperty_TailTime = 20,
35 kAudioUnitProperty_BypassEffect = 21,
36 kAudioUnitProperty_LastRenderError = 22,
37 kAudioUnitProperty_SetRenderCallback = 23,
38 kAudioUnitProperty_FactoryPresets = 24,
39 kAudioUnitProperty_RenderQuality = 26,
40 kAudioUnitProperty_HostCallbacks = 27,
41 kAudioUnitProperty_InPlaceProcessing = 29,
42 kAudioUnitProperty_ElementName = 30,
43 kAudioUnitProperty_SupportedChannelLayoutTags = 32,
44 kAudioUnitProperty_PresentPreset = 36,
45 kAudioUnitProperty_DependentParameters = 45,
46 kAudioUnitProperty_InputSamplesInOutput = 49,
47 kAudioUnitProperty_ShouldAllocateBuffer = 51,
48 kAudioUnitProperty_FrequencyResponse = 52,
49 kAudioUnitProperty_ParameterHistoryInfo = 53,
50 kAudioUnitProperty_NickName = 54,
51 kAudioUnitProperty_OfflineRender = 37,
52 kAudioUnitProperty_ParameterIDName = 34,
53 kAudioUnitProperty_ParameterStringFromValue = 33,
54 kAudioUnitProperty_ParameterClumpName = 35,
55 kAudioUnitProperty_ParameterValueFromString = 38,
56 kAudioUnitProperty_ContextName = 25,
57 kAudioUnitProperty_PresentationLatency = 40,
58 kAudioUnitProperty_ClassInfoFromDocument = 50,
59 kAudioUnitProperty_RequestViewController = 56,
60 kAudioUnitProperty_ParametersForOverview = 57,
61 kAudioUnitProperty_SupportsMPE = 58,
62
63 kAudioUnitProperty_FastDispatch = 5,
64 kAudioUnitProperty_SetExternalBuffer = 15,
65 kAudioUnitProperty_GetUIComponentList = 18,
66 kAudioUnitProperty_CocoaUI = 31,
67 kAudioUnitProperty_IconLocation = 39,
68 kAudioUnitProperty_AUHostIdentifier = 46,
69
70 kAudioUnitProperty_MIDIOutputCallbackInfo = 47,
71 kAudioUnitProperty_MIDIOutputCallback = 48,
72};
73typedef struct AudioUnitConnection {
74 AudioUnit _Nullable sourceAudioUnit;
75 UInt32 sourceOutputNumber;
76 UInt32 destInputNumber;
77} AudioUnitConnection;
78
79typedef struct AUChannelInfo {
80 SInt16 inChannels;
81 SInt16 outChannels;
82} AUChannelInfo;
83
84
85typedef struct AudioUnitExternalBuffer {
86 Byte * buffer;
87 UInt32 size;
88} AudioUnitExternalBuffer;
89
90typedef struct AURenderCallbackStruct {
91 AURenderCallback _Nullable inputProc;
92 void * _Nullable inputProcRefCon;
93} AURenderCallbackStruct;
94typedef struct AUPreset {
95 SInt32 presetNumber;
96 CFStringRef _Nullable presetName;
97} AUPreset;
98
99
100enum {
101 kRenderQuality_Max = 127,
102 kRenderQuality_High = 96,
103 kRenderQuality_Medium = 64,
104 kRenderQuality_Low = 32,
105 kRenderQuality_Min = 0
106};
107enum {
108 kNumberOfResponseFrequencies = 1024
109};
110typedef struct AudioUnitFrequencyResponseBin
111{
112 Float64 mFrequency;
113 Float64 mMagnitude;
114} AudioUnitFrequencyResponseBin;
115typedef OSStatus (*HostCallback_GetBeatAndTempo)(void * _Nullable inHostUserData,
116 Float64 * _Nullable outCurrentBeat,
117 Float64 * _Nullable outCurrentTempo);
118typedef OSStatus (*HostCallback_GetMusicalTimeLocation)(void * _Nullable inHostUserData,
119 UInt32 * _Nullable outDeltaSampleOffsetToNextBeat,
120 Float32 * _Nullable outTimeSig_Numerator,
121 UInt32 * _Nullable outTimeSig_Denominator,
122 Float64 * _Nullable outCurrentMeasureDownBeat);
123typedef OSStatus (*HostCallback_GetTransportState)(void * _Nullable inHostUserData,
124 Boolean * _Nullable outIsPlaying,
125 Boolean * _Nullable outTransportStateChanged,
126 Float64 * _Nullable outCurrentSampleInTimeLine,
127 Boolean * _Nullable outIsCycling,
128 Float64 * _Nullable outCycleStartBeat,
129 Float64 * _Nullable outCycleEndBeat);
130typedef OSStatus (*HostCallback_GetTransportState2)(void * _Nullable inHostUserData,
131 Boolean * _Nullable outIsPlaying,
132 Boolean * _Nullable outIsRecording,
133 Boolean * _Nullable outTransportStateChanged,
134 Float64 * _Nullable outCurrentSampleInTimeLine,
135 Boolean * _Nullable outIsCycling,
136 Float64 * _Nullable outCycleStartBeat,
137 Float64 * _Nullable outCycleEndBeat);
138
139
140typedef struct HostCallbackInfo {
141 void * _Nullable hostUserData;
142 HostCallback_GetBeatAndTempo _Nullable beatAndTempoProc;
143 HostCallback_GetMusicalTimeLocation _Nullable musicalTimeLocationProc;
144 HostCallback_GetTransportState _Nullable transportStateProc;
145 HostCallback_GetTransportState2 _Nullable transportStateProc2;
146} HostCallbackInfo;
147
148
149
150
151
152
153typedef struct AUDependentParameter {
154 AudioUnitScope mScope;
155 AudioUnitParameterID mParameterID;
156} AUDependentParameter;
157typedef struct AudioUnitCocoaViewInfo {
158 CFURLRef mCocoaAUViewBundleLocation;
159 CFStringRef _Nonnull mCocoaAUViewClass[1];
160} AudioUnitCocoaViewInfo;
161
162
163
164
165
166typedef struct AUHostVersionIdentifier {
167 CFStringRef hostName;
168 UInt32 hostVersion;
169} AUHostVersionIdentifier;
170
171
172
173
174
175struct MIDIPacketList;
176
177
178
179
180
181typedef OSStatus
182(*AUMIDIOutputCallback)(void * _Nullable userData,
183 const AudioTimeStamp * timeStamp,
184 UInt32 midiOutNum,
185 const struct MIDIPacketList * pktlist);
186
187
188
189
190
191
192typedef struct AUMIDIOutputCallbackStruct {
193 AUMIDIOutputCallback midiOutputCallback;
194 void * _Nullable userData;
195} AUMIDIOutputCallbackStruct;
196
197
198
199
200
201
202typedef struct AUInputSamplesInOutputCallbackStruct {
203 AUInputSamplesInOutputCallback inputToOutputCallback;
204 void * _Nullable userData;
205} AUInputSamplesInOutputCallbackStruct;
206typedef struct AudioUnitParameterHistoryInfo
207{
208 Float32 updatesPerSecond;
209 Float32 historyDurationInSeconds;
210} AudioUnitParameterHistoryInfo;
211typedef UInt32 AudioUnitParameterUnit; enum
212{
213 kAudioUnitParameterUnit_Generic = 0,
214 kAudioUnitParameterUnit_Indexed = 1,
215 kAudioUnitParameterUnit_Boolean = 2,
216 kAudioUnitParameterUnit_Percent = 3,
217 kAudioUnitParameterUnit_Seconds = 4,
218 kAudioUnitParameterUnit_SampleFrames = 5,
219 kAudioUnitParameterUnit_Phase = 6,
220 kAudioUnitParameterUnit_Rate = 7,
221 kAudioUnitParameterUnit_Hertz = 8,
222 kAudioUnitParameterUnit_Cents = 9,
223 kAudioUnitParameterUnit_RelativeSemiTones = 10,
224 kAudioUnitParameterUnit_MIDINoteNumber = 11,
225 kAudioUnitParameterUnit_MIDIController = 12,
226 kAudioUnitParameterUnit_Decibels = 13,
227 kAudioUnitParameterUnit_LinearGain = 14,
228 kAudioUnitParameterUnit_Degrees = 15,
229 kAudioUnitParameterUnit_EqualPowerCrossfade = 16,
230 kAudioUnitParameterUnit_MixerFaderCurve1 = 17,
231 kAudioUnitParameterUnit_Pan = 18,
232 kAudioUnitParameterUnit_Meters = 19,
233 kAudioUnitParameterUnit_AbsoluteCents = 20,
234 kAudioUnitParameterUnit_Octaves = 21,
235 kAudioUnitParameterUnit_BPM = 22,
236 kAudioUnitParameterUnit_Beats = 23,
237 kAudioUnitParameterUnit_Milliseconds = 24,
238 kAudioUnitParameterUnit_Ratio = 25,
239 kAudioUnitParameterUnit_CustomUnit = 26
240};
241typedef UInt32 AudioUnitParameterOptions; enum
242{
243 kAudioUnitParameterFlag_CFNameRelease = (1UL << 4),
244
245 kAudioUnitParameterFlag_OmitFromPresets = (1UL << 13),
246 kAudioUnitParameterFlag_PlotHistory = (1UL << 14),
247 kAudioUnitParameterFlag_MeterReadOnly = (1UL << 15),
248
249
250 kAudioUnitParameterFlag_DisplayMask = (7UL << 16) | (1UL << 22),
251 kAudioUnitParameterFlag_DisplaySquareRoot = (1UL << 16),
252 kAudioUnitParameterFlag_DisplaySquared = (2UL << 16),
253 kAudioUnitParameterFlag_DisplayCubed = (3UL << 16),
254 kAudioUnitParameterFlag_DisplayCubeRoot = (4UL << 16),
255 kAudioUnitParameterFlag_DisplayExponential = (5UL << 16),
256
257 kAudioUnitParameterFlag_HasClump = (1UL << 20),
258 kAudioUnitParameterFlag_ValuesHaveStrings = (1UL << 21),
259
260 kAudioUnitParameterFlag_DisplayLogarithmic = (1UL << 22),
261
262 kAudioUnitParameterFlag_IsHighResolution = (1UL << 23),
263 kAudioUnitParameterFlag_NonRealTime = (1UL << 24),
264 kAudioUnitParameterFlag_CanRamp = (1UL << 25),
265 kAudioUnitParameterFlag_ExpertMode = (1UL << 26),
266 kAudioUnitParameterFlag_HasCFNameString = (1UL << 27),
267 kAudioUnitParameterFlag_IsGlobalMeta = (1UL << 28),
268 kAudioUnitParameterFlag_IsElementMeta = (1UL << 29),
269 kAudioUnitParameterFlag_IsReadable = (1UL << 30),
270 kAudioUnitParameterFlag_IsWritable = (1UL << 31)
271};
272typedef struct AudioUnitParameterInfo
273{
274 char name[52];
275 CFStringRef _Nullable unitName;
276 UInt32 clumpID;
277 CFStringRef _Nullable cfNameString;
278 AudioUnitParameterUnit unit;
279 AudioUnitParameterValue minValue;
280 AudioUnitParameterValue maxValue;
281 AudioUnitParameterValue defaultValue;
282 AudioUnitParameterOptions flags;
283} AudioUnitParameterInfo;
284
285
286
287
288
289enum {
290 kAudioUnitClumpID_System = 0
291};
292
293
294
295static __inline__ __attribute__((always_inline)) AudioUnitParameterOptions GetAudioUnitParameterDisplayType(AudioUnitParameterOptions flags)
296{
297 return flags & kAudioUnitParameterFlag_DisplayMask;
298}
299
300static __inline__ __attribute__((always_inline)) AudioUnitParameterOptions SetAudioUnitParameterDisplayType(AudioUnitParameterOptions flags, AudioUnitParameterOptions displayType)
301{
302 return (flags & ~kAudioUnitParameterFlag_DisplayMask) | displayType;
303}
304enum {
305 kAudioUnitParameterName_Full = -1
306};
307
308
309
310
311
312typedef struct AudioUnitParameterNameInfo {
313 AudioUnitParameterID inID;
314 SInt32 inDesiredLength;
315 CFStringRef _Nullable outName;
316} AudioUnitParameterIDName;
317
318
319
320
321
322typedef struct AudioUnitParameterStringFromValue {
323 AudioUnitParameterID inParamID;
324 const AudioUnitParameterValue * inValue;
325 CFStringRef _Nullable outString;
326} AudioUnitParameterStringFromValue;
327
328
329
330
331
332typedef struct AudioUnitParameterValueFromString {
333 AudioUnitParameterID inParamID;
334 CFStringRef inString;
335 AudioUnitParameterValue outValue;
336} AudioUnitParameterValueFromString;
337enum {
338
339 kAudioOutputUnitProperty_IsRunning = 2001
340};
341enum {
342 kAudioUnitProperty_AllParameterMIDIMappings = 41,
343 kAudioUnitProperty_AddParameterMIDIMapping = 42,
344 kAudioUnitProperty_RemoveParameterMIDIMapping = 43,
345 kAudioUnitProperty_HotMapParameterMIDIMapping = 44
346};
347typedef UInt32 AUParameterMIDIMappingFlags; enum {
348 kAUParameterMIDIMapping_AnyChannelFlag = (1L << 0),
349 kAUParameterMIDIMapping_AnyNoteFlag = (1L << 1),
350 kAUParameterMIDIMapping_SubRange = (1L << 2),
351 kAUParameterMIDIMapping_Toggle = (1L << 3),
352 kAUParameterMIDIMapping_Bipolar = (1L << 4),
353 kAUParameterMIDIMapping_Bipolar_On = (1L << 5)
354};
355typedef struct AUParameterMIDIMapping
356{
357 AudioUnitScope mScope;
358 AudioUnitElement mElement;
359 AudioUnitParameterID mParameterID;
360 AUParameterMIDIMappingFlags mFlags;
361 AudioUnitParameterValue mSubRangeMin;
362 AudioUnitParameterValue mSubRangeMax;
363 UInt8 mStatus;
364 UInt8 mData1;
365 UInt8 reserved1;
366 UInt8 reserved2;
367 UInt32 reserved3;
368} AUParameterMIDIMapping;
369enum {
370
371 kMusicDeviceProperty_MIDIXMLNames = 1006,
372 kMusicDeviceProperty_PartGroup = 1010,
373 kMusicDeviceProperty_DualSchedulingMode = 1013,
374 kMusicDeviceProperty_SupportsStartStopNote = 1014
375};
376
377
378
379
380enum {
381 kMusicDeviceSampleFrameMask_SampleOffset = 0xFFFFFF,
382 kMusicDeviceSampleFrameMask_IsScheduled = 0x01000000
383};
384enum {
385
386 kAudioUnitOfflineProperty_InputSize = 3020,
387 kAudioUnitOfflineProperty_OutputSize = 3021,
388 kAudioUnitOfflineProperty_StartOffset = 3022,
389 kAudioUnitOfflineProperty_PreflightRequirements = 3023,
390 kAudioUnitOfflineProperty_PreflightName = 3024
391};
392enum {
393 kOfflinePreflight_NotRequired = 0,
394 kOfflinePreflight_Optional = 1,
395 kOfflinePreflight_Required = 2
396};
397enum {
398
399 kAudioUnitProperty_DistanceAttenuationData = 3600
400} __attribute__((availability(macosx,introduced=10.5,deprecated=10.11)));
401
402
403
404
405typedef struct AUDistanceAttenuationData
406{
407 UInt32 inNumberOfPairs;
408 struct {
409 Float32 inDistance;
410 Float32 outGain;
411 } pairs[1];
412} AUDistanceAttenuationData __attribute__((availability(macosx,introduced=10.5,deprecated=10.11)));
413enum {
414
415 kAudioUnitMigrateProperty_FromPlugin = 4000,
416 kAudioUnitMigrateProperty_OldAutomation = 4001
417};
418
419
420
421
422enum {
423 kOtherPluginFormat_Undefined = 0,
424 kOtherPluginFormat_kMAS = 1,
425 kOtherPluginFormat_kVST = 2,
426 kOtherPluginFormat_AU = 3
427};
428typedef struct AudioUnitOtherPluginDesc
429{
430 UInt32 format;
431 AudioClassDescription plugin;
432} AudioUnitOtherPluginDesc;
433
434
435
436
437
438
439typedef struct AudioUnitParameterValueTranslation
440{
441 AudioUnitOtherPluginDesc otherDesc;
442 UInt32 otherParamID;
443 Float32 otherValue;
444 AudioUnitParameterID auParamID;
445 AudioUnitParameterValue auValue;
446} AudioUnitParameterValueTranslation;
447
448
449
450
451
452
453typedef struct AudioUnitPresetMAS_SettingData
454{
455 UInt32 isStockSetting;
456 UInt32 settingID;
457 UInt32 dataLen;
458 UInt8 data[1];
459} AudioUnitPresetMAS_SettingData;
460
461
462
463
464
465typedef struct AudioUnitPresetMAS_Settings
466{
467 UInt32 manufacturerID;
468 UInt32 effectID;
469 UInt32 variantID;
470 UInt32 settingsVersion;
471 UInt32 numberOfSettings;
472 AudioUnitPresetMAS_SettingData settings[1];
473} AudioUnitPresetMAS_Settings;
474enum {
475 kAudioUnitProperty_SampleRateConverterComplexity = 3014
476};
477enum {
478 kAudioUnitSampleRateConverterComplexity_Linear = 'line',
479 kAudioUnitSampleRateConverterComplexity_Normal = 'norm',
480 kAudioUnitSampleRateConverterComplexity_Mastering = 'bats'
481};
482enum {
483 kAudioOutputUnitProperty_CurrentDevice = 2000,
484 kAudioOutputUnitProperty_ChannelMap = 2002,
485 kAudioOutputUnitProperty_EnableIO = 2003,
486 kAudioOutputUnitProperty_StartTime = 2004,
487 kAudioOutputUnitProperty_SetInputCallback = 2005,
488 kAudioOutputUnitProperty_HasIO = 2006,
489 kAudioOutputUnitProperty_StartTimestampsAtZero = 2007
490};
491
492
493
494
495
496typedef struct AudioOutputUnitStartAtTimeParams {
497
498 AudioTimeStamp mTimestamp;
499 UInt32 mFlags;
500} AudioOutputUnitStartAtTimeParams;
501enum {
502 kAUVoiceIOProperty_BypassVoiceProcessing = 2100,
503 kAUVoiceIOProperty_VoiceProcessingEnableAGC = 2101,
504 kAUVoiceIOProperty_MuteOutput = 2104
505
506};
507enum {
508 kAUVoiceIOProperty_VoiceProcessingQuality = 2103
509} __attribute__((availability(macosx,introduced=10.7,deprecated=10.9)));
510enum {
511 kAUNBandEQProperty_NumberOfBands = 2200,
512 kAUNBandEQProperty_MaxNumberOfBands = 2201,
513 kAUNBandEQProperty_BiquadCoefficients = 2203
514};
515enum {
516 kAUVoiceIOErr_UnexpectedNumberOfInputChannels = -66784,
517};
518enum {
519
520 kAudioUnitProperty_MeteringMode = 3007,
521
522
523 kAudioUnitProperty_MatrixLevels = 3006,
524 kAudioUnitProperty_MatrixDimensions = 3009,
525 kAudioUnitProperty_MeterClipping = 3011,
526
527
528 kAudioUnitProperty_InputAnchorTimeStamp = 3016
529};
530typedef struct AudioUnitMeterClipping
531{
532 Float32 peakValueSinceLastCall;
533 Boolean sawInfinity;
534 Boolean sawNotANumber;
535} AudioUnitMeterClipping;
536enum {
537 kAudioUnitProperty_ReverbRoomType = 10,
538 kAudioUnitProperty_UsesInternalReverb = 1005,
539 kAudioUnitProperty_SpatializationAlgorithm = 3000,
540 kAudioUnitProperty_SpatialMixerDistanceParams = 3010,
541 kAudioUnitProperty_SpatialMixerAttenuationCurve = 3013,
542 kAudioUnitProperty_SpatialMixerRenderingFlags = 3003,
543};
544
545
546
547
548typedef UInt32 AUSpatializationAlgorithm; enum {
549 kSpatializationAlgorithm_EqualPowerPanning = 0,
550 kSpatializationAlgorithm_SphericalHead = 1,
551 kSpatializationAlgorithm_HRTF = 2,
552 kSpatializationAlgorithm_SoundField = 3,
553 kSpatializationAlgorithm_VectorBasedPanning = 4,
554 kSpatializationAlgorithm_StereoPassThrough = 5,
555 kSpatializationAlgorithm_HRTFHQ = 6
556};
557
558
559
560
561
562
563typedef UInt32 AUReverbRoomType; enum {
564 kReverbRoomType_SmallRoom = 0,
565 kReverbRoomType_MediumRoom = 1,
566 kReverbRoomType_LargeRoom = 2,
567 kReverbRoomType_MediumHall = 3,
568 kReverbRoomType_LargeHall = 4,
569 kReverbRoomType_Plate = 5,
570 kReverbRoomType_MediumChamber = 6,
571 kReverbRoomType_LargeChamber = 7,
572 kReverbRoomType_Cathedral = 8,
573 kReverbRoomType_LargeRoom2 = 9,
574 kReverbRoomType_MediumHall2 = 10,
575 kReverbRoomType_MediumHall3 = 11,
576 kReverbRoomType_LargeHall2 = 12
577};
578
579
580
581
582typedef UInt32 AUSpatialMixerAttenuationCurve; enum {
583 kSpatialMixerAttenuationCurve_Power = 0,
584 kSpatialMixerAttenuationCurve_Exponential = 1,
585 kSpatialMixerAttenuationCurve_Inverse = 2,
586 kSpatialMixerAttenuationCurve_Linear = 3
587};
588
589
590
591
592typedef struct MixerDistanceParams {
593 Float32 mReferenceDistance;
594 Float32 mMaxDistance;
595 Float32 mMaxAttenuation;
596} MixerDistanceParams;
597
598
599
600
601typedef UInt32 AUSpatialMixerRenderingFlags; enum {
602 kSpatialMixerRenderingFlags_InterAuralDelay = (1L << 0),
603 kSpatialMixerRenderingFlags_DistanceAttenuation = (1L << 2),
604};
605enum {
606 kAudioUnitProperty_3DMixerDistanceParams = 3010,
607 kAudioUnitProperty_3DMixerAttenuationCurve = 3013,
608 kAudioUnitProperty_DopplerShift = 3002,
609 kAudioUnitProperty_3DMixerRenderingFlags = 3003,
610 kAudioUnitProperty_3DMixerDistanceAtten = 3004,
611 kAudioUnitProperty_ReverbPreset = 3012
612} __attribute__((availability(macosx,introduced=10.7,deprecated=10.11)));
613
614
615
616
617typedef UInt32 AU3DMixerRenderingFlags; enum {
618 k3DMixerRenderingFlags_InterAuralDelay = (1L << 0),
619 k3DMixerRenderingFlags_DopplerShift = (1L << 1),
620 k3DMixerRenderingFlags_DistanceAttenuation = (1L << 2),
621 k3DMixerRenderingFlags_DistanceFilter = (1L << 3),
622 k3DMixerRenderingFlags_DistanceDiffusion = (1L << 4),
623 k3DMixerRenderingFlags_LinearDistanceAttenuation = (1L << 5),
624 k3DMixerRenderingFlags_ConstantReverbBlend = (1L << 6)
625};
626
627
628
629
630typedef UInt32 AU3DMixerAttenuationCurve; enum {
631 k3DMixerAttenuationCurve_Power = 0,
632 k3DMixerAttenuationCurve_Exponential = 1,
633 k3DMixerAttenuationCurve_Inverse = 2,
634 k3DMixerAttenuationCurve_Linear = 3
635};
636enum {
637 kAudioUnitProperty_ScheduleAudioSlice = 3300,
638 kAudioUnitProperty_ScheduleStartTimeStamp = 3301,
639 kAudioUnitProperty_CurrentPlayTime = 3302
640};
641typedef UInt32 AUScheduledAudioSliceFlags; enum {
642 kScheduledAudioSliceFlag_Complete = 0x01,
643 kScheduledAudioSliceFlag_BeganToRender = 0x02,
644 kScheduledAudioSliceFlag_BeganToRenderLate = 0x04,
645
646 kScheduledAudioSliceFlag_Loop = 0x08,
647 kScheduledAudioSliceFlag_Interrupt = 0x10,
648 kScheduledAudioSliceFlag_InterruptAtLoop = 0x20
649};
650
651typedef struct ScheduledAudioSlice ScheduledAudioSlice;
652
653
654
655typedef void (*ScheduledAudioSliceCompletionProc)(void * _Nullable userData, ScheduledAudioSlice *bufferList);
656struct ScheduledAudioSlice {
657 AudioTimeStamp mTimeStamp;
658 ScheduledAudioSliceCompletionProc _Nullable mCompletionProc;
659 void * mCompletionProcUserData;
660 AUScheduledAudioSliceFlags mFlags;
661 UInt32 mReserved;
662 void * _Nullable mReserved2;
663 UInt32 mNumberFrames;
664 AudioBufferList * mBufferList;
665};
666enum {
667 kAudioUnitProperty_ScheduledFileIDs = 3310,
668 kAudioUnitProperty_ScheduledFileRegion = 3311,
669 kAudioUnitProperty_ScheduledFilePrime = 3312,
670 kAudioUnitProperty_ScheduledFileBufferSizeFrames = 3313,
671 kAudioUnitProperty_ScheduledFileNumberBuffers = 3314
672};
673
674typedef struct ScheduledAudioFileRegion ScheduledAudioFileRegion;
675
676
677
678typedef void (*ScheduledAudioFileRegionCompletionProc)(void * _Nullable userData,
679 ScheduledAudioFileRegion *fileRegion, OSStatus result);
680struct ScheduledAudioFileRegion {
681 AudioTimeStamp mTimeStamp;
682 ScheduledAudioFileRegionCompletionProc _Nullable mCompletionProc;
683 void * _Nullable mCompletionProcUserData;
684 struct OpaqueAudioFileID * mAudioFile;
685 UInt32 mLoopCount;
686 SInt64 mStartFrame;
687 UInt32 mFramesToPlay;
688};
689enum {
690 kMusicDeviceProperty_UsesInternalReverb = kAudioUnitProperty_UsesInternalReverb,
691 kMusicDeviceProperty_SoundBankData = 1008,
692 kMusicDeviceProperty_StreamFromDisk = 1011,
693 kMusicDeviceProperty_SoundBankFSRef = 1012
694};
695enum {
696 kMusicDeviceProperty_InstrumentName = 1001,
697 kMusicDeviceProperty_InstrumentNumber = 1004
698};
699enum {
700 kMusicDeviceProperty_InstrumentCount = 1000,
701 kMusicDeviceProperty_BankName = 1007,
702 kMusicDeviceProperty_SoundBankURL = 1100
703};
704enum {
705 kAUMIDISynthProperty_EnablePreload = 4119
706};
707enum {
708
709 kAUSamplerProperty_LoadInstrument = 4102,
710 kAUSamplerProperty_LoadAudioFiles = 4101
711};
712typedef struct AUSamplerInstrumentData {
713 CFURLRef fileURL;
714 UInt8 instrumentType;
715 UInt8 bankMSB;
716 UInt8 bankLSB;
717 UInt8 presetID;
718} AUSamplerInstrumentData;
719enum
720{
721 kInstrumentType_DLSPreset = 1,
722 kInstrumentType_SF2Preset = kInstrumentType_DLSPreset,
723 kInstrumentType_AUPreset = 2,
724 kInstrumentType_Audiofile = 3,
725 kInstrumentType_EXS24 = 4
726};
727
728enum
729{
730 kAUSampler_DefaultPercussionBankMSB = 0x78,
731 kAUSampler_DefaultMelodicBankMSB = 0x79,
732 kAUSampler_DefaultBankLSB = 0x00
733};
734enum {
735 kAudioUnitProperty_DeferredRendererPullSize = 3320,
736 kAudioUnitProperty_DeferredRendererExtraLatency = 3321,
737 kAudioUnitProperty_DeferredRendererWaitFrames = 3322
738};
739enum {
740 kAUNetReceiveProperty_Hostname = 3511,
741 kAUNetReceiveProperty_Password = 3512
742};
743enum {
744 kAUNetSendProperty_PortNum = 3513,
745 kAUNetSendProperty_TransmissionFormat = 3514,
746 kAUNetSendProperty_TransmissionFormatIndex = 3515,
747 kAUNetSendProperty_ServiceName = 3516,
748 kAUNetSendProperty_Disconnect = 3517,
749 kAUNetSendProperty_Password = 3518
750};
751enum {
752 kAUNetSendPresetFormat_PCMFloat32 = 0,
753 kAUNetSendPresetFormat_PCMInt24 = 1,
754 kAUNetSendPresetFormat_PCMInt16 = 2,
755 kAUNetSendPresetFormat_Lossless24 = 3,
756 kAUNetSendPresetFormat_Lossless16 = 4,
757 kAUNetSendPresetFormat_ULaw = 5,
758 kAUNetSendPresetFormat_IMA4 = 6,
759 kAUNetSendPresetFormat_AAC_128kbpspc = 7,
760 kAUNetSendPresetFormat_AAC_96kbpspc = 8,
761 kAUNetSendPresetFormat_AAC_80kbpspc = 9,
762 kAUNetSendPresetFormat_AAC_64kbpspc = 10,
763 kAUNetSendPresetFormat_AAC_48kbpspc = 11,
764 kAUNetSendPresetFormat_AAC_40kbpspc = 12,
765 kAUNetSendPresetFormat_AAC_32kbpspc = 13,
766 kAUNetSendPresetFormat_AAC_LD_64kbpspc = 14,
767 kAUNetSendPresetFormat_AAC_LD_48kbpspc = 15,
768 kAUNetSendPresetFormat_AAC_LD_40kbpspc = 16,
769 kAUNetSendPresetFormat_AAC_LD_32kbpspc = 17,
770 kAUNetSendNumPresetFormats = 18
771};
772typedef struct AUNumVersion {
773
774 UInt8 nonRelRev;
775 UInt8 stage;
776 UInt8 minorAndBugRev;
777 UInt8 majorRev;
778} AUNumVersion;
779
780
781
782
783
784
785typedef struct AUHostIdentifier {
786 CFStringRef hostName;
787 AUNumVersion hostVersion;
788} AUHostIdentifier;
789
790
791
792enum {
793 kAudioUnitParameterFlag_Global = (1L << 0),
794 kAudioUnitParameterFlag_Input = (1L << 1),
795 kAudioUnitParameterFlag_Output = (1L << 2),
796 kAudioUnitParameterFlag_Group = (1L << 3)
797};
798
799enum {
800 kAudioUnitParameterFlag_HasName = kAudioUnitParameterFlag_ValuesHaveStrings
801};
802
803enum {
804
805 kAudioUnitProperty_SRCAlgorithm = 9,
806 kAudioUnitProperty_MIDIControlMapping = 17,
807 kAudioUnitProperty_CurrentPreset = 28,
808
809 kAudioUnitProperty_ParameterValueName = kAudioUnitProperty_ParameterStringFromValue,
810 kAudioUnitProperty_BusCount = kAudioUnitProperty_ElementCount,
811
812 kAudioOfflineUnitProperty_InputSize = kAudioUnitOfflineProperty_InputSize,
813 kAudioOfflineUnitProperty_OutputSize = kAudioUnitOfflineProperty_OutputSize
814};
815
816enum {
817 kAudioUnitSRCAlgorithm_Polyphase = 'poly',
818 kAudioUnitSRCAlgorithm_MediumQuality = 'csrc'
819};
820
821
822
823typedef struct AudioUnitMIDIControlMapping
824{
825 UInt16 midiNRPN;
826 UInt8 midiControl;
827 UInt8 scope;
828 AudioUnitElement element;
829 AudioUnitParameterID parameter;
830} AudioUnitMIDIControlMapping;
831
832
833typedef struct AudioUnitParameterValueName {
834 AudioUnitParameterID inParamID;
835 const Float32 * _Nonnull inValue;
836 CFStringRef outName;
837} AudioUnitParameterValueName;
838
839
840
841
842enum {
843 kMusicDeviceProperty_GroupOutputBus = 1002,
844 kMusicDeviceProperty_SoundBankFSSpec = 1003,
845 kAudioUnitProperty_PannerMode = 3008
846};
847
848enum {
849 kAudioUnitProperty_SpeakerConfiguration = 3001
850};
851
852
853
854enum {
855 kSpeakerConfiguration_HeadPhones = 0,
856 kSpeakerConfiguration_Stereo = 1,
857 kSpeakerConfiguration_Quad = 2,
858 kSpeakerConfiguration_5_0 = 3,
859 kSpeakerConfiguration_5_1 = kSpeakerConfiguration_5_0
860};
861
862
863
864
865
866typedef struct AUSamplerBankPresetData {
867 CFURLRef bankURL;
868 UInt8 bankMSB;
869 UInt8 bankLSB;
870 UInt8 presetID;
871 UInt8 reserved;
872} AUSamplerBankPresetData;
873
874enum {
875 kAUSamplerProperty_LoadPresetFromBank = 4100,
876 kAUSamplerProperty_BankAndPreset = kAUSamplerProperty_LoadPresetFromBank
877};
878
879#define kAUPresetVersionKey "version"
880#define kAUPresetTypeKey "type"
881#define kAUPresetSubtypeKey "subtype"
882#define kAUPresetManufacturerKey "manufacturer"
883#define kAUPresetDataKey "data"
884#define kAUPresetNameKey "name"
885#define kAUPresetRenderQualityKey "render-quality"
886#define kAUPresetCPULoadKey "cpu-load"
887#define kAUPresetElementNameKey "element-name"
888#define kAUPresetExternalFileRefs "file-references"
889#define kAUPresetPartKey "part"
890
891#endif
892