Unnamed: 0
int64 0
0
| repo_id
stringlengths 5
186
| file_path
stringlengths 15
223
| content
stringlengths 1
32.8M
⌀ |
---|---|---|---|
0 | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/AudioUnit.framework | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/AudioUnit.framework/Modules/module.modulemap | framework module AudioUnit [extern_c] [system] {
umbrella header "AudioUnit.h"
export *
module * { export * }
explicit module AudioUnitCarbonView { header "AudioUnitCarbonView.h" export * }
explicit module AUCocoaUIView {
header "AUCocoaUIView.h"
export *
}
}
|
0 | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/AudioToolbox.framework/AudioToolbox.tbd | --- !tapi-tbd
tbd-version: 4
targets: [ x86_64-macos, x86_64-maccatalyst, arm64-macos, arm64-maccatalyst,
arm64e-macos, arm64e-maccatalyst ]
uuids:
- target: x86_64-macos
value: 7F695457-B285-33FE-83DC-D5FC0F932762
- target: x86_64-maccatalyst
value: 7F695457-B285-33FE-83DC-D5FC0F932762
- target: arm64-macos
value: 00000000-0000-0000-0000-000000000000
- target: arm64-maccatalyst
value: 00000000-0000-0000-0000-000000000000
- target: arm64e-macos
value: 5F5883D5-7423-3EB4-BA90-1DFCB131B786
- target: arm64e-maccatalyst
value: 5F5883D5-7423-3EB4-BA90-1DFCB131B786
install-name: '/System/Library/Frameworks/AudioToolbox.framework/Versions/A/AudioToolbox'
current-version: 1000
exports:
- targets: [ x86_64-macos, arm64e-macos, x86_64-maccatalyst, arm64e-maccatalyst,
arm64-macos, arm64-maccatalyst ]
symbols: [ '$ld$hide$os10.10$_AudioCodecAppendInputBufferList', '$ld$hide$os10.10$_AudioCodecAppendInputData',
'$ld$hide$os10.10$_AudioCodecGetProperty', '$ld$hide$os10.10$_AudioCodecGetPropertyInfo',
'$ld$hide$os10.10$_AudioCodecInitialize', '$ld$hide$os10.10$_AudioCodecProduceOutputBufferList',
'$ld$hide$os10.10$_AudioCodecProduceOutputPackets', '$ld$hide$os10.10$_AudioCodecReset',
'$ld$hide$os10.10$_AudioCodecSetProperty', '$ld$hide$os10.10$_AudioCodecUninitialize',
'$ld$hide$os10.10$_AudioComponentCopyName', '$ld$hide$os10.10$_AudioComponentCount',
'$ld$hide$os10.10$_AudioComponentFindNext', '$ld$hide$os10.10$_AudioComponentGetDescription',
'$ld$hide$os10.10$_AudioComponentGetVersion', '$ld$hide$os10.10$_AudioComponentInstanceCanDo',
'$ld$hide$os10.10$_AudioComponentInstanceDispose', '$ld$hide$os10.10$_AudioComponentInstanceGetComponent',
'$ld$hide$os10.10$_AudioComponentInstanceNew', '$ld$hide$os10.10$_AudioComponentRegister',
'$ld$hide$os10.10$_AudioOutputUnitStart', '$ld$hide$os10.10$_AudioOutputUnitStop',
'$ld$hide$os10.10$_AudioUnitAddPropertyListener', '$ld$hide$os10.10$_AudioUnitAddRenderNotify',
'$ld$hide$os10.10$_AudioUnitComplexRender', '$ld$hide$os10.10$_AudioUnitGetParameter',
'$ld$hide$os10.10$_AudioUnitGetProperty', '$ld$hide$os10.10$_AudioUnitGetPropertyInfo',
'$ld$hide$os10.10$_AudioUnitInitialize', '$ld$hide$os10.10$_AudioUnitProcess',
'$ld$hide$os10.10$_AudioUnitProcessMultiple', '$ld$hide$os10.10$_AudioUnitRemovePropertyListenerWithUserData',
'$ld$hide$os10.10$_AudioUnitRemoveRenderNotify', '$ld$hide$os10.10$_AudioUnitRender',
'$ld$hide$os10.10$_AudioUnitReset', '$ld$hide$os10.10$_AudioUnitScheduleParameters',
'$ld$hide$os10.10$_AudioUnitSetParameter', '$ld$hide$os10.10$_AudioUnitSetProperty',
'$ld$hide$os10.10$_AudioUnitUninitialize', '$ld$hide$os10.10$_MusicDeviceMIDIEvent',
'$ld$hide$os10.10$_MusicDevicePrepareInstrument', '$ld$hide$os10.10$_MusicDeviceReleaseInstrument',
'$ld$hide$os10.10$_MusicDeviceStartNote', '$ld$hide$os10.10$_MusicDeviceStopNote',
'$ld$hide$os10.10$_MusicDeviceSysEx', '$ld$hide$os10.4$_AudioCodecAppendInputBufferList',
'$ld$hide$os10.4$_AudioCodecAppendInputData', '$ld$hide$os10.4$_AudioCodecGetProperty',
'$ld$hide$os10.4$_AudioCodecGetPropertyInfo', '$ld$hide$os10.4$_AudioCodecInitialize',
'$ld$hide$os10.4$_AudioCodecProduceOutputBufferList', '$ld$hide$os10.4$_AudioCodecProduceOutputPackets',
'$ld$hide$os10.4$_AudioCodecReset', '$ld$hide$os10.4$_AudioCodecSetProperty',
'$ld$hide$os10.4$_AudioCodecUninitialize', '$ld$hide$os10.4$_AudioComponentCopyName',
'$ld$hide$os10.4$_AudioComponentCount', '$ld$hide$os10.4$_AudioComponentFindNext',
'$ld$hide$os10.4$_AudioComponentGetDescription', '$ld$hide$os10.4$_AudioComponentGetVersion',
'$ld$hide$os10.4$_AudioComponentInstanceCanDo', '$ld$hide$os10.4$_AudioComponentInstanceDispose',
'$ld$hide$os10.4$_AudioComponentInstanceGetComponent', '$ld$hide$os10.4$_AudioComponentInstanceNew',
'$ld$hide$os10.4$_AudioComponentRegister', '$ld$hide$os10.4$_AudioOutputUnitStart',
'$ld$hide$os10.4$_AudioOutputUnitStop', '$ld$hide$os10.4$_AudioUnitAddPropertyListener',
'$ld$hide$os10.4$_AudioUnitAddRenderNotify', '$ld$hide$os10.4$_AudioUnitComplexRender',
'$ld$hide$os10.4$_AudioUnitGetParameter', '$ld$hide$os10.4$_AudioUnitGetProperty',
'$ld$hide$os10.4$_AudioUnitGetPropertyInfo', '$ld$hide$os10.4$_AudioUnitInitialize',
'$ld$hide$os10.4$_AudioUnitProcess', '$ld$hide$os10.4$_AudioUnitProcessMultiple',
'$ld$hide$os10.4$_AudioUnitRemovePropertyListenerWithUserData',
'$ld$hide$os10.4$_AudioUnitRemoveRenderNotify', '$ld$hide$os10.4$_AudioUnitRender',
'$ld$hide$os10.4$_AudioUnitReset', '$ld$hide$os10.4$_AudioUnitScheduleParameters',
'$ld$hide$os10.4$_AudioUnitSetParameter', '$ld$hide$os10.4$_AudioUnitSetProperty',
'$ld$hide$os10.4$_AudioUnitUninitialize', '$ld$hide$os10.4$_MusicDeviceMIDIEvent',
'$ld$hide$os10.4$_MusicDevicePrepareInstrument', '$ld$hide$os10.4$_MusicDeviceReleaseInstrument',
'$ld$hide$os10.4$_MusicDeviceStartNote', '$ld$hide$os10.4$_MusicDeviceStopNote',
'$ld$hide$os10.4$_MusicDeviceSysEx', '$ld$hide$os10.5$_AudioCodecAppendInputBufferList',
'$ld$hide$os10.5$_AudioCodecAppendInputData', '$ld$hide$os10.5$_AudioCodecGetProperty',
'$ld$hide$os10.5$_AudioCodecGetPropertyInfo', '$ld$hide$os10.5$_AudioCodecInitialize',
'$ld$hide$os10.5$_AudioCodecProduceOutputBufferList', '$ld$hide$os10.5$_AudioCodecProduceOutputPackets',
'$ld$hide$os10.5$_AudioCodecReset', '$ld$hide$os10.5$_AudioCodecSetProperty',
'$ld$hide$os10.5$_AudioCodecUninitialize', '$ld$hide$os10.5$_AudioComponentCopyName',
'$ld$hide$os10.5$_AudioComponentCount', '$ld$hide$os10.5$_AudioComponentFindNext',
'$ld$hide$os10.5$_AudioComponentGetDescription', '$ld$hide$os10.5$_AudioComponentGetVersion',
'$ld$hide$os10.5$_AudioComponentInstanceCanDo', '$ld$hide$os10.5$_AudioComponentInstanceDispose',
'$ld$hide$os10.5$_AudioComponentInstanceGetComponent', '$ld$hide$os10.5$_AudioComponentInstanceNew',
'$ld$hide$os10.5$_AudioComponentRegister', '$ld$hide$os10.5$_AudioOutputUnitStart',
'$ld$hide$os10.5$_AudioOutputUnitStop', '$ld$hide$os10.5$_AudioUnitAddPropertyListener',
'$ld$hide$os10.5$_AudioUnitAddRenderNotify', '$ld$hide$os10.5$_AudioUnitComplexRender',
'$ld$hide$os10.5$_AudioUnitGetParameter', '$ld$hide$os10.5$_AudioUnitGetProperty',
'$ld$hide$os10.5$_AudioUnitGetPropertyInfo', '$ld$hide$os10.5$_AudioUnitInitialize',
'$ld$hide$os10.5$_AudioUnitProcess', '$ld$hide$os10.5$_AudioUnitProcessMultiple',
'$ld$hide$os10.5$_AudioUnitRemovePropertyListenerWithUserData',
'$ld$hide$os10.5$_AudioUnitRemoveRenderNotify', '$ld$hide$os10.5$_AudioUnitRender',
'$ld$hide$os10.5$_AudioUnitReset', '$ld$hide$os10.5$_AudioUnitScheduleParameters',
'$ld$hide$os10.5$_AudioUnitSetParameter', '$ld$hide$os10.5$_AudioUnitSetProperty',
'$ld$hide$os10.5$_AudioUnitUninitialize', '$ld$hide$os10.5$_MusicDeviceMIDIEvent',
'$ld$hide$os10.5$_MusicDevicePrepareInstrument', '$ld$hide$os10.5$_MusicDeviceReleaseInstrument',
'$ld$hide$os10.5$_MusicDeviceStartNote', '$ld$hide$os10.5$_MusicDeviceStopNote',
'$ld$hide$os10.5$_MusicDeviceSysEx', '$ld$hide$os10.6$_AudioCodecAppendInputBufferList',
'$ld$hide$os10.6$_AudioCodecAppendInputData', '$ld$hide$os10.6$_AudioCodecGetProperty',
'$ld$hide$os10.6$_AudioCodecGetPropertyInfo', '$ld$hide$os10.6$_AudioCodecInitialize',
'$ld$hide$os10.6$_AudioCodecProduceOutputBufferList', '$ld$hide$os10.6$_AudioCodecProduceOutputPackets',
'$ld$hide$os10.6$_AudioCodecReset', '$ld$hide$os10.6$_AudioCodecSetProperty',
'$ld$hide$os10.6$_AudioCodecUninitialize', '$ld$hide$os10.6$_AudioComponentCopyName',
'$ld$hide$os10.6$_AudioComponentCount', '$ld$hide$os10.6$_AudioComponentFindNext',
'$ld$hide$os10.6$_AudioComponentGetDescription', '$ld$hide$os10.6$_AudioComponentGetVersion',
'$ld$hide$os10.6$_AudioComponentInstanceCanDo', '$ld$hide$os10.6$_AudioComponentInstanceDispose',
'$ld$hide$os10.6$_AudioComponentInstanceGetComponent', '$ld$hide$os10.6$_AudioComponentInstanceNew',
'$ld$hide$os10.6$_AudioComponentRegister', '$ld$hide$os10.6$_AudioOutputUnitStart',
'$ld$hide$os10.6$_AudioOutputUnitStop', '$ld$hide$os10.6$_AudioUnitAddPropertyListener',
'$ld$hide$os10.6$_AudioUnitAddRenderNotify', '$ld$hide$os10.6$_AudioUnitComplexRender',
'$ld$hide$os10.6$_AudioUnitGetParameter', '$ld$hide$os10.6$_AudioUnitGetProperty',
'$ld$hide$os10.6$_AudioUnitGetPropertyInfo', '$ld$hide$os10.6$_AudioUnitInitialize',
'$ld$hide$os10.6$_AudioUnitProcess', '$ld$hide$os10.6$_AudioUnitProcessMultiple',
'$ld$hide$os10.6$_AudioUnitRemovePropertyListenerWithUserData',
'$ld$hide$os10.6$_AudioUnitRemoveRenderNotify', '$ld$hide$os10.6$_AudioUnitRender',
'$ld$hide$os10.6$_AudioUnitReset', '$ld$hide$os10.6$_AudioUnitScheduleParameters',
'$ld$hide$os10.6$_AudioUnitSetParameter', '$ld$hide$os10.6$_AudioUnitSetProperty',
'$ld$hide$os10.6$_AudioUnitUninitialize', '$ld$hide$os10.6$_MusicDeviceMIDIEvent',
'$ld$hide$os10.6$_MusicDevicePrepareInstrument', '$ld$hide$os10.6$_MusicDeviceReleaseInstrument',
'$ld$hide$os10.6$_MusicDeviceStartNote', '$ld$hide$os10.6$_MusicDeviceStopNote',
'$ld$hide$os10.6$_MusicDeviceSysEx', '$ld$hide$os10.7$_AudioCodecAppendInputBufferList',
'$ld$hide$os10.7$_AudioCodecAppendInputData', '$ld$hide$os10.7$_AudioCodecGetProperty',
'$ld$hide$os10.7$_AudioCodecGetPropertyInfo', '$ld$hide$os10.7$_AudioCodecInitialize',
'$ld$hide$os10.7$_AudioCodecProduceOutputBufferList', '$ld$hide$os10.7$_AudioCodecProduceOutputPackets',
'$ld$hide$os10.7$_AudioCodecReset', '$ld$hide$os10.7$_AudioCodecSetProperty',
'$ld$hide$os10.7$_AudioCodecUninitialize', '$ld$hide$os10.7$_AudioComponentCopyName',
'$ld$hide$os10.7$_AudioComponentCount', '$ld$hide$os10.7$_AudioComponentFindNext',
'$ld$hide$os10.7$_AudioComponentGetDescription', '$ld$hide$os10.7$_AudioComponentGetVersion',
'$ld$hide$os10.7$_AudioComponentInstanceCanDo', '$ld$hide$os10.7$_AudioComponentInstanceDispose',
'$ld$hide$os10.7$_AudioComponentInstanceGetComponent', '$ld$hide$os10.7$_AudioComponentInstanceNew',
'$ld$hide$os10.7$_AudioComponentRegister', '$ld$hide$os10.7$_AudioOutputUnitStart',
'$ld$hide$os10.7$_AudioOutputUnitStop', '$ld$hide$os10.7$_AudioUnitAddPropertyListener',
'$ld$hide$os10.7$_AudioUnitAddRenderNotify', '$ld$hide$os10.7$_AudioUnitComplexRender',
'$ld$hide$os10.7$_AudioUnitGetParameter', '$ld$hide$os10.7$_AudioUnitGetProperty',
'$ld$hide$os10.7$_AudioUnitGetPropertyInfo', '$ld$hide$os10.7$_AudioUnitInitialize',
'$ld$hide$os10.7$_AudioUnitProcess', '$ld$hide$os10.7$_AudioUnitProcessMultiple',
'$ld$hide$os10.7$_AudioUnitRemovePropertyListenerWithUserData',
'$ld$hide$os10.7$_AudioUnitRemoveRenderNotify', '$ld$hide$os10.7$_AudioUnitRender',
'$ld$hide$os10.7$_AudioUnitReset', '$ld$hide$os10.7$_AudioUnitScheduleParameters',
'$ld$hide$os10.7$_AudioUnitSetParameter', '$ld$hide$os10.7$_AudioUnitSetProperty',
'$ld$hide$os10.7$_AudioUnitUninitialize', '$ld$hide$os10.7$_MusicDeviceMIDIEvent',
'$ld$hide$os10.7$_MusicDevicePrepareInstrument', '$ld$hide$os10.7$_MusicDeviceReleaseInstrument',
'$ld$hide$os10.7$_MusicDeviceStartNote', '$ld$hide$os10.7$_MusicDeviceStopNote',
'$ld$hide$os10.7$_MusicDeviceSysEx', '$ld$hide$os10.8$_AudioCodecAppendInputBufferList',
'$ld$hide$os10.8$_AudioCodecAppendInputData', '$ld$hide$os10.8$_AudioCodecGetProperty',
'$ld$hide$os10.8$_AudioCodecGetPropertyInfo', '$ld$hide$os10.8$_AudioCodecInitialize',
'$ld$hide$os10.8$_AudioCodecProduceOutputBufferList', '$ld$hide$os10.8$_AudioCodecProduceOutputPackets',
'$ld$hide$os10.8$_AudioCodecReset', '$ld$hide$os10.8$_AudioCodecSetProperty',
'$ld$hide$os10.8$_AudioCodecUninitialize', '$ld$hide$os10.8$_AudioComponentCopyName',
'$ld$hide$os10.8$_AudioComponentCount', '$ld$hide$os10.8$_AudioComponentFindNext',
'$ld$hide$os10.8$_AudioComponentGetDescription', '$ld$hide$os10.8$_AudioComponentGetVersion',
'$ld$hide$os10.8$_AudioComponentInstanceCanDo', '$ld$hide$os10.8$_AudioComponentInstanceDispose',
'$ld$hide$os10.8$_AudioComponentInstanceGetComponent', '$ld$hide$os10.8$_AudioComponentInstanceNew',
'$ld$hide$os10.8$_AudioComponentRegister', '$ld$hide$os10.8$_AudioOutputUnitStart',
'$ld$hide$os10.8$_AudioOutputUnitStop', '$ld$hide$os10.8$_AudioUnitAddPropertyListener',
'$ld$hide$os10.8$_AudioUnitAddRenderNotify', '$ld$hide$os10.8$_AudioUnitComplexRender',
'$ld$hide$os10.8$_AudioUnitGetParameter', '$ld$hide$os10.8$_AudioUnitGetProperty',
'$ld$hide$os10.8$_AudioUnitGetPropertyInfo', '$ld$hide$os10.8$_AudioUnitInitialize',
'$ld$hide$os10.8$_AudioUnitProcess', '$ld$hide$os10.8$_AudioUnitProcessMultiple',
'$ld$hide$os10.8$_AudioUnitRemovePropertyListenerWithUserData',
'$ld$hide$os10.8$_AudioUnitRemoveRenderNotify', '$ld$hide$os10.8$_AudioUnitRender',
'$ld$hide$os10.8$_AudioUnitReset', '$ld$hide$os10.8$_AudioUnitScheduleParameters',
'$ld$hide$os10.8$_AudioUnitSetParameter', '$ld$hide$os10.8$_AudioUnitSetProperty',
'$ld$hide$os10.8$_AudioUnitUninitialize', '$ld$hide$os10.8$_MusicDeviceMIDIEvent',
'$ld$hide$os10.8$_MusicDevicePrepareInstrument', '$ld$hide$os10.8$_MusicDeviceReleaseInstrument',
'$ld$hide$os10.8$_MusicDeviceStartNote', '$ld$hide$os10.8$_MusicDeviceStopNote',
'$ld$hide$os10.8$_MusicDeviceSysEx', '$ld$hide$os10.9$_AudioCodecAppendInputBufferList',
'$ld$hide$os10.9$_AudioCodecAppendInputData', '$ld$hide$os10.9$_AudioCodecGetProperty',
'$ld$hide$os10.9$_AudioCodecGetPropertyInfo', '$ld$hide$os10.9$_AudioCodecInitialize',
'$ld$hide$os10.9$_AudioCodecProduceOutputBufferList', '$ld$hide$os10.9$_AudioCodecProduceOutputPackets',
'$ld$hide$os10.9$_AudioCodecReset', '$ld$hide$os10.9$_AudioCodecSetProperty',
'$ld$hide$os10.9$_AudioCodecUninitialize', '$ld$hide$os10.9$_AudioComponentCopyName',
'$ld$hide$os10.9$_AudioComponentCount', '$ld$hide$os10.9$_AudioComponentFindNext',
'$ld$hide$os10.9$_AudioComponentGetDescription', '$ld$hide$os10.9$_AudioComponentGetVersion',
'$ld$hide$os10.9$_AudioComponentInstanceCanDo', '$ld$hide$os10.9$_AudioComponentInstanceDispose',
'$ld$hide$os10.9$_AudioComponentInstanceGetComponent', '$ld$hide$os10.9$_AudioComponentInstanceNew',
'$ld$hide$os10.9$_AudioComponentRegister', '$ld$hide$os10.9$_AudioOutputUnitStart',
'$ld$hide$os10.9$_AudioOutputUnitStop', '$ld$hide$os10.9$_AudioUnitAddPropertyListener',
'$ld$hide$os10.9$_AudioUnitAddRenderNotify', '$ld$hide$os10.9$_AudioUnitComplexRender',
'$ld$hide$os10.9$_AudioUnitGetParameter', '$ld$hide$os10.9$_AudioUnitGetProperty',
'$ld$hide$os10.9$_AudioUnitGetPropertyInfo', '$ld$hide$os10.9$_AudioUnitInitialize',
'$ld$hide$os10.9$_AudioUnitProcess', '$ld$hide$os10.9$_AudioUnitProcessMultiple',
'$ld$hide$os10.9$_AudioUnitRemovePropertyListenerWithUserData',
'$ld$hide$os10.9$_AudioUnitRemoveRenderNotify', '$ld$hide$os10.9$_AudioUnitRender',
'$ld$hide$os10.9$_AudioUnitReset', '$ld$hide$os10.9$_AudioUnitScheduleParameters',
'$ld$hide$os10.9$_AudioUnitSetParameter', '$ld$hide$os10.9$_AudioUnitSetProperty',
'$ld$hide$os10.9$_AudioUnitUninitialize', '$ld$hide$os10.9$_MusicDeviceMIDIEvent',
'$ld$hide$os10.9$_MusicDevicePrepareInstrument', '$ld$hide$os10.9$_MusicDeviceReleaseInstrument',
'$ld$hide$os10.9$_MusicDeviceStartNote', '$ld$hide$os10.9$_MusicDeviceStopNote',
'$ld$hide$os10.9$_MusicDeviceSysEx', _AQIONodeManager_FindSharedCatalystIONode,
_AQIONodeManager_ReleaseAQIONode, _AQIONode_OSWorkgroup, _AQOfflineMixerConnectAudioQueue,
_AQOfflineMixerDisconnectAudioQueue, _AQOfflineMixerDispose,
_AQOfflineMixerGetProperty, _AQOfflineMixerGetPropertySize,
_AQOfflineMixerNew, _AQOfflineMixerRender, _AQOfflineMixerReset,
_AQOfflineMixerSetProperty, _AUGraphAddNode, _AUGraphAddRenderNotify,
_AUGraphClearConnections, _AUGraphClose, _AUGraphConnectNodeInput,
_AUGraphCountNodeInteractions, _AUGraphDisconnectNodeInput,
_AUGraphGetCPULoad, _AUGraphGetIndNode, _AUGraphGetInteractionInfo,
_AUGraphGetMaxCPULoad, _AUGraphGetNodeCount, _AUGraphGetNodeInteractions,
_AUGraphGetNumberOfInteractions, _AUGraphInitialize, _AUGraphIsInitialized,
_AUGraphIsOpen, _AUGraphIsRunning, _AUGraphNodeInfo, _AUGraphOpen,
_AUGraphRemoveNode, _AUGraphRemoveRenderNotify, _AUGraphSetNodeInputCallback,
_AUGraphStart, _AUGraphStop, _AUGraphUninitialize, _AUGraphUpdate,
_AudioGetDeviceSpatialPreferencesForContentType, _AudioGetDeviceSpatializationCapabilities,
_AudioGetDeviceSpatializationCapabilitiesWithSize, _AudioQueueAddPropertyListener,
_AudioQueueAllocateBuffer, _AudioQueueAllocateBufferWithMemory,
_AudioQueueAllocateBufferWithPacketDescriptions, _AudioQueueAllocateBufferWithPacketDescriptionsWithMemory,
_AudioQueueConvertToScaledSampleTime, _AudioQueueConvertToUnscaledSampleTime,
_AudioQueueCreateTimeline, _AudioQueueDeviceGetCurrentTime,
_AudioQueueDeviceGetNearestStartTime, _AudioQueueDeviceTranslateTime,
_AudioQueueDispose, _AudioQueueDisposeTimeline, _AudioQueueEnqueueBuffer,
_AudioQueueEnqueueBufferWithParameters, _AudioQueueEnqueueSilence,
_AudioQueueFlush, _AudioQueueFreeBuffer, _AudioQueueGetCurrentTime,
_AudioQueueGetParameter, _AudioQueueGetProperty, _AudioQueueGetPropertySize,
_AudioQueueNewInput, _AudioQueueNewInputWithDispatchQueue,
_AudioQueueNewOutput, _AudioQueueNewOutputWithDispatchQueue,
_AudioQueueOfflineRender, _AudioQueuePause, _AudioQueuePrime,
_AudioQueueProcessingTapDispose, _AudioQueueProcessingTapGetQueueTime,
_AudioQueueProcessingTapGetQueueTime_CM2, _AudioQueueProcessingTapGetSourceAudio,
_AudioQueueProcessingTapNew, _AudioQueueRemovePropertyListener,
_AudioQueueRequestDisposalNotification, _AudioQueueReset,
_AudioQueueScheduleParameters, _AudioQueueSetOfflineRenderFormat,
_AudioQueueSetParameter, _AudioQueueSetProperty, _AudioQueueStart,
_AudioQueueStop, _AudioServicesAddSystemSoundCompletion, _AudioServicesCreateSystemSoundID,
_AudioServicesCreateSystemSoundIDWithOptions, _AudioServicesCreateSystemSoundIDWithPath,
_AudioServicesDisposeSystemSoundID, _AudioServicesGetProperty,
_AudioServicesGetPropertyInfo, _AudioServicesPlayAlertSound,
_AudioServicesPlayAlertSoundWithCompletion, _AudioServicesPlaySystemSound,
_AudioServicesPlaySystemSoundWithCompletion, _AudioServicesPlaySystemSoundWithOptions,
_AudioServicesRemoveSystemSoundCompletion, _AudioServicesSetProperty,
_AudioServicesStartSystemSound, _AudioServicesStopSystemSound,
_AudioSessionAddPropertyListener, _AudioSessionGetProperty,
_AudioSessionGetPropertySize, _AudioSessionInitialize, _AudioSessionRemovePropertyListener,
_AudioSessionRemovePropertyListenerWithUserData, _AudioSessionSetActive,
_AudioSessionSetActiveWithFlags, _AudioSessionSetProperty,
_AudioSetSpatializationMode, _AudioToolboxServerInit, _CACentralLog,
_CACentralLogString, _CACentralLog_VA, _CZPEnabled, _CZPPrimarySession,
_CopyInstrumentInfoFromSoundBank, _CopyNameFromSoundBank,
_DisposeAUGraph, _DisposeMusicEventIterator, _DisposeMusicPlayer,
_DisposeMusicSequence, _HandleCARPViolation, _MZAudioSessionCanActivate,
_MZCheckImplicitPrimarySessionActivation, _MZCheckImplicitSessionActivation,
_MZSessionManagerInit, _MusicEventIteratorDeleteEvent, _MusicEventIteratorGetEventInfo,
_MusicEventIteratorHasCurrentEvent, _MusicEventIteratorHasNextEvent,
_MusicEventIteratorHasPreviousEvent, _MusicEventIteratorNextEvent,
_MusicEventIteratorPreviousEvent, _MusicEventIteratorSeek,
_MusicEventIteratorSetEventInfo, _MusicEventIteratorSetEventTime,
_MusicPlayerGetBeatsForHostTime, _MusicPlayerGetHostTimeForBeats,
_MusicPlayerGetPlayRateScalar, _MusicPlayerGetSequence, _MusicPlayerGetTime,
_MusicPlayerIsPaused, _MusicPlayerIsPlaying, _MusicPlayerPause,
_MusicPlayerPreroll, _MusicPlayerResume, _MusicPlayerSetPlayRateScalar,
_MusicPlayerSetSequence, _MusicPlayerSetTime, _MusicPlayerSetUseSkipGuard,
_MusicPlayerStart, _MusicPlayerStop, _MusicSequenceBarBeatTimeToBeats,
_MusicSequenceBeatsToBarBeatTime, _MusicSequenceDisposeTrack,
_MusicSequenceFileCreate, _MusicSequenceFileCreateData, _MusicSequenceFileLoad,
_MusicSequenceFileLoadData, _MusicSequenceGetAUGraph, _MusicSequenceGetBeatsForSeconds,
_MusicSequenceGetIndTrack, _MusicSequenceGetInfoDictionary,
_MusicSequenceGetMaxTrackLength, _MusicSequenceGetSecondsForBeats,
_MusicSequenceGetSequenceType, _MusicSequenceGetTempoTrack,
_MusicSequenceGetTrackCount, _MusicSequenceGetTrackIndex,
_MusicSequenceLoadSMFDataWithFlags, _MusicSequenceLoadSMFWithFlags,
_MusicSequenceNewTrack, _MusicSequenceReverse, _MusicSequenceSaveMIDIFile,
_MusicSequenceSaveSMFData, _MusicSequenceSetAUGraph, _MusicSequenceSetAudioGraph,
_MusicSequenceSetMIDIEndpoint, _MusicSequenceSetSequenceType,
_MusicSequenceSetUserCallback, _MusicTrackClear, _MusicTrackCopyInsert,
_MusicTrackCut, _MusicTrackGetDestMIDIEndpoint, _MusicTrackGetDestNode,
_MusicTrackGetProperty, _MusicTrackGetSequence, _MusicTrackIsValid,
_MusicTrackMerge, _MusicTrackMoveEvents, _MusicTrackNewAUPresetEvent,
_MusicTrackNewExtendedNoteEvent, _MusicTrackNewExtendedTempoEvent,
_MusicTrackNewMIDIChannelEvent, _MusicTrackNewMIDINoteEvent,
_MusicTrackNewMIDIRawDataEvent, _MusicTrackNewMetaEvent, _MusicTrackNewParameterEvent,
_MusicTrackNewUserEvent, _MusicTrackSetDestMIDIEndpoint, _MusicTrackSetDestNode,
_MusicTrackSetDestinationAU, _MusicTrackSetProperty, _NewAUGraph,
_NewMusicEventIterator, _NewMusicPlayer, _NewMusicSequence,
_NewMusicTrackFrom, __ZN14AQIONodeClient12SetCanRecordEv,
__ZN14AQIONodeClient18setRoutingBehaviorEjPK14__CFDictionaryRj,
__ZN14AQIONodeClient26GetPIDFromClientAuditTokenEv, __ZN14AQIONodeClient32SetRoutingBehaviorFromDictionaryEPK14__CFDictionary,
__ZN14AQIONodeClientD0Ev, __ZN14AQIONodeClientD1Ev, __ZN14AQIONodeClientD2Ev,
__ZN2AT9IOBindingC1EP14AVAudioSession, __ZN2AT9IOBindingC1EPK10__CFString,
__ZN2AT9IOBindingC1Ej, __ZN2AT9IOBindingC2EP14AVAudioSession,
__ZN2AT9IOBindingC2EPK10__CFString, __ZN2AT9IOBindingC2Ej,
__ZNK14AQIONodeClient20IsNowPlayingEligibleEv, __ZNK2AT9IOBinding11descriptionEv,
__ZNK2AT9IOBinding14serializedObjCEv, __ZNK2AT9IOBinding7sessionEv,
__ZNK2AT9IOBinding8deviceIDEv, __ZNK2AT9IOBinding8objcCopyEv,
__ZNK2AT9IOBinding9deviceUIDEv, __ZNK2AT9IOBinding9sessionIDEv,
__ZNK2AT9IOBindingeqERKS0_, __ZTV14AQIONodeClient, _allocateHapticSharedMemory,
_clearHapticSharedMemory, _createHapticSharedMemory, _destroyHapticSharedMemory,
_freeHapticSharedMemory, _kAudioServicesCreateSystemSoundIDOptionAudioFileURLKey,
_kAudioServicesCreateSystemSoundIDOptionLongFormMediaKey,
_kAudioServicesPlaySystemSoundOptionBehaviorKey, _kAudioServicesPlaySystemSoundOptionFlagsKey,
_kAudioServicesPlaySystemSoundOptionLoopKey, _kAudioSessionInputRoute_BluetoothHFP,
_kAudioSessionInputRoute_BuiltInMic, _kAudioSessionInputRoute_CarAudio,
_kAudioSessionInputRoute_HeadsetMic, _kAudioSessionInputRoute_LineIn,
_kAudioSessionInputRoute_USBAudio, _kAudioSessionOutputRoute_AirPlay,
_kAudioSessionOutputRoute_AirPlayLowLatency, _kAudioSessionOutputRoute_BluetoothA2DP,
_kAudioSessionOutputRoute_BluetoothHFP, _kAudioSessionOutputRoute_BuiltInReceiver,
_kAudioSessionOutputRoute_BuiltInSpeaker, _kAudioSessionOutputRoute_CarAudio,
_kAudioSessionOutputRoute_HDMI, _kAudioSessionOutputRoute_Headphones,
_kAudioSessionOutputRoute_LineOut, _kAudioSessionOutputRoute_USBAudio,
_kAudioSession_AudioRouteChangeKey_CurrentRouteDescription,
_kAudioSession_AudioRouteChangeKey_PreviousRouteDescription,
_kAudioSession_AudioRouteKey_Inputs, _kAudioSession_AudioRouteKey_Outputs,
_kAudioSession_AudioRouteKey_Type, _kAudioSession_InputSourceKey_Description,
_kAudioSession_InputSourceKey_ID, _kAudioSession_OutputDestinationKey_Description,
_kAudioSession_OutputDestinationKey_ID, _kAudioSession_RouteChangeKey_Reason,
_readHapticCommand ]
objc-classes: [ ATAudioTap, ATAudioTapDescription, ATIOBinding, AVHapticEvent,
AVHapticParameterCurveValue, AVHapticPlayer, AVHapticPlayerChannel,
AVHapticPlayerParameterCurve, AVHapticPlayerParameterCurveControlPoint,
AVHapticSequence, STSController ]
- targets: [ x86_64-macos, arm64e-macos, arm64-macos ]
symbols: [ _ATGetDefaultDeviceAggregateID, _ATGetDefaultDeviceAggregateUID,
_AUGraphCountNodeConnections, _AUGraphGetConnectionInfo, _AUGraphGetNodeConnections,
_AUGraphGetNodeInfo, _AUGraphGetNodeInfoSubGraph, _AUGraphGetNumberOfConnections,
_AUGraphIsNodeSubGraph, _AUGraphNewNode, _AUGraphNewNodeSubGraph,
_AudioHardwareServiceAddPropertyListener, _AudioHardwareServiceGetPropertyData,
_AudioHardwareServiceGetPropertyDataSize, _AudioHardwareServiceHasProperty,
_AudioHardwareServiceIsPropertySettable, _AudioHardwareServiceRemovePropertyListener,
_AudioHardwareServiceSetPropertyData, _CAClockAddListener,
_CAClockArm, _CAClockBarBeatTimeToBeats, _CAClockBeatsToBarBeatTime,
_CAClockDisarm, _CAClockDispose, _CAClockGetCurrentTempo,
_CAClockGetCurrentTime, _CAClockGetPlayRate, _CAClockGetProperty,
_CAClockGetPropertyInfo, _CAClockGetStartTime, _CAClockNew,
_CAClockParseMIDI, _CAClockRemoveListener, _CAClockSMPTETimeToSeconds,
_CAClockSecondsToSMPTETime, _CAClockSetCurrentTempo, _CAClockSetCurrentTime,
_CAClockSetPlayRate, _CAClockSetProperty, _CAClockStart, _CAClockStop,
_CAClockTranslateTime, _GetAudioToolboxServerPort, _GetNameFromSoundBank,
_MusicTrackNewExtendedControlEvent, __ZN14ATIOController10invalidateEv,
__ZN14ATIOController15setStreamsInUseEP7NSArray, __ZN14ATIOController19setSessionIOBindingEP23AVAudioSessionIOBinding,
__ZN14ATIOController25implicitlyActivateSessionEb, __ZN14ATIOController25setClientStateChangeBlockEU13block_pointerFvP25AVAudioIOStateChangeEventE,
__ZN14ATIOController4stopEv, __ZN14ATIOController5startEb,
__ZN14ATIOControllerC1ERNS_5OwnerE, __ZN14ATIOControllerC2ERNS_5OwnerE,
__ZN14ATIOControllerD1Ev, __ZN14ATIOControllerD2Ev, __ZNK14ATIOController12IOControllerEv,
__ZNK14ATIOController15isReallyRunningEv, __ZNK14ATIOController22clientStateChangeBlockEv,
__ZNK14ATIOController23requestedSessionBindingEv, __ZNK14ATIOController25effectiveSessionIOBindingEv,
__ZNK14ATIOController9isRunningEv ]
objc-classes: [ ATDefaultDeviceAggregate, ATPhasePlatform ]
--- !tapi-tbd
tbd-version: 4
targets: [ x86_64-macos, x86_64-maccatalyst, arm64-macos, arm64-maccatalyst,
arm64e-macos, arm64e-maccatalyst ]
uuids:
- target: x86_64-macos
value: 9078689A-D5F2-34EA-ABEC-E7D9D36C7E08
- target: x86_64-maccatalyst
value: 9078689A-D5F2-34EA-ABEC-E7D9D36C7E08
- target: arm64-macos
value: 00000000-0000-0000-0000-000000000000
- target: arm64-maccatalyst
value: 00000000-0000-0000-0000-000000000000
- target: arm64e-macos
value: EA02A6F4-8AB7-31DE-9305-F86851863817
- target: arm64e-maccatalyst
value: EA02A6F4-8AB7-31DE-9305-F86851863817
install-name: '/System/Library/PrivateFrameworks/AudioToolboxCore.framework/Versions/A/AudioToolboxCore'
exports:
- targets: [ x86_64-macos ]
objc-classes: [ _ACCarbonComponentCache ]
- targets: [ x86_64-macos, x86_64-maccatalyst ]
symbols: [ _Float32ToNativeInt16Scaled_X86, _Float32ToNativeInt16_X86,
_Float32ToNativeInt24_X86, _Float32ToNativeInt32_X86, _Float32ToSwapInt16Scaled_X86,
_Float32ToSwapInt16_X86, _Float32ToSwapInt24_X86, _Float32ToSwapInt32_X86,
_NativeInt16ToFloat32Scaled_X86, _NativeInt16ToFloat32_X86,
_NativeInt16ToNativeInt32_X86, _NativeInt24ToFloat32_X86,
_NativeInt32ToFloat32_X86, _NativeInt32ToNativeInt16_X86,
_StereoDeinterleave32_X86, _StereoInterleave32_X86, _SwapInt16ToFloat32Scaled_X86,
_SwapInt16ToFloat32_X86, _SwapInt24ToFloat32_X86, _SwapInt32ToFloat32_X86,
_SwapPCM16_X86, _SwapPCM32_X86, _UpmixMonoToStereoInterleaved16_X86,
_UpmixMonoToStereoInterleaved32_X86 ]
- targets: [ x86_64-macos, arm64e-macos, x86_64-maccatalyst, arm64e-maccatalyst,
arm64-macos, arm64-maccatalyst ]
symbols: [ _AUEventListenerAddEventType, _AUEventListenerCreate, _AUEventListenerCreateWithDispatchQueue,
_AUEventListenerNotify, _AUEventListenerRemoveEventType, _AUListenerAddParameter,
_AUListenerCreate, _AUListenerCreateWithDispatchQueue, _AUListenerDispose,
_AUListenerRemoveParameter, _AUPBAddPropertyListener, _AUPBAddServerListener,
_AUPBCopyProperty, _AUPBPropertiesChanged, _AUPBPropertyChanged,
_AUPBRegister, _AUPBRegisterAU, _AUPBRemovePropertyListener,
_AUPBRemoveServerListener, _AUPBSetProperty, _AUPBUnregister,
_AUPBUnregisterAU, _AUParameterFormatValue, _AUParameterListenerNotify,
_AUParameterSet, _AUParameterValueFromLinear, _AUParameterValueToLinear,
_AudioAnalyzerCompleteAnalysis, _AudioAnalyzerCompleteAnalysisWithBlock,
_AudioAnalyzerDispose, _AudioAnalyzerNew, _AudioAnalyzerNewWithBlock,
_AudioAnalyzerPrepare, _AudioAnalyzerPrepareWithFile, _AudioAnalyzerPrepareWithFileStream,
_AudioAnalyzerPushAudio, _AudioCodecAppendInputBufferList,
_AudioCodecAppendInputData, _AudioCodecGetProperty, _AudioCodecGetPropertyInfo,
_AudioCodecInitialize, _AudioCodecProduceOutputBufferList,
_AudioCodecProduceOutputPackets, _AudioCodecReset, _AudioCodecSetProperty,
_AudioCodecUninitialize, _AudioComponentApplyServerRegistrations,
_AudioComponentCopyComponentURL, _AudioComponentCopyConfigurationInfo,
_AudioComponentCopyIcon, _AudioComponentCopyName, _AudioComponentCopyTagsInfo,
_AudioComponentCopyUserTags, _AudioComponentCount, _AudioComponentEnableNonSystemPlugIns,
_AudioComponentFetchServerRegistrations, _AudioComponentFindNext,
_AudioComponentGetDescription, _AudioComponentGetLastActiveTime,
_AudioComponentGetVersion, _AudioComponentInstanceCanDo, _AudioComponentInstanceDispose,
_AudioComponentInstanceGetComponent, _AudioComponentInstanceNew,
_AudioComponentInstantiate, _AudioComponentNoComponentManager,
_AudioComponentRegister, _AudioComponentRelease, _AudioComponentSetUserTags,
_AudioComponentValidate, _AudioConverterConvertBuffer, _AudioConverterConvertComplexBuffer,
_AudioConverterDispose, _AudioConverterFillComplexBuffer,
_AudioConverterFillComplexBufferWithPacketDependencyInfo,
_AudioConverterGetProperty, _AudioConverterGetPropertyInfo,
_AudioConverterNew, _AudioConverterNewSpecific, _AudioConverterReset,
_AudioConverterSetProperty, _AudioFileClose, _AudioFileComponentCloseFile,
_AudioFileComponentCountUserData, _AudioFileComponentCreate,
_AudioFileComponentCreateURL, _AudioFileComponentDataIsThisFormat,
_AudioFileComponentExtensionIsThisFormat, _AudioFileComponentFileDataIsThisFormat,
_AudioFileComponentFileIsThisFormat, _AudioFileComponentGetGlobalInfo,
_AudioFileComponentGetGlobalInfoSize, _AudioFileComponentGetProperty,
_AudioFileComponentGetPropertyInfo, _AudioFileComponentGetUserData,
_AudioFileComponentGetUserDataAtOffset, _AudioFileComponentGetUserDataSize,
_AudioFileComponentGetUserDataSize64, _AudioFileComponentInitialize,
_AudioFileComponentInitializeWithCallbacks, _AudioFileComponentOpenFile,
_AudioFileComponentOpenURL, _AudioFileComponentOpenWithCallbacks,
_AudioFileComponentOptimize, _AudioFileComponentReadBytes,
_AudioFileComponentReadPacketData, _AudioFileComponentReadPackets,
_AudioFileComponentRemoveUserData, _AudioFileComponentSetProperty,
_AudioFileComponentSetUserData, _AudioFileComponentWriteBytes,
_AudioFileComponentWritePackets, _AudioFileCountUserData,
_AudioFileCreateWithURL, _AudioFileGetGlobalInfo, _AudioFileGetGlobalInfoSize,
_AudioFileGetProperty, _AudioFileGetPropertyInfo, _AudioFileGetUserData,
_AudioFileGetUserDataAtOffset, _AudioFileGetUserDataSize,
_AudioFileGetUserDataSize64, _AudioFileInitializeWithCallbacks,
_AudioFileOpenURL, _AudioFileOpenWithCallbacks, _AudioFileOptimize,
_AudioFileReadBytes, _AudioFileReadPacketData, _AudioFileReadPackets,
_AudioFileRemoveUserData, _AudioFileSetProperty, _AudioFileSetUserData,
_AudioFileStreamClose, _AudioFileStreamGetProperty, _AudioFileStreamGetPropertyInfo,
_AudioFileStreamOpen, _AudioFileStreamParseBytes, _AudioFileStreamSeek,
_AudioFileStreamSetProperty, _AudioFileWriteBytes, _AudioFileWritePackets,
_AudioFormatGetProperty, _AudioFormatGetPropertyInfo, _AudioFormat_ComputeLoudnessScalar,
_AudioOutputUnitPublish, _AudioOutputUnitStart, _AudioOutputUnitStop,
_AudioUnitAddPropertyListener, _AudioUnitAddRenderNotify,
_AudioUnitComplexRender, _AudioUnitExtensionCopyComponentList,
_AudioUnitExtensionSetComponentList, _AudioUnitGetParameter,
_AudioUnitGetProperty, _AudioUnitGetPropertyInfo, _AudioUnitInitialize,
_AudioUnitProcess, _AudioUnitProcessMultiple, _AudioUnitRemovePropertyListenerWithUserData,
_AudioUnitRemoveRenderNotify, _AudioUnitRender, _AudioUnitReset,
_AudioUnitScheduleParameters, _AudioUnitSetParameter, _AudioUnitSetProperty,
_AudioUnitURLOpen, _AudioUnitUninitialize, _AudioWorkIntervalCreate,
_CACentralStateDumpRegisterSubsystem, _CACentralStateDumpUnregisterSubsystem,
_CACopyObjectDescription, _CAShow, _CAShowFile, _ConfigureAUAudioUnitXPCInterface,
_DownmixStereoInterleavedFloat32ToMono_Portable, _DownmixStereoInterleavedInt16ToMono_Portable,
_DownmixStereoInterleavedInt32ToMono_Portable, _ExtAudioFileCreateWithURL,
_ExtAudioFileDispose, _ExtAudioFileGetProperty, _ExtAudioFileGetPropertyInfo,
_ExtAudioFileOpenURL, _ExtAudioFileRead, _ExtAudioFileSeek,
_ExtAudioFileSetProperty, _ExtAudioFileTell, _ExtAudioFileWrapAudioFileID,
_ExtAudioFileWrapAudioFileIDWithPreferredFormatID, _ExtAudioFileWrite,
_ExtAudioFileWriteAsync, _ExtendedAudioBufferList_Create,
_ExtendedAudioBufferList_CreateWithFormat, _ExtendedAudioBufferList_Destroy,
_ExtendedAudioBufferList_GetMetadataFrame, _ExtendedAudioBufferList_Prepare,
_Float32ToNativeFloat64, _Float32ToNativeInt16Scaled_Portable,
_Float32ToNativeInt16_Portable, _Float32ToNativeInt24_Portable,
_Float32ToNativeInt32Scaled_Portable, _Float32ToNativeInt32_Portable,
_Float32ToNativeLowAlignedInt32_Portable, _Float32ToNativeLowAlignedInt64_Portable,
_Float32ToSInt8, _Float32ToSwapFloat64, _Float32ToSwapInt16Scaled_Portable,
_Float32ToSwapInt16_Portable, _Float32ToSwapInt24_Portable,
_Float32ToSwapInt32Scaled_Portable, _Float32ToSwapInt32_Portable,
_Float32ToUInt8, _ID3ParserClose, _ID3ParserGetProperty, _ID3ParserOpen,
_MusicDeviceMIDIEvent, _MusicDeviceMIDIEventList, _MusicDevicePrepareInstrument,
_MusicDeviceReleaseInstrument, _MusicDeviceStartNote, _MusicDeviceStopNote,
_MusicDeviceSysEx, _Native824FixedToLowAlignedInt32_Portable,
_NativeFloat64ToFloat32, _NativeInt16ToFloat32Scaled_Portable,
_NativeInt16ToFloat32_Portable, _NativeInt16ToLowAlignedInt32_Portable,
_NativeInt16ToNativeInt24_Portable, _NativeInt16ToNativeInt32_Portable,
_NativeInt16ToSInt8_Portable, _NativeInt16ToSwapInt24_Portable,
_NativeInt16ToUInt8_Portable, _NativeInt24ToFloat32_Portable,
_NativeInt24ToNativeInt16_Portable, _NativeInt24ToNativeInt32_Portable,
_NativeInt32ToFloat32Scaled_Portable, _NativeInt32ToFloat32_Portable,
_NativeInt32ToNativeInt16_Portable, _NativeInt32ToNativeInt24_Portable,
_NativeInt32ToNativeInt32_Portable, _NativeInt32ToSwapInt16_Portable,
_NativeInt32ToSwapInt24_Portable, _NativeInt32ToSwapInt32_Portable,
_NativeLowAlignedInt32To824Fixed_Portable, _NativeLowAlignedInt32ToFloat32_Portable,
_NativeLowAlignedInt32ToInt16_Portable, _NativeLowAlignedInt64ToFloat32_Portable,
_RemoteAudioUnitGetParameter, _RemoteAudioUnitGetProperty,
_RemoteAudioUnitGetPropertyInfo, _RemoteAudioUnitGetPropertySerial,
_RemoteAudioUnitSetParameter, _RemoteAudioUnitSetProperty,
_RemoteAudioUnitSetPropertySerial, _SInt8ToFloat32, _SInt8ToNativeInt16_Portable,
_StereoDeinterleave32_Portable, _StereoDeinterleaveInt16ToFloat32Scaled_Portable,
_StereoDeinterleaveInt16ToInt824_Portable, _StereoDeinterleaveInt824ToFloat32_Portable,
_StereoInterleave32_Portable, _StereoInterleaveFloat32ToInt16Scaled_Portable,
_StereoInterleaveFloat32ToInt824_Portable, _StereoInterleaveInt824ToInt16_Portable,
_SwapFloat64ToFloat32, _SwapInt16ToFloat32Scaled_Portable,
_SwapInt16ToFloat32_Portable, _SwapInt16ToNativeInt32_Portable,
_SwapInt24ToFloat32_Portable, _SwapInt24ToNativeInt16_Portable,
_SwapInt24ToNativeInt32_Portable, _SwapInt32ToFloat32Scaled_Portable,
_SwapInt32ToFloat32_Portable, _SwapInt32ToNativeInt16_Portable,
_SwapInt32ToNativeInt24_Portable, _SwapInt32ToNativeInt32_Portable,
_SwapInt32ToSwapInt32_Portable, _SwapPCM16_Portable, _SwapPCM24_Portable,
_SwapPCM32_Portable, _SwapPCM64_Portable, _UInt8ToFloat32,
_UInt8ToNativeInt16_Portable, _UpmixMonoToStereoInterleaved16_Portable,
_UpmixMonoToStereoInterleaved32_Portable, __AudioConverterNewInternal,
__Z14_CheckRPCErrorPKcii, __Z16PacketTableEntryP21CompressedPacketTablem,
__Z17_ReportRPCTimeoutPKci, __Z21GetAudioToolboxBundlev, __Z24AudioMetadataFrame_ClearP18AudioMetadataFrame,
__Z24GetMediaServerRPCTimeoutv, __Z27AudioMetadataFrame_BeginNewP18AudioMetadataFramePK24AudioMetadataFrameHeader,
__Z28AudioMetadataFrame_GetHeaderPK18AudioMetadataFrame, __Z30AudioMetadataFrame_AppendEventP18AudioMetadataFramePK18AudioMetadataEvent,
__Z32AudioBufferList_GetMetadataFramePK15AudioBufferList,
__ZN11CAFormatter14InitCAShowableEPvPKc, __ZN11CAFormatter15DumpAudioBufferEP7__sFILEPKcRK11AudioBufferiiib,
__ZN11CAFormatter20InitWithMemoryStreamER14CAMemoryStream,
__ZN11CAFormatter4InitERK14AudioTimeStampjb, __ZN11CAFormatter9DumpAudioEP7__sFILERK15AudioBufferListiiiPKcbS6_,
__ZN11CAFormatterC1EP20OpaqueAudioConverter, __ZN11CAFormatterC1EPK14AudioTimeStampjb,
__ZN11CAFormatterC1EPK18AudioChannelLayout, __ZN11CAFormatterC1EPK28AudioStreamPacketDescriptionii,
__ZN11CAFormatterC1EPKfi, __ZN11CAFormatterC1EPKfii, __ZN11CAFormatterC1EPKii,
__ZN11CAFormatterC1EPKvi, __ZN11CAFormatterC1ERK15AudioBufferList,
__ZN11CAFormatterC1ERK15AudioBufferListiRK27AudioStreamBasicDescriptionPKcb,
__ZN11CAFormatterC1ERK15AudioBufferListjPK27AudioStreamBasicDescriptionPKcb,
__ZN11CAFormatterC1ERK21AudioClassDescription, __ZN11CAFormatterC1ERK24CAStreamBasicDescriptionb,
__ZN11CAFormatterC1ERK25AudioComponentDescription, __ZN11CAFormatterC1ERK26AudioObjectPropertyAddress,
__ZN11CAFormatterC1ERK26AudioObjectPropertyAddressPKvi, __ZN11CAFormatterC1ERK27AudioStreamBasicDescriptionb,
__ZN11CAFormatterC2EP20OpaqueAudioConverter, __ZN11CAFormatterC2EPK14AudioTimeStampjb,
__ZN11CAFormatterC2EPK18AudioChannelLayout, __ZN11CAFormatterC2EPK28AudioStreamPacketDescriptionii,
__ZN11CAFormatterC2EPKfi, __ZN11CAFormatterC2EPKfii, __ZN11CAFormatterC2EPKii,
__ZN11CAFormatterC2EPKvi, __ZN11CAFormatterC2ERK15AudioBufferList,
__ZN11CAFormatterC2ERK15AudioBufferListiRK27AudioStreamBasicDescriptionPKcb,
__ZN11CAFormatterC2ERK15AudioBufferListjPK27AudioStreamBasicDescriptionPKcb,
__ZN11CAFormatterC2ERK21AudioClassDescription, __ZN11CAFormatterC2ERK24CAStreamBasicDescriptionb,
__ZN11CAFormatterC2ERK25AudioComponentDescription, __ZN11CAFormatterC2ERK26AudioObjectPropertyAddress,
__ZN11CAFormatterC2ERK26AudioObjectPropertyAddressPKvi, __ZN11CAFormatterC2ERK27AudioStreamBasicDescriptionb,
__ZN13CACFFormatterC1EPKv, __ZN13CACFFormatterC2EPKv, __ZN15AudioFileFormatC2Ej,
__ZN15AudioFileFormatD0Ev, __ZN15AudioFileFormatD1Ev, __ZN15AudioFileFormatD2Ev,
__ZN15AudioFileObject10DoOptimizeEv, __ZN15AudioFileObject10GetBitRateEPj,
__ZN15AudioFileObject10InitializeEPK7__CFURLPK27AudioStreamBasicDescriptionj,
__ZN15AudioFileObject10WriteBytesEhxPjPKv, __ZN15AudioFileObject11GetPropertyEjPjPv,
__ZN15AudioFileObject11GetUserDataEjjPjPv, __ZN15AudioFileObject11ReadPacketsEhPjP28AudioStreamPacketDescriptionxS0_Pv,
__ZN15AudioFileObject11SetPropertyEjjPKv, __ZN15AudioFileObject11SetUserDataEjjjPKv,
__ZN15AudioFileObject11SizeChangedEv, __ZN15AudioFileObject12AppendPacketERK28AudioStreamPacketDescription,
__ZN15AudioFileObject12ByteToPacketEP26AudioBytePacketTranslation,
__ZN15AudioFileObject12DoInitializeEPK7__CFURLPK27AudioStreamBasicDescriptionj,
__ZN15AudioFileObject12PacketToByteEP26AudioBytePacketTranslation,
__ZN15AudioFileObject12WritePacketsEhjPK28AudioStreamPacketDescriptionxPjPKv,
__ZN15AudioFileObject13CountUserDataEjPj, __ZN15AudioFileObject13FrameToPacketExRxRj,
__ZN15AudioFileObject13GetFormatListERjP19AudioFormatListItem,
__ZN15AudioFileObject13GetMarkerListEPjP19AudioFileMarkerList,
__ZN15AudioFileObject13GetRegionListEPjP19AudioFileRegionList,
__ZN15AudioFileObject13PacketToFrameExRx, __ZN15AudioFileObject13SetDataFormatEPK27AudioStreamBasicDescription,
__ZN15AudioFileObject13SetDataSourceEP10DataSource, __ZN15AudioFileObject13SetFormatListEjPK19AudioFormatListItem,
__ZN15AudioFileObject13SetMarkerListEjPK19AudioFileMarkerList,
__ZN15AudioFileObject13SetRegionListEjPK19AudioFileRegionList,
__ZN15AudioFileObject14CreateDataFileEPK7__CFURLRi, __ZN15AudioFileObject14GetPacketTableEh,
__ZN15AudioFileObject14ReadPacketDataEhPjP28AudioStreamPacketDescriptionxS0_Pv,
__ZN15AudioFileObject14RemoveUserDataEjj, __ZN15AudioFileObject14UpdateNumBytesEx,
__ZN15AudioFileObject15GetPropertyInfoEjPjS0_, __ZN15AudioFileObject15GetUserDataSizeEjjPj,
__ZN15AudioFileObject16GetChannelLayoutEPjP18AudioChannelLayout,
__ZN15AudioFileObject16SetChannelLayoutEjPK18AudioChannelLayout,
__ZN15AudioFileObject16UpdateDataFormatEPK27AudioStreamBasicDescription,
__ZN15AudioFileObject16UpdateNumPacketsEx, __ZN15AudioFileObject17DeletePacketTableEv,
__ZN15AudioFileObject17GetFormatListInfoERjS0_, __ZN15AudioFileObject17GetInfoDictionaryEP14CACFDictionary,
__ZN15AudioFileObject17GetMarkerListSizeEPjS0_, __ZN15AudioFileObject17GetRegionListSizeEPjS0_,
__ZN15AudioFileObject17GetUserDataSize64EjjPy, __ZN15AudioFileObject17IsDataFormatValidEPK27AudioStreamBasicDescription,
__ZN15AudioFileObject17ReadPacketDataCBREhPjxS0_Pv, __ZN15AudioFileObject17ReadPacketDataVBREhPjP28AudioStreamPacketDescriptionxS0_Pv,
__ZN15AudioFileObject17SetInfoDictionaryEP14CACFDictionary,
__ZN15AudioFileObject18GetMagicCookieDataEPjPv, __ZN15AudioFileObject18OpenFromDataSourceEv,
__ZN15AudioFileObject18SetMagicCookieDataEjPKv, __ZN15AudioFileObject18UpdateSizeIfNeededEv,
__ZN15AudioFileObject19DoOpenWithCallbacksEPvPFiS0_xjS0_PjEPFiS0_xjPKvS1_EPFxS0_EPFiS0_xE,
__ZN15AudioFileObject19GetUserDataAtOffsetEjjxPjPv, __ZN15AudioFileObject20GetChannelLayoutSizeEPjS0_,
__ZN15AudioFileObject20GetEstimatedDurationEPd, __ZN15AudioFileObject20InitializeDataSourceEPK27AudioStreamBasicDescriptionj,
__ZN15AudioFileObject20PacketToRollDistanceEP34AudioPacketRollDistanceTranslation,
__ZN15AudioFileObject21GetInfoDictionarySizeEPjS0_, __ZN15AudioFileObject21GetPacketDescriptionsEjPjP28AudioStreamPacketDescription,
__ZN15AudioFileObject21PacketRangeUpperBoundExRxS0_, __ZN15AudioFileObject21ValidateFormatAndDataEv,
__ZN15AudioFileObject22GetMagicCookieDataSizeEPjS0_, __ZN15AudioFileObject22PacketToDependencyInfoEP36AudioPacketDependencyInfoTranslation,
__ZN15AudioFileObject24ScanForIndependentPacketEN9AudioFile24AudioPacketScanDirectionEP33AudioIndependentPacketTranslation,
__ZN15AudioFileObject25DoInitializeWithCallbacksEPvPFiS0_xjS0_PjEPFiS0_xjPKvS1_EPFxS0_EPFiS0_xEjPK27AudioStreamBasicDescriptionj,
__ZN15AudioFileObject25ReadPacketDataVBR_InTableEhPjP28AudioStreamPacketDescriptionxS0_Pv,
__ZN15AudioFileObject27AddDurationToInfoDictionaryEP14CACFDictionaryRd,
__ZN15AudioFileObject33HowManyPacketsCanBeReadIntoBufferEPjxS0_,
__ZN15AudioFileObject4OpenEPK7__CFURLai, __ZN15AudioFileObject5CloseEv,
__ZN15AudioFileObject6CreateEPK7__CFURLPK27AudioStreamBasicDescription,
__ZN15AudioFileObject6DoOpenEPK7__CFURLai, __ZN15AudioFileObject6SetURLEPK7__CFURL,
__ZN15AudioFileObject7DoCloseEv, __ZN15AudioFileObject8DoCreateEPK7__CFURLPK27AudioStreamBasicDescriptionj,
__ZN15AudioFileObject8MoveDataExxx, __ZN15AudioFileObject8OpenFileEai,
__ZN15AudioFileObject8OptimizeEv, __ZN15AudioFileObject9ReadBytesEhxPjPv,
__ZN15AudioFileObjectD0Ev, __ZN15AudioFileObjectD1Ev, __ZN15AudioFileObjectD2Ev,
__ZN18AudioMetadataFrame5eraseENS_8iteratorE, __ZN18AudioMetadataFrame6appendERK18AudioMetadataEvent,
__ZN18AudioMetadataFrame6insertENS_8iteratorERK18AudioMetadataEvent,
__ZN18AudioMetadataFrame9begin_newERK24AudioMetadataFrameHeader,
__ZN18AudioMetadataFrameC1Ev, __ZN18AudioMetadataFrameC2Ev,
__ZN18CAHexDumpFormatterC1EPKvi, __ZN18CAHexDumpFormatterC2EPKvi,
__ZN19AudioFileFormatBase11GetHFSCodesEPjPv, __ZN19AudioFileFormatBaseC2Ej,
__ZN19AudioFileFormatBaseD0Ev, __ZN19AudioFileFormatBaseD1Ev,
__ZN19AudioFileFormatBaseD2Ev, __ZN20AUProcessingBlock_AU15GetAvailableAUsERNSt3__16vectorI21AudioClassDescriptionNS0_9allocatorIS2_EEEE,
__ZN21AUProcessingBlockBase11SetPropertyEjPKv, __ZN21AUProcessingBlockBase12CopyPropertyEjPPKv,
__ZN21AUProcessingBlockBase12UnitsChangedEjPP21OpaqueRemoteAudioUnit,
__ZN21AUProcessingBlockBase15InsertAUAtIndexEjRK8AUPBUnit,
__ZN21AUProcessingBlockBase15RemoveAUAtIndexEj, __ZN21AUProcessingBlockBase7SetNameEPK10__CFString,
__ZN21AUProcessingBlockBaseC2EPK10__CFString, __ZN21AUProcessingBlockBaseC2Ev,
__ZN21AUProcessingBlockBaseD0Ev, __ZN21AUProcessingBlockBaseD1Ev,
__ZN21AUProcessingBlockBaseD2Ev, __ZN25CAAUScopeElementFormatterC1Ejj,
__ZN25CAAUScopeElementFormatterC2Ejj, __ZN26AUProcessingBlock_DSPGraph12CopyPropertyEjPPKv,
__ZN26AUProcessingBlock_DSPGraph13AUGetPropertyEP21OpaqueRemoteAudioUnitjjjPvPj,
__ZN26AUProcessingBlock_DSPGraph13AUSetPropertyEP21OpaqueRemoteAudioUnitjjjPKvj,
__ZN26AUProcessingBlock_DSPGraph14AUGetParameterEP21OpaqueRemoteAudioUnitjjjPf,
__ZN26AUProcessingBlock_DSPGraph14AUSetParameterEP21OpaqueRemoteAudioUnitjjjf,
__ZN26AUProcessingBlock_DSPGraph15GetAvailableAUsERNSt3__16vectorI21AudioClassDescriptionNS0_9allocatorIS2_EEEE,
__ZN26AUProcessingBlock_DSPGraph17AUGetPropertyInfoEP21OpaqueRemoteAudioUnitjjjPjPh,
__ZN26AUProcessingBlock_DSPGraph17BoxIDFromRemoteAUEP21OpaqueRemoteAudioUnit,
__ZN26AUProcessingBlock_DSPGraphC1ERKNSt3__110shared_ptrIN8DSPGraph5GraphEEE,
__ZN26AUProcessingBlock_DSPGraphC2ERKNSt3__110shared_ptrIN8DSPGraph5GraphEEE,
__ZN26AUProcessingBlock_DSPGraphD0Ev, __ZN26AUProcessingBlock_DSPGraphD1Ev,
__ZN26AUProcessingBlock_DSPGraphD2Ev, __ZN27AUProcessingBlockBase_NonAU14AddItemToBlockERK21AudioClassDescriptionNSt3__110shared_ptrI31AUProcessingBlockBase_NonAUItemEE,
__ZN27AUProcessingBlockBase_NonAU15GetAvailableAUsERNSt3__16vectorI21AudioClassDescriptionNS0_9allocatorIS2_EEEE,
__ZN27AUProcessingBlockBase_NonAU19RemoveItemFromBlockENSt3__110shared_ptrI31AUProcessingBlockBase_NonAUItemEE,
__ZN27AUProcessingBlockBase_NonAUD0Ev, __ZN27AUProcessingBlockBase_NonAUD1Ev,
__ZN27AUProcessingBlockBase_NonAUD2Ev, __ZN27AudioUnitPropertyMarshaller16CreateMarshallerEj,
__ZN2AT10RingBuffer11TouchMemoryEv, __ZN2AT10RingBuffer14SetInputFormatERK27AudioStreamBasicDescription,
__ZN2AT10RingBuffer17SetResetWhenEmptyEb, __ZN2AT10RingBuffer18FetchAllWithZeroesER15AudioBufferListjxRjS3_S3_,
__ZN2AT10RingBuffer5ClearEv, __ZN2AT10RingBuffer5FetchER15AudioBufferListjx,
__ZN2AT10RingBuffer5StoreERK15AudioBufferListjx, __ZN2AT10RingBufferC1ERK27AudioStreamBasicDescriptionj,
__ZN2AT10RingBufferC1Ejjj, __ZN2AT10RingBufferC2ERK27AudioStreamBasicDescriptionj,
__ZN2AT10RingBufferC2Ejjj, __ZN2AT10RingBufferD1Ev, __ZN2AT10RingBufferD2Ev,
__ZN2AT15make_error_codeENS_15RingBufferErrorE, __ZN2AT9Resampler13MockResampler13SetIsBypassedEb,
__ZN2AT9Resampler13MockResampler16SetVarispeedRateEd, __ZN2AT9Resampler13MockResampler23GetNumberOfSourceFramesEj,
__ZN2AT9Resampler13MockResampler7ProcessEj, __ZN2AT9Resampler13MockResampler7SetRampEPK8RateRamp,
__ZN2AT9Resampler13MockResamplerC1ERS0_, __ZN2AT9Resampler13MockResamplerC2ERS0_,
__ZN2AT9Resampler13MockResamplerD1Ev, __ZN2AT9Resampler13MockResamplerD2Ev,
__ZN2AT9Resampler21ShutdownVarispeedModeEj, __ZN2AT9Resampler23InitializeVarispeedModeEj,
__ZN2AT9Resampler6createEddiiidb, __ZN2CA18MetadataFrameQueue11appendFrameERK18AudioMetadataFrame,
__ZN2CA18MetadataFrameQueue11eraseBeforeEd, __ZN2CA18MetadataFrameQueue5clearEv,
__ZN2CA18MetadataFrameQueue7extractEddR18AudioMetadataFrame,
__ZN2CA18MetadataFrameQueueC1Ev, __ZN2CA18MetadataFrameQueueC2Ev,
__ZN31AUProcessingBlockBase_NonAUItem11GetPropertyEjjjPvPj,
__ZN31AUProcessingBlockBase_NonAUItem11SetPropertyEjjjPKvj,
__ZN31AUProcessingBlockBase_NonAUItem15GetPropertyInfoEjjjPjPh,
__ZN31AUProcessingBlockBase_NonAUItemD0Ev, __ZN31AUProcessingBlockBase_NonAUItemD1Ev,
__ZN31AUProcessingBlockBase_NonAUItemD2Ev, __ZN34AUProcessingBlock_AU_Instantiating15InsertAUAtIndexEjRK8AUPBUnit,
__ZN34AUProcessingBlock_AU_Instantiating15RemoveAUAtIndexEj,
__ZN34AUProcessingBlock_AU_InstantiatingD0Ev, __ZN34AUProcessingBlock_AU_InstantiatingD1Ev,
__ZN34AUProcessingBlock_AU_InstantiatingD2Ev, __ZN8DSPGraph10ABIVersionEv,
__ZN8DSPGraph10AUAnalyzer11getPropertyEjjjRjPv, __ZN8DSPGraph10AUAnalyzer11setPropertyEjjjjPKv,
__ZN8DSPGraph10AUAnalyzer12getParameterEjjj, __ZN8DSPGraph10AUAnalyzer12setParameterEjjjfj,
__ZN8DSPGraph10AUAnalyzer13processBufferEPNS_6BufferEj, __ZN8DSPGraph10AUAnalyzer13resetAnalysisEv,
__ZN8DSPGraph10AUAnalyzer15getPropertyInfoEjjj, __ZN8DSPGraph10AUAnalyzer15setFormatOnUnitERK27AudioStreamBasicDescriptionjj,
__ZN8DSPGraph10AUAnalyzer16getParameterInfoEjj, __ZN8DSPGraph10AUAnalyzer16getParameterListEj,
__ZN8DSPGraph10AUAnalyzer17getFormatFromUnitEjj, __ZN8DSPGraph10AUAnalyzer4openEv,
__ZN8DSPGraph10AUAnalyzerC1EjRK25AudioComponentDescriptionRKNSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEE,
__ZN8DSPGraph10AUAnalyzerC2EjRK25AudioComponentDescriptionRKNSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEE,
__ZN8DSPGraph10AUAnalyzerD0Ev, __ZN8DSPGraph10AUAnalyzerD1Ev,
__ZN8DSPGraph10AUAnalyzerD2Ev, __ZN8DSPGraph10DeadEndBox10initializeEv,
__ZN8DSPGraph10DeadEndBox12uninitializeEv, __ZN8DSPGraph10FreqSRCBox10initializeEv,
__ZN8DSPGraph10FreqSRCBox12uninitializeEv, __ZN8DSPGraph10FreqSRCBox7processEj,
__ZN8DSPGraph10GraphInput10initializeEv, __ZN8DSPGraph10GraphInput12recordEnableEjb,
__ZN8DSPGraph10GraphInput13stopRecordingEj, __ZN8DSPGraph10GraphInput6recordEPKcjbb,
__ZN8DSPGraph10GraphInput7processEj, __ZN8DSPGraph10GraphInput9copyInputEv,
__ZN8DSPGraph10GraphInput9preflightEv, __ZN8DSPGraph10RingBuffer10initializeEj,
__ZN8DSPGraph10RingBuffer4freeEv, __ZN8DSPGraph10RingBuffer4readEjRNS_9SimpleABLE,
__ZN8DSPGraph10RingBuffer4readEjjRNS_9SimpleABLE, __ZN8DSPGraph10RingBuffer5allocEjjjjb,
__ZN8DSPGraph10RingBuffer5writeEjRNS_9SimpleABLE, __ZN8DSPGraph10RingBuffer5writeEjjRNS_9SimpleABLE,
__ZN8DSPGraph10RingBufferD1Ev, __ZN8DSPGraph10RingBufferD2Ev,
__ZN8DSPGraph10kBypassStrE, __ZN8DSPGraph10kSourceStrE, __ZN8DSPGraph10kStripsStrE,
__ZN8DSPGraph11GraphOutput10copyOutputEv, __ZN8DSPGraph11GraphOutput7processEj,
__ZN8DSPGraph11GraphOutput9preflightEv, __ZN8DSPGraph11Interpreter10parseInt64ERPKcRx,
__ZN8DSPGraph11Interpreter11compileFileEPKcRKNSt3__113unordered_mapINS3_12basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEESA_NS3_4hashISA_EENS3_8equal_toISA_EENS8_INS3_4pairIKSA_SA_EEEEEERKNS3_6vectorISA_NS8_ISA_EEEE,
__ZN8DSPGraph11Interpreter11compileTextEPKcRKNSt3__113unordered_mapINS3_12basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEESA_NS3_4hashISA_EENS3_8equal_toISA_EENS8_INS3_4pairIKSA_SA_EEEEEERKNS3_6vectorISA_NS8_ISA_EEEE,
__ZN8DSPGraph11Interpreter11parseStringERPKcRNSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEE,
__ZN8DSPGraph11Interpreter11parseUInt32ERPKcRj, __ZN8DSPGraph11Interpreter13parseCompDescERPKcR25AudioComponentDescription,
__ZN8DSPGraph11InterpreterC1ERKNS_14NewBoxRegistryE, __ZN8DSPGraph11InterpreterC1Ev,
__ZN8DSPGraph11InterpreterC2ERKNS_14NewBoxRegistryE, __ZN8DSPGraph11InterpreterC2Ev,
__ZN8DSPGraph11OSTypeToStrEPcmj, __ZN8DSPGraph11PropertyTap10initializeEv,
__ZN8DSPGraph11PropertyTap12uninitializeEv, __ZN8DSPGraph11PropertyTap7processEPNS_3BoxE,
__ZN8DSPGraph11SanityCheckERK27AudioStreamBasicDescription,
__ZN8DSPGraph11StrToOSTypeEPKcRj, __ZN8DSPGraph11TimeFreqBox10initializeEv,
__ZN8DSPGraph11TimeFreqBox12uninitializeEv, __ZN8DSPGraph11TimeFreqBox18selfLatencyInTicksEv,
__ZN8DSPGraph11TimeFreqBox7processEj, __ZN8DSPGraph11TimeFreqBoxD0Ev,
__ZN8DSPGraph11TimeFreqBoxD1Ev, __ZN8DSPGraph11TimeFreqBoxD2Ev,
__ZN8DSPGraph11kEffectsStrE, __ZN8DSPGraph11kVersionStrE,
__ZN8DSPGraph12ASBDtoStringERK27AudioStreamBasicDescriptionb,
__ZN8DSPGraph12FileInjector10initializeEv, __ZN8DSPGraph12FileInjector12uninitializeEv,
__ZN8DSPGraph12FileInjector6injectEj, __ZN8DSPGraph12FileInjectorC1EPNS_4WireEPKcb,
__ZN8DSPGraph12FileInjectorC2EPNS_4WireEPKcb, __ZN8DSPGraph12FileInjectorD0Ev,
__ZN8DSPGraph12FileInjectorD1Ev, __ZN8DSPGraph12FileInjectorD2Ev,
__ZN8DSPGraph12FileRecorder10initializeEv, __ZN8DSPGraph12FileRecorder12uninitializeEv,
__ZN8DSPGraph12FileRecorder6recordEj, __ZN8DSPGraph12FileRecorderC1EPNS_4WireEPKcbb,
__ZN8DSPGraph12FileRecorderC2EPNS_4WireEPKcbb, __ZN8DSPGraph12FileRecorderD0Ev,
__ZN8DSPGraph12FileRecorderD1Ev, __ZN8DSPGraph12FileRecorderD2Ev,
__ZN8DSPGraph12ReblockerBox10initializeEv, __ZN8DSPGraph12ReblockerBox7processEj,
__ZN8DSPGraph12TestAnalyzer11getPropertyEjjjRjPv, __ZN8DSPGraph12TestAnalyzer11setPropertyEjjjjPKv,
__ZN8DSPGraph12TestAnalyzer12getParameterEjjj, __ZN8DSPGraph12TestAnalyzer12setParameterEjjjfj,
__ZN8DSPGraph12TestAnalyzer13processBufferEPNS_6BufferEj,
__ZN8DSPGraph12TestAnalyzer13resetAnalysisEv, __ZN8DSPGraph12TestAnalyzer15getPropertyInfoEjjj,
__ZN8DSPGraph12TestAnalyzer15setFormatOnUnitERK27AudioStreamBasicDescriptionjj,
__ZN8DSPGraph12TestAnalyzer16getParameterInfoEjj, __ZN8DSPGraph12TestAnalyzer16getParameterListEj,
__ZN8DSPGraph12TestAnalyzer17getFormatFromUnitEjj, __ZN8DSPGraph12TestAnalyzer4openEv,
__ZN8DSPGraph12TestAnalyzerC1EjRKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEE,
__ZN8DSPGraph12TestAnalyzerC2EjRKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEE,
__ZN8DSPGraph12TestAnalyzerD0Ev, __ZN8DSPGraph12TestAnalyzerD1Ev,
__ZN8DSPGraph12TestAnalyzerD2Ev, __ZN8DSPGraph12kAUPresetStrE,
__ZN8DSPGraph13MakeCBRFormatEjdjjjj, __ZN8DSPGraph13RingBufferBox10dryRunInitEv,
__ZN8DSPGraph13RingBufferBox10dryRunReadEy, __ZN8DSPGraph13RingBufferBox10initializeEv,
__ZN8DSPGraph13RingBufferBox11dryRunWriteEy, __ZN8DSPGraph13RingBufferBox12uninitializeEv,
__ZN8DSPGraph13RingBufferBox18selfLatencyInTicksEv, __ZN8DSPGraph13RingBufferBox19configureFromDryRunEv,
__ZN8DSPGraph13RingBufferBox19configureRingBufferEjj, __ZN8DSPGraph13RingBufferBox21unconfigureRingBufferEv,
__ZN8DSPGraph13RingBufferBox5resetEv, __ZN8DSPGraph13VectorGainBox10initializeEv,
__ZN8DSPGraph13VectorGainBox11getPropertyEjjjRjPv, __ZN8DSPGraph13VectorGainBox11setPropertyEjjjjPKv,
__ZN8DSPGraph13VectorGainBox15getPropertyInfoEjjj, __ZN8DSPGraph13VectorGainBox7processEj,
__ZN8DSPGraph13kAudioUnitStrE, __ZN8DSPGraph13kClassNameStrE,
__ZN8DSPGraph14NewBoxRegistry3addERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEERK25AudioComponentDescriptionRKNS1_8functionIFPNS_3BoxEjjEEE,
__ZN8DSPGraph14NewBoxRegistryC1Ev, __ZN8DSPGraph14NewBoxRegistryC2Ev,
__ZN8DSPGraph14ThrowExceptionEiRKNSt3__112basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEEiS8_S8_,
__ZN8DSPGraph14streamToStringENSt3__18functionIFvRNS0_13basic_ostreamIcNS0_11char_traitsIcEEEEEEE,
__ZN8DSPGraph15decompileFormatERK27AudioStreamBasicDescriptionj,
__ZN8DSPGraph15kDisplayNameStrE, __ZN8DSPGraph16ArithmeticMinBox1fEPfRKNS_16arithmetic_boxes5dspscES5_j,
__ZN8DSPGraph16ArithmeticMinBox1fEPfS1_S1_j, __ZN8DSPGraph16ArithmeticMinBox1fERKNS_16arithmetic_boxes5dspscEPfS4_j,
__ZN8DSPGraph16ArithmeticMinBox1fERKNS_16arithmetic_boxes5dspscES4_S4_j,
__ZN8DSPGraph16ArithmeticSumBox1fEPfRKNS_16arithmetic_boxes5dspscES5_j,
__ZN8DSPGraph16ArithmeticSumBox1fEPfS1_S1_j, __ZN8DSPGraph16ArithmeticSumBox1fERKNS_16arithmetic_boxes5dspscEPfS4_j,
__ZN8DSPGraph16ArithmeticSumBox1fERKNS_16arithmetic_boxes5dspscES4_S4_j,
__ZN8DSPGraph16ChannelCopierBox10initializeEv, __ZN8DSPGraph16ChannelCopierBox12uninitializeEv,
__ZN8DSPGraph16ChannelCopierBox7processEj, __ZN8DSPGraph16ChannelJoinerBox10initializeEv,
__ZN8DSPGraph16ChannelJoinerBox12uninitializeEv, __ZN8DSPGraph16ChannelJoinerBox7processEj,
__ZN8DSPGraph16LinearGainPolicy20getGainParameterInfoEv, __ZN8DSPGraph16LinearGainPolicy22linearGainToPolicyGainEf,
__ZN8DSPGraph16LinearGainPolicy22policyGainToLinearGainEf,
__ZN8DSPGraph17ArithmeticDiffBox1fEPfRKNS_16arithmetic_boxes5dspscES5_j,
__ZN8DSPGraph17ArithmeticDiffBox1fEPfS1_S1_j, __ZN8DSPGraph17ArithmeticDiffBox1fERKNS_16arithmetic_boxes5dspscEPfS4_j,
__ZN8DSPGraph17ArithmeticDiffBox1fERKNS_16arithmetic_boxes5dspscES4_S4_j,
__ZN8DSPGraph17ArithmeticMultBox1fEPfRKNS_16arithmetic_boxes5dspscES5_j,
__ZN8DSPGraph17ArithmeticMultBox1fEPfS1_S1_j, __ZN8DSPGraph17ArithmeticMultBox1fERKNS_16arithmetic_boxes5dspscEPfS4_j,
__ZN8DSPGraph17ArithmeticMultBox1fERKNS_16arithmetic_boxes5dspscES4_S4_j,
__ZN8DSPGraph17ConstantSourceBox10initializeEv, __ZN8DSPGraph17ConstantSourceBox12getParameterEjjj,
__ZN8DSPGraph17ConstantSourceBox12setParameterEjjjfj, __ZN8DSPGraph17ConstantSourceBox12uninitializeEv,
__ZN8DSPGraph17ConstantSourceBox16getParameterInfoEjj, __ZN8DSPGraph17ConstantSourceBox16getParameterListEj,
__ZN8DSPGraph17ConstantSourceBox7processEj, __ZN8DSPGraph17DecibelControlBox12getParameterEjjj,
__ZN8DSPGraph17DecibelControlBox12setParameterEjjjfj, __ZN8DSPGraph17DecibelControlBox16getParameterInfoEjj,
__ZN8DSPGraph17DecibelControlBox16getParameterListEj, __ZN8DSPGraph17DecibelGainPolicy20getGainParameterInfoEv,
__ZN8DSPGraph17DecibelGainPolicy22linearGainToPolicyGainEf,
__ZN8DSPGraph17DecibelGainPolicy22policyGainToLinearGainEf,
__ZN8DSPGraph17asDecompileStringERKNSt3__112basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEE,
__ZN8DSPGraph18ChannelSplitterBox10initializeEv, __ZN8DSPGraph18ChannelSplitterBox12uninitializeEv,
__ZN8DSPGraph18ChannelSplitterBox7processEj, __ZN8DSPGraph26MakeFloatInterleavedFormatEdjj,
__ZN8DSPGraph26SingleRateLPCMConverterBox10initializeEv, __ZN8DSPGraph26SingleRateLPCMConverterBox12uninitializeEv,
__ZN8DSPGraph26SingleRateLPCMConverterBox7processEj, __ZN8DSPGraph29MakeFloatNoninterleavedFormatEdjj,
__ZN8DSPGraph3Box10initializeEv, __ZN8DSPGraph3Box11addAnalysisEjjx,
__ZN8DSPGraph3Box11getAnalyzerEjj, __ZN8DSPGraph3Box11getPropertyEjjjRjPv,
__ZN8DSPGraph3Box11setPropertyEjjjjPKv, __ZN8DSPGraph3Box11unconfigureEv,
__ZN8DSPGraph3Box12getParameterEjjj, __ZN8DSPGraph3Box12recordEnableEjb,
__ZN8DSPGraph3Box12setParameterEjjjfj, __ZN8DSPGraph3Box12sortUpstreamERNSt3__16vectorIPS0_NS1_9allocatorIS3_EEEERNS2_IPNS_8IsoGroupENS4_IS9_EEEE,
__ZN8DSPGraph3Box12uninitializeEv, __ZN8DSPGraph3Box13analyzeEnableEjb,
__ZN8DSPGraph3Box13stopAnalyzingEj, __ZN8DSPGraph3Box13stopInjectingEj,
__ZN8DSPGraph3Box13stopRecordingEj, __ZN8DSPGraph3Box13writeDotEdgesERNSt3__113basic_ostreamIcNS1_11char_traitsIcEEEE,
__ZN8DSPGraph3Box14removeAnalysisEjj, __ZN8DSPGraph3Box15getElementCountEj,
__ZN8DSPGraph3Box15getPropertyInfoEjjj, __ZN8DSPGraph3Box15setFormatOnUnitERK27AudioStreamBasicDescriptionjj,
__ZN8DSPGraph3Box15topologicalSortEPNS_8IsoGroupERNSt3__16vectorIPS0_NS3_9allocatorIS5_EEEERNS4_IS2_NS6_IS2_EEEE,
__ZN8DSPGraph3Box16getParameterInfoEjj, __ZN8DSPGraph3Box16getParameterListEj,
__ZN8DSPGraph3Box17getFormatFromUnitEjj, __ZN8DSPGraph3Box18clearCachedLatencyEv,
__ZN8DSPGraph3Box18initializeAnalysisEv, __ZN8DSPGraph3Box18writeDotAttributesERNSt3__113basic_ostreamIcNS1_11char_traitsIcEEEE,
__ZN8DSPGraph3Box19isogroupTraceInputsERNSt3__113unordered_setIPS0_NS1_4hashIS3_EENS1_8equal_toIS3_EENS1_9allocatorIS3_EEEEPNS_8IsoGroupE,
__ZN8DSPGraph3Box19processPropertyTapsEv, __ZN8DSPGraph3Box19totalLatencyInTicksEv,
__ZN8DSPGraph3Box20isogroupTraceOutputsERNSt3__113unordered_setIPS0_NS1_4hashIS3_EENS1_8equal_toIS3_EENS1_9allocatorIS3_EEEEPNS_8IsoGroupE,
__ZN8DSPGraph3Box20processParameterTapsEv, __ZN8DSPGraph3Box20selfLatencyInSecondsEv,
__ZN8DSPGraph3Box20uninitializeAnalysisEv, __ZN8DSPGraph3Box21totalLatencyInSamplesEv,
__ZN8DSPGraph3Box21totalLatencyInSecondsEv, __ZN8DSPGraph3Box22calculateLatencyDelaysEv,
__ZN8DSPGraph3Box22initializePropertyTapsEv, __ZN8DSPGraph3Box22upstreamLatencyInTicksEv,
__ZN8DSPGraph3Box23insertLatencyDelayBoxesEv, __ZN8DSPGraph3Box24uninitializePropertyTapsEv,
__ZN8DSPGraph3Box24upstreamLatencyInSecondsEv, __ZN8DSPGraph3Box26propagateFlagsAndTimeStampEjRK14AudioTimeStamp,
__ZN8DSPGraph3Box5resetEv, __ZN8DSPGraph3Box6injectEPKcjb,
__ZN8DSPGraph3Box6recordEPKcjbb, __ZN8DSPGraph3Box8isogroupERNSt3__113unordered_setIPS0_NS1_4hashIS3_EENS1_8equal_toIS3_EENS1_9allocatorIS3_EEEEPNS_8IsoGroupE,
__ZN8DSPGraph3Box9doProcessEj, __ZN8DSPGraph3Box9getPresetERNSt3__113basic_ostreamIcNS1_11char_traitsIcEEEEb,
__ZN8DSPGraph3Box9getPresetEv, __ZN8DSPGraph3Box9setPresetEPK14__CFDictionary,
__ZN8DSPGraph3Box9setPresetERNSt3__113basic_istreamIcNS1_11char_traitsIcEEEE,
__ZN8DSPGraph3Box9setSubsetEPNS_6SubsetE, __ZN8DSPGraph3BoxC2Ejj,
__ZN8DSPGraph4Base5printENS_11PrintDetailEj, __ZN8DSPGraph4PortC2EPNS_3BoxEj,
__ZN8DSPGraph4Wire13setSameFormatEPS0_, __ZN8DSPGraph4Wire14setLocalFormatERK27AudioStreamBasicDescriptionj,
__ZN8DSPGraph4Wire15setGlobalFormatEPNS_18FormatAndBlockSizeE,
__ZN8DSPGraph4Wire16initializeFormatEv, __ZN8DSPGraph4Wire3addEPNS_9InputPortE,
__ZN8DSPGraph4Wire6addAllEPS0_, __ZN8DSPGraph4Wire6removeEPNS_9InputPortE,
__ZN8DSPGraph4Wire9removeAllEv, __ZN8DSPGraph4Wire9setSourceEPNS_10OutputPortE,
__ZN8DSPGraph4WireC1EPNS_10OutputPortE, __ZN8DSPGraph4WireC2EPNS_10OutputPortE,
__ZN8DSPGraph5AUBox10initializeEv, __ZN8DSPGraph5AUBox10isBypassedEv,
__ZN8DSPGraph5AUBox11getPropertyEjjjRjPv, __ZN8DSPGraph5AUBox11setPropertyEjjjjPKv,
__ZN8DSPGraph5AUBox12getParameterEjjj, __ZN8DSPGraph5AUBox12setMaxFramesEj,
__ZN8DSPGraph5AUBox12setParameterEjjjfj, __ZN8DSPGraph5AUBox12uninitializeEv,
__ZN8DSPGraph5AUBox15getPropertyInfoEjjj, __ZN8DSPGraph5AUBox15setFormatOnUnitERK27AudioStreamBasicDescriptionjj,
__ZN8DSPGraph5AUBox16getParameterInfoEjj, __ZN8DSPGraph5AUBox16getParameterListEj,
__ZN8DSPGraph5AUBox17getFormatFromUnitEjj, __ZN8DSPGraph5AUBox18selfLatencyInTicksEv,
__ZN8DSPGraph5AUBox18usesFixedBlockSizeEv, __ZN8DSPGraph5AUBox21setUsesFixedBlockSizeEb,
__ZN8DSPGraph5AUBox4openEv, __ZN8DSPGraph5AUBox5closeEv, __ZN8DSPGraph5AUBox5resetEjj,
__ZN8DSPGraph5AUBox6bypassEb, __ZN8DSPGraph5AUBox7processEj,
__ZN8DSPGraph5AUBox9canBypassEv, __ZN8DSPGraph5AUBox9getPresetEv,
__ZN8DSPGraph5AUBox9setPresetEPK14__CFDictionary, __ZN8DSPGraph5AUBoxC1EP28OpaqueAudioComponentInstancejj,
__ZN8DSPGraph5AUBoxC2EP28OpaqueAudioComponentInstancejj, __ZN8DSPGraph5FCBox10copyOutputEj,
__ZN8DSPGraph5FCBox8isogroupERNSt3__113unordered_setIPNS_3BoxENS1_4hashIS4_EENS1_8equal_toIS4_EENS1_9allocatorIS4_EEEEPNS_8IsoGroupE,
__ZN8DSPGraph5FCBox9doProcessEj, __ZN8DSPGraph5Graph10initializeEb,
__ZN8DSPGraph5Graph10setAUStripEPK14__CFDictionary, __ZN8DSPGraph5Graph10setAUStripERNSt3__113basic_istreamIcNS1_11char_traitsIcEEEE,
__ZN8DSPGraph5Graph11addAnalyzerEPNS_8AnalyzerE, __ZN8DSPGraph5Graph11addPropertyEjNSt3__18optionalINS1_6vectorIhNS1_9allocatorIhEEEEEEb,
__ZN8DSPGraph5Graph11getPropertyEjRjPv, __ZN8DSPGraph5Graph11makeAUStripERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEE,
__ZN8DSPGraph5Graph11makeAUStripERNSt3__113basic_ostreamIcNS1_11char_traitsIcEEEERKNS1_12basic_stringIcS4_NS1_9allocatorIcEEEEb,
__ZN8DSPGraph5Graph11makeAUStripERNSt3__113basic_ostreamIcNS1_11char_traitsIcEEEEb,
__ZN8DSPGraph5Graph11makeAUStripEv, __ZN8DSPGraph5Graph11setPropertyEjjPKv,
__ZN8DSPGraph5Graph11unconfigureEv, __ZN8DSPGraph5Graph12addParameterEjfb,
__ZN8DSPGraph5Graph12getParameterEj, __ZN8DSPGraph5Graph12pruneSubsetsEv,
__ZN8DSPGraph5Graph12setParameterEjf, __ZN8DSPGraph5Graph12uninitializeEv,
__ZN8DSPGraph5Graph12writeDotFileEPKc, __ZN8DSPGraph5Graph12writeDotFileEPKcS2_,
__ZN8DSPGraph5Graph13connectParamsERKNS_17ParameterEndpointES3_b,
__ZN8DSPGraph5Graph13setSRCQualityEj, __ZN8DSPGraph5Graph14processInPlaceERNS_11GraphIODataE,
__ZN8DSPGraph5Graph14removeAnalyzerEPNS_8AnalyzerE, __ZN8DSPGraph5Graph15connectPropertyEjRKNS_16PropertyEndpointE,
__ZN8DSPGraph5Graph15getPropertyInfoEj, __ZN8DSPGraph5Graph15processMultipleEPNS_11GraphIODataES2_,
__ZN8DSPGraph5Graph15setSRCAlgorithmEj, __ZN8DSPGraph5Graph16connectParameterEjRKNS_17ParameterEndpointE,
__ZN8DSPGraph5Graph16setPropertyStripEPK14__CFDictionary,
__ZN8DSPGraph5Graph16setPropertyStripEPK14__CFDictionaryPK10__CFString,
__ZN8DSPGraph5Graph16setSliceDurationEjjNS0_11SlicePolicyE,
__ZN8DSPGraph5Graph17connectPropertiesERKNS_16PropertyEndpointES3_b,
__ZN8DSPGraph5Graph18setSRCMinimumPhaseEb, __ZN8DSPGraph5Graph19initializeWithFlagsEj,
__ZN8DSPGraph5Graph21addOrderingConstraintEPNS_3BoxES2_, __ZN8DSPGraph5Graph3addEPNS_3BoxERKNSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEE,
__ZN8DSPGraph5Graph3addERK25AudioComponentDescriptionjjRKNSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEE,
__ZN8DSPGraph5Graph3boxERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEE,
__ZN8DSPGraph5Graph3boxEx, __ZN8DSPGraph5Graph3hasEPNS_3BoxE,
__ZN8DSPGraph5Graph5resetEv, __ZN8DSPGraph5Graph6addBoxEPNS_3BoxERKNSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEEx,
__ZN8DSPGraph5Graph6bridgeEPS0_S1_, __ZN8DSPGraph5Graph6detachEPNS_3BoxE,
__ZN8DSPGraph5Graph7addJackERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEE,
__ZN8DSPGraph5Graph7connectEPNS_3BoxES2_jjRKNS_18FormatAndBlockSizeEPNS_4JackES7_,
__ZN8DSPGraph5Graph7connectERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEES9_jjRKNS_18FormatAndBlockSizeE,
__ZN8DSPGraph5Graph7getJackERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEE,
__ZN8DSPGraph5Graph8addInputERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEE,
__ZN8DSPGraph5Graph8analyzerEx, __ZN8DSPGraph5Graph8unbridgeEPS0_S1_,
__ZN8DSPGraph5Graph9addOutputERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEE,
__ZN8DSPGraph5Graph9addSubsetERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEE,
__ZN8DSPGraph5Graph9configureEv, __ZN8DSPGraph5Graph9getFormatERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEERPNS_18FormatAndBlockSizeE,
__ZN8DSPGraph5Graph9getSubsetERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEE,
__ZN8DSPGraph5Graph9preflightEPNS_11GraphIODataES2_jjb, __ZN8DSPGraph5Graph9setFormatERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEERKNS_18FormatAndBlockSizeE,
__ZN8DSPGraph5GraphC1Ev, __ZN8DSPGraph5GraphC2Ev, __ZN8DSPGraph5GraphD0Ev,
__ZN8DSPGraph5GraphD1Ev, __ZN8DSPGraph5GraphD2Ev, __ZN8DSPGraph5kManuE,
__ZN8DSPGraph5kTypeE, __ZN8DSPGraph6Buffer11setByteSizeEj,
__ZN8DSPGraph6Buffer12copyTimeFromEPS0_, __ZN8DSPGraph6Buffer21restoreSizeToCapacityEv,
__ZN8DSPGraph6Buffer8copyFromEPS0_, __ZN8DSPGraph6MixBox10initializeEv,
__ZN8DSPGraph6MixBox12getParameterEjjj, __ZN8DSPGraph6MixBox12setParameterEjjjfj,
__ZN8DSPGraph6MixBox16getParameterInfoEjj, __ZN8DSPGraph6MixBox16getParameterListEj,
__ZN8DSPGraph6MixBox7processEj, __ZN8DSPGraph6SRCBox10initializeEv,
__ZN8DSPGraph6SRCBox11getPropertyEjjjRjPv, __ZN8DSPGraph6SRCBox11setPropertyEjjjjPKv,
__ZN8DSPGraph6SRCBox12uninitializeEv, __ZN8DSPGraph6SRCBox15getPropertyInfoEjjj,
__ZN8DSPGraph6SRCBox18selfLatencyInTicksEv, __ZN8DSPGraph6SRCBox4openEv,
__ZN8DSPGraph6SRCBox5resetEv, __ZN8DSPGraph6SRCBox7processEj,
__ZN8DSPGraph6SumBox10initializeEv, __ZN8DSPGraph6SumBox7processEj,
__ZN8DSPGraph6ToTextERK27AudioStreamBasicDescription, __ZN8DSPGraph6printiERNSt3__113basic_ostreamIcNS0_11char_traitsIcEEEEjPKcz,
__ZN8DSPGraph7CopyBox10initializeEv, __ZN8DSPGraph7CopyBox7processEj,
__ZN8DSPGraph7GainBoxC1Ev, __ZN8DSPGraph7GainBoxC2Ev, __ZN8DSPGraph7GainBoxD0Ev,
__ZN8DSPGraph7GainBoxD1Ev, __ZN8DSPGraph7GainBoxD2Ev, __ZN8DSPGraph7TestBox10initializeEv,
__ZN8DSPGraph7TestBox7processEj, __ZN8DSPGraph8Analyzer10initializeEv,
__ZN8DSPGraph8Analyzer11setSerialNoEx, __ZN8DSPGraph8Analyzer12uninitializeEv,
__ZN8DSPGraph8Analyzer15setFormatOnUnitERK27AudioStreamBasicDescriptionjj,
__ZN8DSPGraph8Analyzer16setBoxOutputPortEj, __ZN8DSPGraph8Analyzer17getFormatFromUnitEjj,
__ZN8DSPGraph8Analyzer6setBoxEPNS_3BoxE, __ZN8DSPGraph8Analyzer7analyzeEj,
__ZN8DSPGraph8Analyzer7setWireEPNS_4WireE, __ZN8DSPGraph8AnalyzerC2EjRK25AudioComponentDescriptionRKNSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEE,
__ZN8DSPGraph8AnalyzerD0Ev, __ZN8DSPGraph8AnalyzerD1Ev, __ZN8DSPGraph8AnalyzerD2Ev,
__ZN8DSPGraph8DelayBox10initializeEv, __ZN8DSPGraph8DelayBox11getPropertyEjjjRjPv,
__ZN8DSPGraph8DelayBox11setPropertyEjjjjPKv, __ZN8DSPGraph8DelayBox12getParameterEjjj,
__ZN8DSPGraph8DelayBox12setParameterEjjjfj, __ZN8DSPGraph8DelayBox12uninitializeEv,
__ZN8DSPGraph8DelayBox14setDelayFramesEj, __ZN8DSPGraph8DelayBox15getPropertyInfoEjjj,
__ZN8DSPGraph8DelayBox16getParameterInfoEjj, __ZN8DSPGraph8DelayBox16getParameterListEj,
__ZN8DSPGraph8DelayBox18selfLatencyInTicksEv, __ZN8DSPGraph8DelayBox5resetEv,
__ZN8DSPGraph8DelayBox7processEj, __ZN8DSPGraph8DelayBoxC1Ej,
__ZN8DSPGraph8DelayBoxC2Ej, __ZN8DSPGraph8IsoGroup10processAllEv,
__ZN8DSPGraph8IsoGroup12sortUpstreamERNSt3__16vectorIPS0_NS1_9allocatorIS3_EEEE,
__ZN8DSPGraph8IsoGroup15initializeBoxesEv, __ZN8DSPGraph8IsoGroup15topologicalSortERNSt3__16vectorIPS0_NS1_9allocatorIS3_EEEE,
__ZN8DSPGraph8IsoGroup17uninitializeBoxesEv, __ZN8DSPGraph8IsoGroup18checkIsochronicityEv,
__ZN8DSPGraph8IsoGroup22initializePropertyTapsEv, __ZN8DSPGraph8IsoGroup24uninitializePropertyTapsEv,
__ZN8DSPGraph8IsoGroup3addEPNS_3BoxE, __ZN8DSPGraph8IsoGroup5resetEv,
__ZN8DSPGraph8IsoGroup7processEj, __ZN8DSPGraph8IsoGroup8addInputEPNS_5FCBoxE,
__ZN8DSPGraph8IsoGroup9addBeforeEPNS_3BoxES2_, __ZN8DSPGraph8IsoGroup9addOutputEPNS_5FCBoxE,
__ZN8DSPGraph8kDataStrE, __ZN8DSPGraph8kSubTypeE, __ZN8DSPGraph8print4ccERNSt3__113basic_ostreamIcNS0_11char_traitsIcEEEEj,
__ZN8DSPGraph8printACDERNSt3__113basic_ostreamIcNS0_11char_traitsIcEEEERK25AudioComponentDescriptionb,
__ZN8DSPGraph9DBGainBoxC1Ev, __ZN8DSPGraph9DBGainBoxC2Ev,
__ZN8DSPGraph9DBGainBoxD0Ev, __ZN8DSPGraph9DBGainBoxD1Ev,
__ZN8DSPGraph9DBGainBoxD2Ev, __ZN8DSPGraph9InputPort6detachEv,
__ZN8DSPGraph9POSIXFile16readFileAsStringEv, __ZN8DSPGraph9POSIXFile4openEPKcS2_,
__ZN8DSPGraph9POSIXFile5closeEv, __ZN8DSPGraph9SimpleABL11dstWrapCopyERS0_jjj,
__ZN8DSPGraph9SimpleABL11setByteSizeEj, __ZN8DSPGraph9SimpleABL11srcWrapCopyERS0_jjjb,
__ZN8DSPGraph9SimpleABL3setEP15AudioBufferList, __ZN8DSPGraph9SimpleABL4copyERS0_b,
__ZN8DSPGraph9SimpleABL4copyERS0_jjjb, __ZN8DSPGraph9SimpleABL4freeEv,
__ZN8DSPGraph9SimpleABL4zeroEjj, __ZN8DSPGraph9SimpleABL4zeroEv,
__ZN8DSPGraph9SimpleABL5allocEjjb, __ZN8DSPGraph9SimpleABLC1EP15AudioBufferList,
__ZN8DSPGraph9SimpleABLC1Ev, __ZN8DSPGraph9SimpleABLC2EP15AudioBufferList,
__ZN8DSPGraph9SimpleABLC2Ev, __ZN8DSPGraph9SimpleABLD1Ev,
__ZN8DSPGraph9SimpleABLD2Ev, __ZN8DSPGraph9errstringEi, __ZN8DSPGraph9printASBDERNSt3__113basic_ostreamIcNS0_11char_traitsIcEEEERK27AudioStreamBasicDescriptionb,
__ZN8DSPGraph9strprintfEPKcz, __ZNK15AudioFileObject18GetPacketTableSizeEv,
__ZNK18AudioMetadataFrame17overlapsTimeRangeEdd, __ZNK2AT10RingBuffer13GetTimeBoundsEv,
__ZNK2AT23RingBufferErrorCategory4nameEv, __ZNK2AT23RingBufferErrorCategory7messageEi,
__ZNK2AT9Resampler13MockResampler13GetIsBypassedEv, __ZNK8DSPGraph10GraphInput12decompileBoxERNSt3__113basic_ostreamIcNS1_11char_traitsIcEEEEj,
__ZNK8DSPGraph11GraphOutput12decompileBoxERNSt3__113basic_ostreamIcNS1_11char_traitsIcEEEEj,
__ZNK8DSPGraph11PropertyTap5printERNSt3__113basic_ostreamIcNS1_11char_traitsIcEEEEj,
__ZNK8DSPGraph12FileInjector5printERNSt3__113basic_ostreamIcNS1_11char_traitsIcEEEENS_11PrintDetailEj,
__ZNK8DSPGraph12FileRecorder5printERNSt3__113basic_ostreamIcNS1_11char_traitsIcEEEENS_11PrintDetailEj,
__ZNK8DSPGraph12ParameterTap5printERNSt3__113basic_ostreamIcNS1_11char_traitsIcEEEEj,
__ZNK8DSPGraph12ParameterTap7processEPNS_3BoxE, __ZNK8DSPGraph14NewBoxRegistry3hasERK25AudioComponentDescription,
__ZNK8DSPGraph14NewBoxRegistry3hasERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEE,
__ZNK8DSPGraph14NewBoxRegistry5printERNSt3__113basic_ostreamIcNS1_11char_traitsIcEEEENS_11PrintDetailEj,
__ZNK8DSPGraph14NewBoxRegistry6newBoxERK25AudioComponentDescriptionjj,
__ZNK8DSPGraph14NewBoxRegistry6newBoxERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEjj,
__ZNK8DSPGraph15AnalyzerBuilder17decompileAnalysisERNSt3__113basic_ostreamIcNS1_11char_traitsIcEEEEj,
__ZNK8DSPGraph15AnalyzerBuilder5printERNSt3__113basic_ostreamIcNS1_11char_traitsIcEEEENS_11PrintDetailEj,
__ZNK8DSPGraph16PropertyEndpoint5printERNSt3__113basic_ostreamIcNS1_11char_traitsIcEEEEj,
__ZNK8DSPGraph17ParameterEndpoint5printERNSt3__113basic_ostreamIcNS1_11char_traitsIcEEEEj,
__ZNK8DSPGraph3Box10printShortERNSt3__113basic_ostreamIcNS1_11char_traitsIcEEEEjb,
__ZNK8DSPGraph3Box10sampleRateEv, __ZNK8DSPGraph3Box11hasAnalysisEjj,
__ZNK8DSPGraph3Box11initializedEv, __ZNK8DSPGraph3Box12decompileBoxERNSt3__113basic_ostreamIcNS1_11char_traitsIcEEEEj,
__ZNK8DSPGraph3Box14decompileWiresERNSt3__113basic_ostreamIcNS1_11char_traitsIcEEEEj,
__ZNK8DSPGraph3Box15getAnalysisListEj, __ZNK8DSPGraph3Box16getAnalysisCountEj,
__ZNK8DSPGraph3Box18decompileAnalyzersERNSt3__113basic_ostreamIcNS1_11char_traitsIcEEEEj,
__ZNK8DSPGraph3Box20decompileAntecedentsERNSt3__113basic_ostreamIcNS1_11char_traitsIcEEEEj,
__ZNK8DSPGraph3Box21decompilePropertyTapsERNSt3__113basic_ostreamIcNS1_11char_traitsIcEEEEj,
__ZNK8DSPGraph3Box22decompileParameterTapsERNSt3__113basic_ostreamIcNS1_11char_traitsIcEEEEj,
__ZNK8DSPGraph3Box5printERNSt3__113basic_ostreamIcNS1_11char_traitsIcEEEENS_11PrintDetailEj,
__ZNK8DSPGraph4Base10printShortERNSt3__113basic_ostreamIcNS1_11char_traitsIcEEEEjb,
__ZNK8DSPGraph4Port5printERNSt3__113basic_ostreamIcNS1_11char_traitsIcEEEENS_11PrintDetailEj,
__ZNK8DSPGraph4Wire5printERNSt3__113basic_ostreamIcNS1_11char_traitsIcEEEENS_11PrintDetailEj,
__ZNK8DSPGraph5AUBox10printShortERNSt3__113basic_ostreamIcNS1_11char_traitsIcEEEEjb,
__ZNK8DSPGraph5AUBox12decompileBoxERNSt3__113basic_ostreamIcNS1_11char_traitsIcEEEEj,
__ZNK8DSPGraph5AUBox16getComponentNameEv, __ZNK8DSPGraph5AUBox5printERNSt3__113basic_ostreamIcNS1_11char_traitsIcEEEENS_11PrintDetailEj,
__ZNK8DSPGraph5FCBox13upstreamIsCBREv, __ZNK8DSPGraph5FCBox15downstreamIsCBREv,
__ZNK8DSPGraph5FCBox17upstreamBlockSizeEv, __ZNK8DSPGraph5FCBox18upstreamSampleRateEv,
__ZNK8DSPGraph5FCBox18upstreamSampleTimeEv, __ZNK8DSPGraph5FCBox19downstreamBlockSizeEv,
__ZNK8DSPGraph5FCBox20downstreamSampleRateEv, __ZNK8DSPGraph5FCBox20downstreamSampleTimeEv,
__ZNK8DSPGraph5FCBox22upstreamBytesPerPacketEv, __ZNK8DSPGraph5FCBox23upstreamFramesPerPacketEv,
__ZNK8DSPGraph5FCBox24downstreamBytesPerPacketEv, __ZNK8DSPGraph5FCBox25downstreamFramesPerPacketEv,
__ZNK8DSPGraph5Graph10numOutputsEv, __ZNK8DSPGraph5Graph11hasPropertyEj,
__ZNK8DSPGraph5Graph12hasParameterEj, __ZNK8DSPGraph5Graph14getFormatNamesEv,
__ZNK8DSPGraph5Graph16GetProfilingInfoEv, __ZNK8DSPGraph5Graph16getParameterListEv,
__ZNK8DSPGraph5Graph22getOrderingConstraintsEv, __ZNK8DSPGraph5Graph2inEj,
__ZNK8DSPGraph5Graph3outEj, __ZNK8DSPGraph5Graph5printERNSt3__113basic_ostreamIcNS1_11char_traitsIcEEEENS_11PrintDetailEj,
__ZNK8DSPGraph5Graph9decompileEPKcj, __ZNK8DSPGraph5Graph9decompileERNSt3__113basic_ostreamIcNS1_11char_traitsIcEEEEj,
__ZNK8DSPGraph5Graph9decompileEj, __ZNK8DSPGraph5Graph9numInputsEv,
__ZNK8DSPGraph6Buffer5printERNSt3__113basic_ostreamIcNS1_11char_traitsIcEEEENS_11PrintDetailEj,
__ZNK8DSPGraph6SRCBox24shouldAddRingBufferZerosEv, __ZNK8DSPGraph8Analyzer10printShortERNSt3__113basic_ostreamIcNS1_11char_traitsIcEEEEjb,
__ZNK8DSPGraph8Analyzer5printERNSt3__113basic_ostreamIcNS1_11char_traitsIcEEEENS_11PrintDetailEj,
__ZNK8DSPGraph9Exception5printENS_11PrintDetailEj, __ZNK8DSPGraph9Exception5printERNSt3__113basic_ostreamIcNS1_11char_traitsIcEEEENS_11PrintDetailEj,
__ZNK8DSPGraph9InputPort22upstreamLatencyInTicksEv, __ZTV15AudioFileFormat,
__ZTV15AudioFileObject, __ZTV19AudioFileFormatBase, __ZTV20AUProcessingBlock_AU,
__ZTV21AUProcessingBlockBase, __ZTV26AUProcessingBlock_DSPGraph,
__ZTV27AUProcessingBlockBase_NonAU, __ZTV31AUProcessingBlockBase_NonAUItem,
__ZTV34AUProcessingBlock_AU_Instantiating, __ZTVN2AT23RingBufferErrorCategoryE,
__ZTVN8DSPGraph10AUAnalyzerE, __ZTVN8DSPGraph10DeadEndBoxE,
__ZTVN8DSPGraph10FreqSRCBoxE, __ZTVN8DSPGraph10GraphInputE,
__ZTVN8DSPGraph10OutputPortE, __ZTVN8DSPGraph11GraphOutputE,
__ZTVN8DSPGraph11InterpreterE, __ZTVN8DSPGraph11TimeFreqBoxE,
__ZTVN8DSPGraph12FileInjectorE, __ZTVN8DSPGraph12FileRecorderE,
__ZTVN8DSPGraph12ReblockerBoxE, __ZTVN8DSPGraph12TestAnalyzerE,
__ZTVN8DSPGraph13RingBufferBoxE, __ZTVN8DSPGraph13VectorGainBoxE,
__ZTVN8DSPGraph14NewBoxRegistryE, __ZTVN8DSPGraph15AnalyzerBuilderE,
__ZTVN8DSPGraph16ChannelCopierBoxE, __ZTVN8DSPGraph16ChannelJoinerBoxE,
__ZTVN8DSPGraph17ConstantSourceBoxE, __ZTVN8DSPGraph17DecibelControlBoxE,
__ZTVN8DSPGraph18ChannelSplitterBoxE, __ZTVN8DSPGraph26SingleRateLPCMConverterBoxE,
__ZTVN8DSPGraph3BoxE, __ZTVN8DSPGraph4BaseE, __ZTVN8DSPGraph4PortE,
__ZTVN8DSPGraph4WireE, __ZTVN8DSPGraph5AUBoxE, __ZTVN8DSPGraph5FCBoxE,
__ZTVN8DSPGraph5GraphE, __ZTVN8DSPGraph6BufferE, __ZTVN8DSPGraph6MixBoxE,
__ZTVN8DSPGraph6SRCBoxE, __ZTVN8DSPGraph6SumBoxE, __ZTVN8DSPGraph7CopyBoxE,
__ZTVN8DSPGraph7GainBoxE, __ZTVN8DSPGraph7TestBoxE, __ZTVN8DSPGraph8AnalyzerE,
__ZTVN8DSPGraph8DelayBoxE, __ZTVN8DSPGraph9DBGainBoxE, __ZTVN8DSPGraph9InputPortE,
_gMediaServerTimeout, _iEjr08d2, _initInterAppAudioLogging,
_kAudioAnalysisKey_AdditionalLoudnessParameters, _kAudioAnalysisKey_DialogueAnchorParameters,
_kAudioAnalysisKey_MainLoudnessParameters, _kAudioAnalysisKey_SoundCheckInfo,
_kAudioAnalysis_AnchorMeasurementSystemKey, _kAudioAnalysis_AnchorReliabilityKey,
_kAudioAnalysis_BitDepthPCMMasterKey, _kAudioAnalysis_DRCSetKey,
_kAudioAnalysis_DownmixIDKey, _kAudioAnalysis_EQSetIDKey,
_kAudioAnalysis_EbuLoudnessRangeKey, _kAudioAnalysis_EbuLoudnessRangeTopKey,
_kAudioAnalysis_EbuMaxMeasurementSystemKey, _kAudioAnalysis_EbuMaxMomentaryLoudnessKey,
_kAudioAnalysis_EbuMaxReliabilityKey, _kAudioAnalysis_EbuMaxShortMeasurementSystemKey,
_kAudioAnalysis_EbuMaxShortReliabilityKey, _kAudioAnalysis_EbuMaxShortTermLoudnessKey,
_kAudioAnalysis_EbuMeasurementSystemKey, _kAudioAnalysis_EbuReliabilityKey,
_kAudioAnalysis_EbuTopMeasurementSystemKey, _kAudioAnalysis_EbuTopReliabilityKey,
_kAudioAnalysis_HeadRoomMasterKey, _kAudioAnalysis_ISOLoudnessBoxKey,
_kAudioAnalysis_ItuLoudnessKey, _kAudioAnalysis_ItuMeasurementSystemKey,
_kAudioAnalysis_ItuReliabilityKey, _kAudioAnalysis_ItuSamplePeakKey,
_kAudioAnalysis_ItuTruePeakKey, _kAudioAnalysis_NoiseFloorMasterKey,
_kAudioAnalysis_ProductionMeasurementSystemKey, _kAudioAnalysis_ProductionMixingLevelKey,
_kAudioAnalysis_ProductionReliabilityKey, _kAudioAnalysis_ProductionRoomTypeKey,
_kAudioAnalysis_RoomMeasurementSystemKey, _kAudioAnalysis_RoomReliabilityKey,
_kAudioAnalysis_ShortTermLoudnessKey, _kAudioAnalysis_ShortTermMeasurementSystemKey,
_kAudioAnalysis_ShortTermReliabilityKey, _kAudioAnalysis_SourceBandwidthMasterKey,
_kAudioAnalysis_SpeechActivityPercentageKey, _kAudioAnalysis_TruePeakMeasurementSystemKey,
_kAudioAnalysis_TruePeakReliabilityKey, _kAudioAnalysis_VersionKey,
_kAudioComponentInstanceInvalidationNotification, _kAudioComponentLocalRegistrationsChangedNotification,
_kAudioComponentRegistrationsChangedNotification, _kLoudnessInfoDictionary_AdditionalLoudnessInfoKey,
_kLoudnessInfoDictionary_AdditionalLoudnessParametersKey,
_kLoudnessInfoDictionary_AdjustToAlbumLoudnessKey, _kLoudnessInfoDictionary_AlbumLoudnessParametersKey,
_kLoudnessInfoDictionary_AnchorLoudnessKey, _kLoudnessInfoDictionary_BitDepthPCMMasterKey,
_kLoudnessInfoDictionary_DialnormKey, _kLoudnessInfoDictionary_DialogueAnchorParametersKey,
_kLoudnessInfoDictionary_LoudnessInfoKey, _kLoudnessInfoDictionary_MainLoudnessParametersKey,
_kLoudnessInfoDictionary_MediaKindKey, _kLoudnessInfoDictionary_PrecalculatedSCAdjustmentKey,
_kLoudnessInfoDictionary_SoundCheckInfoKey, _kMediaKind_AudiobookValue,
_kMediaKind_HomeVideoValue, _kMediaKind_MovieValue, _kMediaKind_MusicValue,
_kMediaKind_MusicVideoValue, _kMediaKind_PodcastValue, _kMediaKind_TVShowValue,
_kMediaKind_VoiceMemoValue, _kMediaKind_iTunesUValue, _kSoundCheck_AvePerceivedPowerCoeffKey,
_kSoundCheck_MaxPerceivedPowerCoeffKey, _kSoundCheck_MaxPerceivedPowerMsecKey,
_kSoundCheck_PeakAmplitudeKey, _kSoundCheck_PeakAmplitudeMsecKey,
_tkqMjk4y ]
objc-classes: [ AUAudioUnit, AUAudioUnitBus, AUAudioUnitBusArray, AUAudioUnitPreset,
AUAudioUnitV2Bridge, AUHostExtensionContext, AUParameter,
AUParameterGroup, AUParameterNode, AUParameterTree, AURemoteExtensionContext,
AURemoteHost, AudioComponentRegistrar ]
- targets: [ x86_64-macos, arm64e-macos, arm64-macos ]
symbols: [ _AudioComponentGetIcon, _AudioConverterFillBuffer, _AudioFileCreate,
_AudioFileInitialize, _AudioFileOpen, _ExtAudioFileCreateNew,
_ExtAudioFileOpen ]
objc-classes: [ AUHostingServiceDelegate, AUHostingServiceInstanceMap, _AUAudioUnitV3ViewFactory,
_RemoteAUv2ViewFactory ]
- targets: [ x86_64-maccatalyst, arm64e-maccatalyst, arm64-maccatalyst ]
symbols: [ _AudioOutputUnitGetHostIcon ]
- targets: [ arm64e-macos, arm64e-maccatalyst, arm64-macos, arm64-maccatalyst ]
symbols: [ _DownmixStereoInterleavedInt16ToMono_ARM, _Float32ToNativeInt16Scaled_ARM,
_Float32ToNativeInt32Scaled_ARM, _Float32ToNativeLowAlignedInt32_ARM,
_Float32ToNativeLowAlignedInt64_ARM, _MultiChannelInterleaveFloat32ToNativeLowAlignedInt32_ARM,
_Native824FixedToLowAlignedInt32_ARM, _NativeInt16ToFloat32Scaled_ARM,
_NativeInt16ToLowAlignedInt32_ARM, _NativeInt16ToNativeInt32_ARM,
_NativeInt24ToNativeInt32_ARM, _NativeInt32ToFloat32Scaled_ARM,
_NativeInt32ToNativeInt16_ARM, _NativeInt32ToNativeInt24_ARM,
_NativeInt32ToNativeInt32_ARM, _NativeLowAlignedInt32To824Fixed_ARM,
_NativeLowAlignedInt32ToFloat32_ARM, _NativeLowAlignedInt32ToInt16_ARM,
_NativeLowAlignedInt64ToFloat32_ARM, _StereoDeinterleaveInt16ToInt824_ARM,
_StereoDeinterleaveInt824ToFloat32_ARM, _StereoDeinterleaveNativeInt16ToScaledFloat32_ARM,
_StereoInterleaveFloat32ToInt824_ARM, _StereoInterleaveFloat32ToNativeInt16Scaled_ARM,
_StereoInterleaveInt824ToInt16_ARM, _SwapPCM16_ARM, _UpmixMonoToStereoInterleaved16_ARM,
_UpmixMonoToStereoInterleaved32_ARM ]
...
|
0 | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/AudioToolbox.framework | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/AudioToolbox.framework/Headers/AudioFileComponent.h | #if (defined(__USE_PUBLIC_HEADERS__) && __USE_PUBLIC_HEADERS__) || (defined(USE_AUDIOTOOLBOX_PUBLIC_HEADERS) && USE_AUDIOTOOLBOX_PUBLIC_HEADERS) || !__has_include(<AudioToolboxCore/AudioFileComponent.h>)
/*!
@file AudioFileComponent.h
@framework AudioToolbox.framework
@copyright (c) 2004-2015 by Apple, Inc., all rights reserved.
@abstract Interfaces for components which implement knowledge of audio file formats.
@discussion
Audio file components are not for the use of clients. Rather, they are called by the
implementation of the AudioFile API to implement the various semantics of that API.
Most of these calls match a call in the AudioFile API which calls through to the component.
A component may be used in two ways, either associated with a file or not. If a component is
not associated with a file, it may be used to answer questions about the file type in
general and whether some data is recognized by that file type. A component is associated
with a file by calling one of the AudioFile Create, Open or Initialize calls. If a component
is associated with a file, then it can also be asked to perform any of the calls that
implement the AudioFile API.
*/
#ifndef AudioToolbox_AudioFileComponent_h
#define AudioToolbox_AudioFileComponent_h
//==================================================================================================
// Includes
//==================================================================================================
#include <AudioToolbox/AudioComponent.h>
#include <AudioToolbox/AudioFile.h>
CF_ASSUME_NONNULL_BEGIN
#if defined(__cplusplus)
extern "C"
{
#endif
/*!
@typedef AudioFileComponent
@abstract represents an instance of an AudioFileComponent.
*/
typedef AudioComponentInstance AudioFileComponent;
/*!
@typedef AudioFileComponentPropertyID
@abstract a four char code for a property ID.
*/
typedef UInt32 AudioFileComponentPropertyID;
/*!
@function AudioFileComponentCreateURL
@abstract creates a new (or initialises an existing) audio file specified by the URL.
@discussion creates a new (or initialises an existing) audio file specified by the URL.
@param inComponent an AudioFileComponent
@param inFileRef an CFURLRef fully specifying the path of the file to create/initialise
@param inFormat an AudioStreamBasicDescription describing the data format that will be
added to the audio file.
@param inFlags relevant flags for creating/opening the file.
if kAudioFileFlags_EraseFile is set, it will erase an existing file
if not set, then the Create call will fail if the URL is an existing file
@result returns noErr if successful.
*/
extern OSStatus
AudioFileComponentCreateURL (
AudioFileComponent inComponent,
CFURLRef inFileRef,
const AudioStreamBasicDescription *inFormat,
UInt32 inFlags) API_AVAILABLE(macos(10.5)) API_UNAVAILABLE(ios, watchos, tvos);
/*!
@function AudioFileComponentOpenURL
@abstract Open an existing audio file.
@discussion Open an existing audio file for reading or reading and writing.
@param inComponent an AudioFileComponent.
@param inFileRef the CFURLRef of an existing audio file.
@param inPermissions use the permission constants.
@param inFileDescriptor an open file descriptor.
@result returns noErr if successful.
*/
extern OSStatus
AudioFileComponentOpenURL (
AudioFileComponent inComponent,
CFURLRef inFileRef,
SInt8 inPermissions,
int inFileDescriptor) API_AVAILABLE(macos(10.5)) API_UNAVAILABLE(ios, watchos, tvos);
/*!
@function AudioFileComponentOpenWithCallbacks
@abstract implements AudioFileOpenWithCallbacks
@param inComponent an AudioFileComponent
@param inClientData a constant that will be passed to your callbacks.
@param inReadFunc a function that will be called when AudioFile needs to read data.
@param inWriteFunc a function that will be called when AudioFile needs to write data.
@param inGetSizeFunc a function that will be called when AudioFile needs to know the file size.
@param inSetSizeFunc a function that will be called when AudioFile needs to set the file size.
@result returns noErr if successful.
*/
extern OSStatus
AudioFileComponentOpenWithCallbacks(
AudioFileComponent inComponent,
void *inClientData,
AudioFile_ReadProc inReadFunc,
AudioFile_WriteProc inWriteFunc,
AudioFile_GetSizeProc inGetSizeFunc,
AudioFile_SetSizeProc inSetSizeFunc) API_AVAILABLE(macos(10.4)) API_UNAVAILABLE(ios, watchos, tvos);
/*!
@function AudioFileComponentInitializeWithCallbacks
@abstract implements AudioFileInitializeWithCallbacks
@param inComponent an AudioFileComponent
@param inClientData a constant that will be passed to your callbacks.
@param inReadFunc a function that will be called when AudioFile needs to read data.
@param inWriteFunc a function that will be called when AudioFile needs to write data.
@param inGetSizeFunc a function that will be called when AudioFile needs to know the file size.
@param inSetSizeFunc a function that will be called when AudioFile needs to set the file size.
@param inFileType an AudioFileTypeID indicating the type of audio file to which to initialize the file.
@param inFormat an AudioStreamBasicDescription describing the data format that will be
added to the audio file.
@param inFlags relevant flags for creating/opening the file. Currently zero.
@result returns noErr if successful.
*/
extern OSStatus
AudioFileComponentInitializeWithCallbacks(
AudioFileComponent inComponent,
void *inClientData,
AudioFile_ReadProc inReadFunc,
AudioFile_WriteProc inWriteFunc,
AudioFile_GetSizeProc inGetSizeFunc,
AudioFile_SetSizeProc inSetSizeFunc,
UInt32 inFileType,
const AudioStreamBasicDescription *inFormat,
UInt32 inFlags) API_AVAILABLE(macos(10.4)) API_UNAVAILABLE(ios, watchos, tvos);
/*!
@function AudioFileComponentCloseFile
@abstract implements AudioFileClose.
@param inComponent an AudioFileComponent
@result returns noErr if successful.
*/
extern OSStatus
AudioFileComponentCloseFile(
AudioFileComponent inComponent) API_AVAILABLE(macos(10.4)) API_UNAVAILABLE(ios, watchos, tvos);
/*!
@function AudioFileComponentOptimize
@abstract implements AudioFileOptimize.
@param inComponent an AudioFileComponent
@result returns noErr if successful.
*/
extern OSStatus
AudioFileComponentOptimize(
AudioFileComponent inComponent) API_AVAILABLE(macos(10.4)) API_UNAVAILABLE(ios, watchos, tvos);
/*!
@function AudioFileComponentReadBytes
@abstract implements AudioFileReadBytes.
@discussion Returns kAudioFileEndOfFileError when read encounters end of file.
@param inComponent an AudioFileComponent
@param inUseCache true if it is desired to cache the data upon read, else false
@param inStartingByte the byte offset of the audio data desired to be returned
@param ioNumBytes on input, the number of bytes to read, on output, the number of
bytes actually read.
@param outBuffer outBuffer should be a void * to user allocated memory large enough for the requested bytes.
@result returns noErr if successful.
*/
extern OSStatus
AudioFileComponentReadBytes(
AudioFileComponent inComponent,
Boolean inUseCache,
SInt64 inStartingByte,
UInt32 *ioNumBytes,
void *outBuffer) API_AVAILABLE(macos(10.4)) API_UNAVAILABLE(ios, watchos, tvos);
/*!
@function AudioFileComponentWriteBytes
@abstract implements AudioFileWriteBytes.
@param inComponent an AudioFileComponent
@param inUseCache true if it is desired to cache the data upon write, else false
@param inStartingByte the byte offset where the audio data should be written
@param ioNumBytes on input, the number of bytes to write, on output, the number of
bytes actually written.
@param inBuffer inBuffer should be a void * containing the bytes to be written
@result returns noErr if successful.
*/
extern OSStatus
AudioFileComponentWriteBytes(
AudioFileComponent inComponent,
Boolean inUseCache,
SInt64 inStartingByte,
UInt32 *ioNumBytes,
const void *inBuffer) API_AVAILABLE(macos(10.4)) API_UNAVAILABLE(ios, watchos, tvos);
/*!
@function AudioFileComponentReadPackets
@abstract implements AudioFileReadPackets.
@discussion For all uncompressed formats, packets == frames.
ioNumPackets less than requested indicates end of file.
@param inComponent an AudioFileComponent
@param inUseCache true if it is desired to cache the data upon read, else false
@param outNumBytes on output, the number of bytes actually returned
@param outPacketDescriptions on output, an array of packet descriptions describing
the packets being returned. NULL may be passed for this
parameter. Nothing will be returned for linear pcm data.
@param inStartingPacket the packet index of the first packet desired to be returned
@param ioNumPackets on input, the number of packets to read, on output, the number of
packets actually read.
@param outBuffer outBuffer should be a pointer to user allocated memory of size:
number of packets requested times file's maximum (or upper bound on)
packet size.
@result returns noErr if successful.
*/
extern OSStatus
AudioFileComponentReadPackets(
AudioFileComponent inComponent,
Boolean inUseCache,
UInt32 *outNumBytes,
AudioStreamPacketDescription * __nullable outPacketDescriptions,
SInt64 inStartingPacket,
UInt32 *ioNumPackets,
void *outBuffer) API_AVAILABLE(macos(10.4)) API_UNAVAILABLE(ios, watchos, tvos);
/*!
@function AudioFileComponentReadPacketData
@abstract implements AudioFileReadPacketData.
@discussion For all uncompressed formats, packets == frames.
If the byte size of the number packets requested is
less than the buffer size, ioNumBytes will be reduced.
If the buffer is too small for the number of packets
requested, ioNumPackets and ioNumBytes will be reduced
to the number of packets that can be accommodated and their byte size.
Returns kAudioFileEndOfFileError when read encounters end of file.
@param inComponent an AudioFileComponent
@param inUseCache true if it is desired to cache the data upon read, else false
@param ioNumBytes on input the size of outBuffer in bytes.
on output, the number of bytes actually returned.
@param outPacketDescriptions on output, an array of packet descriptions describing
the packets being returned. NULL may be passed for this
parameter. Nothing will be returned for linear pcm data.
@param inStartingPacket the packet index of the first packet desired to be returned
@param ioNumPackets on input, the number of packets to read, on output, the number of
packets actually read.
@param outBuffer outBuffer should be a pointer to user allocated memory.
@result returns noErr if successful.
*/
extern OSStatus
AudioFileComponentReadPacketData(
AudioFileComponent inComponent,
Boolean inUseCache,
UInt32 *ioNumBytes,
AudioStreamPacketDescription * __nullable outPacketDescriptions,
SInt64 inStartingPacket,
UInt32 *ioNumPackets,
void *outBuffer) API_AVAILABLE(macos(10.4)) API_UNAVAILABLE(ios, watchos, tvos);
/*!
@function AudioFileComponentWritePackets
@abstract implements AudioFileWritePackets.
@discussion For all uncompressed formats, packets == frames.
@param inComponent an AudioFileComponent
@param inUseCache true if it is desired to cache the data upon write, else false
@param inNumBytes the number of bytes being provided for write
@param inPacketDescriptions an array of packet descriptions describing the packets being
provided. Not all formats require packet descriptions to be
provided. NULL may be passed if no descriptions are required.
@param inStartingPacket the packet index of where the first packet provided should be placed.
@param ioNumPackets on input, the number of packets to write, on output, the number of
packets actually written.
@param inBuffer a void * to user allocated memory containing the packets to write.
@result returns noErr if successful.
*/
extern OSStatus
AudioFileComponentWritePackets(
AudioFileComponent inComponent,
Boolean inUseCache,
UInt32 inNumBytes,
const AudioStreamPacketDescription * __nullable inPacketDescriptions,
SInt64 inStartingPacket,
UInt32 *ioNumPackets,
const void *inBuffer) API_AVAILABLE(macos(10.4)) API_UNAVAILABLE(ios, watchos, tvos);
/*!
@function AudioFileComponentGetPropertyInfo
@abstract implements AudioFileGetPropertyInfo.
@param inComponent an AudioFileComponent
@param inPropertyID an AudioFileProperty constant.
@param outPropertySize the size in bytes of the current value of the property. In order to get the property value,
you will need a buffer of this size.
@param outWritable will be set to 1 if writable, or 0 if read only.
@result returns noErr if successful.
*/
extern OSStatus
AudioFileComponentGetPropertyInfo(
AudioFileComponent inComponent,
AudioFileComponentPropertyID inPropertyID,
UInt32 * __nullable outPropertySize,
UInt32 * __nullable outWritable) API_AVAILABLE(macos(10.4)) API_UNAVAILABLE(ios, watchos, tvos);
/*!
@function AudioFileComponentGetProperty
@abstract implements AudioFileGetProperty.
@param inComponent an AudioFileComponent
@param inPropertyID an AudioFileProperty constant.
@param ioPropertyDataSize on input the size of the outPropertyData buffer. On output the number of bytes written to the buffer.
@param outPropertyData the buffer in which to write the property data.
@result returns noErr if successful.
*/
extern OSStatus
AudioFileComponentGetProperty(
AudioFileComponent inComponent,
AudioFileComponentPropertyID inPropertyID,
UInt32 *ioPropertyDataSize,
void *outPropertyData) API_AVAILABLE(macos(10.4)) API_UNAVAILABLE(ios, watchos, tvos);
/*!
@function AudioFileComponentSetProperty
@abstract implements AudioFileSetProperty.
@param inComponent an AudioFileComponent
@param inPropertyID an AudioFileProperty constant.
@param inPropertyDataSize the size of the property data.
@param inPropertyData the buffer containing the property data.
@result returns noErr if successful.
*/
extern OSStatus
AudioFileComponentSetProperty(
AudioFileComponent inComponent,
AudioFileComponentPropertyID inPropertyID,
UInt32 inPropertyDataSize,
const void *inPropertyData) API_AVAILABLE(macos(10.4)) API_UNAVAILABLE(ios, watchos, tvos);
/*!
@function AudioFileComponentCountUserData
@abstract implements AudioFileCountUserData
@discussion "User Data" refers to chunks in AIFF, CAF and WAVE files, or resources
in Sound Designer II files, and possibly other things in other files.
For simplicity, referred to below as "chunks".
@param inComponent an AudioFileComponent
@param inUserDataID the four char code of the chunk.
@param outNumberItems on output, if successful, number of chunks of this type in the file.
@result returns noErr if successful.
*/
extern OSStatus
AudioFileComponentCountUserData(
AudioFileComponent inComponent,
UInt32 inUserDataID,
UInt32 *outNumberItems) API_AVAILABLE(macos(10.4)) API_UNAVAILABLE(ios, watchos, tvos);
/*!
@function AudioFileComponentGetUserDataSize
@abstract implements AudioFileGetUserDataSize
@param inComponent an AudioFileComponent
@param inUserDataID the four char code of the chunk.
@param inIndex an index specifying which chunk if there are more than one.
@param outUserDataSize on output, if successful, the size of the user data chunk.
@result returns noErr if successful.
*/
extern OSStatus
AudioFileComponentGetUserDataSize(
AudioFileComponent inComponent,
UInt32 inUserDataID,
UInt32 inIndex,
UInt32 *outUserDataSize) API_AVAILABLE(macos(10.4)) API_UNAVAILABLE(ios, watchos, tvos);
/*!
@function AudioFileGetUserData
@abstract implements AudioFileGetUserData.
@param inComponent an AudioFileComponent
@param inUserDataID the four char code of the chunk.
@param inIndex an index specifying which chunk if there are more than one.
@param ioUserDataSize the size of the buffer on input, size of bytes copied to buffer on output
@param outUserData a pointer to a buffer in which to copy the chunk data.
@result returns noErr if successful.
*/
extern OSStatus
AudioFileComponentGetUserData(
AudioFileComponent inComponent,
UInt32 inUserDataID,
UInt32 inIndex,
UInt32 *ioUserDataSize,
void *outUserData) API_AVAILABLE(macos(10.4)) API_UNAVAILABLE(ios, watchos, tvos);
/*!
@function AudioFileComponentSetUserData
@abstract implements AudioFileSetUserData.
@param inComponent an AudioFileComponent
@param inUserDataID the four char code of the chunk.
@param inIndex an index specifying which chunk if there are more than one.
@param inUserDataSize on input the size of the data to copy, on output, size of bytes copied from the buffer
@param inUserData a pointer to a buffer from which to copy the chunk data
(only the contents of the chunk, not including the chunk header).
@result returns noErr if successful.
*/
extern OSStatus
AudioFileComponentSetUserData(
AudioFileComponent inComponent,
UInt32 inUserDataID,
UInt32 inIndex,
UInt32 inUserDataSize,
const void *inUserData) API_AVAILABLE(macos(10.4)) API_UNAVAILABLE(ios, watchos, tvos);
/*!
@function AudioFileComponentRemoveUserData
@abstract implements AudioFileRemoveUserData.
@param inComponent an AudioFileComponent
@param inUserDataID the four char code of the chunk.
@param inIndex an index specifying which chunk if there are more than one.
@result returns noErr if successful.
*/
extern OSStatus
AudioFileComponentRemoveUserData(
AudioFileComponent inComponent,
UInt32 inUserDataID,
UInt32 inIndex) API_AVAILABLE(macos(10.5)) API_UNAVAILABLE(ios, watchos, tvos);
//=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
// The following calls are not made on AudioFile instances.
// These calls are used to determine the audio file type of some data.
//=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
/*!
@function AudioFileComponentExtensionIsThisFormat
@abstract used by the AudioFile API to determine if this component is appropriate for handling a file.
@param inComponent an AudioFileComponent
@param inExtension a CFString containing a file name extension.
@param outResult on output, is set to 1 if the extension is recognized by this component, 0 if not.
@result returns noErr if successful.
*/
extern OSStatus
AudioFileComponentExtensionIsThisFormat(
AudioFileComponent inComponent,
CFStringRef inExtension,
UInt32 *outResult) API_AVAILABLE(macos(10.4)) API_UNAVAILABLE(ios, watchos, tvos);
/*!
@function AudioFileComponentFileDataIsThisFormat
@abstract used by the AudioFile API to determine if this component is appropriate for handling a file.
@param inComponent an AudioFileComponent
@param inDataByteSize the size of inData in bytes.
@param inData a pointer to a buffer of audio file data.
@param outResult on output, is set to 1 if the file is recognized by this component, 0 if not.
@result returns noErr if successful.
*/
extern OSStatus
AudioFileComponentFileDataIsThisFormat(
AudioFileComponent inComponent,
UInt32 inDataByteSize,
const void* inData,
UInt32 *outResult) API_AVAILABLE(macos(10.4)) API_UNAVAILABLE(ios, watchos, tvos);
//=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
// The following two calls are deprecated.
// Please implement AudioFileComponentFileDataIsThisFormat instead.
//=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
/*!
@function AudioFileComponentFileIsThisFormat
@abstract deprecated. use AudioFileComponentFileDataIsThisFormat instead.
@param inComponent an AudioFileComponent
@param inFileRefNum a refNum of a file.
@param outResult on output, is set to 1 if the file is recognized by this component, 0 if not.
@result returns noErr if successful.
*/
extern OSStatus
AudioFileComponentFileIsThisFormat(
AudioFileComponent inComponent,
SInt16 inFileRefNum,
UInt32 *outResult) API_DEPRECATED("no longer supported", macos(10.4, 10.5)) API_UNAVAILABLE(ios, watchos, tvos);
/*!
@function AudioFileComponentDataIsThisFormat
@abstract deprecated. use AudioFileComponentFileDataIsThisFormat instead.
@param inComponent an AudioFileComponent
@param inClientData a constant that will be passed to your callbacks.
@param inReadFunc a function that will be called when AudioFile needs to read data.
@param inWriteFunc a function that will be called when AudioFile needs to write data.
@param inGetSizeFunc a function that will be called when AudioFile needs to know the file size.
@param inSetSizeFunc a function that will be called when AudioFile needs to set the file size.
@param outResult on output, is set to 1 if the file data is recognized by this component, 0 if not.
@result returns noErr if successful.
*/
extern OSStatus
AudioFileComponentDataIsThisFormat(
AudioFileComponent inComponent,
void * __nullable inClientData,
AudioFile_ReadProc __nullable inReadFunc,
AudioFile_WriteProc __nullable inWriteFunc,
AudioFile_GetSizeProc __nullable inGetSizeFunc,
AudioFile_SetSizeProc __nullable inSetSizeFunc,
UInt32 *outResult) API_DEPRECATED("no longer supported", macos(10.4, 10.5)) API_UNAVAILABLE(ios, watchos, tvos);
//=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
// The following calls are not made on AudioFile instances.
// They implement the AudioFileGetGlobalInfo calls.
//=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
/*!
@function AudioFileComponentGetGlobalInfoSize
@abstract implements AudioFileGetGlobalInfoSize.
@param inComponent an AudioFileComponent
@param inPropertyID an AudioFileGlobalInfo property constant.
@param inSpecifierSize The size of the specifier data.
@param inSpecifier A specifier is a buffer of data used as an input argument to some of the global info properties.
@param outPropertySize the size in bytes of the current value of the property. In order to get the property value,
you will need a buffer of this size.
@result returns noErr if successful.
*/
extern OSStatus
AudioFileComponentGetGlobalInfoSize(
AudioFileComponent inComponent,
AudioFileComponentPropertyID inPropertyID,
UInt32 inSpecifierSize,
const void * __nullable inSpecifier,
UInt32 *outPropertySize) API_AVAILABLE(macos(10.4)) API_UNAVAILABLE(ios, watchos, tvos);
/*!
@function AudioFileComponentGetGlobalInfo
@abstract implements AudioFileGetGlobalInfo.
@param inComponent an AudioFileComponent
@param inPropertyID an AudioFileGlobalInfo property constant.
@param inSpecifierSize The size of the specifier data.
@param inSpecifier A specifier is a buffer of data used as an input argument to some of the global info properties.
@param ioPropertyDataSize on input the size of the outPropertyData buffer. On output the number of bytes written to the buffer.
@param outPropertyData the buffer in which to write the property data.
@result returns noErr if successful.
*/
extern OSStatus
AudioFileComponentGetGlobalInfo(
AudioFileComponent inComponent,
AudioFileComponentPropertyID inPropertyID,
UInt32 inSpecifierSize,
const void * __nullable inSpecifier,
UInt32 *ioPropertyDataSize,
void *outPropertyData) API_AVAILABLE(macos(10.4)) API_UNAVAILABLE(ios, watchos, tvos);
//==================================================================================================
// Properties for AudioFileComponentGetGlobalInfo.
//==================================================================================================
/*!
@enum AudioFileComponent specific properties
@constant kAudioFileComponent_CanRead
Is file type readable? Returns a UInt32 1 or 0.
@constant kAudioFileComponent_CanWrite
Is file type writeable? Returns a UInt32 1 or 0.
@constant kAudioFileComponent_FileTypeName
Returns a CFString containing the name for the file type.
@constant kAudioFileComponent_ExtensionsForType
Returns a CFArray of CFStrings containing the file extensions
that are recognized for this file type.
@constant kAudioFileComponent_UTIsForType
Returns a CFArray of CFStrings containing the universal type identifiers
for this file type.
@constant kAudioFileComponent_MIMETypesForType
Returns a CFArray of CFStrings containing the MIME types
for this file type.
@constant kAudioFileComponent_AvailableFormatIDs
Returns a array of format IDs for formats that can be read.
@constant kAudioFileComponent_AvailableStreamDescriptionsForFormat
The specifier is the format ID for the requested format.
Returns an array of AudioStreamBasicDescriptions which have all of the
formats for a particular file type and format ID. The AudioStreamBasicDescriptions
have the following fields filled in: mFormatID, mFormatFlags, mBitsPerChannel
@constant kAudioFileComponent_FastDispatchTable
Deprecated. This selector is no longer called by the implementation.
@constant kAudioFileComponent_HFSTypeCodesForType
Returns an array of HFSTypeCodes corresponding to this file type.
The first type in the array is the preferred one for use when
writing new files.
*/
CF_ENUM(AudioFilePropertyID)
{
kAudioFileComponent_CanRead = 'cnrd',
kAudioFileComponent_CanWrite = 'cnwr',
kAudioFileComponent_FileTypeName = 'ftnm',
kAudioFileComponent_UTIsForType = 'futi',
kAudioFileComponent_MIMETypesForType = 'fmim',
kAudioFileComponent_ExtensionsForType = 'fext',
kAudioFileComponent_AvailableFormatIDs = 'fmid',
kAudioFileComponent_AvailableStreamDescriptionsForFormat = 'sdid',
kAudioFileComponent_FastDispatchTable = 'fdft',
kAudioFileComponent_HFSTypeCodesForType = 'fhfs'
};
//==================================================================================================
// Selectors for the component routines
//==================================================================================================
enum
{
kAudioFileCreateSelect = 0x0001,
kAudioFileOpenSelect = 0x0002,
kAudioFileInitializeSelect = 0x0003,
kAudioFileOpenWithCallbacksSelect = 0x0004,
kAudioFileInitializeWithCallbacksSelect = 0x0005,
kAudioFileCloseSelect = 0x0006,
kAudioFileOptimizeSelect = 0x0007,
kAudioFileReadBytesSelect = 0x0008,
kAudioFileWriteBytesSelect = 0x0009,
kAudioFileReadPacketsSelect = 0x000A,
kAudioFileWritePacketsSelect = 0x000B,
kAudioFileGetPropertyInfoSelect = 0x000C,
kAudioFileGetPropertySelect = 0x000D,
kAudioFileSetPropertySelect = 0x000E,
kAudioFileExtensionIsThisFormatSelect = 0x000F,
kAudioFileFileIsThisFormatSelect = 0x0010,
kAudioFileDataIsThisFormatSelect = 0x0011,
kAudioFileGetGlobalInfoSizeSelect = 0x0012,
kAudioFileGetGlobalInfoSelect = 0x0013,
kAudioFileCountUserDataSelect = 0x0014,
kAudioFileGetUserDataSizeSelect = 0x0015,
kAudioFileGetUserDataSelect = 0x0016,
kAudioFileSetUserDataSelect = 0x0017,
kAudioFileRemoveUserDataSelect = 0x0018,
kAudioFileCreateURLSelect = 0x0019,
kAudioFileOpenURLSelect = 0x001A,
kAudioFileFileDataIsThisFormatSelect = 0x001B,
kAudioFileReadPacketDataSelect = 0x001C,
};
#pragma mark -
#pragma mark Deprecated
//==================================================================================================
// Fast Dispatch Function typedefs. Deprecated. These are no longer used by the implementation.
//==================================================================================================
typedef OSStatus (*ReadBytesFDF)( void *inComponentStorage,
Boolean inUseCache,
SInt64 inStartingByte,
UInt32 *ioNumBytes,
void *outBuffer);
typedef OSStatus (*WriteBytesFDF)( void *inComponentStorage,
Boolean inUseCache,
SInt64 inStartingByte,
UInt32 *ioNumBytes,
const void *inBuffer);
typedef OSStatus (*ReadPacketsFDF)( void *inComponentStorage,
Boolean inUseCache,
UInt32 *outNumBytes,
AudioStreamPacketDescription * __nullable outPacketDescriptions,
SInt64 inStartingPacket,
UInt32 *ioNumPackets,
void *outBuffer);
typedef OSStatus (*ReadPacketDataFDF)( void *inComponentStorage,
Boolean inUseCache,
UInt32 *ioNumBytes,
AudioStreamPacketDescription * __nullable outPacketDescriptions,
SInt64 inStartingPacket,
UInt32 *ioNumPackets,
void *outBuffer);
typedef OSStatus (*WritePacketsFDF)( void *inComponentStorage,
Boolean inUseCache,
UInt32 inNumBytes,
const AudioStreamPacketDescription * __nullable inPacketDescriptions,
SInt64 inStartingPacket,
UInt32 *ioNumPackets,
const void *inBuffer);
typedef OSStatus (*GetPropertyInfoFDF)( void *inComponentStorage,
AudioFilePropertyID inPropertyID,
UInt32 * __nullable outDataSize,
UInt32 * __nullable isWritable);
typedef OSStatus (*GetPropertyFDF)( void *inComponentStorage,
AudioFilePropertyID inPropertyID,
UInt32 *ioDataSize,
void *ioPropertyData);
typedef OSStatus (*SetPropertyFDF)( void *inComponentStorage,
AudioFilePropertyID inPropertyID,
UInt32 inDataSize,
const void *inPropertyData);
typedef OSStatus (*CountUserDataFDF)( void *inComponentStorage,
UInt32 inUserDataID,
UInt32 *outNumberItems);
typedef OSStatus (*GetUserDataSizeFDF)( void *inComponentStorage,
UInt32 inUserDataID,
UInt32 inIndex,
UInt32 *outDataSize);
typedef OSStatus (*GetUserDataFDF)( void *inComponentStorage,
UInt32 inUserDataID,
UInt32 inIndex,
UInt32 *ioUserDataSize,
void *outUserData);
typedef OSStatus (*SetUserDataFDF)( void *inComponentStorage,
UInt32 inUserDataID,
UInt32 inIndex,
UInt32 inUserDataSize,
const void *inUserData);
/* no fast dispatch for kAudioFileRemoveUserDataSelect */
#pragma mark -
#pragma mark Deprecated
//==================================================================================================
// Fast Dispatch Function tables. Deprecated. These are no longer used by the implementation.
//==================================================================================================
typedef struct AudioFileFDFTable
{
void *mComponentStorage;
ReadBytesFDF mReadBytesFDF;
WriteBytesFDF mWriteBytesFDF;
ReadPacketsFDF mReadPacketsFDF;
WritePacketsFDF mWritePacketsFDF;
GetPropertyInfoFDF mGetPropertyInfoFDF;
GetPropertyFDF mGetPropertyFDF;
SetPropertyFDF mSetPropertyFDF;
CountUserDataFDF mCountUserDataFDF;
GetUserDataSizeFDF mGetUserDataSizeFDF;
GetUserDataFDF mGetUserDataFDF;
SetUserDataFDF mSetUserDataFDF;
} AudioFileFDFTable API_DEPRECATED("no longer supported", macos(10.4, 10.7)) API_UNAVAILABLE(ios, watchos, tvos);
typedef struct AudioFileFDFTableExtended
{
void *mComponentStorage;
ReadBytesFDF mReadBytesFDF;
WriteBytesFDF mWriteBytesFDF;
ReadPacketsFDF mReadPacketsFDF;
WritePacketsFDF mWritePacketsFDF;
GetPropertyInfoFDF mGetPropertyInfoFDF;
GetPropertyFDF mGetPropertyFDF;
SetPropertyFDF mSetPropertyFDF;
CountUserDataFDF mCountUserDataFDF;
GetUserDataSizeFDF mGetUserDataSizeFDF;
GetUserDataFDF mGetUserDataFDF;
SetUserDataFDF mSetUserDataFDF;
ReadPacketDataFDF mReadPacketDataFDF;
} AudioFileFDFTableExtended API_DEPRECATED("no longer supported", macos(10.4, 10.7)) API_UNAVAILABLE(ios, watchos, tvos);
struct FSRef;
/*!
@functiongroup Deprecated AFComponent
@discussion These API calls are no longer called on Snow Leopard, instead the URL versions are used.
They can be provided by the file component for compatibility with Leopard and Tiger systems
*/
/*!
@function AudioFileComponentCreate
@abstract implements AudioFileCreate
@param inComponent an AudioFileComponent
@param inParentRef an FSRef to the directory where the new file should be created.
@param inFileName a CFStringRef containing the name of the file to be created.
@param inFormat an AudioStreamBasicDescription describing the data format that will be
added to the audio file.
@param inFlags relevant flags for creating/opening the file. Currently zero.
@param outNewFileRef if successful, the FSRef of the newly created file.
@result returns noErr if successful.
*/
extern OSStatus
AudioFileComponentCreate(
AudioFileComponent inComponent,
const struct FSRef *inParentRef,
CFStringRef inFileName,
const AudioStreamBasicDescription *inFormat,
UInt32 inFlags,
struct FSRef *outNewFileRef) API_DEPRECATED("no longer supported", macos(10.4, 10.6)) API_UNAVAILABLE(ios, watchos, tvos);
/*!
@function AudioFileComponentInitialize
@abstract implements AudioFileInitialize
@param inComponent an AudioFileComponent
@param inFileRef the FSRef of an existing audio file.
@param inFormat an AudioStreamBasicDescription describing the data format that will be
added to the audio file.
@param inFlags flags for creating/opening the file. Currently zero.
@result returns noErr if successful.
*/
extern OSStatus
AudioFileComponentInitialize(
AudioFileComponent inComponent,
const struct FSRef *inFileRef,
const AudioStreamBasicDescription *inFormat,
UInt32 inFlags) API_DEPRECATED("no longer supported", macos(10.4, 10.6)) API_UNAVAILABLE(ios, watchos, tvos);
/*!
@function AudioFileComponentOpenFile
@abstract implements AudioFileOpen
@param inComponent an AudioFileComponent
@param inFileRef the FSRef of an existing audio file.
@param inPermissions use the permission constants
@param inRefNum the file refNum for the opened file. This avoids opening the file twice
- once to determine which file type to which to delegate and once to parse it.
@result returns noErr if successful.
*/
extern OSStatus
AudioFileComponentOpenFile(
AudioFileComponent inComponent,
const struct FSRef *inFileRef,
SInt8 inPermissions,
SInt16 inRefNum) API_DEPRECATED("no longer supported", macos(10.4, 10.6)) API_UNAVAILABLE(ios, watchos, tvos);
#if defined(__cplusplus)
}
#endif
#if !TARGET_OS_IPHONE
//=====================================================================================================================
typedef OSStatus (*AudioFileComponentCreateURLProc)(
void *self,
CFURLRef inFileRef,
const AudioStreamBasicDescription* inFormat,
UInt32 inFlags);
typedef OSStatus (*AudioFileComponentOpenURLProc)(
void *self,
CFURLRef inFileRef,
SInt8 inPermissions,
int inFileDescriptor);
typedef OSStatus (*AudioFileComponentOpenWithCallbacksProc)(
void *self,
void *inClientData,
AudioFile_ReadProc inReadFunc,
AudioFile_WriteProc inWriteFunc,
AudioFile_GetSizeProc inGetSizeFunc,
AudioFile_SetSizeProc inSetSizeFunc);
typedef OSStatus (*AudioFileComponentInitializeWithCallbacksProc)(
void *self,
void *inClientData,
AudioFile_ReadProc inReadFunc,
AudioFile_WriteProc inWriteFunc,
AudioFile_GetSizeProc inGetSizeFunc,
AudioFile_SetSizeProc inSetSizeFunc,
UInt32 inFileType,
const AudioStreamBasicDescription *inFormat,
UInt32 inFlags);
typedef OSStatus (*AudioFileComponentCloseProc)(
void *self);
typedef OSStatus (*AudioFileComponentOptimizeProc)(
void *self);
typedef OSStatus (*AudioFileComponentReadBytesProc)(
void *self,
Boolean inUseCache,
SInt64 inStartingByte,
UInt32 *ioNumBytes,
void *outBuffer);
typedef OSStatus (*AudioFileComponentWriteBytesProc)(
void *self,
Boolean inUseCache,
SInt64 inStartingByte,
UInt32 *ioNumBytes,
const void *inBuffer);
typedef OSStatus (*AudioFileComponentReadPacketsProc)(
void *self,
Boolean inUseCache,
UInt32 *outNumBytes,
AudioStreamPacketDescription * __nullable outPacketDescriptions,
SInt64 inStartingPacket,
UInt32 *ioNumPackets,
void *outBuffer);
typedef OSStatus (*AudioFileComponentReadPacketDataProc)(
void *self,
Boolean inUseCache,
UInt32 *ioNumBytes,
AudioStreamPacketDescription * __nullable outPacketDescriptions,
SInt64 inStartingPacket,
UInt32 *ioNumPackets,
void *outBuffer);
typedef OSStatus (*AudioFileComponentWritePacketsProc)(
void *self,
Boolean inUseCache,
UInt32 inNumBytes,
const AudioStreamPacketDescription * __nullable inPacketDescriptions,
SInt64 inStartingPacket,
UInt32 *ioNumPackets,
const void *inBuffer);
typedef OSStatus (*AudioFileComponentGetPropertyInfoProc)(
void *self,
AudioFileComponentPropertyID inPropertyID,
UInt32 * __nullable outPropertySize,
UInt32 * __nullable outWritable);
typedef OSStatus (*AudioFileComponentGetPropertyProc)(
void *self,
AudioFileComponentPropertyID inPropertyID,
UInt32 *ioPropertyDataSize,
void *outPropertyData);
typedef OSStatus (*AudioFileComponentSetPropertyProc)(
void *self,
AudioFileComponentPropertyID inPropertyID,
UInt32 inPropertyDataSize,
const void *inPropertyData);
typedef OSStatus (*AudioFileComponentCountUserDataProc)(
void *self,
UInt32 inUserDataID,
UInt32 *outNumberItems);
typedef OSStatus (*AudioFileComponentGetUserDataSizeProc)(
void *self,
UInt32 inUserDataID,
UInt32 inIndex,
UInt32 *outUserDataSize);
typedef OSStatus (*AudioFileComponentGetUserDataProc)(
void *self,
UInt32 inUserDataID,
UInt32 inIndex,
UInt32 *ioUserDataSize,
void *outUserData);
typedef OSStatus (*AudioFileComponentSetUserDataProc)(
void *self,
UInt32 inUserDataID,
UInt32 inIndex,
UInt32 inUserDataSize,
const void *inUserData);
typedef OSStatus (*AudioFileComponentRemoveUserDataProc)(
void *self,
UInt32 inUserDataID,
UInt32 inIndex);
typedef OSStatus (*AudioFileComponentExtensionIsThisFormatProc)(
void *self,
CFStringRef inExtension,
UInt32 *outResult);
typedef OSStatus (*AudioFileComponentFileDataIsThisFormatProc)(
void *self,
UInt32 inDataByteSize,
const void* inData,
UInt32 *outResult);
typedef OSStatus (*AudioFileComponentGetGlobalInfoSizeProc)(
void *self,
AudioFileComponentPropertyID inPropertyID,
UInt32 inSpecifierSize,
const void * __nullable inSpecifier,
UInt32 *outPropertySize);
typedef OSStatus (*AudioFileComponentGetGlobalInfoProc)(
void *self,
AudioFileComponentPropertyID inPropertyID,
UInt32 inSpecifierSize,
const void * __nullable inSpecifier,
UInt32 *ioPropertyDataSize,
void *outPropertyData);
#endif
CF_ASSUME_NONNULL_END
#endif // AudioToolbox_AudioFileComponent_h
#else
#include <AudioToolboxCore/AudioFileComponent.h>
#endif
|
0 | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/AudioToolbox.framework | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/AudioToolbox.framework/Headers/AUComponent.h | #if (defined(__USE_PUBLIC_HEADERS__) && __USE_PUBLIC_HEADERS__) || (defined(USE_AUDIOTOOLBOX_PUBLIC_HEADERS) && USE_AUDIOTOOLBOX_PUBLIC_HEADERS) || !__has_include(<AudioToolboxCore/AUComponent.h>)
/*!
@file AUComponent.h
@framework AudioUnit.framework
@copyright (c) 2002-2020 Apple Inc. All rights reserved.
@brief C interfaces for working with Audio Units.
@discussion
An audio unit is a plugin that can be loaded into an application's process and used to process
or generate audio. An audio unit is an AudioComponent type and so the AudioComponent APIs are
used to find specific types of audio units, open and close them.
Audio units use a general notion of description to specify an unique instance. The Type is the
general category of an audio unit. The SubType is an unique identifier specified by the
Manufacturer (provider) of the audio unit. The IDs that are used for Type are specified by
Apple, the Manufacturer ID should be specified by an unique identifier
(as registered with apple). See AudioComponentDescription.
Audio unit types are of the following types (see below for more information)
kAudioUnitType_Output = 'auou',
kAudioUnitType_MusicDevice = 'aumu',
kAudioUnitType_MusicEffect = 'aumf',
kAudioUnitType_FormatConverter = 'aufc',
kAudioUnitType_Effect = 'aufx',
kAudioUnitType_Mixer = 'aumx',
kAudioUnitType_Panner = 'aupn',
kAudioUnitType_OfflineEffect = 'auol',
kAudioUnitType_Generator = 'augn',
An audio unit's general operations are:
- Open an audio unit (AudioComponentInstanceNew)
- Configure it based on the context (AudioUnitSetProperty)
- Initialize the audio unit (AudioUnitInitialize)
- at this point the audio unit is in a state where it can render audio
- Render audio (AudioUnitRender)
An important part of a render operation for an audio unit is to manipulate the various controls
that the unit provides to change the render effects; for instance to change the decay time of
a reverb, the cut off frequency of a filter, etc. These are called parameters, and
AudioUnitGetParameter and AudioUnitSetParameter are used to interact with these.
If any reconfiguration of the audio unit is required, then:
- Uninitialize (AudioUnitUninitialize)
- Configure it based on the context (AudioUnitSetProperty)
- Initialize the audio unit (AudioUnitInitialize)
Once the host is finished with an audio unit, it closes it:
- Dispose the audio unit (AudioComponentInstanceDispose)
Audio units can be used programmatically (for instance, mixers can be used to render audio for a
game, a generator to play audio files, etc), or they can be hosted in Digital Audio Workstation
(DAW) applications such as Logic, Garage Band, etc. In the DAW case, it is common for an audio
unit to provide a custom view to allow the user to interact with what can be complex DSP
operations that the audio unit performs. The view is retrieved from an audio unit through
AudioUnitGetProperty and then the host instantiates it (see <AudioToolbox/AUCocoaUIView.h>).
*/
#ifndef AudioUnit_AUComponent_h
#define AudioUnit_AUComponent_h
//================================================================================================
#pragma mark Overview
#include <AudioToolbox/AudioComponent.h>
CF_ASSUME_NONNULL_BEGIN
#define AU_SUPPORT_INTERAPP_AUDIO 1
#define INTERAPP_AUDIO_DEPRECATED API_DEPRECATED("Inter-App Audio API is deprecated in favor of Audio Units", ios(7.0, 13.0), watchos(2.0, 6.0), tvos(9.0, 13.0), macCatalyst(14.0, 14.0))
#ifdef __cplusplus
extern "C" {
#endif
//================================================================================================
#pragma mark -
#pragma mark Audio Unit Types
/*!
@typedef AudioUnit
@discussion An audio unit is of type AudioComponentInstance as defined in
AudioComponent.h
*/
typedef AudioComponentInstance AudioUnit;
/*!
@enum Audio Unit Types
@abstract Different types of audio units
Audio units are classified into different types, where those types perform different roles and
functions.
There are some general categories of functionality that apply across different types of audio
units:
1. Real-time usage.
The audio unit will complete its operations in less time than is represented by the render
buffer. All audio units with the exception of the OfflineEffect should meet this criteria.
2. Real-time I/O.
Will request the same amount of audio input as it is being asked to produce for output.
Effects, Panners, Mixers and MusicDevices are required to adhere to this restriction.
FormatConverter's can with some constraints be used in this situation (for instance, sample
rate conversion, float-int), but the host of the audio unit is responsible for insuring
this.
3. UI versus Programmatic usage.
UI usage covers the case of using an audio unit in a Digital Audio Workstation (DAW) with
appropriate UI (for example a filter in Garage Band or Logic). Effects, Panners,
MusicDevices are all expected to be usable within this context.
Programmatic usage is where an audio unit is used by a host app as part of a general signal
processing chain.
For instance, a mixer audio unit can be used to take several different audio sources in a
game and mix them together. Mixers, Output units are for programmatic usage. FormatConverter
and Generator types are generally programmatic audio units, but if they can be used in a UI
situation, they specify a custom view. The app can then use that to decide that, with
appropriate constraints, the audio unit could be presented in a DAW type application. For
instance, the AUConverter audio unit from apple can do sample rate conversion, etc, but has
not general utility for a user in a DAW app. Apple's Varispeed or AUTimePitch audio units
can be used to change the playback rate and pitch and so could be used to good affect by a
user in a DAW type environment, as well as just providing this general functionality to any
program.
@constant kAudioUnitType_Output
An output unit can be used standalone or as part of an AUGraph or AVAudioEngine. Apple
provides a number of output units that interface directly with an audio device.
@constant kAudioUnitType_MusicDevice
A software musical instrument such as a sampler or synthesizer. They respond to MIDI and
create notes, which are then controlled through parameters or MIDI control messages. See
<AudioToolbox/MusicDevice.h>
@constant kAudioUnitType_MusicEffect
An effect that is also able to respond directly to MIDI control messages, typically
through the mapping of these MIDI messages to different parameters of the effect's DSP
algorithm.
@constant kAudioUnitType_FormatConverter
A format converter is a general category for audio units that can change the format (for
instance, sample rate conversion) from an input to an output, as well as other, non-I/O type
manipulations (like a deferred render or varispeed type of operation). As such, a format
converter can ask for as much or as little audio input to produce a given output. They are
still expected to complete their rendering within the time represented by the output buffer.
For format converters that have some utility as an "audio effect or processor", it is quite
common to provide an offline version of this audio unit as well. For instance, Apple ships a
format converter (for use in a "real-time" like situation) and an offline version (for
processing audio files) of the Time Pitch and Varispeed audio units.
@constant kAudioUnitType_Effect
An audio unit that will process some x number of audio input samples to produce x number of
audio output samples. The common case for an effect is to have a single input to a single
output, though some effects take side-chain inputs as well. Effects can be run in "offline"
contexts (such as processing a file), but they are expected to run in real-time. A delay
unit or reverb is a good example of this.
@constant kAudioUnitType_Mixer
An audio unit that takes some number of inputs, mixing them to provide 1 or more audio
outputs. A stere mixer (mono and stereo inputs to produce one stereo output) is an example
of this.
@constant kAudioUnitType_Panner
A panner is a specialised effect that will pan a single audio input to a single output.
Panner units are required to support a collection of standardised parameters that specify
the panning coordinates (aside from whatever custom parameters the panner may provide). A
surround panner is an example of this
@constant kAudioUnitType_Generator
A generator will have no audio input, but will just produce audio output. In some ways it is
similar to a MusicDevice, except that a generator provides no MIDI input, or notion of
"notes". A tone generator is a good example of this.
@constant kAudioUnitType_OfflineEffect
An offline effect is used to process data from a file and is also used to publish a
capability that cannot be run in real-time. For instance, the process of normalization
requires seeing the entire audio input before the scalar to apply in the normalization
process can be estimated. As such, offline effects also have a notion of a priming stage
that can be performed before the actual rendering/processing phase is executed.
@constant kAudioUnitType_MIDIProcessor
Plugins of this type process MIDI input and produce MIDI output. They do not produce audio.
*/
CF_ENUM(UInt32) {
kAudioUnitType_Output = 'auou',
kAudioUnitType_MusicDevice = 'aumu',
kAudioUnitType_MusicEffect = 'aumf',
kAudioUnitType_FormatConverter = 'aufc',
kAudioUnitType_Effect = 'aufx',
kAudioUnitType_Mixer = 'aumx',
kAudioUnitType_Panner = 'aupn',
kAudioUnitType_Generator = 'augn',
kAudioUnitType_OfflineEffect = 'auol',
kAudioUnitType_MIDIProcessor = 'aumi'
};
#if AU_SUPPORT_INTERAPP_AUDIO
/*!
@enum Audio Unit Types (for inter-app audio)
@abstract Types of inter-app audio units.
@constant kAudioUnitType_RemoteEffect
@constant kAudioUnitType_RemoteGenerator
@constant kAudioUnitType_RemoteInstrument
@constant kAudioUnitType_RemoteMusicEffect
@discussion
These Audio Unit types are identical to the corresponding "non-remote" types (e.g.
kAudioUnitType_Effect, etc.), with the exception that they are the types that must be
used for AudioUnits defined by applications calling AudioOutputUnitPublish.
When Audio Components of these types are instantiated via AudioComponentInstanceNew,
a connection is made to the process which published the component via AudioOutputUnitPublish.
When using Audio Units which are instances of these components, one must take care to
initialize the unit only immediately before beginning a series of render operations, and
uninitialize it immediately afterwards, since while initialized, the Audio Unit's background
process is being kept awake and is consuming system resources.
When using AudioUnitGetProperty and AudioUnitSetProperty, only Apple-defined properties
are supported.
For kAudioUnitProperty_HostCallbacks, hosts can set this property on any remote audio unit.
This will cause the host callbacks to be called on each render cycle and the results
communicated to the remote AU's process. The owner of the published AU ("node") can *get*
this property on its output units, obtaining the structure of function pointers, and call
the host callbacks during the render cycle.
*/
CF_ENUM(UInt32) {
kAudioUnitType_RemoteEffect = 'aurx',
kAudioUnitType_RemoteGenerator = 'aurg',
kAudioUnitType_RemoteInstrument = 'auri',
kAudioUnitType_RemoteMusicEffect = 'aurm'
};
#endif
//================================================================================================
#pragma mark -
#pragma mark Apple Audio Units
/*!
@enum Apple audio unit manufacturer ID.
@abstract The unique ID used to identifier audio units provided by Apple Inc.
*/
CF_ENUM(UInt32) {
kAudioUnitManufacturer_Apple = 'appl'
};
/*!
@enum Apple input/output audio unit sub types
@abstract Subtypes for the various input/output units that Apple ships.
@discussion Input/output units add an additional notion of Start and Stop.
See <AudioToolbox/AudioOutputUnit.h>
@constant kAudioUnitSubType_GenericOutput
A generic output unit provides the start/stop API, and provides the basic
services to convert Linear PCM formats.
@constant kAudioUnitSubType_VoiceProcessingIO
- Available on macOS and with iOS 3.0 or greater
This audio unit can do input as well as output. Bus 0 is used for the output
side, bus 1 is used to get audio input (thus, on the iPhone, it works in a
very similar way to the Remote I/O). This audio unit does signal processing on
the incoming audio (taking out any of the audio that is played from the device
at a given time from the incoming audio).
*/
CF_ENUM(UInt32) {
kAudioUnitSubType_GenericOutput = 'genr',
kAudioUnitSubType_VoiceProcessingIO = 'vpio'
};
#if !TARGET_OS_IPHONE
/*!
@enum Apple input/output audio unit sub types (macOS)
@constant kAudioUnitSubType_HALOutput
(a.k.a. "AUHAL") The audio unit that interfaces to any audio device. The user specifies
which audio device to track. Bus 0 is used to send audio output to the device; bus 1 is used
to receive audio input from the device. Available on macOS only.
@constant kAudioUnitSubType_DefaultOutput
A specialization of AUHAL that is used to track the user's selection of the default device
as set in the Sound Prefs. Available on macOS only.
@constant kAudioUnitSubType_SystemOutput
A specialization of AUHAL that is used to track the user's selection of the device to use
for sound effects, alerts and other UI sounds. Available on macOS only.
*/
CF_ENUM(UInt32) {
kAudioUnitSubType_HALOutput = 'ahal',
kAudioUnitSubType_DefaultOutput = 'def ',
kAudioUnitSubType_SystemOutput = 'sys ',
};
#else
/*!
@enum Apple input/output audio unit sub types (iOS)
@constant kAudioUnitSubType_RemoteIO
The audio unit that interfaces to the iOS audio system. Bus 0 is used to send audio output;
bus 1 is used to receive audio input.
*/
CF_ENUM(UInt32) {
kAudioUnitSubType_RemoteIO = 'rioc',
};
#endif
/*!
@enum Apple music instrument audio unit sub types
@constant kAudioUnitSubType_DLSSynth
- desktop only
A multi-timbral music device that can use sample banks in either DLS or
SoundFont formats. It fully supports GM-MIDI and the basic extensions of
GS-MIDI.
@constant kAudioUnitSubType_Sampler
A mono-timbral music device which is a sampler synthesizer and supports full
interactive editing of all state.
@constant kAudioUnitSubType_MIDISynth
A fully GM-compatible multi-timbral music device which is a sampler synthesizer.
It can load instruments from sample banks in either DLS or SoundFont formats.
*/
CF_ENUM(UInt32) {
#if !TARGET_OS_IPHONE
kAudioUnitSubType_DLSSynth = 'dls ',
#endif
kAudioUnitSubType_Sampler = 'samp',
kAudioUnitSubType_MIDISynth = 'msyn'
};
/*!
@enum Apple converter audio unit sub types
@discussion These are the subtypes for the various converter units that apple ships.
Except for AUConverter, which is available on both desktop and iPhone, these
audio units are only available on the desktop.
@constant kAudioUnitSubType_AUConverter
An audio unit that uses an AudioConverter to do Linear PCM conversions (sample
rate, bit depth, interleaving).
@constant kAudioUnitSubType_Varispeed
An audio unit that can be used to control playback rate (as the rate is faster,
the pitch is higher). It provides a generic view, so can be used in both a UI
and programmatic context. It also comes in an Offline version so can be used
to process audio files.
@constant kAudioUnitSubType_DeferredRenderer
An audio unit that is used to get its input from a separate thread than the
thread that its render method is called. It thus allows an application to
introduce multiple threads into a rendering graph. There is a buffer sized
delay introduced between the input and output
@constant kAudioUnitSubType_Splitter
An audio unit that provides 2 output buses and 1 input bus. The audio unit
splits (duplicates) the input signal to the two output buses
@constant kAudioUnitSubType_MultiSplitter
An audio unit that sends its input bus to any number of output buses.
Every output bus gets all channels of the input bus.
This unit's implementation is lighter weight than kAudioUnitSubType_Splitter
even for two output buses, and is recommended over kAudioUnitSubType_Splitter.
@constant kAudioUnitSubType_Merger
An audio unit that provides 2 input buses and 2 output bus. The audio unit
merges the two inputs to the single output
@constant kAudioUnitSubType_NewTimePitch
An audio unit that provides good quality time stretching and pitch shifting.
It is computationally less expensive than kAudioUnitSubType_TimePitch.
@constant kAudioUnitSubType_AUiPodTimeOther
An audio unit that provides time domain time stretching.
*/
CF_ENUM(UInt32) {
kAudioUnitSubType_AUConverter = 'conv',
kAudioUnitSubType_Varispeed = 'vari',
kAudioUnitSubType_DeferredRenderer = 'defr',
kAudioUnitSubType_Splitter = 'splt',
kAudioUnitSubType_MultiSplitter = 'mspl',
kAudioUnitSubType_Merger = 'merg',
kAudioUnitSubType_NewTimePitch = 'nutp',
kAudioUnitSubType_AUiPodTimeOther = 'ipto',
kAudioUnitSubType_RoundTripAAC = 'raac',
};
#if !TARGET_OS_WATCH
/*!
@enum Apple converter audio unit sub types (macOS and iOS only)
@constant kAudioUnitSubType_TimePitch
An audio unit that provides high quality time stretching and pitch shifting.
*/
CF_ENUM(UInt32) {
kAudioUnitSubType_TimePitch = 'tmpt'
};
#endif //!TARGET_OS_WATCH
#if TARGET_OS_IPHONE && !TARGET_OS_MACCATALYST
/*!
@enum Apple converter audio unit sub types (iOS only)
@constant kAudioUnitSubType_AUiPodTime
An audio unit that provides simple (and limited) control over playback rate
and time.
*/
CF_ENUM(UInt32) {
kAudioUnitSubType_AUiPodTime API_DEPRECATED_WITH_REPLACEMENT("kAudioUnitSubType_NewTimePitch", ios(2.0, 13.0), watchos(2.0, 6.0), tvos(9.0, 13.0)) API_UNAVAILABLE(macos) = 'iptm'
};
#endif
/*!
@enum Apple effect audio unit sub types
@brief These are the subtypes for the various effect units that apple ships
@constant kAudioUnitSubType_Delay
- desktop only
A delay audio unit
@constant kAudioUnitSubType_LowPassFilter
A filter that passes frequencies below a specified cut-off frequency
@constant kAudioUnitSubType_HighPassFilter
A filter that passes frequencies above a specified cut-off frequency
@constant kAudioUnitSubType_BandPassFilter
A filter that passes frequencies between a low and high cut-off frequency.
@constant kAudioUnitSubType_HighShelfFilter
A filter that can be used to implement a "treble" control
@constant kAudioUnitSubType_LowShelfFilter
A filter that can be used to implement a "bass" control
@constant kAudioUnitSubType_ParametricEQ
A parametric EQ filter
@constant kAudioUnitSubType_PeakLimiter
A peak limiter
@constant kAudioUnitSubType_DynamicsProcessor
A dynamics compressor/expander
@constant kAudioUnitSubType_SampleDelay
- desktop only
A delay that is used to delay the input a specified number of samples until
the output
@constant kAudioUnitSubType_Distortion
A distortion audio unit
@constant kAudioUnitSubType_NBandEQ
A generalized N-band graphic EQ with specifiable filter types per-band
@constant kAudioUnitSubType_Reverb2
A lite reverb that can be used to simulate various and different spaces
*/
CF_ENUM(UInt32) {
kAudioUnitSubType_PeakLimiter = 'lmtr',
kAudioUnitSubType_DynamicsProcessor = 'dcmp',
kAudioUnitSubType_LowPassFilter = 'lpas',
kAudioUnitSubType_HighPassFilter = 'hpas',
kAudioUnitSubType_BandPassFilter = 'bpas',
kAudioUnitSubType_HighShelfFilter = 'hshf',
kAudioUnitSubType_LowShelfFilter = 'lshf',
kAudioUnitSubType_ParametricEQ = 'pmeq',
kAudioUnitSubType_Distortion = 'dist',
kAudioUnitSubType_Delay = 'dely',
kAudioUnitSubType_SampleDelay = 'sdly',
kAudioUnitSubType_NBandEQ = 'nbeq',
kAudioUnitSubType_Reverb2 = 'rvb2'
};
#if !TARGET_OS_IPHONE
/*!
@enum Apple effect audio unit sub types (macOS only)
@constant kAudioUnitSubType_GraphicEQ
A 10 or 31 band Graphic EQ
@constant kAudioUnitSubType_MultiBandCompressor
A 4 band compressor/expander
@constant kAudioUnitSubType_MatrixReverb
A reverb that can be used to simulate various and different spaces
@constant kAudioUnitSubType_Pitch
An audio unit used to change the pitch
@constant kAudioUnitSubType_AUFilter
A filter unit that combines 5 different filters (low, 3 mids, high)
@constant kAudioUnitSubType_NetSend
An audio unit that is used in conjunction with _NetReceive to send audio
across the network (or between different applications)
@constant kAudioUnitSubType_RogerBeep
An audio unit that can be used to emit a short tone in gaps between speech
- similar to the tones used in a walkie-talkie
*/
CF_ENUM(UInt32) {
kAudioUnitSubType_GraphicEQ = 'greq',
kAudioUnitSubType_MultiBandCompressor = 'mcmp',
kAudioUnitSubType_MatrixReverb = 'mrev',
kAudioUnitSubType_Pitch = 'tmpt',
kAudioUnitSubType_AUFilter = 'filt',
kAudioUnitSubType_NetSend = 'nsnd',
kAudioUnitSubType_RogerBeep = 'rogr'
};
#elif !TARGET_OS_MACCATALYST
/*!
@enum Apple effect audio unit sub types (iOS only)
@constant kAudioUnitSubType_AUiPodEQ
A simple graphic EQ with common presets
*/
CF_ENUM(UInt32) {
kAudioUnitSubType_AUiPodEQ API_DEPRECATED_WITH_REPLACEMENT("kAudioUnitSubType_GraphicEQ", ios(2.0, 13.0), watchos(2.0, 6.0), tvos(9.0, 13.0)) API_UNAVAILABLE(macos) = 'ipeq'
};
#endif
/*!
@enum Apple mixer audio unit sub types
@discussion These are the subtypes for the various mixer units that apple ships
@constant kAudioUnitSubType_MultiChannelMixer
Can have any number of inputs, with any number of channels on any input to one
output bus with any number of channels.
@constant kAudioUnitSubType_SpatialMixer
Inputs that are mono will be panned around using 3D coordinates and parameters.
Stereo inputs are passed directly through to the output.
A single output is presented with 2, 4, 5, 6, 7 or 8 channels.
There is also a built in reverb.
@constant kAudioUnitSubType_MatrixMixer
Any number of input and output buses with any number of channels on any bus.
The mix is presented as a matrix of channels that can be controlled through
input volume per channel, "cross-point" volume (a given input channel to a
given output channel), output volume per channel and a global volume across
the whole matrix
*/
CF_ENUM(UInt32) {
kAudioUnitSubType_MultiChannelMixer = 'mcmx',
kAudioUnitSubType_MatrixMixer = 'mxmx',
kAudioUnitSubType_SpatialMixer = '3dem',
};
#if !TARGET_OS_IPHONE
/*!
@enum Apple mixer audio unit sub types (macOS only)
@constant kAudioUnitSubType_StereoMixer
Inputs can be mono or stereo. Single stereo output
@constant kAudioUnitSubType_3DMixer
(deprecated, use kAudioUnitSubType_SpatialMixer instead)
Inputs can be mono, in which case they can be panned around using 3D
coordinates and parameters.
Stereo inputs are passed directly through to the output.
4 channel "ambisonic" inputs will be rendered to the output configuration
A single output of 2, 4, 5, 6, 7 or 8 channels.
*/
CF_ENUM(UInt32) {
kAudioUnitSubType_StereoMixer = 'smxr',
kAudioUnitSubType_3DMixer API_DEPRECATED("no longer supported", macos(10.3, 10.10)) API_UNAVAILABLE(ios, watchos, tvos)
= '3dmx',
// use kAudioUnitSubType_SpatialMixer instead
};
#else
/*!
@enum Apple mixer audio unit sub types (iOS only)
@constant kAudioUnitSubType_AU3DMixerEmbedded
- iPhone only (renamed to kAudioUnitSubType_SpatialMixer)
A scaled-down version of the AU3DMixer that presents a stereo output, mono or
stereo inputs
*/
CF_ENUM(UInt32) {
kAudioUnitSubType_AU3DMixerEmbedded __attribute__((deprecated("renamed to kAudioUnitSubType_SpatialMixer")))
= '3dem'
};
#endif
/*!
@enum Apple panner audio unit sub types
@discussion These are the subtypes for the various panner units that apple ships
@constant kAudioUnitSubType_SphericalHeadPanner
- desktop only
A panner unit that uses the spherical head model to pan to a stereo output
@constant kAudioUnitSubType_VectorPanner
- desktop only
A panner unit that uses a moving pan between the two closes, adjacent channels
in a 3D space to a
surround output
@constant kAudioUnitSubType_SoundFieldPanner
- desktop only
A panner unit that uses a sound-field notion to pan to a surround output
@constant kAudioUnitSubType_HRTFPanner
- desktop only
A panner unit that uses a generic "HRTF" model to pan to a stereo output
*/
#if !TARGET_OS_IPHONE
CF_ENUM(UInt32) {
kAudioUnitSubType_SphericalHeadPanner = 'sphr',
kAudioUnitSubType_VectorPanner = 'vbas',
kAudioUnitSubType_SoundFieldPanner = 'ambi',
kAudioUnitSubType_HRTFPanner = 'hrtf'
};
#endif
/*!
@enum Apple generator audio unit sub types
@discussion These are the subtypes for the various generator units that apple ships
@constant kAudioUnitSubType_ScheduledSoundPlayer
A generator unit that can be used to schedule slices of audio to be played at
a specified time. The audio is scheduled using the time stamps for the render
operation, and can be scheduled from any thread.
@constant kAudioUnitSubType_AudioFilePlayer
A generator unit that is used to play a file. It presents a custom UI so can
be used in a UI context as well
@constant kAudioUnitSubType_NetReceive
- desktop only
A generator unit that is paired with _NetSend to receive the audio that unit
sends. It presents a custom UI so can be used in a UI context as well
*/
CF_ENUM(UInt32) {
#if !TARGET_OS_IPHONE
kAudioUnitSubType_NetReceive = 'nrcv',
#endif
kAudioUnitSubType_ScheduledSoundPlayer = 'sspl',
kAudioUnitSubType_AudioFilePlayer = 'afpl'
};
//================================================================================================
#pragma mark -
#pragma mark Audio Unit Constants and typedefs
/*!
@enum AudioUnitRenderActionFlags
@discussion These flags can be set in a callback from an audio unit during an audio unit
render operation from either the RenderNotify Proc or the render input
callback.
@constant kAudioUnitRenderAction_PreRender
Called on a render notification Proc - which is called either before or after
the render operation of the audio unit. If this flag is set, the proc is being
called before the render operation is performed.
@constant kAudioUnitRenderAction_PostRender
Called on a render notification Proc - which is called either before or after
the render operation of the audio unit. If this flag is set, the proc is being
called after the render operation is completed.
@constant kAudioUnitRenderAction_OutputIsSilence
The originator of a buffer, in a render input callback, or in an audio unit's
render operation, may use this flag to indicate that the buffer contains
only silence.
The receiver of the buffer can then use the flag as a hint as to whether the
buffer needs to be processed or not.
Note that because the flag is only a hint, when setting the silence flag,
the originator of a buffer must also ensure that it contains silence (zeroes).
@constant kAudioOfflineUnitRenderAction_Preflight
This is used with offline audio units (of type 'auol'). It is used when an
offline unit is being preflighted, which is performed prior to the actual
offline rendering actions are performed. It is used for those cases where the
offline process needs it (for example, with an offline unit that normalises an
audio file, it needs to see all of the audio data first before it can perform
its normalization)
@constant kAudioOfflineUnitRenderAction_Render
Once an offline unit has been successfully preflighted, it is then put into
its render mode. So this flag is set to indicate to the audio unit that it is
now in that state and that it should perform its processing on the input data.
@constant kAudioOfflineUnitRenderAction_Complete
This flag is set when an offline unit has completed either its preflight or
performed render operations
@constant kAudioUnitRenderAction_PostRenderError
If this flag is set on the post-render call an error was returned by the
AUs render operation. In this case, the error can be retrieved through the
lastRenderError property and the audio data in ioData handed to the post-render
notification will be invalid.
@constant kAudioUnitRenderAction_DoNotCheckRenderArgs
If this flag is set, then checks that are done on the arguments provided to render
are not performed. This can be useful to use to save computation time in
situations where you are sure you are providing the correct arguments
and structures to the various render calls
*/
typedef CF_OPTIONS(UInt32, AudioUnitRenderActionFlags)
{
kAudioUnitRenderAction_PreRender = (1UL << 2),
kAudioUnitRenderAction_PostRender = (1UL << 3),
kAudioUnitRenderAction_OutputIsSilence = (1UL << 4),
kAudioOfflineUnitRenderAction_Preflight = (1UL << 5),
kAudioOfflineUnitRenderAction_Render = (1UL << 6),
kAudioOfflineUnitRenderAction_Complete = (1UL << 7),
kAudioUnitRenderAction_PostRenderError = (1UL << 8),
kAudioUnitRenderAction_DoNotCheckRenderArgs = (1UL << 9)
};
/*!
@enum Audio unit errors
@discussion These are the various errors that can be returned by AudioUnit API calls
@constant kAudioUnitErr_InvalidProperty
The property is not supported
@constant kAudioUnitErr_InvalidParameter
The parameter is not supported
@constant kAudioUnitErr_InvalidElement
The specified element is not valid
@constant kAudioUnitErr_NoConnection
There is no connection (generally an audio unit is asked to render but it has
not input from which to gather data)
@constant kAudioUnitErr_FailedInitialization
The audio unit is unable to be initialized
@constant kAudioUnitErr_TooManyFramesToProcess
When an audio unit is initialized it has a value which specifies the max
number of frames it will be asked to render at any given time. If an audio
unit is asked to render more than this, this error is returned.
@constant kAudioUnitErr_InvalidFile
If an audio unit uses external files as a data source, this error is returned
if a file is invalid (Apple's DLS synth returns this error)
@constant kAudioUnitErr_UnknownFileType
If an audio unit uses external files as a data source, this error is returned
if a file is invalid (Apple's DLS synth returns this error)
@constant kAudioUnitErr_FileNotSpecified
If an audio unit uses external files as a data source, this error is returned
if a file hasn't been set on it
(Apple's DLS synth returns this error)
@constant kAudioUnitErr_FormatNotSupported
Returned if an input or output format is not supported
@constant kAudioUnitErr_Uninitialized
Returned if an operation requires an audio unit to be initialized and it is
not.
@constant kAudioUnitErr_InvalidScope
The specified scope is invalid
@constant kAudioUnitErr_PropertyNotWritable
The property cannot be written
@constant kAudioUnitErr_CannotDoInCurrentContext
Returned when an audio unit is in a state where it can't perform the requested
action now - but it could later. Its usually used to guard a render operation
when a reconfiguration of its internal state is being performed.
@constant kAudioUnitErr_InvalidPropertyValue
The property is valid, but the value of the property being provided is not
@constant kAudioUnitErr_PropertyNotInUse
Returned when a property is valid, but it hasn't been set to a valid value at
this time.
@constant kAudioUnitErr_Initialized
Indicates the operation cannot be performed because the audio unit is
initialized.
@constant kAudioUnitErr_InvalidOfflineRender
Used to indicate that the offline render operation is invalid. For instance,
when the audio unit needs to be pre-flighted,
but it hasn't been.
@constant kAudioUnitErr_Unauthorized
Returned by either Open or Initialize, this error is used to indicate that the
audio unit is not authorised, that it cannot be used. A host can then present
a UI to notify the user the audio unit is not able to be used in its current
state.
@constant kAudioUnitErr_MIDIOutputBufferFull
Returned during the render call, if the audio unit produces more MIDI output,
than the default allocated buffer. The audio unit can provide a size hint, in
case it needs a larger buffer. See the documentation for AUAudioUnit's
MIDIOutputBufferSizeHint property.
@constant kAudioComponentErr_InstanceInvalidated
The component instance's implementation is not available, most likely because the process
that published it is no longer running.
@constant kAudioUnitErr_RenderTimeout
The audio unit did not satisfy the render request in time.
@constant kAudioUnitErr_ExtensionNotFound
The specified identifier did not match any Audio Unit Extensions.
@constant kAudioUnitErr_InvalidParameterValue
The parameter value is not supported, e.g. the value specified is NaN or
infinite.
@constant kAudioUnitErr_InvalidFilePath
The file path that was passed is not supported. It is either too long or contains
invalid characters.
@constant kAudioUnitErr_MissingKey
A required key is missing from a dictionary object.
*/
CF_ENUM(OSStatus) {
kAudioUnitErr_InvalidProperty = -10879,
kAudioUnitErr_InvalidParameter = -10878,
kAudioUnitErr_InvalidElement = -10877,
kAudioUnitErr_NoConnection = -10876,
kAudioUnitErr_FailedInitialization = -10875,
kAudioUnitErr_TooManyFramesToProcess = -10874,
kAudioUnitErr_InvalidFile = -10871,
kAudioUnitErr_UnknownFileType = -10870,
kAudioUnitErr_FileNotSpecified = -10869,
kAudioUnitErr_FormatNotSupported = -10868,
kAudioUnitErr_Uninitialized = -10867,
kAudioUnitErr_InvalidScope = -10866,
kAudioUnitErr_PropertyNotWritable = -10865,
kAudioUnitErr_CannotDoInCurrentContext = -10863,
kAudioUnitErr_InvalidPropertyValue = -10851,
kAudioUnitErr_PropertyNotInUse = -10850,
kAudioUnitErr_Initialized = -10849,
kAudioUnitErr_InvalidOfflineRender = -10848,
kAudioUnitErr_Unauthorized = -10847,
kAudioUnitErr_MIDIOutputBufferFull = -66753,
kAudioComponentErr_InstanceTimedOut = -66754,
kAudioComponentErr_InstanceInvalidated = -66749,
kAudioUnitErr_RenderTimeout = -66745,
kAudioUnitErr_ExtensionNotFound = -66744,
kAudioUnitErr_InvalidParameterValue = -66743,
kAudioUnitErr_InvalidFilePath = -66742,
kAudioUnitErr_MissingKey = -66741
};
#if AU_SUPPORT_INTERAPP_AUDIO
/*!
@enum AudioComponent errors for inter-app audio
@constant kAudioComponentErr_DuplicateDescription
a non-unique component description was provided to AudioOutputUnitPublish
@constant kAudioComponentErr_UnsupportedType
an unsupported component type was provided to AudioOutputUnitPublish
@constant kAudioComponentErr_TooManyInstances
components published via AudioOutputUnitPublish may only have one instance
@constant kAudioComponentErr_NotPermitted
app needs "inter-app-audio" entitlement or host app needs "audio" in its UIBackgroundModes.
Or app is trying to register a component not declared in its Info.plist.
@constant kAudioComponentErr_InitializationTimedOut
host did not render in a timely manner; must uninitialize and reinitialize.
@constant kAudioComponentErr_InvalidFormat
inter-app AU element formats must have sample rates matching the hardware.
*/
CF_ENUM(OSStatus) {
kAudioComponentErr_DuplicateDescription = -66752,
kAudioComponentErr_UnsupportedType = -66751,
kAudioComponentErr_TooManyInstances = -66750,
kAudioComponentErr_NotPermitted = -66748,
kAudioComponentErr_InitializationTimedOut = -66747,
kAudioComponentErr_InvalidFormat = -66746
};
#endif
/*!
@typedef AudioUnitPropertyID
@discussion Type used for audio unit properties.
Properties are used to describe the state of an audio unit (for instance,
the input or output audio format)
*/
typedef UInt32 AudioUnitPropertyID;
/*!
@typedef AudioUnitScope
@discussion Type used for audio unit scopes. Apple reserves the 0 < 1024 range for
audio unit scope identifiers.
Scopes are used to delineate a major attribute of an audio unit
(for instance, global, input, output)
*/
typedef UInt32 AudioUnitScope;
/*!
@typedef AudioUnitElement
@discussion Type used for audio unit elements.
Scopes can have one or more member, and a member of a scope is
addressed / described by its element
For instance, input bus 1 is input scope, element 1
*/
typedef UInt32 AudioUnitElement;
/*!
@typedef AudioUnitParameterID
@discussion Type used for audio unit parameters.
Parameters are typically used to control and set render state
(for instance, filter cut-off frequency)
*/
typedef UInt32 AudioUnitParameterID;
/*!
@typedef AudioUnitParameterValue
@discussion Type used for audio unit parameter values.
The value of a given parameter is specified using this type
(typically a Float32)
*/
typedef Float32 AudioUnitParameterValue;
/*!
@enum AUParameterEventType
@discussion The type of a parameter event (see AudioUnitScheduleParameter)
@constant kParameterEvent_Immediate
The parameter event describes an immediate change to the parameter value to
the new value
@constant kParameterEvent_Ramped
The parameter event describes a change to the parameter value that should
be applied over the specified period of time
*/
typedef CF_ENUM(UInt32, AUParameterEventType)
{
kParameterEvent_Immediate = 1,
kParameterEvent_Ramped = 2
};
/*!
@struct AudioUnitParameterEvent
@discussion A parameter event describes a change to a parameter's value, where the type of
the event describes how that change is to be applied (see AUParameterEventType).
A parameter is uniquely defined through the triplet of scope, element and
parameterID.
See AudioUnitScheduleParameters
@var scope
The scope for the parameter
@var element
The element for the parameter
@var parameter
The parameterID for the parameter
@var eventType
The event type. This field further defines how the union described by
eventValues is to be interpreted.
@var eventValues
If the parameter event type is _Immediate, then the immediate struct of this
union should be used.
If the parameter event type is _Ramped, then the ramp struct of this union
should be used.
*/
struct AudioUnitParameterEvent
{
AudioUnitScope scope;
AudioUnitElement element;
AudioUnitParameterID parameter;
AUParameterEventType eventType;
union
{
struct
{
SInt32 startBufferOffset;
UInt32 durationInFrames;
AudioUnitParameterValue startValue;
AudioUnitParameterValue endValue;
} ramp;
struct
{
UInt32 bufferOffset;
AudioUnitParameterValue value;
} immediate;
} eventValues;
};
typedef struct AudioUnitParameterEvent AudioUnitParameterEvent;
/*!
@struct AudioUnitParameter
@discussion An audio unit parameter is defined by the triplet of audio unit scope, element
and parameterID. This struct is used with the functions in AudioUnitUtilities.h
to deal with audio unit parameters, but is included in this header file for
completeness.
@var mAudioUnit
The audio unit instance to which the specified parameter applies.
@var mParameterID
The parameterID for the parameter
@var mScope
The scope for the parameter
@var mElement
The element for the parameter
*/
struct AudioUnitParameter
{
AudioUnit mAudioUnit;
AudioUnitParameterID mParameterID;
AudioUnitScope mScope;
AudioUnitElement mElement;
};
typedef struct AudioUnitParameter AudioUnitParameter;
/*!
@struct AudioUnitProperty
@discussion An audio unit property is defined by the triplet of audio unit scope, element
and propertyID. This struct is used with the functions in AudioUnitUtilities.h
to deal with audio unit properties, but is included in this header file for
completeness.
@var mAudioUnit
The audio unit instance which the specified property applies too
@var mPropertyID
The propertyID for the property
@var mScope
The scope for the property
@var mElement
The element for the property
*/
struct AudioUnitProperty
{
AudioUnit mAudioUnit;
AudioUnitPropertyID mPropertyID;
AudioUnitScope mScope;
AudioUnitElement mElement;
};
typedef struct AudioUnitProperty AudioUnitProperty;
/*!
@typedef AURenderCallback
@discussion This is the prototype for a function callback Proc that is used both with the
AudioUnit render notification API and the render input callback. See
kAudioUnitProperty_SetRenderCallback property or AudioUnitAddRenderNotify.
This callback is part of the process of a call to AudioUnitRender. As a
notification it is called either before or after the audio unit's render
operations. As a render input callback, it is called to provide input data for
the particular input bus the callback is attached too.
@param inRefCon
The client data that is provided either with the AURenderCallbackStruct or as
specified with the Add API call
@param ioActionFlags
Flags used to describe more about the context of this call (pre or post in the
notify case for instance)
@param inTimeStamp
The times stamp associated with this call of audio unit render
@param inBusNumber
The bus number associated with this call of audio unit render
@param inNumberFrames
The number of sample frames that will be represented in the audio data in the
provided ioData parameter
@param ioData
The AudioBufferList that will be used to contain the rendered or provided
audio data. These buffers will be aligned to 16 byte boundaries (which is
normally what malloc will return). Can be null in the notification that
input is available.
*/
typedef OSStatus
(*AURenderCallback)( void * inRefCon,
AudioUnitRenderActionFlags * ioActionFlags,
const AudioTimeStamp * inTimeStamp,
UInt32 inBusNumber,
UInt32 inNumberFrames,
AudioBufferList * __nullable ioData);
/*!
@typedef AudioUnitPropertyListenerProc
@discussion This is the prototype for a function callback Proc that is registered with an
audio unit to notify the caller of any changes to a value of an audio unit
property. See AudioUnitAddPropertyListener
@param inRefCon
The client data that is provided with the add property listener registration
@param inUnit
The audio unit upon which the specified property value has changed
@param inID
The property whose value has changed
@param inScope
The scope of the property whose value has changed
@param inElement
The element ID on the scope of the property whose value has changed
*/
typedef void
(*AudioUnitPropertyListenerProc)( void * inRefCon,
AudioUnit inUnit,
AudioUnitPropertyID inID,
AudioUnitScope inScope,
AudioUnitElement inElement);
/*!
@typedef AUInputSamplesInOutputCallback
@discussion This is the prototype for a function callback Proc that is registered with an
audio unit to notify the caller of for the user of a varispeed or AUTimePitch
audio unit where it is not clear what input sample is represented in the
rendered output samples.
@param inRefCon
The client data that is provided with the add property listener registration
@param inOutputTimeStamp
The time stamp that corresponds to the first sample of audio data produced in
AudioUnitRender (its output data)
@param inInputSample
The sample number of the input that is represented in the first sample of that
output time stamp
@param inNumberInputSamples
The number of input samples that are represented in an output buffer
*/
typedef void
(*AUInputSamplesInOutputCallback)( void * inRefCon,
const AudioTimeStamp * inOutputTimeStamp,
Float64 inInputSample,
Float64 inNumberInputSamples);
/*!
@constant kAudioComponentRegistrationsChangedNotification
@abstract Notification generated when the set of available AudioComponents changes.
@discussion
Register for this notification name with `[NSNotificationCenter defaultCenter]` or
`CFNotificationCenterGetLocalCenter()`, using an object of NULL.
*/
extern const CFStringRef kAudioComponentRegistrationsChangedNotification
API_AVAILABLE(macos(10.11), ios(7.0), watchos(2.0), tvos(9.0));
/*!
@constant kAudioComponentInstanceInvalidationNotification
@abstract Notification generated when the connection to an audio unit extension process
is invalidated.
@discussion
Register for this notification name with `[NSNotificationCenter defaultCenter]` or
`CFNotificationCenterGetLocalCenter()`. The "object" refers to an AUAudioUnit instance
to be observed, or can be nil to observe all instances.
This notification can happen for several reasons, for instance the connection being
invalidated or the process abnormally ending. There can be multiple notifications for
the same event (i.e. a terminated process will also invalidate the connection).
The notification's userInfo dictionary may contain the following keys, depending on
the reason for the invalidation and the platform in which it's running:
@"audioUnit", a NSValue whose pointerValue is the AudioUnit or
AudioComponentInstance which is wrapping the AUAudioUnit communicating with
the extension process. (This may be null if there is no such component instance.).
For example:
```
[[NSNotificationCenter defaultCenter]
addObserverForName:(NSString *)kAudioComponentInstanceInvalidationNotification
object:nil queue:nil usingBlock:^(NSNotification *note) {
AUAudioUnit *auAudioUnit = (AUAudioUnit *)note.object;
NSValue *val = note.userInfo[@"audioUnit"];
AudioUnit audioUnit = (AudioUnit)val.pointerValue;
NSLog(@"Received kAudioComponentInstanceInvalidationNotification: auAudioUnit %@, audioUnit %p",
auAudioUnit, audioUnit);
}];
```
@"Service PID", a NSNumber with the process ID for the service.
@"Host PID", a NSNumber with the process ID for the host.
@"Executable Path", a NSString with the path for the executable that may be responsible
for the abnormal exit.
@"Descriptions" a NSArray of NSValues representing byte encoded
AudioComponentDescriptions that may be responsible for the abnormal exit.
*/
extern const CFStringRef kAudioComponentInstanceInvalidationNotification
API_AVAILABLE(macos(10.11), ios(9.0), watchos(2.0), tvos(9.0));
//================================================================================================
#pragma mark -
#pragma mark Functions
/*!
@function AudioUnitInitialize
@abstract initialize an audio unit
@discussion Upon success, the audio unit has been successfully initialized. This means
that the formats for input and output are valid and can be supported and it
has based its allocations on the max number of frames that it is able to
render at any given time. Once initialized, it is in a state where it can be
asked to render.
In common practice, major state of an audio unit (such as its I/O formats,
memory allocations) cannot be changed while an audio unit is initialized.
@param inUnit
The audio unit to initialize
@result noErr, or an error representing the reasons why the audio unit was not able
to be initialized successfully
*/
extern OSStatus
AudioUnitInitialize( AudioUnit inUnit)
API_AVAILABLE(macos(10.0), ios(2.0), watchos(2.0), tvos(9.0));
/*!
@function AudioUnitUninitialize
@abstract uninitialize an audio unit
@discussion Once an audio unit has been initialized, to change its state in response to
some kind of environmental change, the audio unit should be uninitialized.
This will have the effect of the audio unit de-allocating its resources.
The caller can then reconfigure the audio unit to match the new environment
(for instance, the sample rate to process audio is different than it was) and
then re-initialize the audio unit when those changes have been applied.
@param inUnit
The audio unit to uninitialize
@result noErr, or an error representing the reasons why the audio unit was not able
to be initialized successfully. Typically this call won't return an error
unless the audio unit in question is no longer valid.
*/
extern OSStatus
AudioUnitUninitialize( AudioUnit inUnit)
API_AVAILABLE(macos(10.0), ios(2.0), watchos(2.0), tvos(9.0));
/*!
@function AudioUnitGetPropertyInfo
@abstract retrieves information about a specified property
@discussion The API can be used to retrieve both the size of the property, and whether it
is writable or not. In order to get a general answer on the capability of an
audio unit, this function should be called before the audio unit
is initialized (as some properties are writable when the audio unit is
initialized, and others not)
@param inUnit
the audio unit
@param inID
the property identifier
@param inScope
the scope of the property
@param inElement
the element of the scope
@param outDataSize
if not null, then will retrieve the maximum size for the property. if null,
then it is ignored
@param outWritable
if not null, then will retrieve whether the property can be written or not.
if null, then it is ignored
@result noErr, or various audio unit errors related to properties
*/
extern OSStatus
AudioUnitGetPropertyInfo( AudioUnit inUnit,
AudioUnitPropertyID inID,
AudioUnitScope inScope,
AudioUnitElement inElement,
UInt32 * __nullable outDataSize,
Boolean * __nullable outWritable)
API_AVAILABLE(macos(10.0), ios(2.0), watchos(2.0), tvos(9.0));
/*!
@function AudioUnitGetProperty
@abstract retrieves the value of a specified property
@discussion The API can is used to retrieve the value of the property. Property values for
audio units are always passed by reference
@param inUnit
the audio unit
@param inID
the property identifier
@param inScope
the scope of the property
@param inElement
the element of the scope
@param outData
used to retrieve the value of the property. It should point to memory at least
as large as the value described by ioDataSize
@param ioDataSize
on input contains the size of the data pointed to by outData, on output, the
size of the data that was returned.
@result noErr, or various audio unit errors related to properties
*/
extern OSStatus
AudioUnitGetProperty( AudioUnit inUnit,
AudioUnitPropertyID inID,
AudioUnitScope inScope,
AudioUnitElement inElement,
void * outData,
UInt32 * ioDataSize)
API_AVAILABLE(macos(10.0), ios(2.0), watchos(2.0), tvos(9.0));
/*!
@function AudioUnitSetProperty
@abstract sets the value of a specified property
@discussion The API can is used to set the value of the property. Property values for
audio units are always passed by reference
@param inUnit
the audio unit
@param inID
the property identifier
@param inScope
the scope of the property
@param inElement
the element of the scope
@param inData
if not null, then is the new value for the property that will be set. If null,
then inDataSize should be zero, and the call is then used to remove a
previously set value for a property. This removal is only valid for
some properties, as most properties will always have a default value if not
set.
@param inDataSize
the size of the data being provided in inData
@result noErr, or various audio unit errors related to properties
*/
extern OSStatus
AudioUnitSetProperty( AudioUnit inUnit,
AudioUnitPropertyID inID,
AudioUnitScope inScope,
AudioUnitElement inElement,
const void * __nullable inData,
UInt32 inDataSize)
API_AVAILABLE(macos(10.0), ios(2.0), watchos(2.0), tvos(9.0));
/*!
@function AudioUnitAddPropertyListener
@abstract registration call to receive notifications for when a property changes
@discussion When an audio unit property value changes, a notification callback can be
called by the audio unit to inform interested parties that this event has
occurred. The notification is defined by the tuple of inProc and
inProcUserData as paired to the specified property ID, so the previously
defined AudioUnitRemovePropertyListener is deprecated because it didn't allow
for the provision of the inProcUserData to remove a given listener (so,
you should use AudioUnitRemovePropertyListenerWithUserData).
@param inUnit
the audio unit
@param inID
the property identifier
@param inProc
the procedure to call when the property changes (on any scope or element)
@param inProcUserData
the user data to provide with the callback
@result noErr, or various audio unit errors related to properties
*/
extern OSStatus
AudioUnitAddPropertyListener( AudioUnit inUnit,
AudioUnitPropertyID inID,
AudioUnitPropertyListenerProc inProc,
void * __nullable inProcUserData)
API_AVAILABLE(macos(10.0), ios(2.0), watchos(2.0), tvos(9.0));
/*!
@function AudioUnitRemovePropertyListenerWithUserData
@abstract remove a previously registered property listener
@discussion Removes a previously registered property listener as specified by the inProc
and inProcUser data as paired to the property identifier
@param inUnit
the audio unit
@param inID
the property identifier
@param inProc
the procedure previously registered
@param inProcUserData
the user data paired with the provided inProc
@result noErr, or various audio unit errors related to properties
*/
extern OSStatus
AudioUnitRemovePropertyListenerWithUserData(
AudioUnit inUnit,
AudioUnitPropertyID inID,
AudioUnitPropertyListenerProc inProc,
void * __nullable inProcUserData)
API_AVAILABLE(macos(10.5), ios(2.0), watchos(2.0), tvos(9.0));
/*!
@function AudioUnitAddRenderNotify
@abstract a notification callback to call when an audio unit is asked to render
@discussion allows an application to register a callback with an audio unit for whenever
the audio unit is asked to render. The callback is called both before the
audio unit performs its render operations (the render flag's pre-render bit
is set) and after the audio unit has completed its render operations (the
render flag's post-render bit is set). On post-render, the audio buffer list
(ioData) will contain valid audio data that was rendered by the audio unit.
The inProc and inProcUserData are treated as a tuple entity, so when wanting
to remove one, both the inProc and its inProcUserData must be specified
@param inUnit
the audio unit
@param inProc
an AURenderCallback proc
@param inProcUserData
the user data that will be provided with the proc when it is called
@result noErr, or an audio unit error code
*/
extern OSStatus
AudioUnitAddRenderNotify( AudioUnit inUnit,
AURenderCallback inProc,
void * __nullable inProcUserData)
API_AVAILABLE(macos(10.2), ios(2.0), watchos(2.0), tvos(9.0));
/*!
@function AudioUnitRemoveRenderNotify
@abstract remove a previously registered render notification proc
@param inUnit
the audio unit
@param inProc
an AURenderCallback proc
@param inProcUserData
the user data that was provided with the proc when it was previously
registered
@result noErr, or an audio unit error code
*/
extern OSStatus
AudioUnitRemoveRenderNotify( AudioUnit inUnit,
AURenderCallback inProc,
void * __nullable inProcUserData)
API_AVAILABLE(macos(10.2), ios(2.0), watchos(2.0), tvos(9.0));
/*!
@function AudioUnitGetParameter
@abstract Get the value of a parameter
@discussion Get the value of a parameter as specified by its ID, scope and element.
@param inUnit
the audio unit
@param inID
the parameter ID
@param inScope
the scope for the parameter
@param inElement
the element on the scope for the parameter
@param outValue
Must be non-null, and upon success will contain the current value for the
specified parameter
@result noErr, or an audio unit error code (such as InvalidParameter)
*/
extern OSStatus
AudioUnitGetParameter( AudioUnit inUnit,
AudioUnitParameterID inID,
AudioUnitScope inScope,
AudioUnitElement inElement,
AudioUnitParameterValue * outValue)
API_AVAILABLE(macos(10.0), ios(2.0), watchos(2.0), tvos(9.0));
/*!
@function AudioUnitSetParameter
@abstract Set the value of a parameter
@discussion Set the value of a parameter as specified by its ID, scope and element.
Parameter IDs are consistent across all of the elements in a scope - so for a
mixer, the "input volume" parameter can be applied on any input, and the
particular input is specified by the elementID.
@param inUnit
the audio unit
@param inID
the parameter ID
@param inScope
the scope for the parameter
@param inElement
the element on the scope for the parameter
@param inValue
the new value for the parameter.
@param inBufferOffsetInFrames
generally should be set to zero - see AudioUnitScheduleParameters
@result noErr, or an audio unit error code (such as InvalidParameter)
*/
extern OSStatus
AudioUnitSetParameter( AudioUnit inUnit,
AudioUnitParameterID inID,
AudioUnitScope inScope,
AudioUnitElement inElement,
AudioUnitParameterValue inValue,
UInt32 inBufferOffsetInFrames)
API_AVAILABLE(macos(10.0), ios(2.0), watchos(2.0), tvos(9.0));
/*!
@function AudioUnitScheduleParameters
@abstract Schedule changes to the value of a parameter
@discussion This API is used to schedule intra-buffer changes to the value of a parameter
(immediate) or to ramp a parameter from a start value to an end value for a
specified number of samples (ramp)
The API allows for the scheduling of multiple parameter events with the one
call. All of the parameter events must apply to the current (and only apply to
the current) audio unit render call, so the events are scheduled as a part of
the pre-render notification callback.
When scheduling an immediate parameter event, the new value at the specified
sample buffer offset is provided
When scheduling a ramped parameter, the ramp is scheduled each audio unit
render for the duration of the ramp. Each schedule of the the new audio unit
render specifies the progress of the ramp.
Parameters that can have events scheduled to them will indicate this through
their parameter info struct
@param inUnit
the audio unit
@param inParameterEvent
a pointer to an array of parameter event structs
@param inNumParamEvents
the number of parameter event structs pointed to by inParameterEvent
@result noErr, or an audio unit error code (such as InvalidParameter)
*/
extern OSStatus
AudioUnitScheduleParameters( AudioUnit inUnit,
const AudioUnitParameterEvent * inParameterEvent,
UInt32 inNumParamEvents)
API_AVAILABLE(macos(10.2), ios(2.0), watchos(2.0), tvos(9.0));
/*!
@function AudioUnitRender
@abstract the render operation where ioData will contain the results of the audio unit's
render operations
@discussion an audio unit will render the amount of audio data described by
inNumberOfFrames and the results of that render will be contained within
ioData. The caller should provide audio time stamps where at least the sample
time is valid and it is incrementing sequentially from its previous call
(so, the next time stamp will be the current time stamp + inNumberFrames)
If the sample time is not incrementing sequentially, the audio unit will infer
that there is some discontinuity with the timeline it is rendering for
The caller must provide a valid ioData AudioBufferList that matches the
expected topology for the current audio format for the given bus. The buffer
list can be of two variants:
(1) If the mData pointers are non-null then the audio unit will render its
output into those buffers. These buffers should be aligned to 16 byte
boundaries (which is normally what malloc will return).
(2) If the mData pointers are null, then the audio unit can provide pointers
to its own buffers. In this case the audio unit is required to keep those
buffers valid for the duration of the calling thread's I/O cycle
@param inUnit
the audio unit
@param ioActionFlags
any appropriate action flags for the render operation
@param inTimeStamp
the time stamp that applies to this particular render operation. when
rendering for multiple output buses the time stamp will generally be the same
for each output bus, so the audio unit is able to determine without doubt that
this the same render operation
@param inOutputBusNumber
the output bus to render for
@param inNumberFrames
the number of sample frames to render
@param ioData
the audio buffer list that the audio unit is to render into.
@result noErr, or an audio unit render error
*/
extern OSStatus
AudioUnitRender( AudioUnit inUnit,
AudioUnitRenderActionFlags * __nullable ioActionFlags,
const AudioTimeStamp * inTimeStamp,
UInt32 inOutputBusNumber,
UInt32 inNumberFrames,
AudioBufferList * ioData)
API_AVAILABLE(macos(10.2), ios(2.0), watchos(2.0), tvos(9.0));
extern OSStatus
AudioUnitProcess ( AudioUnit inUnit,
AudioUnitRenderActionFlags * __nullable ioActionFlags,
const AudioTimeStamp * inTimeStamp,
UInt32 inNumberFrames,
AudioBufferList * ioData)
API_AVAILABLE(macos(10.7), ios(6.0), watchos(2.0), tvos(9.0));
extern OSStatus
AudioUnitProcessMultiple( AudioUnit inUnit,
AudioUnitRenderActionFlags * __nullable ioActionFlags,
const AudioTimeStamp * inTimeStamp,
UInt32 inNumberFrames,
UInt32 inNumberInputBufferLists,
const AudioBufferList * __nonnull * __nonnull inInputBufferLists,
UInt32 inNumberOutputBufferLists,
AudioBufferList * __nonnull * __nonnull ioOutputBufferLists)
API_AVAILABLE(macos(10.7), ios(6.0), watchos(2.0), tvos(9.0));
/*!
@function AudioUnitReset
@abstract reset an audio unit's render state
@discussion This call will clear any render state of an audio unit. For instance, with a
delay or reverb type of audio unit reset will clear any of the delay lines
maintained within the audio unit. Typically, this call is made when an
audio unit was previously rendering, and was taken out of the render chain
(say, the track it is in was muted) and is being added back in (unmuted).
The host should reset the audio unit before adding it back so that it doesn't
produce audio from its delay lines that is no longer valid.
The call should only clear memory, it should NOT allocate or free memory
resources (this is done in the Initialize calls).
@param inUnit
the audio unit
@param inScope
the scope - typically this is set to GlobalScope
@param inElement
the element - typically this is set to 0
@result noErr, or an audio unit error
*/
extern OSStatus
AudioUnitReset( AudioUnit inUnit,
AudioUnitScope inScope,
AudioUnitElement inElement)
API_AVAILABLE(macos(10.0), ios(2.0), watchos(2.0), tvos(9.0));
#if AU_SUPPORT_INTERAPP_AUDIO
/*!
@function AudioOutputUnitPublish
@abstract Register an audio output unit as available to be used as an audio unit by
other applications.
@param inOutputUnit
The audio output unit to be published.
@param inDesc
The AudioComponentDescription under which to register the application.
@param inName
The application or component name.
@result An OSStatus result code.
@discussion
This allows a publishing application to register its audio (input/)output unit as being able
to be redirected and repurposed as an audio unit effect, generator, music device or music
effect by another host application.
*/
extern OSStatus
AudioOutputUnitPublish( const AudioComponentDescription * inDesc,
CFStringRef inName,
UInt32 inVersion,
AudioUnit inOutputUnit)
API_UNAVAILABLE(macos) INTERAPP_AUDIO_DEPRECATED;
#if defined(__OBJC__) && TARGET_OS_IPHONE
@class UIImage;
extern UIImage * __nullable
AudioOutputUnitGetHostIcon(AudioUnit au, float desiredPointSize)
API_UNAVAILABLE(macos) INTERAPP_AUDIO_DEPRECATED;
#if TARGET_OS_MACCATALYST
CF_INLINE UIImage * __nullable AudioComponentGetIcon(AudioComponent comp, float desiredPointSize)
API_DEPRECATED_WITH_REPLACEMENT("AudioComponentCopyIcon", ios(7.0, 14.0), watchos(2.0, 7.0), tvos(9.0, 14.0), macCatalyst(14.0, 14.0)) { return nil; }
#else
extern UIImage * __nullable
AudioComponentGetIcon(AudioComponent comp, float desiredPointSize)
API_UNAVAILABLE(macos)
API_DEPRECATED_WITH_REPLACEMENT("AudioComponentCopyIcon", ios(7.0, 14.0), watchos(2.0, 7.0), tvos(9.0, 14.0), macCatalyst(14.0, 14.0));
#endif
#endif // __OBJC__ && TARGET_OS_IPHONE
/*!
@function AudioComponentGetLastActiveTime
@abstract Fetches the time at which the application publishing the component was last active.
@discussion
Inter-app audio hosts can use this to sort the list of available nodes by how recently
the user interacted with them.
@param comp
The AudioComponent being queried.
@result The CFAbsoluteTime at which the node was last active (0 if never).
*/
extern CFAbsoluteTime
AudioComponentGetLastActiveTime(AudioComponent comp)
API_UNAVAILABLE(macos) INTERAPP_AUDIO_DEPRECATED;
#endif // AU_SUPPORT_INTERAPP_AUDIO
#if defined(__OBJC__)
#if TARGET_OS_IPHONE
/*!
@function AudioComponentCopyIcon
@abstract Fetches an icon representing the component.
@param comp
The component whose icon data is to be retrieved.
@result
A retained UIImage object.
@discussion
For a component originating in an app extension, the returned icon will be that of the
application containing the extension.
For components loaded from bundles, the icon will be that of the bundle.
The caller is responsible to release this value when done with it.
*/
extern UIImage * __nullable
AudioComponentCopyIcon(AudioComponent comp) __attribute((ns_returns_retained))
API_AVAILABLE(ios(14.0), watchos(7.0), tvos(14.0)) API_UNAVAILABLE(macos);
#else
@class NSImage;
/*!
@function AudioComponentCopyIcon
@abstract Fetches an icon representing the component.
@param comp
The component whose icon data is to be retrieved.
@result
A retained NSImage object.
@discussion
For a component originating in an app extension, the returned icon will be that of the
application containing the extension.
For components loaded from bundles, the icon will be that of the bundle.
The caller is responsible to release this value when done with it.
*/
extern NSImage * __nullable
AudioComponentCopyIcon(AudioComponent comp) __attribute((ns_returns_retained))
API_AVAILABLE(macos(11.0)) API_UNAVAILABLE(ios, watchos, tvos);
#endif
#endif
#if defined(__LP64__) || TARGET_OS_IPHONE
/*!
@function AudioUnitExtensionSetComponentList
@abstract Allows the implementor of an audio unit extension to dynamically modify the
list of component registrations for the extension.
@param extensionIdentifier
The bundle ID of the audio unit extension.
@param audioComponentInfo
An array of dictionaries, one for each component, in the same format as
described in AudioComponent.h for the Info.plist key "AudioComponents".
@result An OSStatus result code.
@discussion
Note that the bundle ID of the process calling this API must prefix (or match)
the provided extension identifier.
*/
extern OSStatus
AudioUnitExtensionSetComponentList(CFStringRef extensionIdentifier, __nullable CFArrayRef audioComponentInfo)
API_AVAILABLE(macos(10.13), ios(11.0))
__TVOS_PROHIBITED __WATCHOS_PROHIBITED;
/*!
@function AudioUnitExtensionCopyComponentList
@abstract Returns the component registrations for a given audio unit extension.
@param extensionIdentifier
The bundle ID of the audio unit extension.
@result An array of dictionaries, one for each component, in the same format as
described in AudioComponent.h for the Info.plist key "AudioComponents".
The caller should release this value when done with it.
*/
extern __nullable CFArrayRef
AudioUnitExtensionCopyComponentList(CFStringRef extensionIdentifier)
API_AVAILABLE(macos(10.13), ios(11.0))
__TVOS_PROHIBITED __WATCHOS_PROHIBITED;
#endif
/*!
enum AudioUnitRange
@discussion the range of selectors that are used to dispatch through to the various audio
unit API
@constant kAudioUnitRange
@constant kAudioUnitInitializeSelect
@constant kAudioUnitUninitializeSelect
@constant kAudioUnitGetPropertyInfoSelect
@constant kAudioUnitGetPropertySelect
@constant kAudioUnitSetPropertySelect
@constant kAudioUnitAddPropertyListenerSelect
@constant kAudioUnitRemovePropertyListenerSelect
@constant kAudioUnitRemovePropertyListenerWithUserDataSelect
@constant kAudioUnitAddRenderNotifySelect
@constant kAudioUnitRemoveRenderNotifySelect
@constant kAudioUnitGetParameterSelect
@constant kAudioUnitSetParameterSelect
@constant kAudioUnitScheduleParametersSelect
@constant kAudioUnitRenderSelect
@constant kAudioUnitResetSelect
@constant kAudioUnitComplexRenderSelect
@constant kAudioUnitProcessSelect
@constant kAudioUnitProcessMultipleSelect
*/
enum {
kAudioUnitRange = 0x0000, // range of selectors for audio units
kAudioUnitInitializeSelect = 0x0001,
kAudioUnitUninitializeSelect = 0x0002,
kAudioUnitGetPropertyInfoSelect = 0x0003,
kAudioUnitGetPropertySelect = 0x0004,
kAudioUnitSetPropertySelect = 0x0005,
kAudioUnitAddPropertyListenerSelect = 0x000A,
kAudioUnitRemovePropertyListenerSelect = 0x000B,
kAudioUnitRemovePropertyListenerWithUserDataSelect = 0x0012,
kAudioUnitAddRenderNotifySelect = 0x000F,
kAudioUnitRemoveRenderNotifySelect = 0x0010,
kAudioUnitGetParameterSelect = 0x0006,
kAudioUnitSetParameterSelect = 0x0007,
kAudioUnitScheduleParametersSelect = 0x0011,
kAudioUnitRenderSelect = 0x000E,
kAudioUnitResetSelect = 0x0009,
kAudioUnitComplexRenderSelect = 0x0013,
kAudioUnitProcessSelect = 0x0014,
kAudioUnitProcessMultipleSelect = 0x0015
};
//================================================================================================
#pragma mark -
#pragma mark Dispatch function prototypes
typedef OSStatus
(*AudioUnitInitializeProc) (void *self);
typedef OSStatus
(*AudioUnitUninitializeProc) (void *self);
typedef OSStatus
(*AudioUnitGetPropertyInfoProc) (void *self, AudioUnitPropertyID prop, AudioUnitScope scope,
AudioUnitElement elem, UInt32 * __nullable outDataSize, Boolean * __nullable outWritable);
typedef OSStatus
(*AudioUnitGetPropertyProc) (void *self, AudioUnitPropertyID inID, AudioUnitScope inScope,
AudioUnitElement inElement, void *outData, UInt32 *ioDataSize);
typedef OSStatus
(*AudioUnitSetPropertyProc) (void *self, AudioUnitPropertyID inID, AudioUnitScope inScope,
AudioUnitElement inElement, const void *inData, UInt32 inDataSize);
typedef OSStatus
(*AudioUnitAddPropertyListenerProc) (void *self, AudioUnitPropertyID prop,
AudioUnitPropertyListenerProc proc, void *userData);
typedef OSStatus
(*AudioUnitRemovePropertyListenerProc) (void *self, AudioUnitPropertyID prop,
AudioUnitPropertyListenerProc proc);
typedef OSStatus
(*AudioUnitRemovePropertyListenerWithUserDataProc) (void *self, AudioUnitPropertyID prop,
AudioUnitPropertyListenerProc proc, void * __nullable userData);
typedef OSStatus
(*AudioUnitAddRenderNotifyProc) (void *self, AURenderCallback proc, void * __nullable userData);
typedef OSStatus
(*AudioUnitRemoveRenderNotifyProc) (void *self, AURenderCallback proc, void * __nullable userData);
typedef OSStatus
(*AudioUnitScheduleParametersProc) (void *self, const AudioUnitParameterEvent *events, UInt32 numEvents);
typedef OSStatus
(*AudioUnitResetProc) (void *self, AudioUnitScope inScope, AudioUnitElement inElement);
typedef OSStatus
(*AudioUnitComplexRenderProc) (void *self, AudioUnitRenderActionFlags * __nullable ioActionFlags, const AudioTimeStamp *inTimeStamp,
UInt32 inOutputBusNumber, UInt32 inNumberOfPackets, UInt32 *outNumberOfPackets,
AudioStreamPacketDescription *outPacketDescriptions, AudioBufferList *ioData,
void *outMetadata, UInt32 *outMetadataByteSize);
typedef OSStatus
(*AudioUnitProcessProc) (void *self, AudioUnitRenderActionFlags * __nullable ioActionFlags, const AudioTimeStamp *inTimeStamp,
UInt32 inNumberFrames, AudioBufferList *ioData);
typedef OSStatus
(*AudioUnitProcessMultipleProc) (void *self, AudioUnitRenderActionFlags * __nullable ioActionFlags, const AudioTimeStamp *inTimeStamp,
UInt32 inNumberFrames, UInt32 inNumberInputBufferLists, const AudioBufferList * __nonnull * __nonnull inInputBufferLists,
UInt32 inNumberOutputBufferLists, AudioBufferList * __nonnull * __nonnull ioOutputBufferLists);
/*!
@typedef AudioUnitGetParameterProc
@discussion This proc can be exported through the FastDispatch property or is used as the prototype for
an audio component dispatch for this selector.
The arguments are the same as are provided to the corresponding API call
@param inComponentStorage
For a component manager component, this is the component instance storage
pointer
*/
typedef OSStatus
(*AudioUnitGetParameterProc)( void * inComponentStorage,
AudioUnitParameterID inID,
AudioUnitScope inScope,
AudioUnitElement inElement,
AudioUnitParameterValue * outValue);
/*!
@typedef AudioUnitSetParameterProc
@discussion This proc can be exported through the FastDispatch property or is used as the prototype for
an audio component dispatch for this selector.
The arguments are the same as are provided to the corresponding API call
@param inComponentStorage
For a component manager component, this is the component instance storage
pointer
*/
typedef OSStatus
(*AudioUnitSetParameterProc)( void * inComponentStorage,
AudioUnitParameterID inID,
AudioUnitScope inScope,
AudioUnitElement inElement,
AudioUnitParameterValue inValue,
UInt32 inBufferOffsetInFrames);
/*!
@typedef AudioUnitRenderProc
@discussion This proc can be exported through the FastDispatch property or is used as the prototype for
an audio component dispatch for this selector.
The arguments are the same as are provided to the corresponding API call
@param inComponentStorage
For a component manager component, this is the component instance storage
pointer
*/
typedef OSStatus
(*AudioUnitRenderProc)( void * inComponentStorage,
AudioUnitRenderActionFlags * __nullable ioActionFlags,
const AudioTimeStamp * inTimeStamp,
UInt32 inOutputBusNumber,
UInt32 inNumberFrames,
AudioBufferList * ioData);
//================================================================================================
#pragma mark -
#pragma mark Deprecated
/*!
@enum deprecated - Audio unit errors
@discussion These are the various errors that can be returned by AudioUnit... API calls
@constant kAudioUnitErr_IllegalInstrument
Apple's DLS synth returns this error if information about a particular
instrument patch is requested, but is not valid.
@constant kAudioUnitErr_InstrumentTypeNotFound
Apple's DLS synth returns this error if information about a particular
instrument patch is requested, but is not valid.
*/
CF_ENUM(OSStatus) {
kAudioUnitErr_IllegalInstrument = -10873,
kAudioUnitErr_InstrumentTypeNotFound = -10872,
} __attribute__((deprecated));
#if !TARGET_RT_64_BIT && !TARGET_OS_IPHONE
// this call is deprecated and replaced by AudioUnitRemovePropertyListenerWithUserData
// this allows apps to use the same function pointer more than once
// you provide the same function ptr and user data as provided when you add a property listener
extern OSStatus
AudioUnitRemovePropertyListener( AudioUnit inUnit,
AudioUnitPropertyID inID,
AudioUnitPropertyListenerProc inProc)
API_DEPRECATED("no longer supported", macos(10.0, 10.5)) API_UNAVAILABLE(ios, watchos, tvos);
#endif
#ifdef __cplusplus
}
#endif
CF_ASSUME_NONNULL_END
#endif /* AudioUnit_AUComponent_h */
#else
#include <AudioToolboxCore/AUComponent.h>
#endif
|
0 | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/AudioToolbox.framework | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/AudioToolbox.framework/Headers/AudioUnit.h | #if (defined(__USE_PUBLIC_HEADERS__) && __USE_PUBLIC_HEADERS__) || (defined(USE_AUDIOTOOLBOX_PUBLIC_HEADERS) && USE_AUDIOTOOLBOX_PUBLIC_HEADERS) || !__has_include(<AudioToolboxCore/AudioUnit.h>)
/*!
@file AudioUnit.h
@framework AudioToolbox.framework
@copyright (c) 2002-2015 Apple, Inc. All rights reserved.
@brief Former umbrella header for AudioUnit framework; now part of AudioToolbox.
*/
#ifndef _AudioToolbox_AudioUnit_h
#define _AudioToolbox_AudioUnit_h
#include <TargetConditionals.h>
#ifndef AUDIO_UNIT_VERSION
#define AUDIO_UNIT_VERSION 1070
#endif
#include <AudioToolbox/AudioComponent.h>
#include <AudioToolbox/AUComponent.h>
#include <AudioToolbox/AudioOutputUnit.h>
#include <AudioToolbox/AudioUnitProperties.h>
#include <AudioToolbox/AudioUnitParameters.h>
#include <AudioToolbox/MusicDevice.h>
#ifdef __OBJC2__
#import <AudioToolbox/AUAudioUnit.h>
#import <AudioToolbox/AUAudioUnitImplementation.h>
#import <AudioToolbox/AUParameters.h>
#endif
#if !TARGET_OS_IPHONE
#include <AudioToolbox/AudioCodec.h>
#endif
#endif /* _AudioToolbox_AudioUnit_h */
#else
#include <AudioToolboxCore/AudioUnit.h>
#endif
|
0 | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/AudioToolbox.framework | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/AudioToolbox.framework/Headers/AudioToolbox.h | /*!
@file AudioToolbox.h
@framework AudioToolbox.framework
@copyright (c) 2002-2018 by Apple, Inc., all rights reserved.
@abstract Umbrella header for AudioToolbox framework.
*/
#ifndef AudioToolbox_AudioToolbox_h
#define AudioToolbox_AudioToolbox_h
#define AUDIO_TOOLBOX_VERSION 1060
#include <Availability.h>
#include <TargetConditionals.h>
#include <AudioToolbox/AudioCodec.h>
#include <AudioToolbox/AUComponent.h>
#include <AudioToolbox/AUGraph.h>
#include <AudioToolbox/AudioComponent.h>
#include <AudioToolbox/AudioConverter.h>
#include <AudioToolbox/AudioFile.h>
#include <AudioToolbox/AudioFileStream.h>
#include <AudioToolbox/AudioFormat.h>
#include <AudioToolbox/AudioOutputUnit.h>
#include <AudioToolbox/AudioQueue.h>
#include <AudioToolbox/AudioServices.h>
#include <AudioToolbox/AudioUnitParameters.h>
#include <AudioToolbox/AudioUnitProperties.h>
#include <AudioToolbox/AudioWorkInterval.h>
#include <AudioToolbox/CAFFile.h>
#include <AudioToolbox/CAShow.h>
#include <AudioToolbox/ExtendedAudioFile.h>
#include <AudioToolbox/MusicDevice.h>
#include <AudioToolbox/MusicPlayer.h>
#if !TARGET_OS_IPHONE
// macOS only
#include <AudioToolbox/AudioFileComponent.h>
#include <AudioToolbox/AudioUnitUtilities.h>
#include <AudioToolbox/AUMIDIController.h>
#include <AudioToolbox/CoreAudioClock.h>
#endif
#ifdef __OBJC2__
// iOS (all architectures), macOS 64-bit only
#import <AudioToolbox/AUAudioUnit.h>
#import <AudioToolbox/AUAudioUnitImplementation.h>
#import <AudioToolbox/AUParameters.h>
#endif
#if TARGET_OS_OSX || TARGET_OS_IOS
#include <AudioToolbox/AudioSession.h>
#endif
/*! @mainpage
@section section_intro Introduction
The AudioUnit framework contains a set of related API's dealing with:
- Audio components, providing various types of plug-in functionality.
- Audio Units, audio processing plug-ins.
- Audio codecs, plug-ins which decode and encode compressed audio.
@section section_component Audio Components
See AudioComponent.h for API's to find and use audio components, as well as information
on how audio components are packaged and built.
In addition, `<AVFoundation/AVAudioUnitComponent.h>` provides a higher-level interface for
finding audio unit components.
See @ref AUExtensionPackaging and AUAudioUnitImplementation.h for information on creating
version 3 audio units.
@section section_audiounit Audio Units
*/
#include <stdio.h>
CF_ASSUME_NONNULL_BEGIN
#if defined(__cplusplus)
extern "C"
{
#endif
#if !TARGET_OS_IPHONE
// this will return the name of a sound bank from a sound bank file
// the name should be released by the caller
struct FSRef;
OS_EXPORT OSStatus GetNameFromSoundBank (const struct FSRef *inSoundBankRef, CFStringRef __nullable * __nonnull outName)
API_DEPRECATED("no longer supported", macos(10.2, 10.5)) API_UNAVAILABLE(ios, watchos, tvos);
#endif
/*!
@function CopyNameFromSoundBank
@discussion This will return the name of a sound bank from a DLS or SF2 bank.
The name should be released by the caller.
@param inURL
The URL for the sound bank.
@param outName
A pointer to a CFStringRef to be created and returned by the function.
@result returns noErr if successful.
*/
OS_EXPORT OSStatus
CopyNameFromSoundBank (CFURLRef inURL, CFStringRef __nullable * __nonnull outName)
API_AVAILABLE(macos(10.5), ios(7.0), watchos(2.0), tvos(9.0));
/*!
@function CopyInstrumentInfoFromSoundBank
@discussion This will return a CFArray of CFDictionaries, one per instrument found in the DLS or SF2 bank.
Each dictionary will contain four items accessed via CFStringRef versions of the keys kInstrumentInfoKey_MSB,
kInstrumentInfoKey_LSB, kInstrumentInfoKey_Program, and kInstrumentInfoKey_Name.
MSB: An NSNumberRef for the most-significant byte of the bank number. GM melodic banks will return 120 (0x78).
GM percussion banks will return 121 (0x79). Custom banks will return their literal value.
LSB: An NSNumberRef for the least-significant byte of the bank number. All GM banks will return
the bank variation number (0-127).
Program Number: An NSNumberRef for the program number (0-127) of an instrument within a particular bank.
Name: A CFStringRef containing the name of the instrument.
Using these MSB, LSB, and Program values will guarantee that the correct instrument is loaded by the DLS synth
or Sampler Audio Unit.
The CFArray should be released by the caller.
@param inURL
The URL for the sound bank.
@param outInstrumentInfo
A pointer to a CFArrayRef to be created and returned by the function.
@result returns noErr if successful.
*/
OS_EXPORT OSStatus
CopyInstrumentInfoFromSoundBank (CFURLRef inURL, CFArrayRef __nullable * __nonnull outInstrumentInfo)
API_AVAILABLE(macos(10.8), ios(7.0), watchos(2.0), tvos(9.0));
#define kInstrumentInfoKey_Name "name"
#define kInstrumentInfoKey_MSB "MSB"
#define kInstrumentInfoKey_LSB "LSB"
#define kInstrumentInfoKey_Program "program"
#if defined(__cplusplus)
}
#endif
CF_ASSUME_NONNULL_END
#endif // AudioToolbox_AudioToolbox_h
|
0 | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/AudioToolbox.framework | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/AudioToolbox.framework/Headers/AudioServices.h | /*!
@file AudioServices.h
@framework AudioToolbox.framework
@copyright (c) 2006-2015 by Apple, Inc., all rights reserved.
@abstract API's for general high level audio services.
@discussion
AudioServices provides a means to play audio for things such as UI sound effects.
*/
#ifndef AudioToolbox_AudioServices_h
#define AudioToolbox_AudioServices_h
//==================================================================================================
#pragma mark Includes
#include <TargetConditionals.h>
#include <Availability.h>
#if TARGET_OS_OSX
#include <CoreAudio/AudioHardware.h>
#include <AudioToolbox/AudioHardwareService.h>
#elif TARGET_OS_IOS && !TARGET_OS_MACCATALYST
#include <AudioToolbox/AudioSession.h>
#endif
#include <CoreFoundation/CoreFoundation.h>
//==================================================================================================
CF_ASSUME_NONNULL_BEGIN
#if defined(__cplusplus)
extern "C"
{
#endif
//==================================================================================================
#pragma mark AudioServices Error Constants
/*!
@enum AudioServices error codes
@abstract Error codes returned from the AudioServices portion of the API.
@constant kAudioServicesNoError
No error has occurred
@constant kAudioServicesUnsupportedPropertyError
The property is not supported.
@constant kAudioServicesBadPropertySizeError
The size of the property data was not correct.
@constant kAudioServicesBadSpecifierSizeError
The size of the specifier data was not correct.
@constant kAudioServicesSystemSoundUnspecifiedError
A SystemSound unspecified error has occurred.
@constant kAudioServicesSystemSoundClientTimedOutError
The SystemSound client message timed out
@constant kAudioServicesSystemSoundExceededMaximumDurationError
The SystemSound's duration exceeded the allowable threshold
*/
CF_ENUM(OSStatus)
{
kAudioServicesNoError = 0,
kAudioServicesUnsupportedPropertyError = 'pty?',
kAudioServicesBadPropertySizeError = '!siz',
kAudioServicesBadSpecifierSizeError = '!spc',
kAudioServicesSystemSoundUnspecifiedError = -1500,
kAudioServicesSystemSoundClientTimedOutError = -1501,
kAudioServicesSystemSoundExceededMaximumDurationError = -1502
};
//==================================================================================================
#pragma mark AudioServices Types
/*!
@typedef SystemSoundID
@abstract SystemSoundIDs are created by the System Sound client application
for playback of a provided AudioFile.
*/
typedef UInt32 SystemSoundID;
/*!
@typedef AudioServicesPropertyID
@abstract Type used for specifying an AudioServices property.
*/
typedef UInt32 AudioServicesPropertyID;
/*!
@typedef AudioServicesSystemSoundCompletionProc
@abstract A function to be executed when a SystemSoundID finishes playing.
@discussion AudioServicesSystemSoundCompletionProc may be provided by client application to be
called when a SystemSoundID has completed playback.
@param ssID
The SystemSoundID that completed playback
@param clientData
Client application user data
*/
typedef void
(*AudioServicesSystemSoundCompletionProc)( SystemSoundID ssID,
void* __nullable clientData);
//==================================================================================================
#pragma mark AudioServices Constants
#if !TARGET_OS_IPHONE
/*!
@enum AudioServices constants
@abstract Constants for use with System Sound portion of the AudioServices APIs.
@constant kSystemSoundID_UserPreferredAlert
Use this constant with the play sound APIs to
playback the alert sound selected by the User in System Preferences.
@constant kSystemSoundID_FlashScreen
Use this constant with the play sound APIs to flash the screen
- Desktop systems only
*/
CF_ENUM(SystemSoundID)
{
kSystemSoundID_UserPreferredAlert = 0x00001000,
kSystemSoundID_FlashScreen = 0x00000FFE,
// this has been renamed to be consistent
kUserPreferredAlert = kSystemSoundID_UserPreferredAlert
};
#endif
/*!
@enum AudioServices constants
@constant kSystemSoundID_Vibrate
Use this constant with the play sound APIs to vibrate the device
- iOS only
- on a device with no vibration capability (like iPod Touch) this will
do nothing
*/
CF_ENUM(SystemSoundID)
{
kSystemSoundID_Vibrate = 0x00000FFF
};
//==================================================================================================
#pragma mark AudioServices Properties
/*!
@enum AudioServices property codes
@abstract These are the property codes used with the AudioServices API.
@constant kAudioServicesPropertyIsUISound
a UInt32 where 1 means that the SystemSoundID passed in the
inSpecifier parameter will respect the 'Play user interface sounds effects'
check box in System Preferences and be silent when the user turns off UI
sounds. This property is set to 1 by default. Set to 0 if it is desired for
an SystemSoundID to always be heard when passed to AudioServicesPlaySystemSound(),
regardless of user's setting in the Sound Preferences.
@constant kAudioServicesPropertyCompletePlaybackIfAppDies
a UInt32 where 1 means that the SystemSoundID passed in the
inSpecifier parameter will finish playing even if the client application goes away.
*/
CF_ENUM(AudioServicesPropertyID)
{
kAudioServicesPropertyIsUISound = 'isui',
kAudioServicesPropertyCompletePlaybackIfAppDies = 'ifdi'
};
//==================================================================================================
#pragma mark AudioServices Functions
/*!
@functiongroup AudioServices
*/
/*!
@function AudioServicesCreateSystemSoundID
@abstract Allows the application to designate an audio file for playback by the System Sound server.
@discussion Returned SystemSoundIDs are passed to AudioServicesPlayAlertSoundWithCompletion()
and AudioServicesPlaySystemSoundWithCompletion() to be played.
The maximum supported duration for a system sound is 30 secs.
@param inFileURL
A CFURLRef for an AudioFile.
@param outSystemSoundID
Returns a SystemSoundID.
*/
extern OSStatus
AudioServicesCreateSystemSoundID( CFURLRef inFileURL,
SystemSoundID* outSystemSoundID)
API_AVAILABLE(macos(10.5), ios(2.0), watchos(2.0), tvos(9.0))
;
/*!
@function AudioServicesDisposeSystemSoundID
@abstract Allows the System Sound server to dispose any resources needed for the provided
SystemSoundID.
@discussion Allows the application to tell the System Sound server that the resources for the
associated audio file are no longer required.
@param inSystemSoundID
A SystemSoundID that the application no longer needs to use.
*/
extern OSStatus
AudioServicesDisposeSystemSoundID(SystemSoundID inSystemSoundID)
API_AVAILABLE(macos(10.5), ios(2.0), watchos(2.0), tvos(9.0))
;
/*!
@function AudioServicesPlayAlertSoundWithCompletion
@abstract Play an alert sound
@discussion Play the sound designated by the provided SystemSoundID with alert sound behavior.
@param inSystemSoundID
The SystemSoundID to be played. On the desktop the kSystemSoundID_UserPreferredAlert
constant can be passed in to play back the alert sound selected by the user
in System Preferences. On iOS there is no preferred user alert sound.
@param inCompletionBlock
The completion block gets executed for every attempt to play a system sound irrespective
of success or failure. The callbacks are issued on a serial queue and the client is
responsible for handling thread safety.
*/
extern void
AudioServicesPlayAlertSoundWithCompletion( SystemSoundID inSystemSoundID,
void (^__nullable inCompletionBlock)(void))
API_AVAILABLE(macos(10.11), ios(9.0), watchos(2.0), tvos(9.0))
;
/*!
@function AudioServicesPlaySystemSoundWithCompletion
@abstract Play a system sound
@discussion Play the sound designated by the provided SystemSoundID.
@param inSystemSoundID
The SystemSoundID to be played.
@param inCompletionBlock
The completion block gets executed for every attempt to play a system sound irrespective
of success or failure. The callbacks are issued on a serial queue and the client is
responsible for handling thread safety.
*/
extern void
AudioServicesPlaySystemSoundWithCompletion( SystemSoundID inSystemSoundID,
void (^__nullable inCompletionBlock)(void))
API_AVAILABLE(macos(10.11), ios(9.0), watchos(2.0), tvos(9.0))
;
/*!
@function AudioServicesGetPropertyInfo
@abstract Get information about the size of an AudioServices property and whether it can
be set.
@param inPropertyID
a AudioServicesPropertyID constant.
@param inSpecifierSize
The size of the specifier data.
@param inSpecifier
A specifier is a buffer of data used as an input argument to some of the
properties.
@param outPropertyDataSize
The size in bytes of the current value of the property. In order to get the
property value, you will need a buffer of this size.
@param outWritable
Will be set to 1 if writable, or 0 if read only.
@result returns kAudioServicesNoError if successful.
*/
extern OSStatus
AudioServicesGetPropertyInfo( AudioServicesPropertyID inPropertyID,
UInt32 inSpecifierSize,
const void * __nullable inSpecifier,
UInt32 * __nullable outPropertyDataSize,
Boolean * __nullable outWritable)
API_AVAILABLE(macos(10.5), ios(2.0), watchos(2.0), tvos(9.0))
;
/*!
@function AudioServicesGetProperty
@abstract Retrieve the indicated property data
@param inPropertyID
a AudioServicesPropertyID constant.
@param inSpecifierSize
The size of the specifier data.
@param inSpecifier
A specifier is a buffer of data used as an input argument to some of the
properties.
@param ioPropertyDataSize
On input, the size of the outPropertyData buffer. On output the number of
bytes written to the buffer.
@param outPropertyData
The buffer in which to write the property data. May be NULL if caller only
wants ioPropertyDataSize to be filled with the amount that would have been
written.
@result returns kAudioServicesNoError if successful.
*/
extern OSStatus
AudioServicesGetProperty( AudioServicesPropertyID inPropertyID,
UInt32 inSpecifierSize,
const void * __nullable inSpecifier,
UInt32 * ioPropertyDataSize,
void * __nullable outPropertyData)
API_AVAILABLE(macos(10.5), ios(2.0), watchos(2.0), tvos(9.0))
;
/*!
@function AudioServicesSetProperty
@abstract Set the indicated property data
@param inPropertyID
a AudioServicesPropertyID constant.
@param inSpecifierSize
The size of the specifier data.
@param inSpecifier
A specifier is a buffer of data used as an input argument to some of the
properties.
@param inPropertyDataSize
The size of the inPropertyData buffer.
@param inPropertyData
The buffer containing the property data.
@result returns kAudioServicesNoError if successful.
*/
extern OSStatus
AudioServicesSetProperty( AudioServicesPropertyID inPropertyID,
UInt32 inSpecifierSize,
const void * __nullable inSpecifier,
UInt32 inPropertyDataSize,
const void * inPropertyData)
API_AVAILABLE(macos(10.5), ios(2.0), watchos(2.0), tvos(9.0))
;
/*!
This function will be deprecated in a future release. Use AudioServicesPlayAlertSoundWithCompletion instead.
@function AudioServicesPlayAlertSound
@abstract Play an Alert Sound
@discussion Play the provided SystemSoundID with AlertSound behavior.
@param inSystemSoundID
A SystemSoundID for the System Sound server to play. On the desktop you
can pass the kSystemSoundID_UserPreferredAlert constant to playback the alert sound
selected by the user in System Preferences. On iOS there is no preferred user alert sound.
*/
extern void
AudioServicesPlayAlertSound(SystemSoundID inSystemSoundID)
API_AVAILABLE(macos(10.5), ios(2.0), watchos(2.0), tvos(9.0))
;
/*!
This function will be deprecated in a future release. Use AudioServicesPlaySystemSoundWithCompletion instead.
@function AudioServicesPlaySystemSound
@abstract Play the sound designated by the provided SystemSoundID.
@discussion A SystemSoundID indicating the desired System Sound to be played.
@param inSystemSoundID
A SystemSoundID for the System Sound server to play.
*/
extern void
AudioServicesPlaySystemSound(SystemSoundID inSystemSoundID)
API_AVAILABLE(macos(10.5), ios(2.0), watchos(2.0), tvos(9.0))
;
/*!
This function will be deprecated in a future release. Use AudioServicesPlayAlertSoundWithCompletion
or AudioServicesPlaySystemSoundWithCompletion instead.
@function AudioServicesAddSystemSoundCompletion
@abstract Call the provided Completion Routine when provided SystemSoundID
finishes playing.
@discussion Once set, the System Sound server will send a message to the System Sound client
indicating which SystemSoundID has finished playing.
@param inSystemSoundID
The SystemSoundID to associate with the provided completion
routine.
@param inRunLoop
A CFRunLoopRef indicating the desired run loop the completion routine should
be run on. Pass NULL to use the main run loop.
@param inRunLoopMode
A CFStringRef indicating the run loop mode for the runloop where the
completion routine will be executed. Pass NULL to use kCFRunLoopDefaultMode.
@param inCompletionRoutine
An AudioServicesSystemSoundCompletionProc to be called when the provided
SystemSoundID has completed playing in the server.
@param inClientData
A void* to pass client data to the completion routine.
*/
extern OSStatus
AudioServicesAddSystemSoundCompletion( SystemSoundID inSystemSoundID,
CFRunLoopRef __nullable inRunLoop,
CFStringRef __nullable inRunLoopMode,
AudioServicesSystemSoundCompletionProc inCompletionRoutine,
void * __nullable inClientData)
API_AVAILABLE(macos(10.5), ios(2.0), watchos(2.0), tvos(9.0))
;
/*!
This function will be deprecated in a future release. Use AudioServicesPlayAlertSoundWithCompletion
or AudioServicesPlaySystemSoundWithCompletion instead.
@function AudioServicesRemoveSystemSoundCompletion
@abstract Disassociate any completion proc for the specified SystemSoundID
@discussion Tells the SystemSound client to remove any completion proc associated with the
provided SystemSoundID
@param inSystemSoundID
The SystemSoundID for which completion routines should be
removed.
*/
extern void
AudioServicesRemoveSystemSoundCompletion(SystemSoundID inSystemSoundID)
API_AVAILABLE(macos(10.5), ios(2.0), watchos(2.0), tvos(9.0))
;
CF_ASSUME_NONNULL_END
#ifdef __cplusplus
}
#endif
#endif /* AudioToolbox_AudioServices_h */
|
0 | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/AudioToolbox.framework | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/AudioToolbox.framework/Headers/ExtendedAudioFile.h | #if (defined(__USE_PUBLIC_HEADERS__) && __USE_PUBLIC_HEADERS__) || (defined(USE_AUDIOTOOLBOX_PUBLIC_HEADERS) && USE_AUDIOTOOLBOX_PUBLIC_HEADERS) || !__has_include(<AudioToolboxCore/ExtendedAudioFile.h>)
/*!
@file ExtendedAudioFile.h
@framework AudioToolbox.framework
@copyright (c) 2004-2015 by Apple, Inc., all rights reserved.
@abstract API's to support reading and writing files in encoded audio formats.
@discussion
The ExtendedAudioFile provides high-level audio file access, building
on top of the AudioFile and AudioConverter API sets. It provides a single
unified interface to reading and writing both encoded and unencoded files.
*/
#ifndef AudioToolbox_ExtendedAudioFile_h
#define AudioToolbox_ExtendedAudioFile_h
#include <AudioToolbox/AudioFile.h>
#ifdef __cplusplus
extern "C" {
#endif
CF_ASSUME_NONNULL_BEGIN
//==================================================================================================
// Types
/*!
@typedef ExtAudioFileRef
@abstract An extended audio file object.
*/
typedef struct OpaqueExtAudioFile * ExtAudioFileRef;
typedef SInt32 ExtAudioFilePacketTableInfoOverride;
CF_ENUM(ExtAudioFilePacketTableInfoOverride) {
kExtAudioFilePacketTableInfoOverride_UseFileValue = -1,
kExtAudioFilePacketTableInfoOverride_UseFileValueIfValid = -2
};
//==================================================================================================
// Properties
typedef UInt32 ExtAudioFilePropertyID;
/*!
enum ExtAudioFilePropertyID
@constant kExtAudioFileProperty_FileDataFormat
An AudioStreamBasicDescription. Represents the file's actual
data format. Read-only.
@constant kExtAudioFileProperty_FileChannelLayout
An AudioChannelLayout.
If writing: the channel layout is written to the file, if the format
supports the layout. If the format does not support the layout, the channel
layout is still interpreted as the destination layout when performing
conversion from the client channel layout, if any.
If reading: the specified layout overrides the one read from the file, if
any.
When setting this, it must be set before the client format or channel
layout.
@constant kExtAudioFileProperty_ClientDataFormat
An AudioStreamBasicDescription.
The format must be linear PCM (kAudioFormatLinearPCM).
You must set this in order to encode or decode a non-PCM file data format.
You may set this on PCM files to specify the data format used in your calls
to read/write.
@constant kExtAudioFileProperty_ClientChannelLayout
An AudioChannelLayout. Specifies the channel layout of the
AudioBufferList's passed to ExtAudioFileRead() and
ExtAudioFileWrite(). The layout may be different from the file's
channel layout, in which the ExtAudioFileRef's underlying AudioConverter
performs the remapping. This must be set after ClientDataFormat, and the
number of channels in the layout must match.
@constant kExtAudioFileProperty_CodecManufacturer
A UInt32 specifying the manufacturer of the codec to be used. This must be
specified before setting kExtAudioFileProperty_ClientDataFormat, which
triggers the creation of the codec. This can be used on iOS
to choose between a hardware or software encoder, by specifying
kAppleHardwareAudioCodecManufacturer or kAppleSoftwareAudioCodecManufacturer.
Available starting on macOS version 10.7 and iOS version 4.0.
@constant kExtAudioFileProperty_AudioConverter
AudioConverterRef. The underlying AudioConverterRef, if any. Read-only.
Note: If you alter any properties of the AudioConverterRef, for example,
an encoder's bit rate, you must set the kExtAudioFileProperty_ConverterConfig
property on the ExtAudioFileRef afterwards. A NULL configuration is
sufficient. This will ensure that the output file's data format is consistent
with the format being produced by the converter.
```
CFArrayRef config = NULL;
err = ExtAudioFileSetProperty(myExtAF, kExtAudioFileProperty_ConverterConfig,
sizeof(config), &config);
```
@constant kExtAudioFileProperty_AudioFile
The underlying AudioFileID. Read-only.
@constant kExtAudioFileProperty_FileMaxPacketSize
UInt32 representing the file data format's maximum packet size in bytes.
Read-only.
@constant kExtAudioFileProperty_ClientMaxPacketSize
UInt32 representing the client data format's maximum packet size in bytes.
Read-only.
@constant kExtAudioFileProperty_FileLengthFrames
SInt64 representing the file's length in sample frames. Read-only on
non-PCM formats; writable for files in PCM formats.
@constant kExtAudioFileProperty_ConverterConfig
CFArrayRef representing the underlying AudioConverter's configuration, as
specified by kAudioConverterPropertySettings.
This may be NULL to force resynchronization of the converter's output format
with the file's data format.
@constant kExtAudioFileProperty_IOBufferSizeBytes
UInt32 representing the size of the buffer through which the converter
reads/writes the audio file (when there is an AudioConverter).
@constant kExtAudioFileProperty_IOBuffer
void *. This is the memory buffer which the ExtAudioFileRef will use for
disk I/O when there is a conversion between the client and file data
formats. A client may be able to share buffers between multiple
ExtAudioFileRef instances, in which case, it can set this property to point
to its own buffer. After setting this property, the client must
subsequently set the kExtAudioFileProperty_IOBufferSizeBytes property. Note
that a pointer to a pointer should be passed to ExtAudioFileSetProperty.
@constant kExtAudioFileProperty_PacketTable
This AudioFilePacketTableInfo can be used both to override the priming and
remainder information in an audio file and to retrieve the current priming
and remainder frames information for a given ExtAudioFile object. If the
underlying file type does not provide packet table info, the Get call will
return an error.
If you set this, then you can override the setting for these values in the
file to ones that you want to use. When setting this, you can use
kExtAudioFilePacketTableInfoOverride_UseFileValue (-1) for either the
priming or remainder frames to signal that the value currently stored in
the file should be used. If you set this to a non-negative number (or zero)
then that value will override whatever value is stored in the file that
you are reading. Retrieving the value of the property will always retrieve
the value the ExtAudioFile object is using (whether this is derived from
the file, or from your override). If you want to determine what the value
is in the file, you should use the AudioFile property:
kAudioFilePropertyPacketTableInfo
If the value of mNumberValidFrames is positive, it will be used to override
the count of valid frames stored in the file. If you wish to override only
the priming and remainder frame values, you should set mNumberValidFrames
to zero.
For example, a file encoded using AAC may have 2112 samples of priming at
the start of the file and a remainder of 823 samples at the end. When
ExtAudioFile returns decoded samples to you, it will trim `mPrimingFrames`
at the start of the file, and `mRemainderFrames` at the end. It will get
these numbers initially from the file. A common use case for overriding this
would be to set the priming and remainder samples to 0, so in this example
you would retrieve an additional 2112 samples of silence from the start of
the file and 823 samples of silence at the end of the file (silence, because
the encoders use silence to pad out these priming and remainder samples)
A value of kExtAudioFilePacketTableInfoOverride_UseFileValueIfValid (-2)
for priming, remainder, or valid frames will cause the corresponding value
stored in the file to be used if the total number of frames produced by the
file matches the total frames accounted for by the packet table info stored
in the file. If these do not match, for priming or remainder frames a value
of 0 will be used instead, and for valid frames a value will be calculated
that causes the total frames accounted for by the overriding packet table
info to match the count of frames produced by the file.
*/
CF_ENUM(ExtAudioFilePropertyID) {
kExtAudioFileProperty_FileDataFormat = 'ffmt', // AudioStreamBasicDescription
kExtAudioFileProperty_FileChannelLayout = 'fclo', // AudioChannelLayout
kExtAudioFileProperty_ClientDataFormat = 'cfmt', // AudioStreamBasicDescription
kExtAudioFileProperty_ClientChannelLayout = 'cclo', // AudioChannelLayout
kExtAudioFileProperty_CodecManufacturer = 'cman', // UInt32
// read-only:
kExtAudioFileProperty_AudioConverter = 'acnv', // AudioConverterRef
kExtAudioFileProperty_AudioFile = 'afil', // AudioFileID
kExtAudioFileProperty_FileMaxPacketSize = 'fmps', // UInt32
kExtAudioFileProperty_ClientMaxPacketSize = 'cmps', // UInt32
kExtAudioFileProperty_FileLengthFrames = '#frm', // SInt64
// writable:
kExtAudioFileProperty_ConverterConfig = 'accf', // CFPropertyListRef
kExtAudioFileProperty_IOBufferSizeBytes = 'iobs', // UInt32
kExtAudioFileProperty_IOBuffer = 'iobf', // void *
kExtAudioFileProperty_PacketTable = 'xpti' // AudioFilePacketTableInfo
};
CF_ENUM(OSStatus) {
kExtAudioFileError_InvalidProperty = -66561,
kExtAudioFileError_InvalidPropertySize = -66562,
kExtAudioFileError_NonPCMClientFormat = -66563,
kExtAudioFileError_InvalidChannelMap = -66564, // number of channels doesn't match format
kExtAudioFileError_InvalidOperationOrder = -66565,
kExtAudioFileError_InvalidDataFormat = -66566,
kExtAudioFileError_MaxPacketSizeUnknown = -66567,
kExtAudioFileError_InvalidSeek = -66568, // writing, or offset out of bounds
kExtAudioFileError_AsyncWriteTooLarge = -66569,
kExtAudioFileError_AsyncWriteBufferOverflow = -66570 // an async write could not be completed in time
};
#if TARGET_OS_IPHONE
/*!
@enum ExtAudioFile errors
@constant kExtAudioFileError_CodecUnavailableInputConsumed
iOS only. Returned when ExtAudioFileWrite was interrupted. You must stop calling
ExtAudioFileWrite. If the underlying audio converter can resume after an
interruption (see kAudioConverterPropertyCanResumeFromInterruption), you must
wait for an EndInterruption notification from AudioSession, and call AudioSessionSetActive(true)
before resuming. In this situation, the buffer you provided to ExtAudioFileWrite was successfully
consumed and you may proceed to the next buffer.
@constant kExtAudioFileError_CodecUnavailableInputNotConsumed
iOS only. Returned when ExtAudioFileWrite was interrupted. You must stop calling
ExtAudioFileWrite. If the underlying audio converter can resume after an
interruption (see kAudioConverterPropertyCanResumeFromInterruption), you must
wait for an EndInterruption notification from AudioSession, and call AudioSessionSetActive(true)
before resuming. In this situation, the buffer you provided to ExtAudioFileWrite was not
successfully consumed and you must try to write it again.
*/
CF_ENUM(OSStatus) {
kExtAudioFileError_CodecUnavailableInputConsumed = -66559,
kExtAudioFileError_CodecUnavailableInputNotConsumed = -66560,
};
#endif
//==================================================================================================
// Creation/Destruction
/*!
@functiongroup Creation/Destruction
*/
/*!
@function ExtAudioFileOpenURL
@abstract Opens an audio file specified by a CFURLRef.
@param inURL
The audio file to read.
@param outExtAudioFile
On exit, a newly-allocated ExtAudioFileRef.
@result An OSStatus error code.
@discussion
Allocates a new ExtAudioFileRef, for reading an existing audio file.
*/
extern OSStatus
ExtAudioFileOpenURL( CFURLRef inURL,
ExtAudioFileRef __nullable * __nonnull outExtAudioFile) API_AVAILABLE(macos(10.5), ios(2.1), watchos(2.0), tvos(9.0));
/*!
@function ExtAudioFileWrapAudioFileID
@abstract Wrap an AudioFileID in an ExtAudioFileRef.
@param inFileID
The AudioFileID to wrap.
@param inForWriting
True if the AudioFileID is a new file opened for writing.
@param outExtAudioFile
On exit, a newly-allocated ExtAudioFileRef.
@result An OSStatus error code.
@discussion
Allocates a new ExtAudioFileRef which wraps an existing AudioFileID. The
client is responsible for keeping the AudioFileID open until the
ExtAudioFileRef is disposed. Disposing the ExtAudioFileRef will not close
the AudioFileID when this Wrap API call is used, so the client is also
responsible for closing the AudioFileID when finished with it.
*/
extern OSStatus
ExtAudioFileWrapAudioFileID(AudioFileID inFileID,
Boolean inForWriting,
ExtAudioFileRef __nullable * __nonnull outExtAudioFile)
API_AVAILABLE(macos(10.4), ios(2.1), watchos(2.0), tvos(9.0));
/*!
@function ExtAudioFileCreateWithURL
@abstract Create a new audio file.
@param inURL
The URL of the new audio file.
@param inFileType
The type of file to create. This is a constant from AudioToolbox/AudioFile.h, e.g.
kAudioFileAIFFType. Note that this is not an HFSTypeCode.
@param inStreamDesc
The format of the audio data to be written to the file.
@param inChannelLayout
The channel layout of the audio data. If non-null, this must be consistent
with the number of channels specified by inStreamDesc.
@param inFlags
The same flags as are used with AudioFileCreateWithURL
Can use these to control whether an existing file is overwritten (or not).
@param outExtAudioFile
On exit, a newly-allocated ExtAudioFileRef.
@result An OSStatus error code.
@discussion
Creates a new audio file.
If the file to be created is in an encoded format, it is permissible for the
sample rate in inStreamDesc to be 0, since in all cases, the file's encoding
AudioConverter may produce audio at a different sample rate than the source. The
file will be created with the audio format actually produced by the encoder.
*/
extern OSStatus
ExtAudioFileCreateWithURL( CFURLRef inURL,
AudioFileTypeID inFileType,
const AudioStreamBasicDescription * inStreamDesc,
const AudioChannelLayout * __nullable inChannelLayout,
UInt32 inFlags,
ExtAudioFileRef __nullable * __nonnull outExtAudioFile)
API_AVAILABLE(macos(10.5), ios(2.1), watchos(2.0), tvos(9.0));
#if !TARGET_OS_IPHONE
/*!
@function ExtAudioFileOpen
@abstract Opens an audio file specified by an FSRef.
@param inFSRef
The audio file to read.
@param outExtAudioFile
On exit, a newly-allocated ExtAudioFileRef.
@result An OSStatus error code.
@discussion
Allocates a new ExtAudioFileRef, for reading an existing audio file.
This function is deprecated as of Mac OS 10.6. ExtAudioFileOpenURL is preferred.
*/
extern OSStatus
ExtAudioFileOpen( const struct FSRef * inFSRef,
ExtAudioFileRef __nullable * __nonnull outExtAudioFile) API_DEPRECATED("no longer supported", macos(10.4, 10.6)) API_UNAVAILABLE(ios, watchos, tvos);
/*!
@function ExtAudioFileCreateNew
@abstract Creates a new audio file.
@param inParentDir
The directory in which to create the new file.
@param inFileName
The name of the new file.
@param inFileType
The type of file to create. This is a constant from AudioToolbox/AudioFile.h, e.g.
kAudioFileAIFFType. Note that this is not an HFSTypeCode.
@param inStreamDesc
The format of the audio data to be written to the file.
@param inChannelLayout
The channel layout of the audio data. If non-null, this must be consistent
with the number of channels specified by inStreamDesc.
@param outExtAudioFile
On exit, a newly-allocated ExtAudioFileRef.
@result An OSStatus error code.
@discussion
If the file to be created is in an encoded format, it is permissible for the
sample rate in inStreamDesc to be 0, since in all cases, the file's encoding
AudioConverter may produce audio at a different sample rate than the source. The
file will be created with the audio format actually produced by the encoder.
This function is deprecated as of Mac OS 10.6. ExtAudioFileCreateWithURL is preferred.
*/
extern OSStatus
ExtAudioFileCreateNew( const struct FSRef * inParentDir,
CFStringRef inFileName,
AudioFileTypeID inFileType,
const AudioStreamBasicDescription * inStreamDesc,
const AudioChannelLayout * __nullable inChannelLayout,
ExtAudioFileRef __nullable * __nonnull outExtAudioFile)
API_DEPRECATED("no longer supported", macos(10.4, 10.6)) API_UNAVAILABLE(ios, watchos, tvos);
#endif
/*!
@function ExtAudioFileDispose
@abstract Close the file and dispose the object.
@param inExtAudioFile
The extended audio file object.
@result An OSStatus error code.
@discussion
Closes the file and deletes the object.
*/
extern OSStatus
ExtAudioFileDispose( ExtAudioFileRef inExtAudioFile)
API_AVAILABLE(macos(10.4), ios(2.1), watchos(2.0), tvos(9.0));
//==================================================================================================
// I/O
/*!
@functiongroup I/O
*/
/*!
@function ExtAudioFileRead
@abstract Perform a synchronous sequential read.
@param inExtAudioFile
The extended audio file object.
@param ioNumberFrames
On entry, ioNumberFrames is the number of frames to be read from the file.
On exit, it is the number of frames actually read. A number of factors may
cause a fewer number of frames to be read, including the supplied buffers
not being large enough, and internal optimizations. If 0 frames are
returned, however, this indicates that end-of-file was reached.
@param ioData
Buffer(s) into which the audio data is read.
@result An OSStatus error code.
@discussion
If the file has a client data format, then the audio data from the file is
translated from the file data format to the client format, via the
ExtAudioFile's internal AudioConverter.
(Note that the use of sequential reads/writes means that an ExtAudioFile must
not be read on multiple threads; clients wishing to do this should use the
lower-level AudioFile API set).
*/
extern OSStatus
ExtAudioFileRead( ExtAudioFileRef inExtAudioFile,
UInt32 * ioNumberFrames,
AudioBufferList * ioData)
API_AVAILABLE(macos(10.4), ios(2.1), watchos(2.0), tvos(9.0));
/*!
@function ExtAudioFileWrite
@abstract Perform a synchronous sequential write.
@param inExtAudioFile
The extended audio file object.
@param inNumberFrames
The number of frames to write.
@param ioData
The buffer(s) from which audio data is written to the file.
@result An OSStatus error code.
@discussion
If the file has a client data format, then the audio data in ioData is
translated from the client format to the file data format, via the
ExtAudioFile's internal AudioConverter.
*/
extern OSStatus
ExtAudioFileWrite( ExtAudioFileRef inExtAudioFile,
UInt32 inNumberFrames,
const AudioBufferList * ioData)
API_AVAILABLE(macos(10.4), ios(2.1), watchos(2.0), tvos(9.0));
/*!
@function ExtAudioFileWriteAsync
@abstract Perform an asynchronous sequential write.
@param inExtAudioFile
The extended audio file object.
@param inNumberFrames
The number of frames to write.
@param ioData
The buffer(s) from which audio data is written to the file.
@result An OSStatus error code.
@discussion
Writes the provided buffer list to an internal ring buffer and notifies an
internal thread to perform the write at a later time. The first time this is
called, allocations may be performed. You can call this with 0 frames and null
buffer in a non-time-critical context to initialize the asynchronous mechanism.
Once initialized, subsequent calls are very efficient and do not take locks;
thus this may be used to write to a file from a realtime thread.
The client must not mix synchronous and asynchronous writes to the same file.
Pending writes are not guaranteed to be flushed to disk until
ExtAudioFileDispose is called.
N.B. Errors may occur after this call has returned. Such errors may be returned
from subsequent calls to this function.
*/
extern OSStatus
ExtAudioFileWriteAsync( ExtAudioFileRef inExtAudioFile,
UInt32 inNumberFrames,
const AudioBufferList * __nullable ioData)
API_AVAILABLE(macos(10.4), ios(2.1), watchos(2.0), tvos(9.0));
/*!
@function ExtAudioFileSeek
@abstract Seek to a specific frame position.
@param inExtAudioFile
The extended audio file object.
@param inFrameOffset
The desired seek position, in sample frames, relative to the beginning of
the file. This is specified in the sample rate and frame count of the file's format
(not the client format)
@result An OSStatus error code.
@discussion
Sets the file's read position to the specified sample frame number. The next call
to ExtAudioFileRead will return samples from precisely this location, even if it
is located in the middle of a packet.
This function's behavior with files open for writing is currently undefined.
*/
extern OSStatus
ExtAudioFileSeek( ExtAudioFileRef inExtAudioFile,
SInt64 inFrameOffset)
API_AVAILABLE(macos(10.4), ios(2.1), watchos(2.0), tvos(9.0));
/*!
@function ExtAudioFileTell
@abstract Return the file's read/write position.
@param inExtAudioFile
The extended audio file object.
@param outFrameOffset
On exit, the file's current read/write position in sample frames. This is specified in the
sample rate and frame count of the file's format (not the client format)
@result An OSStatus error code.
*/
extern OSStatus
ExtAudioFileTell( ExtAudioFileRef inExtAudioFile,
SInt64 * outFrameOffset)
API_AVAILABLE(macos(10.4), ios(2.1), watchos(2.0), tvos(9.0));
//==================================================================================================
// Property Access
/*!
@functiongroup Property Access
*/
/*!
@function ExtAudioFileGetPropertyInfo
@abstract Get information about a property
@param inExtAudioFile
The extended audio file object.
@param inPropertyID
The property being queried.
@param outSize
If non-null, on exit, this is set to the size of the property's value.
@param outWritable
If non-null, on exit, this indicates whether the property value is settable.
@result An OSStatus error code.
*/
extern OSStatus
ExtAudioFileGetPropertyInfo(ExtAudioFileRef inExtAudioFile,
ExtAudioFilePropertyID inPropertyID,
UInt32 * __nullable outSize,
Boolean * __nullable outWritable)
API_AVAILABLE(macos(10.4), ios(2.1), watchos(2.0), tvos(9.0));
/*!
@function ExtAudioFileGetProperty
@abstract Get a property value.
@param inExtAudioFile
The extended audio file object.
@param inPropertyID
The property being fetched.
@param ioPropertyDataSize
On entry, the size (in bytes) of the memory pointed to by outPropertyData.
On exit, the actual size of the property data returned.
@param outPropertyData
The value of the property is copied to the memory this points to.
@result An OSStatus error code.
*/
extern OSStatus
ExtAudioFileGetProperty( ExtAudioFileRef inExtAudioFile,
ExtAudioFilePropertyID inPropertyID,
UInt32 * ioPropertyDataSize,
void * outPropertyData)
API_AVAILABLE(macos(10.4), ios(2.1), watchos(2.0), tvos(9.0));
/*!
@function ExtAudioFileSetProperty
@abstract Set a property value.
@param inExtAudioFile
The extended audio file object.
@param inPropertyID
The property being set.
@param inPropertyDataSize
The size of the property data, in bytes.
@param inPropertyData
Points to the property's new value.
@result An OSStatus error code.
*/
extern OSStatus
ExtAudioFileSetProperty( ExtAudioFileRef inExtAudioFile,
ExtAudioFilePropertyID inPropertyID,
UInt32 inPropertyDataSize,
const void * inPropertyData)
API_AVAILABLE(macos(10.4), ios(2.1), watchos(2.0), tvos(9.0));
CF_ASSUME_NONNULL_END
#ifdef __cplusplus
}
#endif
#endif // AudioToolbox_ExtendedAudioFile_h
#else
#include <AudioToolboxCore/ExtendedAudioFile.h>
#endif
|
0 | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/AudioToolbox.framework | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/AudioToolbox.framework/Headers/AUParameters.h | #if (defined(__USE_PUBLIC_HEADERS__) && __USE_PUBLIC_HEADERS__) || (defined(USE_AUDIOTOOLBOX_PUBLIC_HEADERS) && USE_AUDIOTOOLBOX_PUBLIC_HEADERS) || !__has_include(<AudioToolboxCore/AUParameters.h>)
/*!
@file AUParameters.h
@framework AudioToolbox.framework
@copyright (c) 2015 Apple, Inc. All rights reserved.
@brief Objects representing an AUAudioUnit's tree of parameters.
*/
#ifndef AudioToolbox_AUParameters_h
#define AudioToolbox_AUParameters_h
#ifdef __OBJC2__
#import <AudioToolbox/AudioUnitProperties.h>
#import <Foundation/Foundation.h>
NS_ASSUME_NONNULL_BEGIN
@class AUParameter;
// =================================================================================================
// typedefs
/*! @typedef AUValue
@brief A value of an audio unit parameter.
*/
typedef float AUValue;
/*! @typedef AUParameterAddress
@brief Numeric identifier for audio unit parameter.
@discussion
Note that parameter addresses are not necessarily persistent, unless the individual audio
unit documents a promise to maintain its addressing scheme. Hosts should bind to parameters'
key paths.
*/
typedef uint64_t AUParameterAddress;
/*! @enum AUParameterAutomationEventType
@brief Identifies the different types of parameter automation events.
@discussion
Audio Units may generate parameter changes from their user interfaces. Hosts may attach
significance to the beginning and end of a UI gesture (typically touching and releasing
a fader). These gestures are conveyed through these types of automation events.
@constant AUParameterAutomationEventTypeValue
The event contains an updated value for the parameter.
@constant AUParameterAutomationEventTypeTouch
The event marks an initial "touch" gesture on a UI element.
@constant AUParameterAutomationEventTypeRelease
The event marks a final "release" gesture on a UI element.
*/
typedef NS_ENUM(uint32_t, AUParameterAutomationEventType) {
AUParameterAutomationEventTypeValue = 0,
AUParameterAutomationEventTypeTouch = 1,
AUParameterAutomationEventTypeRelease = 2
};
/*! @typedef AURecordedParameterEvent
@brief An event recording the changing of a parameter at a particular host time.
*/
typedef struct AURecordedParameterEvent {
uint64_t hostTime; ///< The host time at which the event occurred.
AUParameterAddress address; ///< The address of the parameter whose value changed.
AUValue value; ///< The value of the parameter at that time.
} AURecordedParameterEvent;
/*! @typedef AUParameterAutomationEvent
@brief An event recording the changing of a parameter, possibly including events
such as touch and release gestures, at a particular host time.
*/
typedef struct AUParameterAutomationEvent {
uint64_t hostTime; ///< The host time at which the event occurred.
AUParameterAddress address; ///< The address of the parameter whose value changed.
AUValue value; ///< The value of the parameter at that time.
AUParameterAutomationEventType eventType; ///< The type of the event.
uint64_t reserved;
} AUParameterAutomationEvent;
/*! @typedef AUParameterObserver
@brief A block called to signal that the value of a parameter has changed.
@discussion
See the discussion of -[AUParameterNode tokenByAddingParameterObserver:].
@param address
The address of the parameter whose value changed.
@param value
The current value of the parameter.
*/
typedef void (^AUParameterObserver)(AUParameterAddress address, AUValue value);
/*! @typedef AUParameterRecordingObserver
@brief A block called to record parameter changes as automation events.
@discussion
See the discussion of -[AUParameterNode tokenByAddingParameterRecordingObserver:].
@param numberEvents
The number of events being delivered.
@param events
The events being delivered.
*/
typedef void (^AUParameterRecordingObserver)(NSInteger numberEvents, const AURecordedParameterEvent *events);
/*! @typedef AUParameterAutomationObserver
@brief A block called to record parameter changes as automation events.
@discussion
See the discussion of -[AUParameterNode tokenByAddingParameterAutomationObserver:].
@param numberEvents
The number of events being delivered.
@param events
The events being delivered.
*/
typedef void (^AUParameterAutomationObserver)(NSInteger numberEvents, const AUParameterAutomationEvent *events);
/*! @typedef AUParameterObserverToken
@brief A token representing an installed AUParameterObserver, AUParameterRecordingObserver,
or AUParameterAutomationObserver.
*/
typedef void *AUParameterObserverToken;
// =================================================================================================
/*! @class AUParameterNode
@brief A node in an audio unit's tree of parameters.
@discussion
Nodes are instances of either AUParameterGroup or AUParameter.
*/
API_AVAILABLE(macos(10.11), ios(9.0), watchos(2.0), tvos(9.0))
@interface AUParameterNode : NSObject
/*! @property identifier
@brief A non-localized, permanent name for a parameter or group.
@discussion
The identifier must be unique for all child nodes under any given parent. From release to
release, an audio unit must not change its parameters' identifiers; this will invalidate any
hosts' documents that refer to the parameters.
*/
@property (NS_NONATOMIC_IOSONLY, readonly, copy) NSString *identifier;
/*! @property keyPath
@brief Generated by concatenating the identifiers of a node's parents with its own.
@discussion
Unless an audio unit specifically documents that its parameter addresses are stable and
persistent, hosts, when recording parameter values, should bind to the keyPath.
The individual node identifiers in a key path are separated by periods. (".")
Passing a node's keyPath to -[tree valueForKeyPath:] should return the same node.
*/
@property (NS_NONATOMIC_IOSONLY, readonly, copy) NSString *keyPath;
/*! @property displayName
@brief A localized name to display for the parameter.
*/
@property (NS_NONATOMIC_IOSONLY, readonly, copy) NSString *displayName;
/*! @method displayNameWithLength:
@brief A version of displayName possibly abbreviated to the given desired length, in characters.
@discussion
The default implementation simply returns displayName.
*/
- (NSString *)displayNameWithLength:(NSInteger)maximumLength;
/*! @method tokenByAddingParameterObserver:
@brief Add an observer for a parameter or all parameters in a group/tree.
@discussion
An audio unit view can use an AUParameterObserver to be notified of changes
to a single parameter, or to all parameters in a group/tree.
These callbacks are throttled so as to limit the rate of redundant notifications
in the case of frequent changes to a single parameter.
This block is called in an arbitrary thread context. It is responsible for thread-safety.
It must not make any calls to add or remove other observers, including itself;
this will deadlock.
An audio unit's implementation should interact with the parameter object via
implementorValueObserver and implementorValueProvider.
Parameter observers are bound to a specific parameter instance. If this parameter is
destroyed, e.g. if the parameter tree is re-constructed, the previously set parameter
observers will no longer be valid. Clients can observe changes to the parameter tree
via KVO. See the discussion of -[AUAudioUnit parameterTree].
@param observer
A block to call after the value of a parameter has changed.
@return
A token which can be passed to removeParameterObserver: or to -[AUParameter setValue:originator:]
*/
- (AUParameterObserverToken)tokenByAddingParameterObserver:(AUParameterObserver)observer;
/*! @method tokenByAddingParameterRecordingObserver:
@brief Add a recording observer for a parameter or all parameters in a group/tree.
@discussion
This is a variant of tokenByAddingParameterAutomationObserver where the callback receives
AURecordedParameterEvents instead of AUParameterAutomationEvents.
This will be deprecated in favor of tokenByAddingParameterAutomationObserver in a future
release.
*/
- (AUParameterObserverToken)tokenByAddingParameterRecordingObserver:(AUParameterRecordingObserver)observer;
/*! @method tokenByAddingParameterAutomationObserver:
@brief Add a recording observer for a parameter or all parameters in a group/tree.
@discussion
An audio unit host can use an AUParameterAutomationObserver or AUParameterRecordingObserver
to capture a series of changes to a parameter value, including the timing of the events, as
generated by a UI gesture in a view, for example.
Unlike AUParameterObserver, these callbacks are not throttled.
This block is called in an arbitrary thread context. It is responsible for thread-safety.
It must not make any calls to add or remove other observers, including itself;
this will deadlock.
An audio unit's engine should interact with the parameter object via
implementorValueObserver and implementorValueProvider.
@param observer
A block to call to record the changing of a parameter value.
@return
A token which can be passed to removeParameterObserver: or to -[AUParameter
setValue:originator:]
*/
- (AUParameterObserverToken)tokenByAddingParameterAutomationObserver:(AUParameterAutomationObserver)observer API_AVAILABLE(macos(10.12), ios(10.0), watchos(3.0), tvos(10.0));
/*! @method removeParameterObserver:
@brief Remove an observer created with tokenByAddingParameterObserver,
tokenByAddingParameterRecordingObserver, or tokenByAddingParameterAutomationObserver.
@discussion
This call will remove the callback corresponding to the supplied token. Note that this
will block until any callbacks currently in flight have completed.
*/
- (void)removeParameterObserver:(AUParameterObserverToken)token;
@end
// =================================================================================================
/*! @class AUParameterGroup
@brief A group of related parameters.
@discussion
A parameter group is KVC-compliant for its children; e.g. valueForKey:@"volume" will
return a child parameter whose identifier is "volume".
*/
API_AVAILABLE(macos(10.11), ios(9.0), watchos(2.0), tvos(9.0))
@interface AUParameterGroup : AUParameterNode <NSSecureCoding>
/// The group's child nodes (AUParameterGroupNode).
@property (NS_NONATOMIC_IOSONLY, readonly) NSArray<AUParameterNode *> *children;
/// Returns a flat array of all parameters in the group, including those in child groups.
@property (NS_NONATOMIC_IOSONLY, readonly) NSArray<AUParameter *> *allParameters;
@end
// =================================================================================================
/*! @class AUParameterTree
@brief The top level group node, representing all of an audio unit's parameters.
@discussion
An audio unit's parameters are organized into a tree containing groups and parameters.
Groups may be nested.
The tree is KVO-compliant. For example, if the tree contains a group named "LFO" ,
containing a parameter named rate, then "LFO.rate" refers to that parameter object, and
"LFO.rate.value" refers to that parameter's value.
An audio unit may choose to dynamically rearrange the tree. When doing so, it must
issue a KVO notification on the audio unit's parameterTree property. The tree's elements are
mostly immutable (except for values and implementor hooks); the only way to modify them
is to publish a new tree.
*/
API_AVAILABLE(macos(10.11), ios(9.0), watchos(2.0), tvos(9.0))
@interface AUParameterTree : AUParameterGroup <NSSecureCoding>
/*! @method parameterWithAddress:
@brief Search a tree for a parameter with a specific address.
@return
The parameter corresponding to the supplied address, or nil if no such parameter exists.
*/
- (AUParameter *__nullable)parameterWithAddress:(AUParameterAddress)address;
/*! @method parameterWithID:scope:element:
@brief Search a tree for a specific v2 audio unit parameter.
@discussion
V2 audio units publish parameters identified by a parameter ID, scope, and element.
A host that knows that it is dealing with a v2 unit can locate parameters using this method,
for example, for the Apple-supplied system audio units.
@return
The parameter corresponding to the supplied ID/scope/element, or nil if no such parameter
exists, or if the audio unit is not a v2 unit.
*/
- (AUParameter *__nullable)parameterWithID:(AudioUnitParameterID)paramID scope:(AudioUnitScope)scope element:(AudioUnitElement)element;
@end
// =================================================================================================
// AUParameter
/*! @class AUParameter
@brief A node representing a single parameter.
*/
API_AVAILABLE(macos(10.11), ios(9.0), watchos(2.0), tvos(9.0))
@interface AUParameter : AUParameterNode <NSSecureCoding>
/// The parameter's minimum value.
@property (NS_NONATOMIC_IOSONLY, readonly) AUValue minValue;
/// The parameter's maximum value.
@property (NS_NONATOMIC_IOSONLY, readonly) AUValue maxValue;
/// The parameter's unit of measurement.
@property (NS_NONATOMIC_IOSONLY, readonly) AudioUnitParameterUnit unit;
/// A localized name for the parameter's unit. Supplied by the AU if kAudioUnitParameterUnit_CustomUnit; else by the framework.
@property (NS_NONATOMIC_IOSONLY, readonly, copy, nullable) NSString *unitName;
/// Various details of the parameter.
@property (NS_NONATOMIC_IOSONLY, readonly) AudioUnitParameterOptions flags;
/// The parameter's address.
@property (NS_NONATOMIC_IOSONLY, readonly) AUParameterAddress address;
/// For parameters with kAudioUnitParameterUnit_Indexed, localized strings corresponding
/// to the values.
@property (NS_NONATOMIC_IOSONLY, readonly, copy, nullable) NSArray<NSString *> *valueStrings;
/*! @brief Parameters whose values may change as a side effect of this parameter's value
changing.
@discussion
Each array value is an NSNumber representing AUParameterAddress.
*/
@property (NS_NONATOMIC_IOSONLY, readonly, copy, nullable) NSArray<NSNumber *> *dependentParameters;
/// The parameter's current value.
@property (NS_NONATOMIC_IOSONLY) AUValue value;
///
/*! @brief Set the parameter's value, avoiding redundant notifications to the originator.
@discussion
Bridged to the v2 function AudioUnitSetParameter.
*/
- (void)setValue:(AUValue)value originator:(AUParameterObserverToken __nullable)originator;
/*! @brief Convenience for setValue:originator:atHostTime:eventType:
@discussion
Bridged to the v2 function AudioUnitSetParameter.
*/
- (void)setValue:(AUValue)value originator:(AUParameterObserverToken __nullable)originator atHostTime:(uint64_t)hostTime;
/*! @brief Set the parameter's value, preserving the host time of the gesture that initiated the
change, and associating an event type such as touch/release.
@discussion
In general, this method should only be called from a user interface. It initiates a change
to a parameter in a way that captures the gesture such that it can be recorded later --
any AUParameterAutomationObservers will receive the host time and event type associated
with the parameter change.
From an audio playback engine, a host should schedule automated parameter changes through
AUAudioUnit's scheduleParameterBlock.
Bridged to the v2 function AudioUnitSetParameter.
*/
- (void)setValue:(AUValue)value originator:(AUParameterObserverToken __nullable)originator atHostTime:(uint64_t)hostTime eventType:(AUParameterAutomationEventType)eventType API_AVAILABLE(macos(10.12), ios(10.0), watchos(3.0), tvos(10.0));
/*! @brief Get a textual representation of a value for the parameter. Use value==nil to use the
current value. Bridged to the v2 property kAudioUnitProperty_ParameterStringFromValue.
@discussion
This is currently only supported for parameters whose flags include
kAudioUnitParameterFlag_ValuesHaveStrings.
*/
- (NSString *)stringFromValue:(const AUValue *__nullable)value;
/*! @brief Convert a textual representation of a value to a numeric one.
@discussion
This is currently only supported for parameters whose flags include
kAudioUnitParameterFlag_ValuesHaveStrings.
*/
- (AUValue)valueFromString:(NSString *)string;
@end
NS_ASSUME_NONNULL_END
#endif // __OBJC2__
#endif // AudioToolbox_AUParameters_h
#else
#include <AudioToolboxCore/AUParameters.h>
#endif
|
0 | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/AudioToolbox.framework | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/AudioToolbox.framework/Headers/CAFFile.h | #if (defined(__USE_PUBLIC_HEADERS__) && __USE_PUBLIC_HEADERS__) || (defined(USE_AUDIOTOOLBOX_PUBLIC_HEADERS) && USE_AUDIOTOOLBOX_PUBLIC_HEADERS) || !__has_include(<AudioToolboxCore/CAFFile.h>)
/*!
@file CAFFile.h
@framework AudioToolbox.framework
@copyright (c) 2004-2015 by Apple, Inc., all rights reserved.
@abstract The data structures contained within a CAF (Core Audio Format) file.
*/
#ifndef AudioToolbox_CAFFile_h
#define AudioToolbox_CAFFile_h
#include <CoreAudioTypes/CoreAudioTypes.h>
#if TARGET_OS_WIN32
#define ATTRIBUTE_PACKED
#pragma pack(push, 1)
#else
#define ATTRIBUTE_PACKED __attribute__((__packed__))
#endif
// In a CAF File all of these types' byte order is big endian.
// When reading or writing these values the program will need to flip byte order to native endian
// CAF File Header
CF_ENUM(UInt32) {
kCAF_FileType = 'caff',
kCAF_FileVersion_Initial = 1
};
// CAF Chunk Types
CF_ENUM(UInt32) {
kCAF_StreamDescriptionChunkID = 'desc',
kCAF_AudioDataChunkID = 'data',
kCAF_ChannelLayoutChunkID = 'chan',
kCAF_FillerChunkID = 'free',
kCAF_MarkerChunkID = 'mark',
kCAF_RegionChunkID = 'regn',
kCAF_InstrumentChunkID = 'inst',
kCAF_MagicCookieID = 'kuki',
kCAF_InfoStringsChunkID = 'info',
kCAF_EditCommentsChunkID = 'edct',
kCAF_PacketTableChunkID = 'pakt',
kCAF_StringsChunkID = 'strg',
kCAF_UUIDChunkID = 'uuid',
kCAF_PeakChunkID = 'peak',
kCAF_OverviewChunkID = 'ovvw',
kCAF_MIDIChunkID = 'midi',
kCAF_UMIDChunkID = 'umid',
kCAF_FormatListID = 'ldsc',
kCAF_iXMLChunkID = 'iXML'
};
struct CAFFileHeader
{
UInt32 mFileType; // 'caff'
UInt16 mFileVersion; //initial revision set to 1
UInt16 mFileFlags; //initial revision set to 0
} ATTRIBUTE_PACKED;
typedef struct CAFFileHeader CAFFileHeader;
struct CAFChunkHeader
{
UInt32 mChunkType; // four char code
SInt64 mChunkSize; // size in bytes of the chunk data (not including this header).
// mChunkSize is SInt64 not UInt64 because negative values for
// the data size can have a special meaning
} ATTRIBUTE_PACKED;
typedef struct CAFChunkHeader CAFChunkHeader;
struct CAF_UUID_ChunkHeader
{
CAFChunkHeader mHeader;
UInt8 mUUID[16];
} ATTRIBUTE_PACKED;
typedef struct CAF_UUID_ChunkHeader CAF_UUID_ChunkHeader;
// these are the flags if the format ID is 'lpcm'
// <CoreAudioTypes/CoreAudioTypes.h> declares some of the format constants
// that can be used as Data Formats in a CAF file
typedef CF_OPTIONS(UInt32, CAFFormatFlags)
{
kCAFLinearPCMFormatFlagIsFloat = (1L << 0),
kCAFLinearPCMFormatFlagIsLittleEndian = (1L << 1)
};
// Every file MUST have this chunk. It MUST be the first chunk in the file
struct CAFAudioDescription
{
Float64 mSampleRate;
UInt32 mFormatID;
CAFFormatFlags mFormatFlags;
UInt32 mBytesPerPacket;
UInt32 mFramesPerPacket;
UInt32 mChannelsPerFrame;
UInt32 mBitsPerChannel;
} ATTRIBUTE_PACKED;
typedef struct CAFAudioDescription CAFAudioDescription;
// 'ldsc' format list chunk.
// for data formats like AAC SBR which can be decompressed to multiple formats, this chunk contains a list of
// CAFAudioFormatListItem describing those formats. The list is ordered from best to worst by number of channels
// and sample rate in that order. mChannelLayoutTag is an AudioChannelLayoutTag as defined in CoreAudioTypes.h
struct CAFAudioFormatListItem
{
CAFAudioDescription mFormat;
UInt32 mChannelLayoutTag;
} ATTRIBUTE_PACKED;
// 'chan' Optional chunk.
// struct AudioChannelLayout as defined in CoreAudioTypes.h.
// 'free'
// this is a padding chunk for reserving space in the file. content is meaningless.
// 'kuki'
// this is the magic cookie chunk. bag of bytes.
// 'data' Every file MUST have this chunk.
// actual audio data can be any format as described by the 'asbd' chunk.
// if mChunkSize is < 0 then this is the last chunk in the file and the actual length
// should be determined from the file size.
// The motivation for this is to allow writing the files without seeking to update size fields after every
// write in order to keep the file legal.
// The program can put a -1 in the mChunkSize field and
// update it only once at the end of recording.
// If the program were to crash during recording then the file is still well defined.
// 'pakt' Required if either/or mBytesPerPacket or mFramesPerPacket in the Format Description are zero
// For formats that are packetized and have variable sized packets.
// The table is stored as an array of one or two variable length integers.
// (a) size in bytes of the data of a given packet.
// (b) number of frames in a given packet.
// These sizes are encoded as variable length integers
// The packet description entries are either one or two values depending on the format.
// There are three possibilities
// (1)
// If the format has variable bytes per packets (desc.mBytesPerPacket == 0) and constant frames per packet
// (desc.mFramesPerPacket != 0) then the packet table contains single entries representing the bytes in a given packet
// (2)
// If the format is a constant bit rate (desc.mBytesPerPacket != 0) but variable frames per packet
// (desc.mFramesPerPacket == 0) then the packet table entries contains single entries
// representing the number of frames in a given packet
// (3)
// If the format has variable frames per packet (asbd.mFramesPerPacket == 0) and variable bytes per packet
// (desc.mBytesPerPacket == 0) then the packet table entries are a duple of two values. The first value
// is the number of bytes in a given packet, the second value is the number of frames in a given packet
struct CAFPacketTableHeader
{
SInt64 mNumberPackets;
SInt64 mNumberValidFrames;
SInt32 mPrimingFrames;
SInt32 mRemainderFrames;
UInt8 mPacketDescriptions[1]; // this is a variable length array of mNumberPackets elements
} ATTRIBUTE_PACKED;
typedef struct CAFPacketTableHeader CAFPacketTableHeader;
struct CAFDataChunk
{
UInt32 mEditCount;
UInt8 mData[1]; // this is a variable length data field based off the size of the data chunk
} ATTRIBUTE_PACKED;
typedef struct CAFDataChunk CAFDataChunk;
// markers types
CF_ENUM(UInt32) {
kCAFMarkerType_Generic = 0,
kCAFMarkerType_ProgramStart = 'pbeg',
kCAFMarkerType_ProgramEnd = 'pend',
kCAFMarkerType_TrackStart = 'tbeg',
kCAFMarkerType_TrackEnd = 'tend',
kCAFMarkerType_Index = 'indx',
kCAFMarkerType_RegionStart = 'rbeg',
kCAFMarkerType_RegionEnd = 'rend',
kCAFMarkerType_RegionSyncPoint = 'rsyc',
kCAFMarkerType_SelectionStart = 'sbeg',
kCAFMarkerType_SelectionEnd = 'send',
kCAFMarkerType_EditSourceBegin = 'cbeg',
kCAFMarkerType_EditSourceEnd = 'cend',
kCAFMarkerType_EditDestinationBegin = 'dbeg',
kCAFMarkerType_EditDestinationEnd = 'dend',
kCAFMarkerType_SustainLoopStart = 'slbg',
kCAFMarkerType_SustainLoopEnd = 'slen',
kCAFMarkerType_ReleaseLoopStart = 'rlbg',
kCAFMarkerType_ReleaseLoopEnd = 'rlen',
kCAFMarkerType_SavedPlayPosition = 'sply',
kCAFMarkerType_Tempo = 'tmpo',
kCAFMarkerType_TimeSignature = 'tsig',
kCAFMarkerType_KeySignature = 'ksig'
};
CF_ENUM(UInt32)
{
kCAF_SMPTE_TimeTypeNone = 0,
kCAF_SMPTE_TimeType24 = 1,
kCAF_SMPTE_TimeType25 = 2,
kCAF_SMPTE_TimeType30Drop = 3,
kCAF_SMPTE_TimeType30 = 4,
kCAF_SMPTE_TimeType2997 = 5,
kCAF_SMPTE_TimeType2997Drop = 6,
kCAF_SMPTE_TimeType60 = 7,
kCAF_SMPTE_TimeType5994 = 8,
kCAF_SMPTE_TimeType60Drop = 9,
kCAF_SMPTE_TimeType5994Drop = 10,
kCAF_SMPTE_TimeType50 = 11,
kCAF_SMPTE_TimeType2398 = 12
};
struct CAF_SMPTE_Time
{
SInt8 mHours;
SInt8 mMinutes;
SInt8 mSeconds;
SInt8 mFrames;
UInt32 mSubFrameSampleOffset;
} ATTRIBUTE_PACKED;
typedef struct CAF_SMPTE_Time CAF_SMPTE_Time;
struct CAFMarker
{
UInt32 mType;
Float64 mFramePosition;
UInt32 mMarkerID;
CAF_SMPTE_Time mSMPTETime;
UInt32 mChannel;
} ATTRIBUTE_PACKED;
typedef struct CAFMarker CAFMarker;
struct CAFMarkerChunk
{
UInt32 mSMPTE_TimeType;
UInt32 mNumberMarkers;
CAFMarker mMarkers[1]; // this is a variable length array of mNumberMarkers elements
} ATTRIBUTE_PACKED;
typedef struct CAFMarkerChunk CAFMarkerChunk;
#define kCAFMarkerChunkHdrSize offsetof(CAFMarkerChunk, mMarkers)
typedef CF_OPTIONS(UInt32, CAFRegionFlags) {
kCAFRegionFlag_LoopEnable = 1,
kCAFRegionFlag_PlayForward = 2,
kCAFRegionFlag_PlayBackward = 4
};
struct CAFRegion
{
UInt32 mRegionID;
CAFRegionFlags mFlags;
UInt32 mNumberMarkers;
CAFMarker mMarkers[1]; // this is a variable length array of mNumberMarkers elements
} ATTRIBUTE_PACKED;
typedef struct CAFRegion CAFRegion;
/* because AudioFileRegions are variable length, you cannot access them as an array. Use NextAudioFileRegion to walk the list. */
#define NextCAFRegion(inCAFRegionPtr) \
((CAFRegion*)((char*)(inCAFRegionPtr) + offsetof(CAFRegion, mMarkers) + ((inCAFRegionPtr)->mNumberMarkers)*sizeof(CAFMarker)))
struct CAFRegionChunk
{
UInt32 mSMPTE_TimeType;
UInt32 mNumberRegions;
CAFRegion mRegions[1]; // this is a variable length array of mNumberRegions elements
} ATTRIBUTE_PACKED;
typedef struct CAFRegionChunk CAFRegionChunk;
#define kCAFRegionChunkHdrSize offsetof(CAFRegionChunk, mRegions)
struct CAFInstrumentChunk
{
Float32 mBaseNote;
UInt8 mMIDILowNote;
UInt8 mMIDIHighNote;
UInt8 mMIDILowVelocity;
UInt8 mMIDIHighVelocity;
Float32 mdBGain;
UInt32 mStartRegionID;
UInt32 mSustainRegionID;
UInt32 mReleaseRegionID;
UInt32 mInstrumentID;
} ATTRIBUTE_PACKED;
typedef struct CAFInstrumentChunk CAFInstrumentChunk;
struct CAFStringID {
UInt32 mStringID;
SInt64 mStringStartByteOffset;
} ATTRIBUTE_PACKED;
typedef struct CAFStringID CAFStringID;
struct CAFStrings
{
UInt32 mNumEntries;
CAFStringID mStringsIDs[1]; // this is a variable length array of mNumEntries elements
// this struct is only fictionally described due to the variable length fields
// UInt8 mStrings[ variable num elements ]; // null terminated UTF8 strings
} ATTRIBUTE_PACKED;
typedef struct CAFStrings CAFStrings;
struct CAFInfoStrings
{
UInt32 mNumEntries;
// These are only fictionally defined in the struct due to the variable length fields.
// struct {
// UInt8 mKey[ variable num elements ]; // null terminated UTF8 string
// UInt8 mValue[ variable num elements ]; // null terminated UTF8 string
// } mStrings[ variable num elements ];
} ATTRIBUTE_PACKED;
typedef struct CAFInfoStrings CAFInfoStrings;
struct CAFPositionPeak
{
Float32 mValue;
UInt64 mFrameNumber;
} ATTRIBUTE_PACKED;
typedef struct CAFPositionPeak CAFPositionPeak;
struct CAFPeakChunk
{
UInt32 mEditCount;
CAFPositionPeak mPeaks[1]; // this is a variable length array of peak elements (calculated from the size of the chunk)
} ATTRIBUTE_PACKED;
typedef struct CAFPeakChunk CAFPeakChunk;
struct CAFOverviewSample
{
SInt16 mMinValue;
SInt16 mMaxValue;
} ATTRIBUTE_PACKED;
typedef struct CAFOverviewSample CAFOverviewSample;
struct CAFOverviewChunk
{
UInt32 mEditCount;
UInt32 mNumFramesPerOVWSample;
CAFOverviewSample mData[1]; // data is of variable size, calculated from the sizeo of the chunk.
} ATTRIBUTE_PACKED;
typedef struct CAFOverviewChunk CAFOverviewChunk;
struct CAFUMIDChunk
{
UInt8 mBytes[64];
} ATTRIBUTE_PACKED;
typedef struct CAFUMIDChunk CAFUMIDChunk;
#if TARGET_OS_WIN32
#pragma pack(pop)
#endif
////////////////////////////////////////////////////////////////////////////////////////////////
#endif // AudioToolbox_CAFFile_h
#else
#include <AudioToolboxCore/CAFFile.h>
#endif
|
0 | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/AudioToolbox.framework | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/AudioToolbox.framework/Headers/AudioUnitCarbonView.h | /*!
@file AudioUnitCarbonView.h
@framework AudioToolbox.framework
@copyright (c) 2000-2015 Apple, Inc. All rights reserved.
@abstract Deprecated interfaces for using Carbon-based views of Audio Units.
*/
#ifndef AudioUnit_AudioUnitCarbonView_h
#define AudioUnit_AudioUnitCarbonView_h
#include <TargetConditionals.h>
#if TARGET_OS_OSX
#if !defined(__COREAUDIO_USE_FLAT_INCLUDES__)
#include <Carbon/Carbon.h>
#include <AudioToolbox/AUComponent.h>
#else
#include <MacWindows.h>
#include <Controls.h>
#include <AUComponent.h>
#endif
#ifdef __cplusplus
extern "C" {
#endif
#if PRAGMA_STRUCT_ALIGN
#pragma options align=mac68k
#elif PRAGMA_STRUCT_PACKPUSH
#pragma pack(push, 2)
#elif PRAGMA_STRUCT_PACK
#pragma pack(2)
#endif
/*!
@typedef AudioUnitCarbonView
@abstract An audio unit Carbon view is of type ComponentInstance, defined by the Component Manager.
*/
typedef ComponentInstance AudioUnitCarbonView;
/*!
@enum Carbon view component types and subtypes
@constant kAudioUnitCarbonViewComponentType
The four char-code type of a carbon-based view component
@constant kAUCarbonViewSubType_Generic
The four char-code subtype of a carbon-based view component
*/
CF_ENUM(UInt32)
{
kAudioUnitCarbonViewComponentType = 'auvw',
kAUCarbonViewSubType_Generic = 'gnrc'
};
/*!
@enum Carbon view events
@constant kAudioUnitCarbonViewEvent_MouseDownInControl
The event type indicating that the mouse is pressed in a control
@constant kAudioUnitCarbonViewEvent_MouseUpInControl
The event type indicating that the mouse is released in a control
*/
enum
{
kAudioUnitCarbonViewEvent_MouseDownInControl = 0,
kAudioUnitCarbonViewEvent_MouseUpInControl = 1
};
/*!
@typedef AudioUnitcarbViewEventID
@abstract Specifies an event passed to an AudioUnitCarbonViewEventListener callback.
*/
typedef SInt32 AudioUnitCarbonViewEventID;
/*!
@typedef AudioUnitCarbonViewEventListener
@abstract Defines a callback function that is called when certain events occur in an
Audio Unit Carbon view, such as mouse-down and up events on a control.
@param inUserData
A user-defined pointer that was passed to an AudioUnitCarbonViewSetEventListener callback.
@param inView
The Audio unit Carbon vIew that generated the message.
@param inParameter
The parameter associated with the control generating the message.
@param inEvent
The type of event, as listed in Audio unit Carbon view events.
@param inEventParam
Further information about the event, dependent on its type.
*/
#ifndef __LP64__
typedef void
(*AudioUnitCarbonViewEventListener)( void * inUserData,
AudioUnitCarbonView inView,
const AudioUnitParameter * inParameter,
AudioUnitCarbonViewEventID inEvent,
const void * inEventParam);
#endif
/*!
@function AudioUnitCarbonViewCreate
@abstract A callback that tells an Audio unit Carbon view to open its user interface (user pane).
@discussion The host application specifies the audio unit which the view is to control. The host
also provides the window, parent control, and rectangle into which the Audio unit
Carbon view component (of type AudioUnitCarbonView) is to create itself.
The host application is responsible for closing the component (by calling the
CloseComponent function) before closing its window.
@param inView
The view component instance.
@param inAudioUnit
The audio unit component instance which the view is to control.
@param inWindow
The Carbon window in which the user interface is to be opened.
@param inParentControl
The Carbon control into which the user interface is to be embedded.
(This is typically the window's root control).
@param inLocation
The host application's requested location for the view. The view should
always create itself at the specified location.
@param inSize
The host application's requested size for the view. The view may choose a
different size for itself. The actual dimensions of the view are described
by the value of the outControl parameter.
@param outControl
The Carbon control which contains the entire user interface for the view.
*/
#ifndef __LP64__
extern OSStatus
AudioUnitCarbonViewCreate( AudioUnitCarbonView inView,
AudioUnit inAudioUnit,
WindowRef inWindow,
ControlRef inParentControl,
const Float32Point * inLocation,
const Float32Point * inSize,
ControlRef * outControl) API_DEPRECATED("no longer supported", macos(10.2, 10.11)) API_UNAVAILABLE(ios, watchos, tvos);
/*!
@function AudioUnitCarbonViewSetEventListener
@abstract Add an event listener to the carbon view.
@deprecated in macOS version 10.4
@discussion Use the AUEventListener functions in <AudioToolbox/AudioUnitUtilities.h> instead.
@param inView
The Carbon view component instance.
@param inCallback
The event listener callback function.
@param inUserData
A user data pointer passed to the callback.
*/
extern OSStatus
AudioUnitCarbonViewSetEventListener( AudioUnitCarbonView inView,
AudioUnitCarbonViewEventListener inCallback,
void * inUserData)
API_DEPRECATED("no longer supported", macos(10.2, 10.4)) API_UNAVAILABLE(ios, watchos, tvos);
#endif
/*!
@enum Selectors for component calls
@constant kAudioUnitCarbonViewRange
Range of selectors
@constant kAudioUnitCarbonViewCreateSelect
Selector for creating the carbon view
@constant kAudioUnitCarbonViewSetEventListenerSelect
Selector for setting the event listener callback
*/
enum
{
kAudioUnitCarbonViewRange = 0x0300, // range of selectors
kAudioUnitCarbonViewCreateSelect = 0x0301,
kAudioUnitCarbonViewSetEventListenerSelect = 0x0302
};
#if PRAGMA_STRUCT_ALIGN
#pragma options align=reset
#elif PRAGMA_STRUCT_PACKPUSH
#pragma pack(pop)
#elif PRAGMA_STRUCT_PACK
#pragma pack()
#endif
#ifdef __cplusplus
}
#endif
#endif // TARGET_OS_OSX
#endif /* AudioUnit_AudioUnitCarbonView_h */
|
0 | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/AudioToolbox.framework | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/AudioToolbox.framework/Headers/AudioFormat.h | #if (defined(__USE_PUBLIC_HEADERS__) && __USE_PUBLIC_HEADERS__) || (defined(USE_AUDIOTOOLBOX_PUBLIC_HEADERS) && USE_AUDIOTOOLBOX_PUBLIC_HEADERS) || !__has_include(<AudioToolboxCore/AudioFormat.h>)
/*!
@file AudioFormat.h
@framework AudioToolbox.framework
@copyright (c) 1985-2015 by Apple, Inc., all rights reserved.
@abstract API for finding things out about audio formats.
*/
#ifndef AudioToolbox_AudioFormat_h
#define AudioToolbox_AudioFormat_h
//=============================================================================
// Includes
//=============================================================================
// System Includes
#include <Availability.h>
#include <CoreAudioTypes/CoreAudioTypes.h>
CF_ASSUME_NONNULL_BEGIN
#if defined(__cplusplus)
extern "C"
{
#endif
//=============================================================================
// Types
//=============================================================================
/*!
@typedef AudioFormatPropertyID
@abstract A type for four char codes for property IDs
*/
typedef UInt32 AudioFormatPropertyID;
/*!
@enum AudioPanningMode
@abstract Different panning algorithms.
@constant kPanningMode_SoundField
Sound field panning algorithm
@constant kPanningMode_VectorBasedPanning
Vector based panning algorithm
*/
typedef CF_ENUM(UInt32, AudioPanningMode) {
kPanningMode_SoundField = 3,
kPanningMode_VectorBasedPanning = 4
};
/*!
@struct AudioPanningInfo
@abstract This struct is for use with kAudioFormatProperty_PanningMatrix.
@var mPanningMode the PanningMode to be used for the pan
@var mCoordinateFlags the coordinates are specified as in the AudioChannelDescription struct in CoreAudioTypes.h
@var mCoordinates the coordinates are specified as in the AudioChannelDescription struct in CoreAudioTypes.h
@var mGainScale
mGainScale is used to multiply the panning values.
In typical usage you are applying an existing volume.
value in 0 -> 1 (where 1 is unity gain) to the panned values.
1 would give you panning at unity.
0 would give you back a matrix of zeroes.
@var mOutputChannelMap
This is the channel map that is going to be used to determine channel volumes for this pan.
*/
struct AudioPanningInfo {
AudioPanningMode mPanningMode;
UInt32 mCoordinateFlags;
Float32 mCoordinates[3];
Float32 mGainScale;
const AudioChannelLayout * mOutputChannelMap;
};
typedef struct AudioPanningInfo AudioPanningInfo;
/*!
@enum AudioBalanceFadeType
@abstract used for mType field of AudioBalanceFade struct
@constant kAudioBalanceFadeType_MaxUnityGain
the gain value never exceeds 1.0, the opposite channel fades out.
This can reduce overall loudness when the balance or fade is not in the center.
@constant kAudioBalanceFadeType_EqualPower
The overall loudness remains constant, but gain can exceed 1.0.
the gain value is 1.0 when the balance and fade are in the center.
From there they can increase to +3dB (1.414) and decrease to -inf dB (0.0).
*/
typedef CF_ENUM(UInt32, AudioBalanceFadeType) {
kAudioBalanceFadeType_MaxUnityGain = 0,
kAudioBalanceFadeType_EqualPower = 1
};
/*!
@struct AudioBalanceFade
@abstract this struct is used with kAudioFormatProperty_BalanceFade
@var mLeftRightBalance
-1 is full left, 0 is center, +1 is full right
@var mBackFrontFade
-1 is full rear, 0 is center, +1 is full front
@var mType
an AudioBalanceFadeType constant
@var mChannelLayout
a pointer to an AudioChannelLayout
*/
struct AudioBalanceFade
{
Float32 mLeftRightBalance; // -1 is full left, 0 is center, +1 is full right
Float32 mBackFrontFade; // -1 is full rear, 0 is center, +1 is full front
AudioBalanceFadeType mType; // max unity gain, or equal power.
const AudioChannelLayout* mChannelLayout;
};
typedef struct AudioBalanceFade AudioBalanceFade;
/*!
@struct AudioFormatInfo
@abstract this struct is used as a specifier for the kAudioFormatProperty_FormatList property
@var mASBD
an AudioStreamBasicDescription
@var mMagicCookie
a pointer to the decompression info for the data described in mASBD
@var mMagicCookieSize
the size in bytes of mMagicCookie
*/
struct AudioFormatInfo
{
AudioStreamBasicDescription mASBD;
const void* mMagicCookie;
UInt32 mMagicCookieSize;
};
typedef struct AudioFormatInfo AudioFormatInfo;
/*!
@struct ExtendedAudioFormatInfo
@abstract this struct is used as a specifier for the kAudioFormatProperty_FormatList property
@var mASBD
an AudioStreamBasicDescription
@var mMagicCookie
a pointer to the decompression info for the data described in mASBD
@var mMagicCookieSize
the size in bytes of mMagicCookie
@var mClassDescription
an AudioClassDescription specifying the codec to be used in answering the question.
*/
struct ExtendedAudioFormatInfo
{
AudioStreamBasicDescription mASBD;
const void* __nullable mMagicCookie;
UInt32 mMagicCookieSize;
AudioClassDescription mClassDescription;
};
typedef struct ExtendedAudioFormatInfo ExtendedAudioFormatInfo;
//=============================================================================
// Properties - for various format structures.
//=============================================================================
/*!
@enum AudioFormatProperty constants
@abstract constants for use with AudioFormatGetPropertyInfo and AudioFormatGetProperty.
@constant kAudioFormatProperty_FormatInfo
Retrieves general information about a format. The specifier is a
magic cookie, or NULL.
On input, the property value is an AudioStreamBasicDescription which
should have at least the mFormatID filled out. On output it will be filled out
as much as possible given the information known about the format
and the contents of the magic cookie (if any is given).
If multiple formats can be described by the AudioStreamBasicDescription and the associated magic cookie,
this property will return the base level format.
@constant kAudioFormatProperty_FormatIsVBR
Returns whether or not a format has a variable number of bytes per
packet. The specifier is an AudioStreamBasicDescription describing
the format to ask about. The value is a UInt32 where non-zero means
the format is variable bytes per packet.
@constant kAudioFormatProperty_FormatIsExternallyFramed
Returns whether or not a format requires external framing information,
i.e. AudioStreamPacketDescriptions.
The specifier is an AudioStreamBasicDescription describing
the format to ask about. The value is a UInt32 where non-zero means
the format is externally framed. Any format which has variable byte sized packets
requires AudioStreamPacketDescriptions.
@constant kAudioFormatProperty_FormatEmploysDependentPackets
Returns whether or not a format is capable of combining independently
decodable packets with dependent packets. The specifier is an
AudioStreamBasicDescription describing the format to ask about.
The value is a UInt32 where zero means that all packets in streams
of the specified format are independently decodable and non-zero means
that streams of the specified format may include dependent packets.
@constant kAudioFormatProperty_FormatIsEncrypted
Returns whether or not a format is encrypted. The specifier is a UInt32 format ID.
The value is a UInt32 where non-zero means the format is encrypted.
@constant kAudioFormatProperty_EncodeFormatIDs
No specifier needed. Must be set to NULL.
Returns an array of UInt32 format IDs for formats that are valid output formats
for a converter.
@constant kAudioFormatProperty_DecodeFormatIDs
No specifier needed. Must be set to NULL.
Returns an array of UInt32 format IDs for formats that are valid input formats
for a converter.
@constant kAudioFormatProperty_Encoders
The specifier is the format that you are interested in, e.g. 'aac '
Returns an array of AudioClassDescriptions for all installed encoders for the given format
@constant kAudioFormatProperty_Decoders
The specifier is the format that you are interested in, e.g. 'aac '
Returns an array of AudioClassDescriptions for all installed decoders for the given format
@constant kAudioFormatProperty_AvailableEncodeBitRates
The specifier is a UInt32 format ID.
The property value is an array of AudioValueRange describing all available bit rates.
@constant kAudioFormatProperty_AvailableEncodeSampleRates
The specifier is a UInt32 format ID.
The property value is an array of AudioValueRange describing all available sample rates.
@constant kAudioFormatProperty_AvailableEncodeChannelLayoutTags
The specifier is an AudioStreamBasicDescription with at least the mFormatID
and mChannelsPerFrame fields set.
The property value is an array of AudioChannelLayoutTags for the format and number of
channels specified. If mChannelsPerFrame is zero, then all layouts supported by
the format are returned.
@constant kAudioFormatProperty_AvailableEncodeNumberChannels
The specifier is an AudioStreamBasicDescription with at least the mFormatID field set.
The property value is an array of UInt32 indicating the number of channels that can be encoded.
A value of 0xFFFFFFFF indicates that any number of channels may be encoded.
@constant kAudioFormatProperty_AvailableDecodeNumberChannels
The specifier is an AudioStreamBasicDescription with at least the mFormatID field set.
The property value is an array of UInt32 indicating the number of channels that can be decoded.
@constant kAudioFormatProperty_FormatName
Returns a name for a given format. The specifier is an
AudioStreamBasicDescription describing the format to ask about.
The value is a CFStringRef. The caller is responsible for releasing the
returned string. For some formats (eg, Linear PCM) you will get back a
descriptive string (e.g. 16-bit, interleaved, etc...)
@constant kAudioFormatProperty_ASBDFromESDS
Returns an audio stream description for a given ESDS. The specifier is an ESDS.
The value is a AudioStreamBasicDescription. If multiple formats can be described
by the ESDS this property will return the base level format.
@constant kAudioFormatProperty_ChannelLayoutFromESDS
Returns an audio channel layout for a given ESDS. The specifier is an
ESDS. The value is a AudioChannelLayout.
@constant kAudioFormatProperty_ASBDFromMPEGPacket
Returns an audio stream description for a given MPEG Packet. The specifier is an MPEG Packet.
The value is a AudioStreamBasicDescription.
@constant kAudioFormatProperty_FormatList
Returns a list of AudioFormatListItem structs describing the audio formats contained within the compressed bit stream
as described by the magic cookie. The specifier is an AudioFormatInfo struct. The mFormatID member of the
ASBD struct must filled in. Formats are returned in order from the most to least 'rich', with
channel count taking the highest precedence followed by sample rate. The kAudioFormatProperty_FormatList property
is the preferred method for discovering format information of the audio data. If the audio data can only be described
by a single AudioFormatListItem, this property would be equivalent to using the kAudioFormatProperty_FormatInfo property,
which should be used by the application as a fallback case, to ensure backward compatibility with existing systems
when kAudioFormatProperty_FormatList is not present on the running system.
@constant kAudioFormatProperty_OutputFormatList
Returns a list of AudioFormatListItem structs describing the audio formats which may be obtained by decoding the format
described by the specifier.
The specifier is an AudioFormatInfo struct. At a minimum formatID member of the ASBD struct must filled in. Other fields
may be filled in. If there is no magic cookie, then the number of channels and sample rate should be filled in.
@constant kAudioFormatProperty_FirstPlayableFormatFromList
The specifier is a list of 1 or more AudioFormatListItem. Generally it is the list of these items returned from kAudioFormatProperty_FormatList. The property value retrieved is an UInt32 that specifies an index into that list. The list that the caller provides is generally sorted with the first item as the best format (most number of channels, highest sample rate), and the returned index represents the first item in that list that can be played by the system.
Thus, the property is typically used to determine the best playable format for a given (layered) audio stream
@constant kAudioFormatProperty_ValidateChannelLayout
The specifier is an AudioChannelLayout. The property value and size are not used and must be set to NULL.
This property validates an AudioChannelLayout. This is useful if the layout has come from an untrusted source such as a file.
It returns noErr if the AudioChannelLayout is OK, kAudio_ParamError if there is a structural problem with the layout,
or kAudioFormatUnknownFormatError for unrecognized layout tags or channel labels.
@constant kAudioFormatProperty_ChannelLayoutForTag
Returns the channel descriptions for a standard channel layout.
The specifier is a AudioChannelLayoutTag (the mChannelLayoutTag field
of the AudioChannelLayout struct) containing the layout constant.
The value is an AudioChannelLayout structure. In typical use a AudioChannelLayout
can be valid with just a defined AudioChannelLayoutTag (ie, those layouts
have predefined speaker locations and orderings).
Returns an error if the tag is kAudioChannelLayoutTag_UseChannelBitmap
@constant kAudioFormatProperty_TagForChannelLayout
Returns an AudioChannelLayoutTag for a layout, if there is one.
The specifier is an AudioChannelLayout containing the layout description.
The value is an AudioChannelLayoutTag.
This can be used to reduce a layout specified by kAudioChannelLayoutTag_UseChannelDescriptions
or kAudioChannelLayoutTag_UseChannelBitmap to a known AudioChannelLayoutTag.
@constant kAudioFormatProperty_ChannelLayoutForBitmap
Returns the channel descriptions for a standard channel layout.
The specifier is a UInt32 (the mChannelBitmap field
of the AudioChannelLayout struct) containing the layout bitmap. The value
is an AudioChannelLayout structure. In some uses, an AudioChannelLayout can be
valid with the layoutTag set to "use bitmap" and the bitmap set appropriately.
@constant kAudioFormatProperty_BitmapForLayoutTag
Returns a bitmap for an AudioChannelLayoutTag, if there is one.
The specifier is a AudioChannelLayoutTag containing the layout tag.
The value is an UInt32 bitmap. The bits are as defined in CoreAudioTypes.h.
To go in the other direction, i.e. get a layout tag for a bitmap,
use kAudioFormatProperty_TagForChannelLayout where your layout tag
is kAudioChannelLayoutTag_UseChannelBitmap and the bitmap is filled in.
@constant kAudioFormatProperty_ChannelLayoutName
Returns the a name for a particular channel layout. The specifier is
an AudioChannelLayout containing the layout description. The value
is a CFStringRef. The caller is responsible for releasing the
returned string.
@constant kAudioFormatProperty_ChannelLayoutSimpleName
Returns the a simpler name for a channel layout than does kAudioFormatProperty_ChannelLayoutName.
It omits the channel labels from the name. The specifier is
an AudioChannelLayout containing the layout description. The value
is a CFStringRef. The caller is responsible for releasing the
returned string.
@constant kAudioFormatProperty_ChannelName
Returns the name for a particular channel. The specifier is an
AudioChannelDescription which has the mChannelLabel field set. The value
is a CFStringRef. The caller is responsible for releasing the
returned string.
@constant kAudioFormatProperty_ChannelShortName
Returns an abbreviated name for a particular channel. The specifier is an
AudioChannelDescription which has the mChannelLabel field set. The value
is a CFStringRef. The caller is responsible for releasing the
returned string.
@constant kAudioFormatProperty_MatrixMixMap
Returns a matrix of scaling coefficients for converting audio from one channel map
to another in a standard way, if one is known. Otherwise an error is returned.
The specifier is an array of two pointers to AudioChannelLayout structures.
The first points to the input layout, the second to the output layout.
The value is a two dimensional array of Float32 where the first dimension (rows)
is the input channel and the second dimension (columns) is the output channel.
@constant kAudioFormatProperty_ChannelMap
Returns an array of SInt32 for reordering input channels.
The specifier is an array of two pointers to AudioChannelLayout structures.
The first points to the input layout, the second to the output layout.
The length of the output array is equal to the number of output channels.
@constant kAudioFormatProperty_NumberOfChannelsForLayout
This is a general call for parsing a AudioChannelLayout provided as the specifier,
to determine the number of valid channels that are represented. So, if the
LayoutTag is specified, it returns the number of channels for that layout. If
the bitmap is specified, it returns the number of channels represented by that bitmap.
If the layout tag is 'kAudioChannelLayoutTag_UseChannelDescriptions' it returns
the number of channel descriptions.
@constant kAudioFormatProperty_AreChannelLayoutsEquivalent
Returns a UInt32 which is 1 if two layouts are equivalent and 0 if they are not equivalent.
In order to be equivalent, the layouts must describe the same channels in the same order.
Whether the layout is represented by a bitmap, channel descriptions or a channel layout tag is not significant.
The channel coordinates are only significant if the channel label is kAudioChannelLabel_UseCoordinates.
The specifier is an array of two pointers to AudioChannelLayout structures.
The value is a pointer to the UInt32 result.
@constant kAudioFormatProperty_ChannelLayoutHash
Returns a UInt32 which represents the hash of the provided channel layout.
The specifier is a pointer to an AudioChannelLayout structure.
The value is a pointer to the UInt32 result.
@constant kAudioFormatProperty_TagsForNumberOfChannels
returns an array of AudioChannelLayoutTags for the number of channels specified.
The specifier is a UInt32 number of channels.
@constant kAudioFormatProperty_PanningMatrix
This call will pass in an AudioPanningInfo struct that specifies one of the
kPanningMode_ constants for the panning algorithm and an AudioChannelLayout
to describe the destination channel layout. As in kAudioFormatProperty_MatrixMixMap
the return value is an array of Float32 values of the number of channels
represented by this specified channel layout. It is presumed that the source
being panned is mono (thus for a quad channel layout, 4 Float32 values are returned).
The intention of this API is to provide support for panning operations that are
strictly manipulating the respective volumes of the channels. Thus, more
complex panners (like HRTF, distance filtering etc,) will not be represented
by this API. The resultant volume scalars can then be applied to a mixer
or some other processing code to adapt the individual volumes of the mixed
output.
The volume values will typically be presented within a 0->1 range (where 1 is unity gain)
For stereo formats, vector based panning is equivalent to the equal-power pan mode.
@constant kAudioFormatProperty_BalanceFade
get an array of coefficients for applying left/right balance and front/back fade.
The specifier is an AudioBalanceFade struct.
the return value is an array of Float32 values of the number of channels
represented by this specified channel layout.
The volume values will typically be presented within a 0->1 range (where 1 is unity gain)
@constant kAudioFormatProperty_ID3TagSize
Returns a UInt32 indicating the ID3 tag size.
The specifier must begin with the ID3 tag header and be at least 10 bytes in length
@constant kAudioFormatProperty_ID3TagToDictionary
Returns a CFDictionary containing key/value pairs for the frames in the ID3 tag
The specifier is the entire ID3 tag
Caller must call CFRelease for the returned dictionary
*/
CF_ENUM(AudioFormatPropertyID)
{
//=============================================================================
// The following properties are concerned with the AudioStreamBasicDescription
//=============================================================================
kAudioFormatProperty_FormatInfo = 'fmti',
kAudioFormatProperty_FormatName = 'fnam',
kAudioFormatProperty_EncodeFormatIDs = 'acof',
kAudioFormatProperty_DecodeFormatIDs = 'acif',
kAudioFormatProperty_FormatList = 'flst',
kAudioFormatProperty_ASBDFromESDS = 'essd',
kAudioFormatProperty_ChannelLayoutFromESDS = 'escl',
kAudioFormatProperty_OutputFormatList = 'ofls',
kAudioFormatProperty_FirstPlayableFormatFromList = 'fpfl',
kAudioFormatProperty_FormatIsVBR = 'fvbr',
kAudioFormatProperty_FormatIsExternallyFramed = 'fexf',
kAudioFormatProperty_FormatEmploysDependentPackets = 'fdep',
kAudioFormatProperty_FormatIsEncrypted = 'cryp',
kAudioFormatProperty_Encoders = 'aven',
kAudioFormatProperty_Decoders = 'avde',
kAudioFormatProperty_AvailableEncodeBitRates = 'aebr',
kAudioFormatProperty_AvailableEncodeSampleRates = 'aesr',
kAudioFormatProperty_AvailableEncodeChannelLayoutTags = 'aecl',
kAudioFormatProperty_AvailableEncodeNumberChannels = 'avnc',
kAudioFormatProperty_AvailableDecodeNumberChannels = 'adnc',
kAudioFormatProperty_ASBDFromMPEGPacket = 'admp',
//=============================================================================
// The following properties concern the AudioChannelLayout struct (speaker layouts)
//=============================================================================
kAudioFormatProperty_BitmapForLayoutTag = 'bmtg',
kAudioFormatProperty_MatrixMixMap = 'mmap',
kAudioFormatProperty_ChannelMap = 'chmp',
kAudioFormatProperty_NumberOfChannelsForLayout = 'nchm',
kAudioFormatProperty_AreChannelLayoutsEquivalent = 'cheq',
kAudioFormatProperty_ChannelLayoutHash = 'chha',
kAudioFormatProperty_ValidateChannelLayout = 'vacl',
kAudioFormatProperty_ChannelLayoutForTag = 'cmpl',
kAudioFormatProperty_TagForChannelLayout = 'cmpt',
kAudioFormatProperty_ChannelLayoutName = 'lonm',
kAudioFormatProperty_ChannelLayoutSimpleName = 'lsnm',
kAudioFormatProperty_ChannelLayoutForBitmap = 'cmpb',
kAudioFormatProperty_ChannelName = 'cnam',
kAudioFormatProperty_ChannelShortName = 'csnm',
kAudioFormatProperty_TagsForNumberOfChannels = 'tagc',
kAudioFormatProperty_PanningMatrix = 'panm',
kAudioFormatProperty_BalanceFade = 'balf',
//=============================================================================
// The following properties concern the ID3 Tags
//=============================================================================
kAudioFormatProperty_ID3TagSize = 'id3s',
kAudioFormatProperty_ID3TagToDictionary = 'id3d'
};
#if TARGET_OS_IPHONE
CF_ENUM(AudioFormatPropertyID) {
kAudioFormatProperty_HardwareCodecCapabilities = 'hwcc',
} __attribute__((deprecated));
/*!
@enum AudioCodecComponentType
@discussion Collection of audio codec component types.
(On macOS these declarations are in AudioToolbox/AudioCodec.h).
@constant kAudioDecoderComponentType
A codec that translates data in some other format into linear PCM.
The component subtype specifies the format ID of the other format.
@constant kAudioEncoderComponentType
A codec that translates linear PCM data into some other format
The component subtype specifies the format ID of the other format
*/
CF_ENUM(UInt32)
{
kAudioDecoderComponentType = 'adec',
kAudioEncoderComponentType = 'aenc',
};
/*!
@enum AudioCodecComponentManufacturer
@discussion Audio codec component manufacturer codes. On iPhoneOS, a codec's
manufacturer can be used to distinguish between hardware and
software codecs.
@constant kAppleSoftwareAudioCodecManufacturer
Apple software audio codecs.
@constant kAppleHardwareAudioCodecManufacturer
Apple hardware audio codecs.
*/
CF_ENUM(UInt32)
{
kAppleSoftwareAudioCodecManufacturer = 'appl',
kAppleHardwareAudioCodecManufacturer = 'aphw'
};
#endif
//=============================================================================
// Routines
//=============================================================================
/*!
@function AudioFormatGetPropertyInfo
@abstract Retrieve information about the given property
@param inPropertyID an AudioFormatPropertyID constant.
@param inSpecifierSize The size of the specifier data.
@param inSpecifier A specifier is a buffer of data used as an input argument to some of the properties.
@param outPropertyDataSize The size in bytes of the current value of the property. In order to get the property value,
you will need a buffer of this size.
@result returns noErr if successful.
*/
extern OSStatus
AudioFormatGetPropertyInfo( AudioFormatPropertyID inPropertyID,
UInt32 inSpecifierSize,
const void * __nullable inSpecifier,
UInt32 * outPropertyDataSize) API_AVAILABLE(macos(10.3), ios(2.0), watchos(2.0), tvos(9.0));
/*!
@function AudioFormatGetProperty
@abstract Retrieve the indicated property data
@param inPropertyID an AudioFormatPropertyID constant.
@param inSpecifierSize The size of the specifier data.
@param inSpecifier A specifier is a buffer of data used as an input argument to some of the properties.
@param ioPropertyDataSize on input the size of the outPropertyData buffer. On output the number of bytes written to the buffer.
@param outPropertyData the buffer in which to write the property data. If outPropertyData is NULL and ioPropertyDataSize is
not, the amount that would have been written will be reported.
@result returns noErr if successful.
*/
extern OSStatus
AudioFormatGetProperty( AudioFormatPropertyID inPropertyID,
UInt32 inSpecifierSize,
const void * __nullable inSpecifier,
UInt32 * __nullable ioPropertyDataSize,
void * __nullable outPropertyData) API_AVAILABLE(macos(10.3), ios(2.0), watchos(2.0), tvos(9.0));
//-----------------------------------------------------------------------------
// AudioFormat Error Codes
//-----------------------------------------------------------------------------
CF_ENUM(OSStatus)
{
kAudioFormatUnspecifiedError = 'what', // 0x77686174, 2003329396
kAudioFormatUnsupportedPropertyError = 'prop', // 0x70726F70, 1886547824
kAudioFormatBadPropertySizeError = '!siz', // 0x2173697A, 561211770
kAudioFormatBadSpecifierSizeError = '!spc', // 0x21737063, 561213539
kAudioFormatUnsupportedDataFormatError = 'fmt?', // 0x666D743F, 1718449215
kAudioFormatUnknownFormatError = '!fmt' // 0x21666D74, 560360820
};
#if defined(__cplusplus)
}
#endif
CF_ASSUME_NONNULL_END
#endif // AudioToolbox_AudioFormat_h
#else
#include <AudioToolboxCore/AudioFormat.h>
#endif
|
0 | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/AudioToolbox.framework | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/AudioToolbox.framework/Headers/DefaultAudioOutput.h | /*!
@file DefaultAudioOutput.h
@framework AudioToolbox.framework
@copyright (c) 2000-2015 by Apple, Inc., all rights reserved.
@deprecated Contains deprecated API's.
*/
#ifndef AudioToolbox_DefaultAudioOutput_h
#define AudioToolbox_DefaultAudioOutput_h
#if !__LP64__
#include <Availability.h>
#if !defined(__COREAUDIO_USE_FLAT_INCLUDES__)
#include <AudioToolbox/AudioUnit.h>
#else
#include <AudioUnit.h>
#endif
#ifdef __cplusplus
extern "C" {
#endif
// Open an instance of the default audio output unit (it can be closed with CloseComponent).
extern OSStatus OpenDefaultAudioOutput(AudioUnit *outUnit) API_DEPRECATED("no longer supported", macos(10.0, 10.3)) API_UNAVAILABLE(ios, watchos, tvos);
extern OSStatus OpenSystemSoundAudioOutput(AudioUnit *outUnit) API_DEPRECATED("no longer supported", macos(10.1, 10.5)) API_UNAVAILABLE(ios, watchos, tvos);
// for system sounds like alerts, modems, etc.
#ifdef __cplusplus
}
#endif
#endif // !__LP64__
#endif // AudioToolbox_DefaultAudioOutput_h
|
0 | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/AudioToolbox.framework | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/AudioToolbox.framework/Headers/AudioConverter.h | #if (defined(__USE_PUBLIC_HEADERS__) && __USE_PUBLIC_HEADERS__) || (defined(USE_AUDIOTOOLBOX_PUBLIC_HEADERS) && USE_AUDIOTOOLBOX_PUBLIC_HEADERS) || !__has_include(<AudioToolboxCore/AudioConverter.h>)
/*!
@file AudioConverter.h
@framework AudioToolbox.framework
@copyright (c) 1985-2015 by Apple, Inc., all rights reserved.
@abstract API's to perform audio format conversions.
AudioConverters convert between various linear PCM and compressed
audio formats. Supported transformations include:
- PCM float/integer/bit depth conversions
- PCM sample rate conversion
- PCM interleaving and deinterleaving
- encoding PCM to compressed formats
- decoding compressed formats to PCM
A single AudioConverter may perform more than one
of the above transformations.
*/
#ifndef AudioToolbox_AudioConverter_h
#define AudioToolbox_AudioConverter_h
//=============================================================================
// Includes
//=============================================================================
#include <Availability.h>
#include <CoreAudioTypes/CoreAudioTypes.h>
CF_ASSUME_NONNULL_BEGIN
#if defined(__cplusplus)
extern "C"
{
#endif
//=============================================================================
// Theory of Operation
//=============================================================================
//=============================================================================
// Types specific to the Audio Converter API
//=============================================================================
/*!
@typedef AudioConverterRef
@abstract A reference to an AudioConverter object.
*/
typedef struct OpaqueAudioConverter * AudioConverterRef;
typedef UInt32 AudioConverterPropertyID;
//=============================================================================
// Standard Properties
//=============================================================================
/*!
@enum AudioConverter Property IDs
@abstract The properties of an AudioConverter, accessible via AudioConverterGetProperty()
and AudioConverterSetProperty().
@constant kAudioConverterPropertyMinimumInputBufferSize
a UInt32 that indicates the size in bytes of the smallest buffer of input
data that can be supplied via the AudioConverterInputProc or as the input to
AudioConverterConvertBuffer
@constant kAudioConverterPropertyMinimumOutputBufferSize
a UInt32 that indicates the size in bytes of the smallest buffer of output
data that can be supplied to AudioConverterFillComplexBuffer or as the output to
AudioConverterConvertBuffer
@constant kAudioConverterPropertyMaximumInputPacketSize
a UInt32 that indicates the size in bytes of the largest single packet of
data in the input format. This is mostly useful for variable bit rate
compressed data (decoders).
@constant kAudioConverterPropertyMaximumOutputPacketSize
a UInt32 that indicates the size in bytes of the largest single packet of
data in the output format. This is mostly useful for variable bit rate
compressed data (encoders).
@constant kAudioConverterPropertyCalculateInputBufferSize
a UInt32 that on input holds a size in bytes that is desired for the output
data. On output, it will hold the size in bytes of the input buffer required
to generate that much output data. Note that some converters cannot do this
calculation.
@constant kAudioConverterPropertyCalculateOutputBufferSize
a UInt32 that on input holds a size in bytes that is desired for the input
data. On output, it will hold the size in bytes of the output buffer
required to hold the output data that will be generated. Note that some
converters cannot do this calculation.
@constant kAudioConverterPropertyInputCodecParameters
The value of this property varies from format to format and is considered
private to the format. It is treated as a buffer of untyped data.
@constant kAudioConverterPropertyOutputCodecParameters
The value of this property varies from format to format and is considered
private to the format. It is treated as a buffer of untyped data.
@constant kAudioConverterSampleRateConverterComplexity
An OSType that specifies the sample rate converter algorithm to use (as defined in
AudioToolbox/AudioUnitProperties.h)
@constant kAudioConverterSampleRateConverterQuality
A UInt32 that specifies rendering quality of the sample rate converter (see
enum constants below)
@constant kAudioConverterSampleRateConverterInitialPhase
A Float64 with value 0.0 <= x < 1.0 giving the initial subsample position of the
sample rate converter.
@constant kAudioConverterCodecQuality
A UInt32 that specifies rendering quality of a codec (see enum constants
below)
@constant kAudioConverterPrimeMethod
a UInt32 specifying priming method (usually for sample-rate converter) see
explanation for struct AudioConverterPrimeInfo below along with enum
constants
@constant kAudioConverterPrimeInfo
A pointer to AudioConverterPrimeInfo (see explanation for struct
AudioConverterPrimeInfo below)
@constant kAudioConverterChannelMap
An array of SInt32's. The size of the array is the number of output
channels, and each element specifies which input channel's data is routed to
that output channel (using a 0-based index of the input channels), or -1 if
no input channel is to be routed to that output channel. The default
behavior is as follows. I = number of input channels, O = number of output
channels. When I > O, the first O inputs are routed to the first O outputs,
and the remaining puts discarded. When O > I, the first I inputs are routed
to the first O outputs, and the remaining outputs are zeroed.
A simple example for splitting mono input to stereo output (instead of routing
the input to only the first output channel):
```
// this should be as large as the number of output channels:
SInt32 channelMap[2] = { 0, 0 };
AudioConverterSetProperty(theConverter, kAudioConverterChannelMap,
sizeof(channelMap), channelMap);
```
@constant kAudioConverterDecompressionMagicCookie
A void * pointing to memory set up by the caller. Required by some formats
in order to decompress the input data.
@constant kAudioConverterCompressionMagicCookie
A void * pointing to memory set up by the caller. Returned by the converter
so that it may be stored along with the output data. It can then be passed
back to the converter for decompression at a later time.
@constant kAudioConverterEncodeBitRate
A UInt32 containing the number of bits per second to aim for when encoding
data. Some decoders will also allow you to get this property to discover the bit rate.
@constant kAudioConverterEncodeAdjustableSampleRate
For encoders where the AudioConverter was created with an output sample rate
of zero, and the codec can do rate conversion on its input, this provides a
way to set the output sample rate. The property value is a Float64.
@constant kAudioConverterInputChannelLayout
The property value is an AudioChannelLayout.
@constant kAudioConverterOutputChannelLayout
The property value is an AudioChannelLayout.
@constant kAudioConverterApplicableEncodeBitRates
The property value is an array of AudioValueRange describing applicable bit
rates based on current settings.
@constant kAudioConverterAvailableEncodeBitRates
The property value is an array of AudioValueRange describing available bit
rates based on the input format. You can get all available bit rates from
the AudioFormat API.
@constant kAudioConverterApplicableEncodeSampleRates
The property value is an array of AudioValueRange describing applicable
sample rates based on current settings.
@constant kAudioConverterAvailableEncodeSampleRates
The property value is an array of AudioValueRange describing available
sample rates based on the input format. You can get all available sample
rates from the AudioFormat API.
@constant kAudioConverterAvailableEncodeChannelLayoutTags
The property value is an array of AudioChannelLayoutTags for the format and
number of channels specified in the input format going to the encoder.
@constant kAudioConverterCurrentOutputStreamDescription
Returns the current completely specified output AudioStreamBasicDescription.
For example when encoding to AAC, your original output stream description
will not have been completely filled out.
@constant kAudioConverterCurrentInputStreamDescription
Returns the current completely specified input AudioStreamBasicDescription.
@constant kAudioConverterPropertySettings
Returns the a CFArray of property settings for converters.
@constant kAudioConverterPropertyBitDepthHint
An SInt32 of the source bit depth to preserve. This is a hint to some
encoders like lossless about how many bits to preserve in the input. The
converter usually tries to preserve as many as possible, but a lossless
encoder will do poorly if more bits are supplied than are desired in the
output. The bit depth is expressed as a negative number if the source was floating point,
e.g. -32 for float, -64 for double.
@constant kAudioConverterPropertyFormatList
An array of AudioFormatListItem structs describing all the data formats produced by the
encoder end of the AudioConverter. If the ioPropertyDataSize parameter indicates that
outPropertyData is sizeof(AudioFormatListItem), then only the best format is returned.
This property may be used for example to discover all the data formats produced by the AAC_HE2
(AAC High Efficiency vers. 2) encoder.
*/
CF_ENUM(AudioConverterPropertyID)
{
kAudioConverterPropertyMinimumInputBufferSize = 'mibs',
kAudioConverterPropertyMinimumOutputBufferSize = 'mobs',
kAudioConverterPropertyMaximumInputPacketSize = 'xips',
kAudioConverterPropertyMaximumOutputPacketSize = 'xops',
kAudioConverterPropertyCalculateInputBufferSize = 'cibs',
kAudioConverterPropertyCalculateOutputBufferSize = 'cobs',
kAudioConverterPropertyInputCodecParameters = 'icdp',
kAudioConverterPropertyOutputCodecParameters = 'ocdp',
kAudioConverterSampleRateConverterComplexity = 'srca',
kAudioConverterSampleRateConverterQuality = 'srcq',
kAudioConverterSampleRateConverterInitialPhase = 'srcp',
kAudioConverterCodecQuality = 'cdqu',
kAudioConverterPrimeMethod = 'prmm',
kAudioConverterPrimeInfo = 'prim',
kAudioConverterChannelMap = 'chmp',
kAudioConverterDecompressionMagicCookie = 'dmgc',
kAudioConverterCompressionMagicCookie = 'cmgc',
kAudioConverterEncodeBitRate = 'brat',
kAudioConverterEncodeAdjustableSampleRate = 'ajsr',
kAudioConverterInputChannelLayout = 'icl ',
kAudioConverterOutputChannelLayout = 'ocl ',
kAudioConverterApplicableEncodeBitRates = 'aebr',
kAudioConverterAvailableEncodeBitRates = 'vebr',
kAudioConverterApplicableEncodeSampleRates = 'aesr',
kAudioConverterAvailableEncodeSampleRates = 'vesr',
kAudioConverterAvailableEncodeChannelLayoutTags = 'aecl',
kAudioConverterCurrentOutputStreamDescription = 'acod',
kAudioConverterCurrentInputStreamDescription = 'acid',
kAudioConverterPropertySettings = 'acps',
kAudioConverterPropertyBitDepthHint = 'acbd',
kAudioConverterPropertyFormatList = 'flst'
};
#if !TARGET_OS_IPHONE
//=============================================================================
//
//=============================================================================
/*!
@enum macOS AudioConverter Properties
@constant kAudioConverterPropertyDithering
A UInt32. Set to a value from the enum of dithering algorithms below.
Zero means no dithering and is the default. (macOS only.)
@constant kAudioConverterPropertyDitherBitDepth
A UInt32. Dither is applied at this bit depth. (macOS only.)
*/
CF_ENUM(AudioConverterPropertyID)
{
kAudioConverterPropertyDithering = 'dith',
kAudioConverterPropertyDitherBitDepth = 'dbit'
};
/*!
@enum Dithering algorithms
@abstract Constants to be used as the value for kAudioConverterPropertyDithering.
@constant kDitherAlgorithm_TPDF Dither signal is generated by a white noise source with a triangular probability density function
@constant kDitherAlgorithm_NoiseShaping Use a static, perceptually weighted noise shaped dither
*/
CF_ENUM(UInt32)
{
kDitherAlgorithm_TPDF = 1,
kDitherAlgorithm_NoiseShaping = 2
};
#endif
/*!
@enum Quality constants
@abstract Constants to be used with kAudioConverterSampleRateConverterQuality.
@constant kAudioConverterQuality_Max
maximum quality
@constant kAudioConverterQuality_High
high quality
@constant kAudioConverterQuality_Medium
medium quality
@constant kAudioConverterQuality_Low
low quality
@constant kAudioConverterQuality_Min
minimum quality
*/
CF_ENUM(UInt32)
{
kAudioConverterQuality_Max = 0x7F,
kAudioConverterQuality_High = 0x60,
kAudioConverterQuality_Medium = 0x40,
kAudioConverterQuality_Low = 0x20,
kAudioConverterQuality_Min = 0
};
/*!
@enum Sample Rate Converter Complexity
@constant kAudioConverterSampleRateConverterComplexity_Linear
@discussion Linear interpolation. lowest quality, cheapest.
InitialPhase and PrimeMethod properties are not operative with this mode.
@constant kAudioConverterSampleRateConverterComplexity_Normal
@discussion Normal quality sample rate conversion.
@constant kAudioConverterSampleRateConverterComplexity_Mastering
@discussion Mastering quality sample rate conversion. More expensive.
@constant kAudioConverterSampleRateConverterComplexity_MinimumPhase
@discussion Minimum phase impulse response. Stopband attenuation varies with quality setting.
The InitialPhase and PrimeMethod properties are not operative with this mode.
There are three levels of quality provided.
kAudioConverterQuality_Low (or Min) : noise floor to -96 dB
kAudioConverterQuality_Medium : noise floor to -144 dB
kAudioConverterQuality_High (or Max) : noise floor to -160 dB (this uses double precision internally)
Quality equivalences to the other complexity modes are very roughly as follows:
MinimumPhase Low is somewhat better than Normal Medium.
MinimumPhase Medium is similar to Normal Max.
MinimumPhase High is similar to Mastering Low.
In general, MinimumPhase performs better than Normal and Mastering for the equivalent qualities listed above.
MinimumPhase High is several times faster than Mastering Low.
*/
CF_ENUM(UInt32)
{
kAudioConverterSampleRateConverterComplexity_Linear = 'line', // linear interpolation
kAudioConverterSampleRateConverterComplexity_Normal = 'norm', // normal quality range, the default
kAudioConverterSampleRateConverterComplexity_Mastering = 'bats', // higher quality range, more expensive
kAudioConverterSampleRateConverterComplexity_MinimumPhase = 'minp' // minimum phase impulse response.
};
/*!
@enum Prime method constants
@abstract Constants to be used with kAudioConverterPrimeMethod.
@constant kConverterPrimeMethod_Pre
Primes with leading + trailing input frames.
@constant kConverterPrimeMethod_Normal
Only primes with trailing (zero latency). Leading frames are assumed to be
silence.
@constant kConverterPrimeMethod_None
Acts in "latency" mode. Both leading and trailing frames assumed to be
silence.
*/
CF_ENUM(UInt32)
{
kConverterPrimeMethod_Pre = 0,
kConverterPrimeMethod_Normal = 1,
kConverterPrimeMethod_None = 2
};
/*!
@struct AudioConverterPrimeInfo
@abstract Specifies priming information.
When using AudioConverterFillComplexBuffer() (either a single call or a series of calls), some
conversions, particularly involving sample-rate conversion, ideally require a certain
number of input frames previous to the normal start input frame and beyond the end of
the last expected input frame in order to yield high-quality results.
These are expressed in the leadingFrames and trailingFrames members of the structure.
The very first call to AudioConverterFillComplexBuffer(), or first call after
AudioConverterReset(), will request additional input frames beyond those normally
expected in the input proc callback to fulfill this first AudioConverterFillComplexBuffer()
request. The number of additional frames requested, depending on the prime method, will
be approximately:
Prime method | Additional frames
------------------------------|----------------------
kConverterPrimeMethod_Pre | leadingFrames + trailingFrames
kConverterPrimeMethod_Normal | trailingFrames
kConverterPrimeMethod_None | 0
Thus, in effect, the first input proc callback(s) may provide not only the leading
frames, but also may "read ahead" by an additional number of trailing frames depending
on the prime method.
kConverterPrimeMethod_None is useful in a real-time application processing live input,
in which case trailingFrames (relative to input sample rate) of through latency will be
seen at the beginning of the output of the AudioConverter. In other real-time
applications such as DAW systems, it may be possible to provide these initial extra
audio frames since they are stored on disk or in memory somewhere and
kConverterPrimeMethod_Pre may be preferable. The default method is
kConverterPrimeMethod_Normal, which requires no pre-seeking of the input stream and
generates no latency at the output.
@var leadingFrames
Specifies the number of leading (previous) input frames, relative to the normal/desired
start input frame, required by the converter to perform a high quality conversion. If
using kConverterPrimeMethod_Pre, the client should "pre-seek" the input stream provided
through the input proc by leadingFrames. If no frames are available previous to the
desired input start frame (because, for example, the desired start frame is at the very
beginning of available audio), then provide "leadingFrames" worth of initial zero frames
in the input proc. Do not "pre-seek" in the default case of
kConverterPrimeMethod_Normal or when using kConverterPrimeMethod_None.
@var trailingFrames
Specifies the number of trailing input frames (past the normal/expected end input frame)
required by the converter to perform a high quality conversion. The client should be
prepared to provide this number of additional input frames except when using
kConverterPrimeMethod_None. If no more frames of input are available in the input stream
(because, for example, the desired end frame is at the end of an audio file), then zero
(silent) trailing frames will be synthesized for the client.
*/
struct AudioConverterPrimeInfo {
UInt32 leadingFrames;
UInt32 trailingFrames;
};
typedef struct AudioConverterPrimeInfo AudioConverterPrimeInfo;
//=============================================================================
// Errors
//=============================================================================
/*!
@enum AudioConverter errors
*/
CF_ENUM(OSStatus)
{
kAudioConverterErr_FormatNotSupported = 'fmt?',
kAudioConverterErr_OperationNotSupported = 0x6F703F3F, // 'op??', integer used because of trigraph
kAudioConverterErr_PropertyNotSupported = 'prop',
kAudioConverterErr_InvalidInputSize = 'insz',
kAudioConverterErr_InvalidOutputSize = 'otsz',
// e.g. byte size is not a multiple of the frame size
kAudioConverterErr_UnspecifiedError = 'what',
kAudioConverterErr_BadPropertySizeError = '!siz',
kAudioConverterErr_RequiresPacketDescriptionsError = '!pkd',
kAudioConverterErr_InputSampleRateOutOfRange = '!isr',
kAudioConverterErr_OutputSampleRateOutOfRange = '!osr'
};
#if TARGET_OS_IPHONE
/*!
@enum AudioConverter errors (iPhone only)
@abstract iPhone-specific OSStatus results for AudioConverter
@constant kAudioConverterErr_HardwareInUse
Returned from AudioConverterFillComplexBuffer if the underlying hardware codec has
become unavailable, probably due to an interruption. In this case, your application
must stop calling AudioConverterFillComplexBuffer. If the converter can resume from an
interruption (see kAudioConverterPropertyCanResumeFromInterruption), you must
wait for an EndInterruption notification from AudioSession, and call AudioSessionSetActive(true)
before resuming.
@constant kAudioConverterErr_NoHardwarePermission
Returned from AudioConverterNew if the new converter would use a hardware codec
which the application does not have permission to use.
*/
CF_ENUM(OSStatus)
{
kAudioConverterErr_HardwareInUse = 'hwiu',
kAudioConverterErr_NoHardwarePermission = 'perm'
};
#endif
//=============================================================================
// Routines
//=============================================================================
//-----------------------------------------------------------------------------
/*!
@function AudioConverterNew
@abstract Create a new AudioConverter.
@param inSourceFormat
The format of the source audio to be converted.
@param inDestinationFormat
The destination format to which the audio is to be converted.
@param outAudioConverter
On successful return, points to a new AudioConverter instance.
@result An OSStatus result code.
For a pair of linear PCM formats, the following conversions
are supported:
<ul>
<li>addition and removal of channels, when the stream descriptions'
mChannelsPerFrame does not match. Channels may also be reordered and removed
using the kAudioConverterChannelMap property.</li>
<li>sample rate conversion</li>
<li>interleaving/deinterleaving, when the stream descriptions' (mFormatFlags &
kAudioFormatFlagIsNonInterleaved) does not match.</li>
<li>conversion between any pair of the following formats:</li>
<ul>
<li>8 bit integer, signed or unsigned</li>
<li>16, 24, or 32-bit integer, big- or little-endian. Other integral
bit depths, if high-aligned and non-packed, are also supported</li>
<li>32 and 64-bit float, big- or little-endian.</li>
</ul>
</ul>
Also, encoding and decoding between linear PCM and compressed formats is
supported. Functions in AudioToolbox/AudioFormat.h return information about the
supported formats. When using a codec, you can use any supported PCM format (as
above); the converter will perform any necessary additional conversion between
your PCM format and the one created or consumed by the codec.
*/
extern OSStatus
AudioConverterNew( const AudioStreamBasicDescription * inSourceFormat,
const AudioStreamBasicDescription * inDestinationFormat,
AudioConverterRef __nullable * __nonnull outAudioConverter) API_AVAILABLE(macos(10.1), ios(2.0), watchos(2.0), tvos(9.0));
//-----------------------------------------------------------------------------
/*!
@function AudioConverterNewSpecific
@abstract Create a new AudioConverter using specific codecs.
@param inSourceFormat
The format of the source audio to be converted.
@param inDestinationFormat
The destination format to which the audio is to be converted.
@param inNumberClassDescriptions
The number of class descriptions.
@param inClassDescriptions
AudioClassDescriptions specifiying the codec to instantiate.
@param outAudioConverter
On successful return, points to a new AudioConverter instance.
@result An OSStatus result code.
This function is identical to AudioConverterNew(), except that the client may
explicitly choose which codec to instantiate if there is more than one choice.
*/
extern OSStatus
AudioConverterNewSpecific( const AudioStreamBasicDescription * inSourceFormat,
const AudioStreamBasicDescription * inDestinationFormat,
UInt32 inNumberClassDescriptions,
const AudioClassDescription * inClassDescriptions,
AudioConverterRef __nullable * __nonnull outAudioConverter)
API_AVAILABLE(macos(10.4), ios(2.0), watchos(2.0), tvos(9.0));
//-----------------------------------------------------------------------------
/*!
@function AudioConverterDispose
@abstract Destroy an AudioConverter.
@param inAudioConverter
The AudioConverter to dispose.
@result An OSStatus result code.
*/
extern OSStatus
AudioConverterDispose( AudioConverterRef inAudioConverter) API_AVAILABLE(macos(10.1), ios(2.0), watchos(2.0), tvos(9.0));
//-----------------------------------------------------------------------------
/*!
@function AudioConverterReset
@abstract Reset an AudioConverter
@param inAudioConverter
The AudioConverter to reset.
@result An OSStatus result code.
Should be called whenever there is a discontinuity in the source audio stream
being provided to the converter. This will flush any internal buffers in the
converter.
*/
extern OSStatus
AudioConverterReset( AudioConverterRef inAudioConverter) API_AVAILABLE(macos(10.1), ios(2.0), watchos(2.0), tvos(9.0));
//-----------------------------------------------------------------------------
/*!
@function AudioConverterGetPropertyInfo
@abstract Returns information about an AudioConverter property.
@param inAudioConverter
The AudioConverter to query.
@param inPropertyID
The property to query.
@param outSize
If non-null, on exit, the maximum size of the property value in bytes.
@param outWritable
If non-null, on exit, indicates whether the property value is writable.
@result An OSStatus result code.
*/
extern OSStatus
AudioConverterGetPropertyInfo( AudioConverterRef inAudioConverter,
AudioConverterPropertyID inPropertyID,
UInt32 * __nullable outSize,
Boolean * __nullable outWritable) API_AVAILABLE(macos(10.1), ios(2.0), watchos(2.0), tvos(9.0));
//-----------------------------------------------------------------------------
/*!
@function AudioConverterGetProperty
@abstract Returns an AudioConverter property value.
@param inAudioConverter
The AudioConverter to query.
@param inPropertyID
The property to fetch.
@param ioPropertyDataSize
On entry, the size of the memory pointed to by outPropertyData. On
successful exit, the size of the property value.
@param outPropertyData
On exit, the property value.
@result An OSStatus result code.
*/
extern OSStatus
AudioConverterGetProperty( AudioConverterRef inAudioConverter,
AudioConverterPropertyID inPropertyID,
UInt32 * ioPropertyDataSize,
void * outPropertyData) API_AVAILABLE(macos(10.1), ios(2.0), watchos(2.0), tvos(9.0));
//-----------------------------------------------------------------------------
/*!
@function AudioConverterSetProperty
@abstract Sets an AudioConverter property value.
@param inAudioConverter
The AudioConverter to modify.
@param inPropertyID
The property to set.
@param inPropertyDataSize
The size in bytes of the property value.
@param inPropertyData
Points to the new property value.
@result An OSStatus result code.
*/
extern OSStatus
AudioConverterSetProperty( AudioConverterRef inAudioConverter,
AudioConverterPropertyID inPropertyID,
UInt32 inPropertyDataSize,
const void * inPropertyData) API_AVAILABLE(macos(10.1), ios(2.0), watchos(2.0), tvos(9.0));
//-----------------------------------------------------------------------------
/*!
@function AudioConverterConvertBuffer
@abstract Converts data from an input buffer to an output buffer.
@param inAudioConverter
The AudioConverter to use.
@param inInputDataSize
The size of the buffer inInputData.
@param inInputData
The input audio data buffer.
@param ioOutputDataSize
On entry, the size of the buffer outOutputData. On exit, the number of bytes
written to outOutputData.
@param outOutputData
The output data buffer.
@result
Produces a buffer of output data from an AudioConverter, using the supplied
input buffer.
WARNING: this function will fail for any conversion where there is a
variable relationship between the input and output data buffer sizes. This
includes sample rate conversions and most compressed formats. In these cases,
use AudioConverterFillComplexBuffer. Generally this function is only appropriate for
PCM-to-PCM conversions where there is no sample rate conversion.
*/
extern OSStatus
AudioConverterConvertBuffer( AudioConverterRef inAudioConverter,
UInt32 inInputDataSize,
const void * inInputData,
UInt32 * ioOutputDataSize,
void * outOutputData) API_AVAILABLE(macos(10.1), ios(2.0), watchos(2.0), tvos(9.0));
//-----------------------------------------------------------------------------
/*!
@typedef AudioConverterComplexInputDataProc
@abstract Callback function for supplying input data to AudioConverterFillComplexBuffer.
@param inAudioConverter
The AudioConverter requesting input.
@param ioNumberDataPackets
On entry, the minimum number of packets of input audio data the converter
would like in order to fulfill its current FillBuffer request. On exit, the
number of packets of audio data actually being provided for input, or 0 if
there is no more input.
@param ioData
On exit, the members of ioData should be set to point to the audio data
being provided for input.
@param outDataPacketDescription
If non-null, on exit, the callback is expected to fill this in with
an AudioStreamPacketDescription for each packet of input data being provided.
@param inUserData
The inInputDataProcUserData parameter passed to AudioConverterFillComplexBuffer().
@result An OSStatus result code.
This callback function supplies input to AudioConverterFillComplexBuffer.
The AudioConverter requests a minimum number of packets (*ioNumberDataPackets).
The callback may return one or more packets. If this is less than the minimum,
the callback will simply be called again in the near future.
The callback manipulates the members of ioData to point to one or more buffers
of audio data (multiple buffers are used with non-interleaved PCM data). The
callback is responsible for not freeing or altering this buffer until it is
called again.
If the callback returns an error, it must return zero packets of data.
AudioConverterFillComplexBuffer will stop producing output and return whatever
output has already been produced to its caller, along with the error code. This
mechanism can be used when an input proc has temporarily run out of data, but
has not yet reached end of stream.
*/
typedef OSStatus
(*AudioConverterComplexInputDataProc)( AudioConverterRef inAudioConverter,
UInt32 * ioNumberDataPackets,
AudioBufferList * ioData,
AudioStreamPacketDescription * __nullable * __nullable outDataPacketDescription,
void * __nullable inUserData);
//-----------------------------------------------------------------------------
/*!
@function AudioConverterFillComplexBuffer
@abstract Converts data supplied by an input callback function, supporting non-interleaved
and packetized formats.
@param inAudioConverter
The AudioConverter to use.
@param inInputDataProc
A callback function which supplies the input data.
@param inInputDataProcUserData
A value for the use of the callback function.
@param ioOutputDataPacketSize
On entry, the capacity of outOutputData expressed in packets in the
converter's output format. On exit, the number of packets of converted
data that were written to outOutputData.
@param outOutputData
The converted output data is written to this buffer. On entry, the buffers'
mDataByteSize fields (which must all be the same) reflect buffer capacity.
On exit, mDataByteSize is set to the number of bytes written.
@param outPacketDescription
If non-null, and the converter's output uses packet descriptions, then
packet descriptions are written to this array. It must point to a memory
block capable of holding *ioOutputDataPacketSize packet descriptions.
(See AudioFormat.h for ways to determine whether an audio format
uses packet descriptions).
@result An OSStatus result code.
Produces a buffer list of output data from an AudioConverter. The supplied input
callback function is called whenever necessary.
*/
extern OSStatus
AudioConverterFillComplexBuffer( AudioConverterRef inAudioConverter,
AudioConverterComplexInputDataProc inInputDataProc,
void * __nullable inInputDataProcUserData,
UInt32 * ioOutputDataPacketSize,
AudioBufferList * outOutputData,
AudioStreamPacketDescription * __nullable outPacketDescription)
API_AVAILABLE(macos(10.2), ios(2.0), watchos(2.0), tvos(9.0));
//-----------------------------------------------------------------------------
/*!
@function AudioConverterConvertComplexBuffer
@abstract Converts PCM data from an input buffer list to an output buffer list.
@param inAudioConverter
The AudioConverter to use.
@param inNumberPCMFrames
The number of PCM frames to convert.
@param inInputData
The source audio buffer list.
@param outOutputData
The converted output data is written to this buffer list.
@result An OSStatus result code.
@warning This function will fail for any conversion where there is a
variable relationship between the input and output data buffer sizes. This
includes sample rate conversions and most compressed formats. In these cases,
use AudioConverterFillComplexBuffer. Generally this function is only appropriate for
PCM-to-PCM conversions where there is no sample rate conversion.
*/
extern OSStatus
AudioConverterConvertComplexBuffer( AudioConverterRef inAudioConverter,
UInt32 inNumberPCMFrames,
const AudioBufferList * inInputData,
AudioBufferList * outOutputData)
API_AVAILABLE(macos(10.7), ios(5.0), watchos(2.0), tvos(9.0));
// =================================================================================================
// DEPRECATED
// =================================================================================================
/*
Deprecated properties:
@constant kAudioConverterPropertyMaximumInputBufferSize
DEPRECATED. The AudioConverter input proc may be passed any number of packets of data.
If fewer are packets are returned than required, then the input proc will be called again.
If more packets are passed than required, they will remain in the client's buffer and be
consumed as needed.
@constant kAudioConverterSampleRateConverterAlgorithm
DEPRECATED: please use kAudioConverterSampleRateConverterComplexity instead
*/
CF_ENUM(AudioConverterPropertyID)
{
kAudioConverterPropertyMaximumInputBufferSize = 'xibs',
kAudioConverterSampleRateConverterAlgorithm = 'srci',
};
#if TARGET_OS_IPHONE
/*!
@enum AudioConverterPropertyID (iOS only)
@abstract iOS-specific properties of an AudioConverter, accessible via AudioConverterGetProperty()
and AudioConverterSetProperty().
@constant kAudioConverterPropertyCanResumeFromInterruption
A read-only UInt32 signifying whether the underlying codec supports resumption following
an interruption. If the property is unimplemented (i.e. AudioConverterGetProperty
returns an error), then the codec is not a hardware codec. If the property's value
is 1, then the codec can resume work following an interruption. If the property's
value is 0, then interruptions destroy the codec's state.
DEPRECATED: Hardware codecs are no longer supported.
*/
CF_ENUM(AudioConverterPropertyID)
{
kAudioConverterPropertyCanResumeFromInterruption = 'crfi'
};
#endif
//-----------------------------------------------------------------------------
/*!
@typedef AudioConverterInputDataProc
@abstract Callback function for supplying input data to AudioConverterFillBuffer.
@param inAudioConverter
The AudioConverter requesting input.
@param ioDataSize
On entry, the minimum number of bytes of audio data the converter
would like in order to fulfill its current FillBuffer request.
On exit, the number of bytes of audio data actually being provided
for input, or 0 if there is no more input.
@param outData
On exit, *outData should point to the audio data being provided
for input.
@param inUserData
The inInputDataProcUserData parameter passed to AudioConverterFillBuffer().
@result An OSStatus result code.
This callback function supplies input to AudioConverterFillBuffer.
The AudioConverter requests a minimum amount of data (*ioDataSize). The callback
may return any amount of data. If it is less than than the minimum, the callback
will simply be called again in the near future.
The callback supplies a pointer to a buffer of audio data. The callback is
responsible for not freeing or altering this buffer until it is called again.
If the callback returns an error, it must return zero bytes of data.
AudioConverterFillBuffer will stop producing output and return whatever output
has already been produced to its caller, along with the error code. This
mechanism can be used when an input proc has temporarily run out of data, but
has not yet reached end of stream.
@deprecated This API is now deprecated, use AudioConverterFillComplexBuffer instead.
*/
typedef OSStatus
(*AudioConverterInputDataProc)( AudioConverterRef inAudioConverter,
UInt32 * ioDataSize,
void * __nonnull * __nonnull outData,
void * __nullable inUserData);
//-----------------------------------------------------------------------------
/*!
@function AudioConverterFillBuffer
@abstract Converts data supplied by an input callback function.
@param inAudioConverter
The AudioConverter to use.
@param inInputDataProc
A callback function which supplies the input data.
@param inInputDataProcUserData
A value for the use of the callback function.
@param ioOutputDataSize
On entry, the size of the buffer pointed to by outOutputData.
On exit, the number of bytes written to outOutputData
@param outOutputData
The buffer into which the converted data is written.
@result An OSStatus result code.
Produces a buffer of output data from an AudioConverter. The supplied input
callback function is called whenever necessary.
@deprecated This API is now deprecated, use AudioConverterFillComplexBuffer instead.
*/
#if !TARGET_OS_IPHONE
extern OSStatus
AudioConverterFillBuffer( AudioConverterRef inAudioConverter,
AudioConverterInputDataProc inInputDataProc,
void * __nullable inInputDataProcUserData,
UInt32 * ioOutputDataSize,
void * outOutputData)
API_DEPRECATED("no longer supported", macos(10.1, 10.5)) API_UNAVAILABLE(ios, watchos, tvos);
#endif // !TARGET_OS_IPHONE
#if defined(__cplusplus)
}
#endif
CF_ASSUME_NONNULL_END
#endif // AudioToolbox_AudioConverter_h
#else
#include <AudioToolboxCore/AudioConverter.h>
#endif
|
0 | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/AudioToolbox.framework | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/AudioToolbox.framework/Headers/AUGraph.h | /*!
@file AUGraph.h
@framework AudioToolbox.framework
@copyright (c) 2000-2015 by Apple, Inc., all rights reserved.
@abstract API's to manage graphs of AudioUnits.
An AUGraph is a complete description of an audio signal processing network. The AUGraph
API's maintain a set of AudioUnits, audio connections between their inputs and outputs, and
any callbacks used to provide inputs. It also allows the embedding of sub-graphs within
parent graphs to allow for a logical organization of parts of an overall signal chain. The
graph's AudioUnits do the actual audio processing.
The AUGraph may be introspected, in order to get complete information about all of the
AudioUnits in the graph. The various nodes (AUNode) in the AUGraph representing AudioUnits
or sub graphs may be added or removed, and the interactions between them modified.
An AUGraph's state can be manipulated in both the rendering thread and in other threads.
Consequently, any activities that affect the state of the graph are guarded with locks and a
messaging model between any calling thread and the thread upon which the AUGraph's output
unit is called (the render thread).
An AUGraph will have a single head node - what is referred to below as its output unit. The
output unit is used to both start and stop the rendering operations of a graph, and as the
dispatch point for the safe manipulation of the state of the graph while it is running.
*/
#ifndef AudioToolbox_AUGraph_h
#define AudioToolbox_AUGraph_h
#include <AudioToolbox/AudioUnit.h>
CF_ASSUME_NONNULL_BEGIN
#if defined(__cplusplus)
extern "C"
{
#endif
#define AUGRAPH_DEPRECATED(macos_intro) API_DEPRECATED("AUGraph is deprecated in favor of AVAudioEngine", macos(macos_intro, API_TO_BE_DEPRECATED), ios(2.0, API_TO_BE_DEPRECATED), watchos(2.0, API_TO_BE_DEPRECATED), tvos(9.0, API_TO_BE_DEPRECATED))
/*!
@typedef AUGraph
@abstract A reference to an AUGraph object.
*/
typedef struct OpaqueAUGraph *AUGraph;
/*!
@typedef AUNode
@abstract Used to represent a member of an AUGraph
*/
typedef SInt32 AUNode;
/*!
@enum AUGraph error codes
@abstract These are the error codes returned from the AUGraph API.
@constant kAUGraphErr_NodeNotFound
The specified node cannot be found
@constant kAUGraphErr_InvalidConnection
The attempted connection between two nodes cannot be made
@constant kAUGraphErr_OutputNodeErr
AUGraphs can only contain one OutputUnit.
this error is returned if trying to add a second output unit
or the graph's output unit is removed while the graph is running
@constant kAUGraphErr_CannotDoInCurrentContext
To avoid spinning or waiting in the render thread (a bad idea!), many of the
calls to AUGraph can return: kAUGraphErr_CannotDoInCurrentContext. This
result is only generated when you call an AUGraph API from its render
callback. It means that the lock that it required was held at that time, by
another thread. If you see this result code, you can generally attempt the
action again - typically the NEXT render cycle (so in the mean time the lock
can be cleared), or you can delegate that call to another thread in your
app. You should not spin or put-to-sleep the render thread.
@constant kAUGraphErr_InvalidAudioUnit
*/
CF_ENUM(OSStatus)
{
kAUGraphErr_NodeNotFound = -10860,
kAUGraphErr_InvalidConnection = -10861,
kAUGraphErr_OutputNodeErr = -10862,
kAUGraphErr_CannotDoInCurrentContext = -10863,
kAUGraphErr_InvalidAudioUnit = -10864
};
#pragma mark -
/*!
@function NewAUGraph
@abstract Create a new AUGraph
@param outGraph the new AUGraph object
*/
extern OSStatus
NewAUGraph( AUGraph __nullable * __nonnull outGraph) AUGRAPH_DEPRECATED(10.0);
/*!
@function DisposeAUGraph
@abstract Dispose an AUGraph
Deallocates the AUGraph along with its nodes and their resources.
@param inGraph the AUGraph object to be disposed
*/
extern OSStatus
DisposeAUGraph( AUGraph inGraph) AUGRAPH_DEPRECATED(10.0);
#pragma mark -
#pragma mark Node State
/// @name AU Node management
/// @{
/*!
@function AUGraphAddNode
@abstract Add a node to an AUGraph
Creates a node in the graph that is an AudioUnit, using the supplied
AudioComponentDescription to find and open that unit.
@param inGraph the AUGraph object
@param inDescription the AudioComponentDescription used to find and open the AudioUnit
@param outNode the newly added node
*/
extern OSStatus
AUGraphAddNode( AUGraph inGraph,
const AudioComponentDescription * inDescription,
AUNode * outNode) AUGRAPH_DEPRECATED(10.5);
/*!
@function AUGraphRemoveNode
@abstract Remove a node from an AUGraph
Nodes can be removed from any thread context. The output node of
the AUGraph cannot be removed while the graph is running.
@param inGraph the AUGraph object
@param inNode the node to be removed
*/
extern OSStatus
AUGraphRemoveNode( AUGraph inGraph,
AUNode inNode) AUGRAPH_DEPRECATED(10.0);
/*!
@function AUGraphGetNodeCount
@abstract The number of nodes in an AUGraph
@param inGraph the AUGraph object
@param outNumberOfNodes the number of nodes
*/
extern OSStatus
AUGraphGetNodeCount(AUGraph inGraph,
UInt32 *outNumberOfNodes) AUGRAPH_DEPRECATED(10.0);
/*!
@function AUGraphGetIndNode
@abstract Returns the node at a given index
By using AUGraphGetNodeCount in conjunction with this call, you can
iterate through the nodes of an AUGraph.
@param inGraph the AUGraph object
@param inIndex the index of the node to retrieve
@param outNode the node at that index
*/
extern OSStatus
AUGraphGetIndNode( AUGraph inGraph,
UInt32 inIndex,
AUNode *outNode) AUGRAPH_DEPRECATED(10.0);
/*!
@function AUGraphNodeInfo
@abstract Returns information about a particular AUNode
You can pass in NULL for any of the out parameters if you're not interested
in that value.
@param inGraph the AUGraph object
@param inNode the node to query
@param outDescription the component description that would describe the AudioUnit of this node
@param outAudioUnit the AudioUnit of this node
*/
extern OSStatus
AUGraphNodeInfo( AUGraph inGraph,
AUNode inNode,
AudioComponentDescription * __nullable outDescription,
AudioUnit __nullable * __nullable outAudioUnit) AUGRAPH_DEPRECATED(10.5);
/// @}
#if !TARGET_OS_IPHONE
#pragma mark -
#pragma mark Sub Graphs
/// @name Sub Graph Nodes
/// @{
/*!
@function AUGraphNewNodeSubGraph
@abstract Create a node that will represent a sub graph
This will create a node that represents a contained or member AUGraph.
The AUGraph can be retrieved through the GetNodeInfoSubGraph call.
The member AUGraph is owned by the parent graph and will be disposed when
either:
1. The parent graph is disposed
2. The node is removed from the parent AUGraph
@param inGraph the AUGraph object
@param outNode the node that is used to refer to the sub-graph
*/
extern OSStatus
AUGraphNewNodeSubGraph( AUGraph inGraph,
AUNode *outNode) API_DEPRECATED("no longer supported", macos(10.2, API_TO_BE_DEPRECATED)) API_UNAVAILABLE(ios, watchos, tvos);
/*!
@function AUGraphGetNodeInfoSubGraph
@abstract Return an AUGraph represented by this node
This will return the sub graph represented by this AUNode.
@param inGraph the AUGraph object
@param inNode the node to query
@param outSubGraph the sub-graph
*/
extern OSStatus
AUGraphGetNodeInfoSubGraph( const AUGraph inGraph,
AUNode inNode,
AUGraph __nullable * __nonnull outSubGraph) API_DEPRECATED("no longer supported", macos(10.2, API_TO_BE_DEPRECATED)) API_UNAVAILABLE(ios, watchos, tvos);
/*!
@function AUGraphIsNodeSubGraph
@abstract Determine whether the node represents a sub graph
This will return true if the specified node represents a subgraph, false if not.
@param inGraph the AUGraph object
@param inNode the node to query
@param outFlag true if the node is a subgraph, false if not
*/
extern OSStatus
AUGraphIsNodeSubGraph( const AUGraph inGraph,
AUNode inNode,
Boolean * outFlag) API_DEPRECATED("no longer supported", macos(10.2, API_TO_BE_DEPRECATED)) API_UNAVAILABLE(ios, watchos, tvos);
#endif // !TARGET_OS_IPHONE
/// @}
#pragma mark -
#pragma mark Node Interactions
/// @name Node Interactions
/// @{
/*!
@abstract The different types of node interactions
We use the term interaction as a general term to describe some interaction
of a node. Currently, the interactions of a node that the graph manages are
described below.
@constant kAUNodeInteraction_Connection
connections between 2 audio units,
@constant kAUNodeInteraction_InputCallback
input callbacks being registered to a single audio unit's input bus.
*/
CF_ENUM(UInt32) {
kAUNodeInteraction_Connection = 1,
kAUNodeInteraction_InputCallback = 2
};
/*!
@struct AudioUnitNodeConnection
@abstract A connection between two nodes
@var sourceNode
@var sourceOutputNumber
@var destNode
@var destInputNumber
*/
struct AudioUnitNodeConnection
{
AUNode sourceNode;
UInt32 sourceOutputNumber;
AUNode destNode;
UInt32 destInputNumber;
};
typedef struct AudioUnitNodeConnection AudioUnitNodeConnection;
typedef struct AudioUnitNodeConnection AUNodeConnection;
/*!
@struct AUNodeRenderCallback
@abstract A callback used to provide input to an audio unit
Used to contain information when a callback is used
to provide input to the specific node's specified input
@var destNode
@var destInputNumber
@var cback
*/
struct AUNodeRenderCallback
{
AUNode destNode;
AudioUnitElement destInputNumber;
AURenderCallbackStruct cback;
};
typedef struct AUNodeRenderCallback AUNodeRenderCallback;
/*!
@struct AUNodeInteraction
@abstract Used to describe the interaction between/with a node
This structure contains information about the interaction between
two nodes (in the case of a connection), or the input to a node
(in the case of a callback).
The type of the interaction is used to determine how to interpret the contents
of the following union.
There may be other nodal interactions in the future, so NO ASSUMPTIONS should be made
that these are the only 2 nodal interaction types; you must always check the
nodeInteractionType and only act on those types you understand
Arrays of these structs can be returned, the addition of new members to the
nodeInteraction union will NOT change the size of this structure
@var nodeInteractionType the interaction type
@var nodeInteraction a union providing information about the specified interaction
*/
struct AUNodeInteraction
{
UInt32 nodeInteractionType;
union
{
AUNodeConnection connection;
AUNodeRenderCallback inputCallback;
} nodeInteraction;
};
typedef struct AUNodeInteraction AUNodeInteraction;
/*!
@function AUGraphConnectNodeInput
@abstract connect a node's output to a node's input
*/
extern OSStatus
AUGraphConnectNodeInput( AUGraph inGraph,
AUNode inSourceNode,
UInt32 inSourceOutputNumber,
AUNode inDestNode,
UInt32 inDestInputNumber) AUGRAPH_DEPRECATED(10.0);
/*!
@function AUGraphSetNodeInputCallback
@abstract Set a callback for the specified node's specified input.
@param inInputCallback The callback that will provide input data to the node
*/
extern OSStatus
AUGraphSetNodeInputCallback (AUGraph inGraph,
AUNode inDestNode,
UInt32 inDestInputNumber,
const AURenderCallbackStruct * inInputCallback)
AUGRAPH_DEPRECATED(10.5);
/*!
@function AUGraphDisconnectNodeInput
@abstract disconnect a node's input
This can be used to disconnect either a connection or callback interaction
to the specified node input
*/
extern OSStatus
AUGraphDisconnectNodeInput( AUGraph inGraph,
AUNode inDestNode,
UInt32 inDestInputNumber) AUGRAPH_DEPRECATED(10.0);
/*!
@function AUGraphClearConnections
@abstract clear all of the interactions in a graph
This will clear all connections and callback interactions of the nodes of a graph
*/
extern OSStatus
AUGraphClearConnections( AUGraph inGraph) AUGRAPH_DEPRECATED(10.0);
/*!
@function AUGraphGetNumberOfInteractions
@abstract Retrieve the number of interactions of a graph
The number of node interactions currently being managed by the graph
*/
extern OSStatus
AUGraphGetNumberOfInteractions( AUGraph inGraph,
UInt32 * outNumInteractions) AUGRAPH_DEPRECATED(10.5);
/*!
@function AUGraphGetInteractionInfo
@abstract Retrieve information about a particular interaction in a graph
Returns information about a particular interaction.
inInteractionIndex is based on the outNumInteractions value and is only valid if no
edits to the graph's state have been made.
An app can iterate through the interactions (as with the nodes) of a graph by retrieving
the number of interactions, and then iterating an index from 0 < numInteractions
@param outInteraction the interaction information at the specified index
*/
extern OSStatus
AUGraphGetInteractionInfo( AUGraph inGraph,
UInt32 inInteractionIndex,
AUNodeInteraction * outInteraction) AUGRAPH_DEPRECATED(10.5);
/*!
@function AUGraphCountNodeInteractions
@abstract Retrieve the number of interactions of a graph's node
The number of node interactions currently being managed by the graph for the specified node.
*/
extern OSStatus
AUGraphCountNodeInteractions( AUGraph inGraph,
AUNode inNode,
UInt32 * outNumInteractions) AUGRAPH_DEPRECATED(10.5);
/*!
@function AUGraphGetNodeInteractions
@abstract Retrieve information about the interactions in a graph for a given node
@param ioNumInteractions
on input, specifies the number of interactions that can be returned
on output, specifies the number of interactions returned.
@param outInteractions the interactions the specified node is involved in
*/
extern OSStatus
AUGraphGetNodeInteractions( AUGraph inGraph,
AUNode inNode,
UInt32 * ioNumInteractions,
AUNodeInteraction * outInteractions) AUGRAPH_DEPRECATED(10.5);
/// @}
#pragma mark -
/// @name Updating an AUGraph
/// @{
/*!
@function AUGraphUpdate
@abstract Updates the state of a running AUGraph
Call this after performing a series of "edits" on the AUGraph with calls
such as AUGraphConnectNodeInput() to finalize those edits.
The call will be synchronous if outIsUpdated is NULL,
meaning it will block until the changes are incorporated
into the graph OR an error is returned from the update process
if outIsUpdated is non-NULL, then AUGraphUpdate() will return
immediately and outIsUpdated will equal "true" if the changes
were already made (no more changes to make) or "false" if changes are still
outstanding.
Calling from the AUGraphRenderNotification callback:
Connection and Disconnection events can be completely processed
in the render notification callback of the AUGraph
Nodes can also be removed (except for the output node or a sub-graph of the AUGraph)
as well.
Getting kAUGraphErr_CannotDoInCurrentContext as a result code:
If AUGraphUpdate returns this result, then it means it was
unable to process the update, due to an inability to safely
alter the state of the graph (because another thread was accessing
a call that relies on the graph's state having integrity).
This result code is only a transitory state, which will pass as soon
as your other thread's call to AUGraph (that has the lock) completes.
If an error is encountered in the process of an update (say an invalid connection
is attempted, a disconnection between nodes that are not connected, etc) on a running graph,
then the call will return that error code. It only process events whilst it receives
no error results. Thus, if an error is encountered, other events will not be
processed until AUGraphUpdate is called again. This is done, in cases where
the state of the graph could become inconsistent if further events were processed, so
this decision is left up to you. The same applies to the "cant do" error - you have
to explicitly call AUGraphUpdate again to have the processing of the events occur.
@param outIsUpdated if specified returns true if all of the edits were applied to the graph
*/
extern OSStatus
AUGraphUpdate( AUGraph inGraph,
Boolean * __nullable outIsUpdated) AUGRAPH_DEPRECATED(10.0);
/// @}
#pragma mark -
#pragma mark State Management
/// @name AUGraph state management
/// @{
/*!
@function AUGraphOpen
@abstract Open a graph
AudioUnits are open but not initialized (no resource allocation occurs here)
*/
extern OSStatus
AUGraphOpen( AUGraph inGraph) AUGRAPH_DEPRECATED(10.0);
/*!
@function AUGraphClose
@abstract Close a graph
All AudioUnits are closed - leaving only its nodal representation
*/
extern OSStatus
AUGraphClose( AUGraph inGraph) AUGRAPH_DEPRECATED(10.0);
/*!
@function AUGraphInitialize
@abstract Initialise a graph
AudioUnitInitialize() is called on each opened node/AudioUnit
(get ready to render) and SubGraph that are involved in a
interaction. If the node is not involved, it is initialised
after it becomes involved in an interaction.
A graph must be opened before it can be initialised.
*/
extern OSStatus
AUGraphInitialize( AUGraph inGraph) AUGRAPH_DEPRECATED(10.0);
/*!
@function AUGraphUninitialize
@abstract Uninitialise a graph
The member of the graph are uninitialised
*/
extern OSStatus
AUGraphUninitialize( AUGraph inGraph) AUGRAPH_DEPRECATED(10.0);
/*!
@function AUGraphStart
@abstract Start a graph
Start() is called on the "head" node(s) of the AUGraph (now rendering starts)
The graph must be initialised before it can be started.
*/
extern OSStatus
AUGraphStart( AUGraph inGraph) AUGRAPH_DEPRECATED(10.0);
/*!
@function AUGraphStop
@abstract Stop a graph
Stop() is called on the "head" node(s) of the AUGraph (rendering is stopped)
*/
extern OSStatus
AUGraphStop( AUGraph inGraph) AUGRAPH_DEPRECATED(10.0);
/*!
@function AUGraphIsOpen
@abstract Is the graph open
*/
extern OSStatus
AUGraphIsOpen( AUGraph inGraph,
Boolean *outIsOpen) AUGRAPH_DEPRECATED(10.0);
/*!
@function AUGraphIsInitialized
@abstract Is the graph initialised
*/
extern OSStatus
AUGraphIsInitialized( AUGraph inGraph,
Boolean *outIsInitialized) AUGRAPH_DEPRECATED(10.0);
/*!
@function AUGraphIsRunning
@abstract Is the graph running (has it been started)
*/
extern OSStatus
AUGraphIsRunning( AUGraph inGraph,
Boolean *outIsRunning) AUGRAPH_DEPRECATED(10.0);
/// @}
#pragma mark -
#pragma mark Utilities
/// @name AUGraph utilities
/// @{
/*!
@function AUGraphGetCPULoad
@abstract The CPU load of the graph
Returns a short-term running average of the current CPU load of the graph.
*/
extern OSStatus
AUGraphGetCPULoad( AUGraph inGraph,
Float32 *outAverageCPULoad) AUGRAPH_DEPRECATED(10.1);
/*!
@function AUGraphGetMaxCPULoad
@abstract The Maximum CPU load of the graph
Returns the max CPU load of the graph since this call was last made or the graph was last
started.
*/
extern OSStatus
AUGraphGetMaxCPULoad( AUGraph inGraph,
Float32 *outMaxLoad) AUGRAPH_DEPRECATED(10.3);
/*!
@function AUGraphAddRenderNotify
@abstract Add a notification callback
Add a callback that the graph will call every time the graph renders. The callback will be
called once before the graph's render operation, and once after the render operation is
complete.
*/
extern OSStatus
AUGraphAddRenderNotify( AUGraph inGraph,
AURenderCallback inCallback,
void * __nullable inRefCon) AUGRAPH_DEPRECATED(10.2);
/*!
@function AUGraphRemoveRenderNotify
@abstract Remove a notification callback
Remove a previously added callback. You must provide both the callback and the refCon that was
used previously to add the callback.
*/
extern OSStatus
AUGraphRemoveRenderNotify( AUGraph inGraph,
AURenderCallback inCallback,
void * __nullable inRefCon) AUGRAPH_DEPRECATED(10.2);
/// @}
#pragma mark -
#pragma mark Deprecated
#if !TARGET_OS_IPHONE
struct ComponentDescription;
/*!
@function AUGraphNewNode
ClassInfo data should not be used with new nodes
@param inClassData
must be null
@deprecated in 10.5, see AUGraphAddNode
*/
extern OSStatus
AUGraphNewNode( AUGraph inGraph,
const struct ComponentDescription *inDescription,
UInt32 inClassDataSize,
const void *inClassData,
AUNode *outNode) API_DEPRECATED("no longer supported", macos(10.0, 10.5)) API_UNAVAILABLE(ios, watchos, tvos);
/*!
@function AUGraphGetNodeInfo
ClassInfo data should not be used with new nodes
@deprecated in 10.5, see AUGraphNodeInfo
*/
extern OSStatus
AUGraphGetNodeInfo( AUGraph inGraph,
AUNode inNode,
struct ComponentDescription *outDescription,
UInt32 *outClassDataSize,
void * __nullable * __nullable outClassData,
AudioUnit __nullable * __nullable outAudioUnit) API_DEPRECATED("no longer supported", macos(10.0, 10.5)) API_UNAVAILABLE(ios, watchos, tvos);
/*!
@function AUGraphGetNumberOfConnections
@deprecated in 10.5, see AUGraphGetNumberOfInteractions
*/
extern OSStatus
AUGraphGetNumberOfConnections( AUGraph inGraph,
UInt32 *outNumConnections) API_DEPRECATED("no longer supported", macos(10.1, 10.5)) API_UNAVAILABLE(ios, watchos, tvos);
/*!
@function AUGraphGetConnectionInfo
@deprecated in 10.5, see AUGraphGetInteractionInfo
*/
extern OSStatus
AUGraphGetConnectionInfo( AUGraph inGraph,
UInt32 inConnectionIndex,
AUNode *outSourceNode,
UInt32 *outSourceOutputNumber,
AUNode *outDestNode,
UInt32 *outDestInputNumber) API_DEPRECATED("no longer supported", macos(10.1, 10.5)) API_UNAVAILABLE(ios, watchos, tvos);
/*!
@function AUGraphCountNodeConnections
@deprecated in 10.5, see AUGraphCountNodeInteractions
*/
extern OSStatus
AUGraphCountNodeConnections( AUGraph inGraph,
AUNode inNode,
UInt32 *outNumConnections) API_DEPRECATED("no longer supported", macos(10.3, 10.5)) API_UNAVAILABLE(ios, watchos, tvos);
/*!
@function AUGraphGetNodeConnections
@deprecated in 10.5, see AUGraphGetNodeInteractions
*/
extern OSStatus
AUGraphGetNodeConnections( AUGraph inGraph,
AUNode inNode,
AudioUnitNodeConnection *outConnections,
UInt32 *ioNumConnections)
API_DEPRECATED("no longer supported", macos(10.3, 10.5)) API_UNAVAILABLE(ios, watchos, tvos);
#endif //!TARGET_OS_IPHONE
#if defined(__cplusplus)
}
#endif
CF_ASSUME_NONNULL_END
#endif // AudioToolbox_AUGraph_h
|
0 | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/AudioToolbox.framework | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/AudioToolbox.framework/Headers/AudioFileStream.h | #if (defined(__USE_PUBLIC_HEADERS__) && __USE_PUBLIC_HEADERS__) || (defined(USE_AUDIOTOOLBOX_PUBLIC_HEADERS) && USE_AUDIOTOOLBOX_PUBLIC_HEADERS) || !__has_include(<AudioToolboxCore/AudioFileStream.h>)
/*!
@file AudioFileStream.h
@framework AudioToolbox.framework
@copyright (c) 1985-2015 by Apple, Inc., all rights reserved.
@brief API's to parse streamed audio files into packets of audio data.
@discussion
AudioFileStream addresses situations where, in a stream of audio data, only a limited window
of data may be available at any time.
This case differs significantly enough from the random access file case to warrant a separate
API rather than overload the AudioFile API with additional semantics. With a random access file,
one can always assume that a read request for contiguous data that doesn't include EOF will
always supply all of the data. This makes parsing straightforward and inexpensive. In the
streaming case such an assumption cannot be made. A request by the parser for data from the
stream may only be partially satisfied. Any partially satisfied requests must be remembered and
retried before any other requests are satisfied, otherwise the streamed data might be lost
forever in the past. So the parser must be able to suspend work at any point and resume parsing
where it left off.
The client provides data to the parser using AudioFileStreamParseBytes and the parser calls back
to the client with properties or packets using the AudioFileStream_PropertyListenerProc and
AudioFileStream_PacketsProc function pointers.
*/
#ifndef AudioToolbox_AudioFileStream_h
#define AudioToolbox_AudioFileStream_h
//=============================================================================
// Includes
//=============================================================================
#include <AudioToolbox/AudioFile.h>
CF_ASSUME_NONNULL_BEGIN
#if defined(__cplusplus)
extern "C"
{
#endif
//=============================================================================
// AudioFileStream flags
//=============================================================================
#pragma mark flags
/*!
@enum AudioFileStreamPropertyFlags
@constant kAudioFileStreamPropertyFlag_PropertyIsCached
This flag is set in a call to AudioFileStream_PropertyListenerProc when the value of the property
can be obtained at any later time. If this flag is not set, then you should either get the value of
the property from within this callback or set the flag kAudioFileStreamPropertyFlag_CacheProperty in order to signal
to the parser to begin caching the property data. Otherwise the value may not be available in the future.
@constant kAudioFileStreamPropertyFlag_CacheProperty
This flag can be set by a property listener in order to signal to the parser that the client is
interested in the value of the property and that it should be cached until the full value of the property is available.
*/
typedef CF_OPTIONS(UInt32, AudioFileStreamPropertyFlags) {
kAudioFileStreamPropertyFlag_PropertyIsCached = 1,
kAudioFileStreamPropertyFlag_CacheProperty = 2
};
/*! @enum AudioFileStreamParseFlags
@constant kAudioFileStreamParseFlag_Discontinuity
This flag is passed in to AudioFileStreamParseBytes to signal a discontinuity. Any partial packet straddling a buffer
boundary will be discarded. This is necessary to avoid being called with a corrupt packet. After a discontinuity occurs
seeking may be approximate in some data formats.
*/
typedef CF_OPTIONS(UInt32, AudioFileStreamParseFlags) {
kAudioFileStreamParseFlag_Discontinuity = 1
};
/*! @enum AudioFileStreamParseFlags
@constant kAudioFileStreamSeekFlag_OffsetIsEstimated
This flag may be returned from AudioFileStreamSeek if the byte offset is only an estimate, not exact.
*/
typedef CF_OPTIONS(UInt32, AudioFileStreamSeekFlags) {
kAudioFileStreamSeekFlag_OffsetIsEstimated = 1
};
//=============================================================================
// AudioFileStream Types
//=============================================================================
#pragma mark types
typedef UInt32 AudioFileStreamPropertyID;
typedef struct OpaqueAudioFileStreamID *AudioFileStreamID;
typedef void (*AudioFileStream_PropertyListenerProc)(
void * inClientData,
AudioFileStreamID inAudioFileStream,
AudioFileStreamPropertyID inPropertyID,
AudioFileStreamPropertyFlags * ioFlags);
typedef void (*AudioFileStream_PacketsProc)(
void * inClientData,
UInt32 inNumberBytes,
UInt32 inNumberPackets,
const void * inInputData,
AudioStreamPacketDescription * __nullable inPacketDescriptions);
//=============================================================================
// AudioFileStream error codes
//=============================================================================
#pragma mark Error codes
/*!
@enum AudioFileStream error codes
@abstract These are the error codes returned from the AudioFile API.
@constant kAudioFileStreamError_UnsupportedFileType
The file type is not supported.
@constant kAudioFileStreamError_UnsupportedDataFormat
The data format is not supported by this file type.
@constant kAudioFileStreamError_UnsupportedProperty
The property is not supported.
@constant kAudioFileStreamError_BadPropertySize
The size of the property data was not correct.
@constant kAudioFileStreamError_NotOptimized
It is not possible to produce output packets because the file's packet table or other defining
info is either not present or is after the audio data.
@constant kAudioFileStreamError_InvalidPacketOffset
A packet offset was less than zero, or past the end of the file,
or a corrupt packet size was read when building the packet table.
@constant kAudioFileStreamError_InvalidFile
The file is malformed, or otherwise not a valid instance of an audio file of its type, or
is not recognized as an audio file.
@constant kAudioFileStreamError_ValueUnknown
The property value is not present in this file before the audio data.
@constant kAudioFileStreamError_DataUnavailable
The amount of data provided to the parser was insufficient to produce any result.
@constant kAudioFileStreamError_IllegalOperation
An illegal operation was attempted.
@constant kAudioFileStreamError_UnspecifiedError
An unspecified error has occurred.
*/
CF_ENUM(OSStatus)
{
kAudioFileStreamError_UnsupportedFileType = 'typ?',
kAudioFileStreamError_UnsupportedDataFormat = 'fmt?',
kAudioFileStreamError_UnsupportedProperty = 'pty?',
kAudioFileStreamError_BadPropertySize = '!siz',
kAudioFileStreamError_NotOptimized = 'optm',
kAudioFileStreamError_InvalidPacketOffset = 'pck?',
kAudioFileStreamError_InvalidFile = 'dta?',
kAudioFileStreamError_ValueUnknown = 'unk?',
kAudioFileStreamError_DataUnavailable = 'more',
kAudioFileStreamError_IllegalOperation = 'nope',
kAudioFileStreamError_UnspecifiedError = 'wht?',
kAudioFileStreamError_DiscontinuityCantRecover = 'dsc!'
};
//=============================================================================
// AudioFileStream Properties
//=============================================================================
#pragma mark Properties
/*!
@enum AudioFileStream Properties
@abstract constants for AudioFileStream get property calls
@discussion There are currently no settable properties.
@constant kAudioFileStreamProperty_ReadyToProducePackets
An UInt32 which is zero until the parser has parsed up to the beginning of the audio data.
Once it has reached the audio data, the value of this property becomes one.
When this value has become one, all properties that can be known about the stream are known.
@constant kAudioFileStreamProperty_FileFormat
An UInt32 four char code that identifies the format of the file
@constant kAudioFileStreamProperty_DataFormat
An AudioStreamBasicDescription describing the format of the audio data
@constant kAudioFileStreamProperty_FormatList
In order to support formats such as AAC SBR where an encoded data stream can be decoded to
multiple destination formats, this property returns an array of AudioFormatListItems
(see AudioFormat.h) of those formats.
The default behavior is to return the an AudioFormatListItem that has the same
AudioStreamBasicDescription that kAudioFileStreamProperty_DataFormat returns.
@constant kAudioFileStreamProperty_MagicCookieData
A void * pointing to memory set up by the caller.
Some file types require that a magic cookie be provided before packets can be written
to the file, so this property should be set before calling
AudioFileWriteBytes()/AudioFileWritePackets() if a magic cookie exists.
@constant kAudioFileStreamProperty_AudioDataByteCount
a UInt64 that indicates the number of bytes of audio data contained in the file
@constant kAudioFileStreamProperty_AudioDataPacketCount
a UInt64 that indicates the number of packets of audio data contained in the file
@constant kAudioFileStreamProperty_MaximumPacketSize
a UInt32 that indicates the maximum size of a packet for the data contained in the file
@constant kAudioFileStreamProperty_DataOffset
a SInt64 that indicates the byte offset in the file of the audio data.
@constant kAudioFileStreamProperty_ChannelLayout
An AudioChannelLayout struct.
@constant kAudioFileStreamProperty_PacketToFrame
pass a AudioFramePacketTranslation with mPacket filled out and get mFrame back.
mFrameOffsetInPacket is ignored.
@constant kAudioFileStreamProperty_FrameToPacket
pass a AudioFramePacketTranslation with mFrame filled out and get mPacket and
mFrameOffsetInPacket back.
@constant kAudioFileStreamProperty_RestrictsRandomAccess
A UInt32 indicating whether an Audio File contains packets that cannot be used as random
access points.
A value of 0 indicates that any packet can be used as a random access point, i.e. that a
decoder can start decoding with any packet.
A value of 1 indicates that some packets cannot be used as random access points, i.e.
that either kAudioFileStreamProperty_PacketToRollDistance or
kAudioFileStreamProperty_PacketToDependencyInfo must be employed in order to identify an
appropriate initial packet for decoding.
@constant kAudioFileStreamProperty_PacketToRollDistance
Pass an AudioPacketRollDistanceTranslation with mPacket filled out and get mRollDistance
back.
See AudioFile.h for the declaration of AudioPacketRollDistanceTranslation.
The roll distance indicates the count of packets that must be decoded prior to the
packet with the specified number in order to achieve full refresh of the decoder at that
packet.
For file formats that do not carry comprehensive information regarding independently
decodable packets, accurate roll distances may be available only for the range of
packets either currently or most recently provided to your packets proc.
@constant kAudioFileStreamProperty_PreviousIndependentPacket
@constant kAudioFileStreamProperty_NextIndependentPacket
Pass an AudioIndependentPacketTranslation with mPacket filled out and get
mIndependentlyDecodablePacket back. A value of -1 means that no independent packet is
present in the stream in the direction of interest. Otherwise, for
kAudioFileStreamProperty_PreviousIndependentPacket, mIndependentlyDecodablePacket will be
less than mPacket, and for kAudioFileStreamProperty_NextIndependentPacket,
mIndependentlyDecodablePacket will be greater than mPacket.
For file formats that do not carry comprehensive information regarding independently
decodable packets, independent packets may be identifiable only within the range of
packets either currently or most recently provided to your packets proc.
@constant kAudioFileStreamProperty_PacketToDependencyInfo
Pass an AudioPacketDependencyInfoTranslation with mPacket filled out and get
mIsIndependentlyDecodable and mPrerollPacketCount back.
A value of 0 for mIsIndependentlyDecodable indicates that the specified packet is not
independently decodable.
A value of 1 for mIsIndependentlyDecodable indicates that the specified packet is
independently decodable.
For independently decodable packets, mPrerollPacketCount indicates the count of packets
that must be decoded after the packet with the specified number in order to refresh the
decoder.
For file formats that do not carry comprehensive information regarding packet
dependencies, accurate dependency info may be available only for the range of
packets either currently or most recently provided to your packets proc.
@constant kAudioFileStreamProperty_PacketToByte
pass an AudioBytePacketTranslation struct with mPacket filled out and get mByte back.
mByteOffsetInPacket is ignored. If the mByte value is an estimate then
kBytePacketTranslationFlag_IsEstimate will be set in the mFlags field.
@constant kAudioFileStreamProperty_ByteToPacket
pass an AudioBytePacketTranslation struct with mByte filled out and get mPacket and
mByteOffsetInPacket back. If the mPacket value is an estimate then
kBytePacketTranslationFlag_IsEstimate will be set in the mFlags field.
@constant kAudioFileStreamProperty_PacketTableInfo
Gets the AudioFilePacketTableInfo struct for the file types that support it.
@constant kAudioFileStreamProperty_PacketSizeUpperBound
a UInt32 for the theoretical maximum packet size in the file.
@constant kAudioFileStreamProperty_AverageBytesPerPacket
a Float64 of giving the average bytes per packet seen.
For CBR and files with packet tables, this number will be exact. Otherwise, it is a
running average of packets parsed.
@constant kAudioFileStreamProperty_BitRate
a UInt32 of the bit rate in bits per second.
@constant kAudioFileStreamProperty_InfoDictionary
a CFDictionary filled with information about the data contained in the stream.
See AudioFile.h for InfoDictionary key strings. Caller is responsible for releasing the CFObject.
*/
CF_ENUM(AudioFileStreamPropertyID)
{
kAudioFileStreamProperty_ReadyToProducePackets = 'redy',
kAudioFileStreamProperty_FileFormat = 'ffmt',
kAudioFileStreamProperty_DataFormat = 'dfmt',
kAudioFileStreamProperty_FormatList = 'flst',
kAudioFileStreamProperty_MagicCookieData = 'mgic',
kAudioFileStreamProperty_AudioDataByteCount = 'bcnt',
kAudioFileStreamProperty_AudioDataPacketCount = 'pcnt',
kAudioFileStreamProperty_MaximumPacketSize = 'psze',
kAudioFileStreamProperty_DataOffset = 'doff',
kAudioFileStreamProperty_ChannelLayout = 'cmap',
kAudioFileStreamProperty_PacketToFrame = 'pkfr',
kAudioFileStreamProperty_FrameToPacket = 'frpk',
kAudioFileStreamProperty_RestrictsRandomAccess = 'rrap',
kAudioFileStreamProperty_PacketToRollDistance = 'pkrl',
kAudioFileStreamProperty_PreviousIndependentPacket = 'pind',
kAudioFileStreamProperty_NextIndependentPacket = 'nind',
kAudioFileStreamProperty_PacketToDependencyInfo = 'pkdp',
kAudioFileStreamProperty_PacketToByte = 'pkby',
kAudioFileStreamProperty_ByteToPacket = 'bypk',
kAudioFileStreamProperty_PacketTableInfo = 'pnfo',
kAudioFileStreamProperty_PacketSizeUpperBound = 'pkub',
kAudioFileStreamProperty_AverageBytesPerPacket = 'abpp',
kAudioFileStreamProperty_BitRate = 'brat',
kAudioFileStreamProperty_InfoDictionary = 'info'
};
//=============================================================================
// AudioFileStream Functions
//=============================================================================
#pragma mark Functions
/*!
@function AudioFileStreamOpen
@discussion Create a new audio file stream parser.
The client provides the parser with data and the parser calls
callbacks when interesting things are found in the data, such as properties and
audio packets.
@param inClientData
a constant that will be passed to your callbacks.
@param inPropertyListenerProc
Whenever the value of a property is parsed in the data, this function will be called.
You can then get the value of the property from in the callback. In some cases, due to
boundaries in the input data, the property may return kAudioFileStreamError_DataUnavailable.
When unavailable data is requested from within the property listener, the parser will begin
caching the property value and will call the property listener again when the property is
available. For property values for which kAudioFileStreamPropertyFlag_PropertyIsCached is unset, this
will be the only opportunity to get the value of the property, since the data will be
disposed upon return of the property listener callback.
@param inPacketsProc
Whenever packets are parsed in the data, a pointer to the packets is passed to the client
using this callback. At times only a single packet may be passed due to boundaries in the
input data.
@param inFileTypeHint
For files whose type cannot be easily or uniquely determined from the data (ADTS,AC3),
this hint can be used to indicate the file type.
Otherwise if you do not know the file type, you can pass zero.
@param outAudioFileStream
A new file stream ID for use in other AudioFileStream API calls.
*/
extern OSStatus
AudioFileStreamOpen (
void * __nullable inClientData,
AudioFileStream_PropertyListenerProc inPropertyListenerProc,
AudioFileStream_PacketsProc inPacketsProc,
AudioFileTypeID inFileTypeHint,
AudioFileStreamID __nullable * __nonnull outAudioFileStream)
API_AVAILABLE(macos(10.5), ios(2.0), watchos(2.0), tvos(9.0));
/*!
@function AudioFileStreamParseBytes
@discussion This call is the means for streams to supply data to the parser.
Data is expected to be passed in sequentially from the beginning of the file, without gaps.
In the course of parsing, the client's property and/or packets callbacks may be called.
At the end of the stream, this function must be called once with null data pointer and zero
data byte size to flush any remaining packets out of the parser.
@param inAudioFileStream
The file stream ID
@param inDataByteSize
The number of bytes passed in for parsing. Must be zero when flushing the parser.
@param inData
The data passed in to be parsed. Must be null when flushing the parser.
@param inFlags
If there is a data discontinuity, then kAudioFileStreamParseFlag_Discontinuity should be set true.
*/
extern OSStatus
AudioFileStreamParseBytes(
AudioFileStreamID inAudioFileStream,
UInt32 inDataByteSize,
const void * __nullable inData,
AudioFileStreamParseFlags inFlags)
API_AVAILABLE(macos(10.5), ios(2.0), watchos(2.0), tvos(9.0));
/*!
@function AudioFileStreamSeek
@discussion This call is used to seek in the data stream. The client passes in a packet
offset to seek to and the parser passes back a byte offset from which to
get the data to satisfy that request. The data passed to the next call to
AudioFileParseBytes will be assumed to be from that byte offset.
For file formats which do not contain packet tables the byte offset may
be an estimate. If so, the flag kAudioFileStreamSeekFlag_OffsetIsEstimated will be true.
@param inAudioFileStream
The file stream ID
@param inPacketOffset
The offset from the beginning of the file of the packet to which to seek.
@param outDataByteOffset
The byte offset of the data from the file's data offset returned.
You need to add the value of kAudioFileStreamProperty_DataOffset to get an absolute byte offset in the file.
@param ioFlags
If outDataByteOffset is an estimate, then kAudioFileStreamSeekFlag_OffsetIsEstimated will be set on output.
There are currently no flags defined for passing into this call.
*/
extern OSStatus
AudioFileStreamSeek(
AudioFileStreamID inAudioFileStream,
SInt64 inPacketOffset,
SInt64 * outDataByteOffset,
AudioFileStreamSeekFlags * ioFlags)
API_AVAILABLE(macos(10.5), ios(2.0), watchos(2.0), tvos(9.0));
/*!
@function AudioFileStreamGetPropertyInfo
@discussion Retrieve the info about the given property. The outSize argument
will return the size in bytes of the current value of the property.
@param inAudioFileStream
The file stream ID
@param inPropertyID
Property ID whose value should be read
@param outPropertyDataSize
Size in bytes of the property
@param outWritable
whether the property is writable
@result an OSStatus return code
*/
extern OSStatus
AudioFileStreamGetPropertyInfo(
AudioFileStreamID inAudioFileStream,
AudioFileStreamPropertyID inPropertyID,
UInt32 * __nullable outPropertyDataSize,
Boolean * __nullable outWritable)
API_AVAILABLE(macos(10.5), ios(2.0), watchos(2.0), tvos(9.0));
/*!
@function AudioFileStreamGetProperty
@discussion Retrieve the indicated property data.
@param inAudioFileStream
The file stream ID
@param inPropertyID
Property ID whose value should be read
@param ioPropertyDataSize
On input, the size of the buffer pointed to by outPropertyData. On output,
the number of bytes written.
@param outPropertyData
Pointer to the property data buffer
@result an OSStatus return code
*/
extern OSStatus
AudioFileStreamGetProperty(
AudioFileStreamID inAudioFileStream,
AudioFileStreamPropertyID inPropertyID,
UInt32 * ioPropertyDataSize,
void * outPropertyData)
API_AVAILABLE(macos(10.5), ios(2.0), watchos(2.0), tvos(9.0));
/*!
@function AudioFileStreamSetProperty
@discussion Set the value of the property. There are currently no settable properties.
@param inAudioFileStream
The file stream ID
@param inPropertyID
Property ID whose value should be set
@param inPropertyDataSize
Size in bytes of the property data
@param inPropertyData
Pointer to the property data buffer
@result an OSStatus return code
*/
extern OSStatus
AudioFileStreamSetProperty(
AudioFileStreamID inAudioFileStream,
AudioFileStreamPropertyID inPropertyID,
UInt32 inPropertyDataSize,
const void * inPropertyData)
API_AVAILABLE(macos(10.5), ios(2.0), watchos(2.0), tvos(9.0));
/*!
@function AudioFileStreamClose
@discussion Close and deallocate the file stream object.
@param inAudioFileStream
The file stream ID
*/
extern OSStatus
AudioFileStreamClose( AudioFileStreamID inAudioFileStream)
API_AVAILABLE(macos(10.5), ios(2.0), watchos(2.0), tvos(9.0));
#if defined(__cplusplus)
}
#endif
CF_ASSUME_NONNULL_END
#endif // AudioToolbox_AudioFileStream_h
#else
#include <AudioToolboxCore/AudioFileStream.h>
#endif
|
0 | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/AudioToolbox.framework | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/AudioToolbox.framework/Headers/AUMIDIController.h | /*!
@file AUMIDIController.h
@framework AudioToolbox.framework
@copyright (c) 2002-2015 by Apple, Inc., all rights reserved.
@abstract Deprecated.
*/
#ifndef AudioToolbox_AUMIDIController_h
#define AudioToolbox_AUMIDIController_h
#include <TargetConditionals.h>
#if !TARGET_RT_64_BIT
// This API set is not available for 64-bit
#include <AudioToolbox/AudioUnit.h>
#include <CoreMIDI/CoreMIDI.h>
#include <AudioToolbox/AudioUnitUtilities.h>
typedef struct OpaqueAUMIDIController *AUMIDIControllerRef;
#ifdef __cplusplus
extern "C" {
#endif
/*
inVirtualDestinationName is null to create no virtual destination
*/
extern OSStatus
AUMIDIControllerCreate( CFStringRef inVirtualDestinationName,
AUMIDIControllerRef * outController)
API_DEPRECATED("no longer supported", macos(10.2, 10.5)) API_UNAVAILABLE(ios, watchos, tvos);
extern OSStatus
AUMIDIControllerDispose( AUMIDIControllerRef inController)
API_DEPRECATED("no longer supported", macos(10.2, 10.5)) API_UNAVAILABLE(ios, watchos, tvos);
extern OSStatus
AUMIDIControllerMapChannelToAU( AUMIDIControllerRef inController,
SInt32 inSourceMIDIChannel,
AudioUnit inAudioUnit,
SInt32 inDestMIDIChannel,
Boolean inCreateDefaultControlMappings)
API_DEPRECATED("no longer supported", macos(10.2, 10.5)) API_UNAVAILABLE(ios, watchos, tvos);
extern OSStatus
AUMIDIControllerMapEventToParameter( AUMIDIControllerRef inController,
UInt8 inMIDIStatusByte,
UInt16 inMIDIControl,
const AudioUnitParameter *inParameter)
API_DEPRECATED("no longer supported", macos(10.2, 10.5)) API_UNAVAILABLE(ios, watchos, tvos);
// this will remove any mapping held by this controller
// to the specified audio unit - whether those are:
// (1) default mappings (AUMIDIControllerMapChannelToAU)
// (2) custom mappings (AUMIDIControllerMapEventToParameter)
// Typically, this is done when (and should be done) when an AU no longer
// should receive MIDI events for its parameters (or the AU is being disposed)
extern OSStatus
AUMIDIControllerUnmapAudioUnit( AUMIDIControllerRef inController,
AudioUnit inAudioUnit)
API_DEPRECATED("no longer supported", macos(10.2, 10.5)) API_UNAVAILABLE(ios, watchos, tvos);
/*
$$$ need description of timestamps in the packets (if any) are treated -- needs
to factor in the AU's latency $$$
*/
extern OSStatus
AUMIDIControllerHandleMIDI( AUMIDIControllerRef inController,
const MIDIPacketList * inMIDIPacketList)
API_DEPRECATED("no longer supported", macos(10.2, 10.5)) API_UNAVAILABLE(ios, watchos, tvos);
extern OSStatus
AUMIDIControllerConnectSource( AUMIDIControllerRef inController,
MIDIEndpointRef inSource)
API_DEPRECATED("no longer supported", macos(10.2, 10.5)) API_UNAVAILABLE(ios, watchos, tvos);
extern OSStatus
AUMIDIControllerDisconnectSource( AUMIDIControllerRef inController,
MIDIEndpointRef inSource)
API_DEPRECATED("no longer supported", macos(10.2, 10.5)) API_UNAVAILABLE(ios, watchos, tvos);
/*
Tells an AUMIDIController to generate an XML description of the control/NRPN
mapping. Returns a (local file) URL to the file written. $$$ If the AUMIDIController
has a virtual destination associated with it, the AUMIDIController will
call MIDIObjectSetNameConfiguration to publish those names as the current
ones for that destination.
*/
extern OSStatus
AUMIDIControllerExportXMLNames( AUMIDIControllerRef inController,
CFURLRef * outXMLFileURL)
API_DEPRECATED("no longer supported", macos(10.2, 10.5)) API_UNAVAILABLE(ios, watchos, tvos);
#ifdef __cplusplus
}
#endif
#endif // !TARGET_RT_64_BIT
#endif // AudioToolbox_AUMIDIController_h
|
0 | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/AudioToolbox.framework | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/AudioToolbox.framework/Headers/MusicDevice.h | #if (defined(__USE_PUBLIC_HEADERS__) && __USE_PUBLIC_HEADERS__) || (defined(USE_AUDIOTOOLBOX_PUBLIC_HEADERS) && USE_AUDIOTOOLBOX_PUBLIC_HEADERS) || !__has_include(<AudioToolboxCore/MusicDevice.h>)
/*!
@file MusicDevice.h
@framework AudioToolbox.framework
@copyright (c) 2000-2015 Apple, Inc. All rights reserved.
@abstract Additional Audio Unit API for software musical instruments.
@discussion
A music device audio unit, commonly referred to as a music instrument, is used to render notes.
A note is a sound, usually pitched, that is started and stopped with a note number or pitch
specifier. A note is played on a group (in MIDI this is called a MIDI Channel) and the various
state values of a group (such as pitch bend, after-touch, etc) is inherited and controlled by
every playing note on a given group. A note can be individually stopped (which is the common
case), or stopped with the "All Notes Off" message that is sent to a specific group.
A music instrument can be multi-timbral - that is, each group can have a particular patch (or
sound) associated with it, and different groups can have different patches. This is a common
case for music instruments that implement the General MIDI specification. In this case, the
music instrument should return the number of available patches at a given time as the value for
the _InstrumentCount property.
It is also common for instruments to be mono-timbral - that is, they are only capable of
producing notes using a single patch/sound and typically only respond to commands on one group.
In this case, the music instrument should return 0 as the value for the _InstrumentCount
property.
Parameters can be defined in Group Scope, and these parameter IDs within the range of 0 < 1024,
are equivalent to the standard definitions of control in the MIDI specification (up to the ID
of). Parameters in group scope above 1024 are audio unit defined.
Notes can be created/started with one of two methods. To stop a note it must be stopped with the
same API group as was used to start it (MIDI or the extended Start/Stop note API.
(1) the MIDI Note on event (MusicDeviceMIDIEvent)
- notes must be stopped with the MIDI note off event (MusicDeviceMIDIEvent)
The MIDI Note number is used to turn the note off for the specified channel
(2) the extended Note API (MusicDeviceStartNote). This API returns a note instance ID.
This is unique and can be used with the kAudioUnitScope_Note.
It is also used to turn the note off with MusicDeviceStopNote
*/
#ifndef AudioUnit_MusicDevice_h
#define AudioUnit_MusicDevice_h
#include <AudioToolbox/AUComponent.h>
CF_ASSUME_NONNULL_BEGIN
#ifdef __cplusplus
extern "C" {
#endif
//=====================================================================================================================
#pragma mark -
#pragma mark Types
/*!
@typedef MusicDeviceInstrumentID
@abstract type for instrument identifiers
*/
typedef UInt32 MusicDeviceInstrumentID;
/*!
@struct MusicDeviceStdNoteParams
@abstract convenience struct for specifying a note and velocity
@discussion This struct is the common usage for MusicDeviceStartNote, as most synths that implement this functionality
will only allow for the specification of a note number and velocity when starting a new note.
@var argCount
Should be set to 2
@var mPitch
The pitch of the new note, typically specified using a MIDI note number (and a fractional pitch) within the
range of 0 < 128. So 60 is middle C, 60.5 is middle C + 50 cents.
@var mVelocity
The velocity of the new note - this can be a fractional value - specified as MIDI (within the range of 0 < 128)
*/
struct MusicDeviceStdNoteParams
{
UInt32 argCount; /* should be 2*/
Float32 mPitch;
Float32 mVelocity;
};
typedef struct MusicDeviceStdNoteParams MusicDeviceStdNoteParams;
/*!
@struct NoteParamsControlValue
@abstract used to describe a control and value
@discussion This struct is used to describe a parameterID (a control in MIDI terminology, though it is not limited to
MIDI CC specifications) and the value of this parameter.
@var mID
The parameter ID
@var mValue
The value of that parameter
*/
struct NoteParamsControlValue
{
AudioUnitParameterID mID;
AudioUnitParameterValue mValue;
};
typedef struct NoteParamsControlValue NoteParamsControlValue;
/*!
@struct MusicDeviceNoteParams
@abstract Used to hold the value of the inParams parameter for the MusicDeviceStartNote function.
@discussion The generic version of this structure describes an arg count (which is the number of mControls values
+ 1 for mPitch and 1 for mVelocity). So, argCount should at least be two. See MusicDeviceStdNoteParams
for the common use case, as many audio unit instruments will not respond to control values provided
in the start note function
@var argCount
The number of controls + 2 (for mPitch and mVelocity)
@var mPitch
The pitch of the new note, typically specified using a MIDI note number (and a fractional pitch) within the
range of 0 < 128. So 60 is middle C, 60.5 is middle C + 50 cents.
@var mVelocity
The velocity of the new note - this can be a fractional value - specified as MIDI (within the range of 0 < 128)
@var mControls
A variable length array with the number of elements: argCount - 2.
*/
struct MusicDeviceNoteParams
{
UInt32 argCount;
Float32 mPitch;
Float32 mVelocity;
NoteParamsControlValue mControls[1]; /* arbitrary length */
};
typedef struct MusicDeviceNoteParams MusicDeviceNoteParams;
/*!
enum MusicNoteEvent
@discussion This is used to signify that the patch used to start a note (its sound) is defined by the current
selection for the group ID; this is the normal usage in MIDI as any notes started on a given channel
(group ID) use the sound (patch) defined for that channel. See MusicDeviceStartNote
@constant kMusicNoteEvent_UseGroupInstrument
Use the patch (instrument number) assigned to the new notes group ID
@constant kMusicNoteEvent_Unused
The instrument ID is not specified
*/
enum {
kMusicNoteEvent_UseGroupInstrument = 0xFFFFFFFF,
kMusicNoteEvent_Unused = 0xFFFFFFFF
};
/*!
@typedef MusicDeviceGroupID
@discussion The type used to specify which group (channel number in MIDI) is used with a given command (new note,
control or parameter value change)
*/
typedef UInt32 MusicDeviceGroupID;
/*!
@typedef NoteInstanceID
@discussion The type used to hold an unique identifier returned by MusicDeviceStartNote that is used to then address
that note (typically to turn the note off). An ID must be used for notes, because notes can be specified
by fractional pitches, and so using the MIDI note number is not sufficient to identify the note to turn
it off (or to apply polyphonic after touch).
*/
typedef UInt32 NoteInstanceID;
/*!
@typedef MusicDeviceComponent
@discussion The unique type of a MusicDevice audio unit (which is an AudioComponentInstance)
*/
typedef AudioComponentInstance MusicDeviceComponent;
/*!
@struct MIDIEventList
@abstract Forward declaration of MIDIEventList found in <CoreMIDI/MIDIServices.h>
*/
typedef struct MIDIEventList MIDIEventList;
//=====================================================================================================================
#pragma mark -
#pragma mark Functions
/*!
@function MusicDeviceMIDIEvent
@abstract Used to sent MIDI channel messages to an audio unit
@discussion This is the API used to send MIDI channel messages to an audio unit. The status and data parameters
are used exactly as described by the MIDI specification, including the combination of channel and
command in the status byte. All events sent via MusicDeviceMIDIEventList will be delivered to the
audio unit in the MIDI protocol returned by kAudioUnitProperty_AudioUnitMIDIProtocol.
@param inUnit
The audio unit
@param inStatus
The MIDI status byte
@param inData1
The first MIDI data byte (value is in the range 0 < 128)
@param inData2
The second MIDI data byte (value is in the range 0 < 128). If the MIDI status byte only has one
data byte, this should be set to zero.
@param inOffsetSampleFrame
If you are scheduling the MIDI Event from the audio unit's render thread, then you can supply a
sample offset that the audio unit may apply when applying that event in its next audio unit render.
This allows you to schedule to the sample, the time when a MIDI command is applied and is particularly
important when starting new notes. If you are not scheduling in the audio unit's render thread,
then you should set this value to 0
@result noErr, or an audio unit error code
*/
extern OSStatus
MusicDeviceMIDIEvent( MusicDeviceComponent inUnit,
UInt32 inStatus,
UInt32 inData1,
UInt32 inData2,
UInt32 inOffsetSampleFrame) API_AVAILABLE(macos(10.0), ios(5.0), watchos(2.0), tvos(9.0));
/*!
@function MusicDeviceSysEx
@abstract used to send any non-channel MIDI event to an audio unit
@discussion This is used to send any non-channel MIDI event to an audio unit. In practise this is a System Exclusive
(SysEx) MIDI message
@param inUnit
The audio unit
@param inData
The complete MIDI SysEx message including the F0 and F7 start and termination bytes
@param inLength
The size, in bytes, of the data
@result noErr, or an audio unit error code
*/
extern OSStatus
MusicDeviceSysEx( MusicDeviceComponent inUnit,
const UInt8 * inData,
UInt32 inLength) API_AVAILABLE(macos(10.0), ios(5.0), watchos(2.0), tvos(9.0));
/*!
@function MusicDeviceMIDIEventList
@abstract Used to send MIDI messages to an audio unit
@discussion This API is suitable for sending Universal MIDI Packet (UMP) MIDI messages to an audio unit. The message must be
a full non-SysEx event, a partial SysEx event, or a complete SysEx event. Running status is not allowed. MIDI 1.0 in
universal packets (MIDI-1UP) and MIDI 2.0 messages are allowed. All events sent via MusicDeviceMIDIEventList will
be delivered to the audio unit in the MIDI protocol returned by kAudioUnitProperty_AudioUnitMIDIProtocol.
This is bridged to the v2 API property kAudioUnitProperty_MIDIOutputCallback.
@param inUnit
The audio unit
@param inOffsetSampleFrame
If you are scheduling the MIDIEventList from the audio unit's render thread, then you can supply a
sample offset that the audio unit may apply within its next audio unit render.
This allows you to schedule to the sample, the time when a MIDI command is applied and is particularly
important when starting new notes. If you are not scheduling in the audio unit's render thread,
then you should set this value to 0
inOffsetSampleFrame should serve as the base offset for each packet's timestamp i.e.
sampleOffset = inOffsetSampleFrame + evtList.packet[0].timeStamp
@param evtList
The MIDIEventList to be sent
@result noErr, or an audio unit error code
*/
extern OSStatus
MusicDeviceMIDIEventList( MusicDeviceComponent inUnit,
UInt32 inOffsetSampleFrame,
const struct MIDIEventList * evtList) API_AVAILABLE(macos(12), ios(15.0), tvos(15.0));
/*!
@function MusicDeviceStartNote
@abstract used to start a note
@discussion This function is used to start a note. The caller must provide a NoteInstanceID to receive a
token that is then used to stop the note. The MusicDeviceStopNote call should be used to stop
notes started with this API. The token can also be used to address individual notes on the
kAudioUnitScope_Note if the audio unit supports it. The instrumentID is no longer used and the
kMusicNoteEvent_Unused constant should be specified (this takes the current patch for the
specifed group as the sound to use for the note).
The Audio unit must provide an unique ID for the note instance ID. This ID must be non-zero and not
0xFFFFFFFF (any other UInt32 value is valid).
Not all Music Device audio units implement the semantics of this API (though it is strongly recommended
that they do). A host application shoudl query the kMusicDeviceProperty_SupportsStartStopNote to
check that this is supported.
@param inUnit
The audio unit
@param inInstrument
The instrumentID is no longer used and the kMusicNoteEvent_Unused constant should be specified (this takes
the current patch for the specifed group as the sound to use for the note)
@param inGroupID
The group ID that this note will be attached too. As with MIDI, all notes sounding on a groupID can be
controlled through the various parameters (such as pitch bend, etc) that can be specified on the Group
Scope
@param outNoteInstanceID
A pointer to receive the token that is used to identify the note. This parameter must be specified
@param inOffsetSampleFrame
If you are scheduling the MIDI Event from the audio unit's render thread, then you can supply a sample offset
that the audio unit may apply when starting the note in its next audio unit render. This allows you to
schedule to the sample and is particularly important when starting new notes. If you are not scheduling
in the audio unit's render thread, then you should set this value to 0
@param inParams
The parameters to be used when starting the note - pitch and velocity must be specified
@result noErr, or an audio unit error code
*/
extern OSStatus
MusicDeviceStartNote( MusicDeviceComponent inUnit,
MusicDeviceInstrumentID inInstrument,
MusicDeviceGroupID inGroupID,
NoteInstanceID * outNoteInstanceID,
UInt32 inOffsetSampleFrame,
const MusicDeviceNoteParams * inParams) API_AVAILABLE(macos(10.0), ios(5.0), watchos(2.0), tvos(9.0));
/*!
@function MusicDeviceStopNote
@abstract used to stop notes started with the MusicDeviceStartNote call
@discussion This call is used to stop notes that have been started with the MusicDeviceStartNote call; both the group ID
that the note was started on and the noteInstanceID should be specified.
@param inUnit
The audio unit
@param inGroupID
the group ID
@param inNoteInstanceID
the note instance ID
@param inOffsetSampleFrame
the sample offset within the next buffer rendered that the note should be turned off at
@result noErr, or an audio unit error code
*/
extern OSStatus
MusicDeviceStopNote( MusicDeviceComponent inUnit,
MusicDeviceGroupID inGroupID,
NoteInstanceID inNoteInstanceID,
UInt32 inOffsetSampleFrame) API_AVAILABLE(macos(10.0), ios(5.0), watchos(2.0), tvos(9.0));
/*!
@enum Music Device range
@constant kMusicDeviceRange
delineates the start of the selector ranges for music devices
@constant kMusicDeviceMIDIEventSelect
@constant kMusicDeviceSysExSelect
@constant kMusicDevicePrepareInstrumentSelect
@constant kMusicDeviceReleaseInstrumentSelect
@constant kMusicDeviceStartNoteSelect
@constant kMusicDeviceStopNoteSelect
@constant kMusicDeviceMIDIEventListSelect
*/
enum {
kMusicDeviceRange = 0x0100,
kMusicDeviceMIDIEventSelect = 0x0101,
kMusicDeviceSysExSelect = 0x0102,
kMusicDevicePrepareInstrumentSelect = 0x0103,
kMusicDeviceReleaseInstrumentSelect = 0x0104,
kMusicDeviceStartNoteSelect = 0x0105,
kMusicDeviceStopNoteSelect = 0x0106,
kMusicDeviceMIDIEventListSelect = 0x0107
};
//=====================================================================================================================
#pragma mark -
#pragma mark Fast-dispatch function prototypes
/*!
@typedef MusicDeviceMIDIEventProc
@discussion This proc can be exported through the FastDispatch property or is used as the prototype for
an audio component dispatch for this selector.
The arguments are the same as are provided to the corresponding API call
@param self
For a component manager component, this is the component instance storage pointer
@result noErr, or an audio unit error code
*/
typedef OSStatus
(*MusicDeviceMIDIEventProc)( void * self,
UInt32 inStatus,
UInt32 inData1,
UInt32 inData2,
UInt32 inOffsetSampleFrame);
/*!
@typedef MusicDeviceSysExProc
@discussion This proc can be exported through the FastDispatch property or is used as the prototype for
an audio component dispatch for this selector.
The arguments are the same as are provided to the corresponding API call
@param self
For a component manager component, this is the component instance storage pointer
@result noErr, or an audio unit error code
*/
typedef OSStatus
(*MusicDeviceSysExProc)( void * self,
const UInt8 * inData,
UInt32 inLength);
/*!
@typedef MusicDeviceStartNoteProc
@discussion This proc can be exported through the FastDispatch property or is used as the prototype for
an audio component dispatch for this selector.
The arguments are the same as are provided to the corresponding API call
@param self
For a component manager component, this is the component instance storage pointer
@result noErr, or an audio unit error code
*/
typedef OSStatus
(*MusicDeviceStartNoteProc)( void * self,
MusicDeviceInstrumentID inInstrument,
MusicDeviceGroupID inGroupID,
NoteInstanceID * outNoteInstanceID,
UInt32 inOffsetSampleFrame,
const MusicDeviceNoteParams * inParams);
/*!
@typedef MusicDeviceStopNoteProc
@discussion This proc can be exported through the FastDispatch property or is used as the prototype for
an audio component dispatch for this selector.
The arguments are the same as are provided to the corresponding API call
@param self
For a component manager component, this is the component instance storage pointer
@result noErr, or an audio unit error code
*/
typedef OSStatus
(*MusicDeviceStopNoteProc)( void * self,
MusicDeviceGroupID inGroupID,
NoteInstanceID inNoteInstanceID,
UInt32 inOffsetSampleFrame);
//=====================================================================================================================
#pragma mark -
#pragma mark Deprecated
/*
The notion of instruments (separate voices assigned to different control groups) is a deprecated concept.
Going forward, multitimbral synths are implemented using Part Scopes.
Thus, the Prepare and Release Instrument API calls are deprecated (see also MusicDeviceStartNote)
*/
extern OSStatus
MusicDevicePrepareInstrument( MusicDeviceComponent inUnit,
MusicDeviceInstrumentID inInstrument)
API_DEPRECATED("no longer supported", macos(10.0, 10.5)) API_UNAVAILABLE(ios, watchos, tvos);
extern OSStatus
MusicDeviceReleaseInstrument( MusicDeviceComponent inUnit,
MusicDeviceInstrumentID inInstrument)
API_DEPRECATED("no longer supported", macos(10.0, 10.5)) API_UNAVAILABLE(ios, watchos, tvos);
#ifdef __cplusplus
}
#endif
CF_ASSUME_NONNULL_END
#endif /* AudioUnit_MusicDevice_h */
#else
#include <AudioToolboxCore/MusicDevice.h>
#endif
|
0 | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/AudioToolbox.framework | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/AudioToolbox.framework/Headers/AudioUnitUtilities.h | #if (defined(__USE_PUBLIC_HEADERS__) && __USE_PUBLIC_HEADERS__) || (defined(USE_AUDIOTOOLBOX_PUBLIC_HEADERS) && USE_AUDIOTOOLBOX_PUBLIC_HEADERS) || !__has_include(<AudioToolboxCore/AudioUnitUtilities.h>)
/*!
@file AudioUnitUtilities.h
@framework AudioToolbox.framework
@copyright (c) 2002-2015 by Apple, Inc., all rights reserved.
@abstract Higher-level utility functions for the use of AudioUnit clients.
@discussion
The AU Parameter Listener is designed to provide notifications when an Audio Unit's parameters
or other state changes. It makes it unnecessary for UI components to continually poll an Audio
Unit to determine if a parameter value has been changed. In order for this notification
mechanism to work properly, parameter values should be changed using the AUParameterSet call
(discussed below). This also makes it unnecessary for an Audio Unit to provide and support a
notification mechanism, particularly as AudioUnitSetParameter may be received by an Audio Unit
during the render process.
The AUEventListener API's extend the AUParameterListener API's by supporting event types
other than parameter changes. Events, including parameter changes are delivered serially to the
listener, preserving the time order of the events and parameter changes.
There are also some utilities for converting between non-linear and linear value ranges. These
are useful for displaying a non-linear parameter (such as one whose units are in Hertz or
decibels) using a linear control mechanism, such as a slider, to ensure that the user has a
wider perceived range of control over the parameter value.
*/
#ifndef AudioToolbox_AudioUnitUtilities_h
#define AudioToolbox_AudioUnitUtilities_h
#include <Availability.h>
#include <AudioToolbox/AudioUnit.h>
#ifdef __BLOCKS__
#include <dispatch/dispatch.h>
#endif
CF_ASSUME_NONNULL_BEGIN
#ifdef __cplusplus
extern "C" {
#endif
/* ============================================================================= */
/*!
@constant kAUParameterListener_AnyParameter
A wildcard value for an AudioUnitParameterID. Note that this is
only valid when sending a notification (with AUParameterListenerNotify),
not when registering to receive one.
*/
CF_ENUM(AudioUnitParameterID) {
kAUParameterListener_AnyParameter = 0xFFFFFFFF
};
/*!
@enum AudioUnitEventType
@abstract Types of Audio Unit Events.
@constant kAudioUnitEvent_ParameterValueChange
The event is a change to a parameter value
@constant kAudioUnitEvent_BeginParameterChangeGesture
The event signifies a gesture (e.g. mouse-down) beginning a potential series of
related parameter value change events.
@constant kAudioUnitEvent_EndParameterChangeGesture
The event signifies a gesture (e.g. mouse-up) ending a series of related
parameter value change events.
@constant kAudioUnitEvent_PropertyChange
The event is a change to a property value.
*/
typedef CF_ENUM(UInt32, AudioUnitEventType) {
kAudioUnitEvent_ParameterValueChange = 0,
kAudioUnitEvent_BeginParameterChangeGesture = 1,
kAudioUnitEvent_EndParameterChangeGesture = 2,
kAudioUnitEvent_PropertyChange = 3
};
/* ============================================================================= */
/*!
@typedef AUParameterListenerRef
@abstract An object which receives notifications of Audio Unit parameter value changes.
*/
typedef struct AUListenerBase *AUParameterListenerRef;
// opaque
// old-style listener, may not be passed to new functions
/*!
@typedef AUEventListenerRef
@abstract An object which receives Audio Unit events.
@discussion An AUEventListenerRef may be passed to API's taking an AUEventListenerRef
as an argument.
*/
typedef AUParameterListenerRef AUEventListenerRef;
// new-style listener, can be passed to both old and new functions
/*!
@struct AudioUnitEvent
@abstract Describes a change to an Audio Unit's state.
@var mEventType
The type of event.
@var mArgument
Specifies the parameter or property which has changed.
*/
struct AudioUnitEvent {
AudioUnitEventType mEventType;
union {
AudioUnitParameter mParameter; // for parameter value change, begin and end gesture
AudioUnitProperty mProperty; // for kAudioUnitEvent_PropertyChange
} mArgument;
};
typedef struct AudioUnitEvent AudioUnitEvent;
#ifdef __BLOCKS__
/*!
@typedef AUParameterListenerBlock
@abstract A block called when a parameter value changes.
@param inObject
The object which generated the parameter change.
@param inParameter
Signifies the parameter whose value changed.
@param inValue
The parameter's new value.
*/
typedef void (^AUParameterListenerBlock)( void * __nullable inObject,
const AudioUnitParameter * inParameter,
AudioUnitParameterValue inValue);
/*!
@typedef AUEventListenerBlock
@abstract A block called when an Audio Unit event occurs.
@param inObject
The object which generated the parameter change.
@param inEvent
The event which occurred.
@param inEventHostTime
The host time at which the event occurred.
@param inParameterValue
If the event is parameter change, the parameter's new value (otherwise, undefined).
*/
typedef void (^AUEventListenerBlock)( void * __nullable inObject,
const AudioUnitEvent * inEvent,
UInt64 inEventHostTime,
AudioUnitParameterValue inParameterValue);
#endif
/*!
@typedef AUParameterListenerProc
@abstract A function called when a parameter value changes.
@param inUserData
The value passed to AUListenerCreate when the callback function was installed.
@param inObject
The object which generated the parameter change.
@param inParameter
Signifies the parameter whose value changed.
@param inValue
The parameter's new value.
*/
typedef void (*AUParameterListenerProc)( void * __nullable inUserData,
void * __nullable inObject,
const AudioUnitParameter * inParameter,
AudioUnitParameterValue inValue);
/*!
@typedef AUEventListenerProc
@abstract A function called when an Audio Unit event occurs.
@param inUserData
The value passed to AUListenerCreate when the callback function was installed.
@param inObject
The object which generated the parameter change.
@param inEvent
The event which occurred.
@param inEventHostTime
The host time at which the event occurred.
@param inParameterValue
If the event is parameter change, the parameter's new value (otherwise, undefined).
*/
typedef void (*AUEventListenerProc)(void * __nullable inUserData,
void * __nullable inObject,
const AudioUnitEvent * inEvent,
UInt64 inEventHostTime,
AudioUnitParameterValue inParameterValue);
/* ============================================================================= */
/*!
@functiongroup AUListener
*/
#ifdef __BLOCKS__
/*!
@function AUListenerCreateWithDispatchQueue
@abstract Create an object for fielding notifications when AudioUnit parameter values change.
@param outListener
On successful return, an AUParameterListenerRef.
@param inNotificationInterval
The minimum time interval, in seconds, at which the callback will be called.
If multiple parameter value changes occur within this time interval, the
listener will only receive a notification for the last value change that
occurred before the callback. If inNotificationInterval is 0, the inRunLoop
and inRunLoopMode arguments are ignored, and the callback will be issued
immediately, on the thread on which the parameter was changed.
@param inDispatchQueue
Dispatch queue on which the callback is called.
@param inBlock
Block called when the parameter's value changes.
@discussion
Note that only parameter changes issued through AUParameterSet will generate
notifications to listeners; thus, in most cases, AudioUnit clients should use
AUParameterSet in preference to AudioUnitSetParameterValue.
*/
extern OSStatus
AUListenerCreateWithDispatchQueue( AUParameterListenerRef __nullable * __nonnull outListener,
Float32 inNotificationInterval,
dispatch_queue_t inDispatchQueue,
AUParameterListenerBlock inBlock) API_AVAILABLE(macos(10.6), ios(6.0), watchos(2.0), tvos(9.0));
#endif
/*!
@function AUListenerCreate
@abstract Create an object for fielding notifications when AudioUnit parameter values change.
@param inProc
Function called when the parameter's value changes.
@param inUserData
A reference value for the use of the callback function.
@param inRunLoop
The run loop on which the callback is called. If NULL,
CFRunLoopGetCurrent() is used.
@param inRunLoopMode
The run loop mode in which the callback's underlying run loop source will be
attached. If NULL, kCFRunLoopDefaultMode is used.
@param inNotificationInterval
The minimum time interval, in seconds, at which the callback will be called.
If multiple parameter value changes occur within this time interval, the
listener will only receive a notification for the last value change that
occurred before the callback. If inNotificationInterval is 0, the inRunLoop
and inRunLoopMode arguments are ignored, and the callback will be issued
immediately, on the thread on which the parameter was changed.
@param outListener
On successful return, an AUParameterListenerRef.
@discussion
Note that only parameter changes issued through AUParameterSet will generate
notifications to listeners; thus, in most cases, AudioUnit clients should use
AUParameterSet in preference to AudioUnitSetParameter.
*/
extern OSStatus
AUListenerCreate( AUParameterListenerProc inProc,
void * inUserData,
CFRunLoopRef __nullable inRunLoop,
CFStringRef __nullable inRunLoopMode,
Float32 inNotificationInterval,
AUParameterListenerRef __nullable * __nonnull outListener) API_AVAILABLE(macos(10.2), ios(6.0), watchos(2.0), tvos(9.0));
/*!
@function AUListenerDispose
@abstract Dispose a parameter listener object.
@param inListener
The parameter listener to dispose.
*/
extern OSStatus
AUListenerDispose( AUParameterListenerRef inListener) API_AVAILABLE(macos(10.2), ios(6.0), watchos(2.0), tvos(9.0));
/*!
@function AUListenerAddParameter
@abstract Connect a parameter to a listener.
@param inListener
The parameter listener which will receive the callback.
@param inObject
The object which is interested in the value of the parameter. This will be
passed as the inObject parameter to the listener callback function when the
parameter changes.
@param inParameter
The parameter whose value changes are to generate callbacks.
@discussion
Associates an arbitrary object (often a user interface widget) with an
AudioUnitParameter, and delivers notifications to the specified listener, telling it
that the object needs to be informed of the parameter's value change.
*/
extern OSStatus
AUListenerAddParameter( AUParameterListenerRef inListener,
void * __nullable inObject,
const AudioUnitParameter * inParameter) API_AVAILABLE(macos(10.2), ios(6.0), watchos(2.0), tvos(9.0));
/*!
@function AUListenerRemoveParameter
@abstract Remove a parameter/listener connection.
@param inListener
The parameter listener to stop receiving callbacks.
@param inObject
The object which is no longer interested in the value of the parameter.
@param inParameter
The parameter whose value changes are to stop generating callbacks.
*/
extern OSStatus
AUListenerRemoveParameter( AUParameterListenerRef inListener,
void * __nullable inObject,
const AudioUnitParameter * inParameter) API_AVAILABLE(macos(10.2), ios(6.0), watchos(2.0), tvos(9.0));
/*!
@function AUParameterSet
@abstract Set an AudioUnit parameter value and notify listeners.
@param inSendingListener
A parameter listener generating the change and which does not want to
receive a callback as a result of it. May be NULL.
@param inSendingObject
The object generating the change and which does not want to receive a
callback as a result of it. NULL is treated specially when inListener is
non-null; it signifies that none of the specified listener's objects will
receive notifications.
@param inParameter
The parameter being changed.
@param inValue
The new value of the parameter.
@param inBufferOffsetInFrames
The offset into the next rendered buffer at which the parameter change will take
effect.
@discussion
Calls AudioUnitSetParameter, and performs/schedules notification callbacks to all
parameter listeners, for that parameter -- except that no callback will be generated to
the inListener/inObject pair.
*/
extern OSStatus
AUParameterSet( AUParameterListenerRef __nullable inSendingListener,
void * __nullable inSendingObject,
const AudioUnitParameter * inParameter,
AudioUnitParameterValue inValue,
UInt32 inBufferOffsetInFrames)
API_AVAILABLE(macos(10.2), ios(6.0), watchos(2.0), tvos(9.0));
/*!
@function AUParameterListenerNotify
@abstract Notify listeners of a past parameter change.
@param inSendingListener
A parameter listener generating the change and which does not want to
receive a callback as a result of it. May be NULL.
@param inSendingObject
The object generating the change and which does not want to receive a
callback as a result of it. NULL is treated specially when inListener is
non-null; it signifies that none of the specified listener's objects will
receive notifications.
@param inParameter
The parameter which was changed.
@discussion
Performs and schedules the notification callbacks of AUParameterSet, without
actually setting an AudioUnit parameter value.
Clients scheduling ramped parameter changes to AudioUnits must make this call
dynamically during playback in order for AudioUnitViews to be updated. When the view's
listener receives a notification, it will be passed the current value of the parameter.
A special meaning is applied if the mParameterID value of inParameter is equal to
kAUParameterListener_AnyParameter. In this case, ANY listener for ANY parameter value
changes on the specified AudioUnit will be notified of the current value of that
parameter.
*/
extern OSStatus
AUParameterListenerNotify( AUParameterListenerRef __nullable inSendingListener,
void * __nullable inSendingObject,
const AudioUnitParameter * inParameter) API_AVAILABLE(macos(10.2), ios(6.0), watchos(2.0), tvos(9.0));
/* ============================================================================= */
/*!
@functiongroup AUEventListener
*/
#ifdef __BLOCKS__
/*!
@function AUEventListenerCreateWithDispatchQueue
@abstract Creates an Audio Unit event listener.
@param outListener
On successful return, an AUEventListenerRef.
@param inNotificationInterval
The minimum time interval, in seconds, at which the callback will be called.
@param inValueChangeGranularity
Determines how parameter value changes occurring within this interval are
queued; when an event follows a previous one by a smaller time interval than
the granularity, then the listener will only be notified for the second
parameter change.
@param inDispatchQueue
The dispatch queue on which the callback is called.
@param inBlock
Block called when an event occurs.
@discussion
AUEventListener is a specialization of AUParameterListener; use AUListenerDispose to
dispose of an AUEventListener. You may use AUListenerAddParameter and
AUListenerRemoveParameter with AUEventListerRef's, in addition to
AUEventListenerAddEventType / AUEventListenerRemoveEventType.
Some examples illustrating inNotificationInterval and inValueChangeGranularity:
[1] a UI receiver: inNotificationInterval = 100 ms, inValueChangeGranularity = 100 ms.
User interfaces almost never care about previous values, only the current one,
and don't wish to perform redraws too often.
[2] An automation recorder: inNotificationInterval = 200 ms, inValueChangeGranularity = 10 ms.
Automation systems typically wish to record events with a high degree of timing precision,
but do not need to be woken up for each event.
In case [1], the listener will be called within 100 ms (the notification interval) of an
event. It will only receive one notification for any number of value changes to the
parameter concerned, occurring within a 100 ms window (the granularity).
In case [2], the listener will be received within 200 ms (the notification interval) of
an event It can receive more than one notification per parameter, for the last of each
group of value changes occurring within a 10 ms window (the granularity).
In both cases, thread scheduling latencies may result in more events being delivered to
the listener callback than the theoretical maximum (notification interval /
granularity).
*/
extern OSStatus
AUEventListenerCreateWithDispatchQueue(
AUEventListenerRef __nullable * __nonnull outListener,
Float32 inNotificationInterval, // seconds
Float32 inValueChangeGranularity, // seconds
dispatch_queue_t inDispatchQueue,
AUEventListenerBlock inBlock) API_AVAILABLE(macos(10.6), ios(6.0), watchos(2.0), tvos(9.0));
#endif
/*!
@function AUEventListenerCreate
@abstract Creates an Audio Unit event listener.
@param inProc
Function called when an event occurs.
@param inUserData
A reference value for the use of the callback function.
@param inRunLoop
The run loop on which the callback is called. If NULL,
CFRunLoopGetCurrent() is used.
@param inRunLoopMode
The run loop mode in which the callback's underlying run loop source will be
attached. If NULL, kCFRunLoopDefaultMode is used.
@param inNotificationInterval
The minimum time interval, in seconds, at which the callback will be called.
@param inValueChangeGranularity
Determines how parameter value changes occurring within this interval are
queued; when an event follows a previous one by a smaller time interval than
the granularity, then the listener will only be notified for the second
parameter change.
@param outListener
On successful return, an AUEventListenerRef.
@discussion
See the discussion of AUEventListenerCreateWithDispatchQueue.
*/
extern OSStatus
AUEventListenerCreate( AUEventListenerProc inProc,
void * __nullable inUserData,
CFRunLoopRef __nullable inRunLoop,
CFStringRef __nullable inRunLoopMode,
Float32 inNotificationInterval,
Float32 inValueChangeGranularity,
AUEventListenerRef __nullable * __nonnull outListener) API_AVAILABLE(macos(10.3), ios(6.0), watchos(2.0), tvos(9.0));
/*!
@function AUEventListenerAddEventType
@abstract Begin delivering a particular type of events to a listener.
@param inListener
The parameter listener which will receive the events.
@param inObject
The object which is interested in the value of the parameter. This will be
passed as the inObject parameter to the listener callback function when the
parameter changes.
@param inEvent
The type of event to listen for.
@result An OSStatus error code.
*/
extern OSStatus
AUEventListenerAddEventType( AUEventListenerRef inListener,
void * __nullable inObject,
const AudioUnitEvent * inEvent) API_AVAILABLE(macos(10.3), ios(6.0), watchos(2.0), tvos(9.0));
/*!
@function AUEventListenerRemoveEventType
@abstract Stop delivering a particular type of events to a listener.
@param inListener
The parameter listener to stop receiving events.
@param inObject
The object which is no longer interested in the value of the parameter.
@param inEvent
The type of event to stop listening for.
@result An OSStatus error code.
*/
extern OSStatus
AUEventListenerRemoveEventType( AUEventListenerRef inListener,
void * __nullable inObject,
const AudioUnitEvent * inEvent) API_AVAILABLE(macos(10.3), ios(6.0), watchos(2.0), tvos(9.0));
/*!
@function AUEventListenerNotify
@abstract Deliver an AudioUnitEvent to all listeners registered to receive it.
@discussion This is only to be used for notifications about parameter changes (and gestures).
It can not be used for notifying changes to property values as these are
internal to an audio unit and should not be issued outside of the audio unit itself.
@param inSendingListener
A parameter listener generating the change and which does not want to
receive a callback as a result of it. May be NULL.
@param inSendingObject
The object generating the change and which does not want to receive a
callback as a result of it. NULL is treated specially when inListener is
non-null; it signifies that none of the specified listener's objects will
receive notifications.
@param inEvent
The event to be delivered.
@result An OSStatus error code.
*/
extern OSStatus
AUEventListenerNotify( AUEventListenerRef __nullable inSendingListener,
void * __nullable inSendingObject,
const AudioUnitEvent * inEvent) API_AVAILABLE(macos(10.3), ios(6.0), watchos(2.0), tvos(9.0));
/* ============================================================================= */
/*!
@functiongroup Parameter value utilities
*/
/*!
@function AUParameterValueFromLinear
@abstract Converts a linear value to a parameter value according to the parameter's units.
@param inLinearValue
The linear value (0.0-1.0) to convert.
@param inParameter
The parameter, including its Audio Unit, that will define the conversion of
the supplied linear value to a value that is natural to that parameter.
@result
The converted parameter value, in the parameter's natural units.
*/
extern AudioUnitParameterValue
AUParameterValueFromLinear( Float32 inLinearValue,
const AudioUnitParameter * inParameter) API_AVAILABLE(macos(10.2), ios(6.0), watchos(2.0), tvos(9.0));
/*!
@function AUParameterValueToLinear
@abstract Converts a parameter value to a linear value according to the parameter's units.
@param inParameterValue
The value in the natural units of the specified parameter.
@param inParameter
The parameter, including its Audio Unit, that will define the conversion of
the supplied parameter value to a corresponding linear value.
@result
A number 0.0-1.0.
*/
extern Float32
AUParameterValueToLinear( AudioUnitParameterValue inParameterValue,
const AudioUnitParameter * inParameter) API_AVAILABLE(macos(10.2), ios(6.0), watchos(2.0), tvos(9.0));
// returns 0-1
/*!
@function AUParameterFormatValue
@abstract Format a parameter value into a string.
@param inParameterValue
The parameter value to be formatted.
@param inParameter
The Audio Unit, scope, element, and parameter whose value this is.
@param inTextBuffer
The character array to receive the formatted text. Should be at least 32
characters.
@param inDigits
The resolution of the string (see example above).
@result
`inTextBuffer`
@discussion
Formats a floating point value into a string. Computes a power of 10 to which the value
will be rounded and displayed as follows: if the the parameter is logarithmic (Hertz),
the number of significant digits is inDigits - pow10(inParameterValue) + 1. Otherwise,
it is inDigits - pow10(maxValue - minValue) + 1.
Example for inDigits=3:
pow10 | range | digits after decimal place display
------|--------------|------------------------------------
-2 | .0100-.0999 | 4
-1 | .100-.999 | 3
0 | 1.00-9.99 | 2
1 | 10.0-99.9 | 1
2 | 100-999 | 0
3 | 1000-9990 | -1
4 | 10000-99900 | -2
*/
extern char *
AUParameterFormatValue( Float64 inParameterValue,
const AudioUnitParameter * inParameter,
char * inTextBuffer,
UInt32 inDigits) API_AVAILABLE(macos(10.2), ios(6.0), watchos(2.0), tvos(9.0));
#ifdef __cplusplus
}
#endif
CF_ASSUME_NONNULL_END
#endif // AudioToolbox_AudioUnitUtilities_h
#else
#include <AudioToolboxCore/AudioUnitUtilities.h>
#endif
|
0 | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/AudioToolbox.framework | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/AudioToolbox.framework/Headers/AudioComponent.h | #if (defined(__USE_PUBLIC_HEADERS__) && __USE_PUBLIC_HEADERS__) || (defined(USE_AUDIOTOOLBOX_PUBLIC_HEADERS) && USE_AUDIOTOOLBOX_PUBLIC_HEADERS) || !__has_include(<AudioToolboxCore/AudioComponent.h>)
/*!
@file AudioComponent.h
@framework AudioToolbox.framework
@copyright (c) 2007-2020 Apple Inc. All rights reserved.
@brief API's to locate, get information about, and open audio components.
@discussion
This header file defines a collection of APIs to find, get information about, and open
audio components (such as audio units, audio codecs, and audio file components).
Originally, CoreServices' Component Manager was used for the registration, discovery, and
packaging of these loadable code modules. However, in order to provide an API that will be
supported going forward from macOS 10.6 and iOS 2.0, it is advised that applications use the
Audio Component APIs to find and load (open) audio components such as audio units.
The type "AudioComponent" or "AudioComponentInstance" should be seen and used as a distinct type
from the Component Manager types of "Component" and "ComponentInstance". It is never safe to
assume a direct cast is compatible between this type and the other.
Beginning with macOS 10.7, AudioComponents can be registered and used directly without
involving the Component Manager. The system scans certain directories for bundles with names
ending in ".audiocomp" or ".component" (the latter permits registering plug-ins in a single
bundle with both the Component Manager and the Audio Component system). These directories are
scanned non-recursively:
- ~/Library/Audio/Plug-Ins/Components
- /Library/Audio/Plug-Ins/Components
- /System/Library/Components
Bundles' Info.plist dictionaries should contain an "AudioComponents" item whose value
is an array of dictionaries, e.g.
```
<key>AudioComponents</key>
<array>
<dict>
<key>type</key>
<string>aufx</string>
<key>subtype</key>
<string>XMPL</string>
<key>manufacturer</key>
<string>ACME</string>
<key>name</key>
<string>AUExample</string>
<key>version</key>
<integer>12345</integer>
<key>factoryFunction</key>
<string>AUExampleFactory</string>
<!-- An AudioComponent is sandbox safe -->
<key>sandboxSafe</key>
<true/>
<!-- or it can describe its resource usage -->
<key>resourceUsage</key>
<dict>
<key>iokit.user-client</key>
<array>
<string>CustomUserClient1</string>
<string>CustomUserClient2</string>
</array>
<key>mach-lookup.global-name</key>
<array>
<string>MachServiceName1</string>
<string>MachServiceName2</string>
</array>
<key>network.client</key>
<true/>
<key>temporary-exception.files.all.read-write</key>
</true>
</dict>
<!-- An AudioComponent can define its tags -->
<key>tags</key>
<array>
<string>Effect</string>
<string>Equalizer</string>
</array>
</dict>
</array>
```
The type, subtype and manufacturer keys correspond to the OSType fields of the
AudioComponentDescription structure. They can be strings if they are 4 ASCII characters;
otherwise they must be 32-bit integers.
The "factoryFunction" is the name of a AudioComponentFactoryFunction in the bundle's binary.
Sandbox-Safety
--------------
The "sandboxSafe" key is used to indicate whether or not an AudioComponent can be loaded
directly into a sandboxed process. This key is reflected in the componentFlags field of the the
AudioComponentDescription for the AudioComponent with the constant,
kAudioComponentFlag_SandboxSafe. Note that if this key is not present, it is assumed that the
AudioComponent is not sandbox safe.
The "resourceUsage" key describes the system resources used by an AudioComponent that is not
sandbox safe. The keys for this dictionary are described below. If the "sandboxSafe" key is
true, this dictionary should not be included.
The "iokit.user-client" key is a "resourceUsage" key that describes the IOKit user-client
objects the AudioComponent will open. It is an array of the user-clients' class names.
The "mach-lookup.global-name" key is a "resourceUsage" key that describes the mach services the
AudioComponent needs to connect to. It is an array of the names of the services. Note that these
services can be direct mach services found via bootstrap_look_up() or XPC services found via
xpc_connection_create_mach_service().
The "network.client" key is a "resourceUsage" key that indicates that the AudioComponent will
receive data from the network.
The "temporary-exception.files.all.read-write" key is a "resourceUsage" key that indicates that
the AudioComponent needs arbitrary access to the file system. This is for backward compatibility
for AudioComponents that have not yet adopted the usage of security scope bookmarks and/or the
usage of the standard file dialog for discovering, accessing and storing persistent references
to files on the file system. In a future OS release, this key will not be supported.
Note that a sandbox-safe AudioComponent can function correctly in even the most severely
sandboxed process. This means that the process will have curtailed or no access to common system
resources like the file system, device drivers, the network, and communication with other
processes.
When instantiating a sandbox unsafe AudioComponent in a sandboxed process, the system evaluates
the "resourceUsage" information against the restrictions the process is under. If the
"resourceUsage" will not violate those restrictions, the AudioComponent will be instantiated and
can be used as normal. Note that the system will set kAudioComponentFlag_SandboxSafe in the
AudioComponentDescription in this case.
If the "resourceUsage" information includes things that can't be accessed from the process and
the process has the entitlement, "com.apple.security.temporary-exception.audio-unit-host", the
system will ask the user whether or not it is acceptable for the process to open the unsafe
AudioComponent. If the user says yes, the system will suspend the process's sandbox and allow
the unsafe AudioComponent to be opened and used.
Tags
----
The "tags" key is an array of tags associated with the defined AudioComponent. The following are
the set of predefined standard tags that are localized and can be used in the audio unit
definition. "Equalizer", "Dynamics", "Distortion", "Synthesizer", "Effects", "Filter", "Dynamics
Processor", "Delay", "Reverb", "Pitch", "Panner", "Imaging", "Sampler", "Mixer", "Format
Converter", "Time Effect", "Output", "Offline Effect", "Drums", "Guitar", "Vocal", "Bass",
"MIDI".
These standard tags should not be localized in the audio unit.
Localizing the tags is similar to localizing AudioUnit parameter strings. Create a strings
resource file and name it "AudioUnitTags.strings".
For more information on strings resource file please check
https://developer.apple.com/library/mac/documentation/macosx/conceptual/bpinternational/Articles/StringsFiles.html
*/
#ifndef AudioUnit_AudioComponent_h
#define AudioUnit_AudioComponent_h
//=====================================================================================================================
#pragma mark Overview
#include <TargetConditionals.h>
#include <Availability.h>
#include <CoreAudioTypes/CoreAudioTypes.h>
#include <CoreFoundation/CoreFoundation.h>
CF_ASSUME_NONNULL_BEGIN
//=====================================================================================================================
#pragma mark Constants
/*!
@enum AudioComponentFlags
@brief Flags found in AudioComponentDescription.componentFlags.
@constant kAudioComponentFlag_Unsearchable
When this bit in AudioComponentDescription's componentFlags is set, AudioComponentFindNext
will only return this component when performing a specific, non-wildcard search for the
component, i.e. with non-zero values of componentType, componentSubType, and
componentManufacturer. This can be useful when privately registering a component.
@constant kAudioComponentFlag_SandboxSafe
An AudioComponent sets this bit in its componentFlags to indicate to the system that the
AudioComponent is safe to open in a sandboxed process.
@constant kAudioComponentFlag_IsV3AudioUnit
The system sets this flag automatically when registering components which implement a version 3
Audio Unit.
@constant kAudioComponentFlag_RequiresAsyncInstantiation
The system sets this flag automatically when registering components which require asynchronous
instantiation via AudioComponentInstantiate (v3 audio units with views).
@constant kAudioComponentFlag_CanLoadInProcess
The system sets this flag automatically when registering components which can be loaded into
the current process. This is always true for V2 audio units; it depends on the packaging
in the case of a V3 audio unit.
*/
typedef CF_OPTIONS(UInt32, AudioComponentFlags) {
kAudioComponentFlag_Unsearchable CF_ENUM_AVAILABLE(10_7, 5_0) = 1,
kAudioComponentFlag_SandboxSafe CF_ENUM_AVAILABLE(10_8, 6_0) = 2,
kAudioComponentFlag_IsV3AudioUnit CF_ENUM_AVAILABLE(10_11, 9_0) = 4,
kAudioComponentFlag_RequiresAsyncInstantiation CF_ENUM_AVAILABLE(10_11, 9_0) = 8,
kAudioComponentFlag_CanLoadInProcess CF_ENUM_AVAILABLE(10_11, 9_0) = 0x10
};
/*! @enum AudioComponentInstantiationOptions
@brief Options controlling component instantiation.
@discussion
Most component instances are loaded into the calling process.
A version 3 audio unit, however, can be loaded into a separate extension service process,
and this is the default behavior for these components. To be able to load one in-process
requires that the developer package the audio unit in a bundle separate from the application
extension, since an extension's main binary cannot be dynamically loaded into another
process.
A macOS host may request in-process loading of such audio units using
kAudioComponentInstantiation_LoadInProcess.
kAudioComponentFlag_IsV3AudioUnit specifies whether an audio unit is implemented using API
version 3.
These options are just requests to the implementation. It may fail and fall back to the
default.
@constant kAudioComponentInstantiation_LoadOutOfProcess
Attempt to load the component into a separate extension process.
@constant kAudioComponentInstantiation_LoadInProcess
Attempt to load the component into the current process. Only available on macOS.
*/
typedef CF_OPTIONS(UInt32, AudioComponentInstantiationOptions) {
kAudioComponentInstantiation_LoadOutOfProcess CF_ENUM_AVAILABLE(10_11, 9_0) = 1,
kAudioComponentInstantiation_LoadInProcess CF_ENUM_AVAILABLE(10_11, NA) = 2,
kAudioComponentInstantiation_LoadedRemotely API_UNAVAILABLE(macos) = 1u << 31,
};
//=====================================================================================================================
#pragma mark Data Types
/*!
@struct AudioComponentDescription
@discussion A structure describing the unique and identifying IDs of an audio component
@var componentType
A 4-char code identifying the generic type of an audio component.
@var componentSubType
A 4-char code identifying the a specific individual component. type/
subtype/manufacturer triples must be globally unique.
@var componentManufacturer
Vendor identification.
@var componentFlags
Must be set to zero unless a known specific value is requested.
@var componentFlagsMask
Must be set to zero unless a known specific value is requested.
*/
#pragma pack(push, 4)
typedef struct AudioComponentDescription {
OSType componentType;
OSType componentSubType;
OSType componentManufacturer;
UInt32 componentFlags;
UInt32 componentFlagsMask;
} AudioComponentDescription;
#pragma pack(pop)
/*!
@typedef AudioComponent
@abstract The type used to represent a class of particular audio components
@discussion An audio component is usually found through a search and is then uniquely
identified by the triple of an audio component's type, subtype and
manufacturer.
It can have properties associated with it (such as a name, a version).
It is then used as a factory (like a class in an object-oriented programming
language) from which to create instances. The instances are used to do the
actual work.
For example: the AudioComponentDescription 'aufx'/'dely'/'appl' describes the
delay audio unit effect from Apple, Inc. You can find this component by
searching explicitly for the audio component that matches this pattern (this is
an unique identifier - there is only one match to this triple ID). Then once
found, instances of the Apple delay effect audio unit can be created from its
audio component and used to apply that effect to an audio signal. A single
component can create any number of component instances.
*/
typedef struct OpaqueAudioComponent * AudioComponent;
/*!
@typedef AudioComponentInstance
@abstract The type used to represent an instance of a particular audio component
@discussion An audio component instance is created from its factory/producer audio
component. It is the body of code that does the work.
A special note: While on the desktop this is typedef'd to a
ComponentInstanceRecord *, you should not assume that this will always be
compatible and usable with Component Manager calls.
*/
#if TARGET_OS_IPHONE || (defined(AUDIOCOMPONENT_NOCARBONINSTANCES) && AUDIOCOMPONENT_NOCARBONINSTANCES)
typedef struct OpaqueAudioComponentInstance * AudioComponentInstance;
#else
typedef struct ComponentInstanceRecord * AudioComponentInstance;
#endif
/*!
@typedef AudioComponentMethod
@abstract Generic prototype for an audio plugin method.
@discussion Every audio plugin will implement a collection of methods that match a particular
selector. For example, the AudioUnitInitialize API call is implemented by a
plugin implementing the kAudioUnitInitializeSelect selector. Any function implementing
an audio plugin selector conforms to the basic pattern where the first argument
is a pointer to the plugin instance structure, has 0 or more specific arguments,
and returns an OSStatus.
*/
typedef OSStatus (*AudioComponentMethod)(void *self, ...);
/*!
@struct AudioComponentPlugInInterface
@discussion A structure used to represent an audio plugin's routines
@var Open
the function used to open (or create) an audio plugin instance
@var Close
the function used to close (or dispose) an audio plugin instance
@var Lookup
this is used to return a function pointer for a given selector,
or NULL if that selector is not implemented
@var reserved
must be NULL
*/
struct AudioComponentPlugInInterface {
OSStatus (*Open)(void *self, AudioComponentInstance mInstance);
OSStatus (*Close)(void *self);
AudioComponentMethod __nullable (* __nonnull Lookup)(SInt16 selector);
void * __nullable reserved;
};
typedef struct AudioComponentPlugInInterface AudioComponentPlugInInterface;
/*!
@typedef AudioComponentFactoryFunction
@abstract A function that creates AudioComponentInstances.
@discussion
Authors of AudioComponents may register them from bundles as described
above in the discussion of this header file, or dynamically within a single
process, using AudioComponentRegister.
@param inDesc
The AudioComponentDescription specifying the component to be instantiated.
@result A pointer to a AudioComponentPlugInInterface structure.
*/
typedef AudioComponentPlugInInterface * __nullable (*AudioComponentFactoryFunction)(const AudioComponentDescription *inDesc);
//=====================================================================================================================
#pragma mark Functions
#ifdef __cplusplus
extern "C" {
#endif
/*!
@function AudioComponentFindNext
@abstract Finds an audio component.
@discussion This function is used to find an audio component that is the closest match
to the provided values. Note that the list of available components may change
dynamically in situations involving inter-app audio on iOS, or version 3
audio unit extensions. See kAudioComponentRegistrationsChangedNotification.
@param inComponent
If NULL, then the search starts from the beginning until an audio
component is found that matches the description provided by inDesc.
If non-NULL, then the search starts (continues) from the previously
found audio component specified by inComponent, and will return the next
found audio component.
@param inDesc
The type, subtype and manufacturer fields are used to specify the audio
component to search for. A value of 0 (zero) for any of these fields is
a wildcard, so the first match found is returned.
@result An audio component that matches the search parameters, or NULL if none found.
*/
extern AudioComponent __nullable
AudioComponentFindNext ( AudioComponent __nullable inComponent,
const AudioComponentDescription * inDesc)
API_AVAILABLE(macos(10.6), ios(2.0), watchos(2.0), tvos(9.0));
/*!
@function AudioComponentCount
@abstract Counts audio components.
@discussion Returns the number of AudioComponents that match the specified
AudioComponentDescription.
@param inDesc
The type, subtype and manufacturer fields are used to specify the audio
components to count A value of 0 (zero) for any of these fields is a
wildcard, so will match any value for this field
@result a UInt32. 0 (zero) means no audio components were found that matched the
search parameters.
*/
extern UInt32
AudioComponentCount ( const AudioComponentDescription * inDesc)
API_AVAILABLE(macos(10.6), ios(2.0), watchos(2.0), tvos(9.0));
/*!
@function AudioComponentCopyName
@abstract Retrieves the name of an audio component.
@discussion the name of an audio component
@param inComponent
the audio component (must not be NULL)
@param outName
a CFString that is the name of the audio component. This string should
be released by the caller.
@result an OSStatus result code.
*/
extern OSStatus
AudioComponentCopyName ( AudioComponent inComponent,
CFStringRef __nullable * __nonnull outName)
API_AVAILABLE(macos(10.6), ios(2.0), watchos(2.0), tvos(9.0));
/*!
@function AudioComponentGetDescription
@abstract Retrieve an audio component's description.
@discussion This will return the fully specified audio component description for the
provided audio component.
@param inComponent
the audio component (must not be NULL)
@param outDesc
the audio component description for the specified audio component
@result an OSStatus result code.
*/
extern OSStatus
AudioComponentGetDescription( AudioComponent inComponent,
AudioComponentDescription * outDesc)
API_AVAILABLE(macos(10.6), ios(2.0), watchos(2.0), tvos(9.0));
/*!
@function AudioComponentGetVersion
@abstract Retrieve an audio component's version.
@param inComponent
the audio component (must not be NULL)
@param outVersion
the audio component's version in the form of 0xMMMMmmDD (Major, Minor, Dot)
@result an OSStatus result code.
*/
extern OSStatus
AudioComponentGetVersion( AudioComponent inComponent,
UInt32 * outVersion)
API_AVAILABLE(macos(10.6), ios(2.0), watchos(2.0), tvos(9.0));
#if defined(__OBJC__) && !TARGET_OS_IPHONE
@class NSImage;
/*!
@function AudioComponentGetIcon
@abstract Fetches an icon representing the component.
@param comp
The component whose icon is to be retrieved.
@result
An autoreleased NSImage object.
@discussion
For a component originating in an app extension, the returned icon will be that of the
application containing the extension.
For components loaded from bundles, the icon will be that of the bundle.
*/
extern NSImage * __nullable
AudioComponentGetIcon(AudioComponent comp) API_DEPRECATED_WITH_REPLACEMENT("AudioComponentCopyIcon", macos(10.11, 11.0)) API_UNAVAILABLE(ios, watchos, tvos);
#endif
/*!
@function AudioComponentInstanceNew
@abstract Creates an audio component instance.
@discussion This function creates an instance of a given audio component. The audio
component instance is the object that does all of the work, whereas the
audio component is the way an application finds and then creates this object
to do this work. For example, an audio unit is a type of audio component
instance, so to use an audio unit, one finds its audio component, and then
creates a new instance of that component. This instance is then used to
perform the audio tasks for which it was designed (process, mix, synthesise,
etc.).
@param inComponent
the audio component (must not be NULL)
@param outInstance
the audio component instance
@result an OSStatus result code.
*/
extern OSStatus
AudioComponentInstanceNew( AudioComponent inComponent,
AudioComponentInstance __nullable * __nonnull outInstance)
API_AVAILABLE(macos(10.6), ios(2.0), watchos(2.0), tvos(9.0));
/*!
@function AudioComponentInstantiate
@abstract Creates an audio component instance, asynchronously.
@discussion This is an asynchronous version of AudioComponentInstanceNew(). It must be
used to instantiate any component with kAudioComponentFlag_RequiresAsyncInstantiation
set in its component flags. It may be used for other components as well.
Note: Do not block the main thread while waiting for the completion handler
to be called; this can deadlock.
@param inComponent
the audio component
@param inOptions
see AudioComponentInstantiationOptions
@param inCompletionHandler
called in an arbitrary thread context when instantiation is complete.
*/
extern void
AudioComponentInstantiate( AudioComponent inComponent,
AudioComponentInstantiationOptions inOptions,
void (^inCompletionHandler)(AudioComponentInstance __nullable, OSStatus))
API_AVAILABLE(macos(10.11), ios(9.0), watchos(2.0), tvos(9.0));
/*!
@function AudioComponentInstanceDispose
@abstract Disposes of an audio component instance.
@discussion This function will dispose the audio component instance that was created
with the New call. It will deallocate any resources that the instance was using.
@param inInstance
the audio component instance to dispose (must not be NULL)
@result an OSStatus result code.
*/
extern OSStatus
AudioComponentInstanceDispose( AudioComponentInstance inInstance)
API_AVAILABLE(macos(10.6), ios(2.0), watchos(2.0), tvos(9.0));
/*!
@function AudioComponentInstanceGetComponent
@abstract Retrieve the audio component from its instance
@discussion Allows the application at any time to retrieve the audio component that is
the factory object of a given instance (i.e., the audio component that was
used to create the instance in the first place). This allows the application
to retrieve general information about a particular audio component (its
name, version, etc) when one just has an audio component instance to work
with
@param inInstance
the audio component instance (must not be NULL, and instance must be valid - that is, not disposed)
@result a valid audio component or NULL if no component was found.
*/
extern AudioComponent
AudioComponentInstanceGetComponent ( AudioComponentInstance inInstance)
API_AVAILABLE(macos(10.6), ios(2.0), watchos(2.0), tvos(9.0));
/*!
@function AudioComponentInstanceCanDo
@discussion Determines if an audio component instance implements a particular component
API call as signified by the specified selector identifier token.
@param inInstance
the audio component instance
@param inSelectorID
a number to signify the audio component API (component selector) as appropriate for the instance's component type.
@result a boolean
*/
extern Boolean
AudioComponentInstanceCanDo ( AudioComponentInstance inInstance,
SInt16 inSelectorID)
API_AVAILABLE(macos(10.6), ios(3.0), watchos(2.0), tvos(9.0));
/*!
@function AudioComponentRegister
@abstract Dynamically registers an AudioComponent within the current process
@discussion
AudioComponents are registered either when found in appropriate bundles in the filesystem,
or via this call. AudioComponents registered via this call are available only within
the current process.
@param inDesc
The AudioComponentDescription that describes the AudioComponent. Note that
the registrar needs to be sure to set the flag kAudioComponentFlag_SandboxSafe
in the componentFlags field of the AudioComponentDescription to indicate that
the AudioComponent can be loaded directly into a sandboxed process.
@param inName
the AudioComponent's name
@param inVersion
the AudioComponent's version
@param inFactory
an AudioComponentFactoryFunction which will create instances of your
AudioComponent
@result an AudioComponent object
*/
extern AudioComponent
AudioComponentRegister( const AudioComponentDescription * inDesc,
CFStringRef inName,
UInt32 inVersion,
AudioComponentFactoryFunction inFactory)
API_AVAILABLE(macos(10.7), ios(5.0), watchos(2.0), tvos(9.0));
/*!
@function AudioComponentCopyConfigurationInfo
@abstract Fetches the basic configuration info about a given AudioComponent
@discussion Currently, only AudioUnits can supply this information.
@param inComponent
The AudioComponent whose info is being fetched.
@param outConfigurationInfo
On exit, this is CFDictionaryRef that contains information describing the
capabilities of the AudioComponent. The specific information depends on the
type of AudioComponent. The keys for the dictionary are defined in
AudioUnitProperties.h (or other headers as appropriate for the component type).
@result An OSStatus indicating success or failure.
*/
extern OSStatus
AudioComponentCopyConfigurationInfo( AudioComponent inComponent,
CFDictionaryRef __nullable * __nonnull outConfigurationInfo)
API_AVAILABLE(macos(10.7)) API_UNAVAILABLE(ios, watchos, tvos);
/*!
@enum AudioComponentValidationResult
@abstract Constants for describing the result of validating an AudioComponent
@constant kAudioComponentValidationResult_Passed
The AudioComponent passed validation.
@constant kAudioComponentValidationResult_Failed
The AudioComponent failed validation.
@constant kAudioComponentValidationResult_TimedOut
The validation operation timed out before completing.
@constant kAudioComponentValidationResult_UnauthorizedError_Open
The AudioComponent failed validation during open operation as it is not authorized.
@constant kAudioComponentValidationResult_UnauthorizedError_Init
The AudioComponent failed validation during initialization as it is not authorized.
*/
typedef CF_ENUM(UInt32, AudioComponentValidationResult)
{
kAudioComponentValidationResult_Unknown = 0,
kAudioComponentValidationResult_Passed,
kAudioComponentValidationResult_Failed,
kAudioComponentValidationResult_TimedOut,
kAudioComponentValidationResult_UnauthorizedError_Open,
kAudioComponentValidationResult_UnauthorizedError_Init
};
/*!
@define kAudioComponentConfigurationInfo_ValidationResult
@abstract Dictionary that contains the AudioComponentValidationResult for the component.
@discussion
The keys in this dictionary are the CPU architectures (e.g. "i386") that generated each result.
*/
#define kAudioComponentConfigurationInfo_ValidationResult "ValidationResult"
/*!
@function AudioComponentValidate
@abstract Tests a specified AudioComponent for API and behavioral conformance.
@discussion Currently, only AudioUnits can can be validated.
@param inComponent
The AudioComponent to validate.
@param inValidationParameters
A CFDictionaryRef that contains parameters for the validation operation.
Passing NULL for this argument tells the system to use the default
parameters.
@param outValidationResult
On exit, this is an AudioComponentValidationResult.
@result an OSStatus result code.
*/
extern OSStatus
AudioComponentValidate( AudioComponent inComponent,
CFDictionaryRef __nullable inValidationParameters,
AudioComponentValidationResult *outValidationResult)
API_AVAILABLE(macos(10.7)) API_UNAVAILABLE(ios, watchos, tvos);
/*!
@define kAudioComponentValidationParameter_TimeOut
@discussion This is a number that indicates the time in seconds to wait for a validation
operation to complete. Note that if a validation operation times out, it will return
kAudioComponentValidationResult_TimedOut as its result.
*/
#define kAudioComponentValidationParameter_TimeOut "TimeOut"
/*!
@define kAudioComponentValidationParameter_ForceValidation
@discussion
This is a bool that indicates to ignore the cached value and run validation on the specified
audio unit and update the cache.
*/
#define kAudioComponentValidationParameter_ForceValidation "ForceValidation"
/*!
@define kAudioComponentValidationParameter_LoadOutOfProcess
@discussion
This is a bool that can be used when validating Audio Units and it specifies that the
Audio Unit should be loaded out-of-process during validation.
Under normal circumstances, the validation result should not be influenced by how
the Audio Unit is loaded (in- or out-of-process). This option allows a host
that plans on loading the Audio Unit out-of-process to make sure that it passes the
validation checks in this mode of operation.
*/
#define kAudioComponentValidationParameter_LoadOutOfProcess "LoadOutOfProcess"
#ifdef __cplusplus
}
#endif
CF_ASSUME_NONNULL_END
#endif // AudioUnit_AudioComponent_h
#else
#include <AudioToolboxCore/AudioComponent.h>
#endif
|
0 | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/AudioToolbox.framework | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/AudioToolbox.framework/Headers/CAShow.h | #if (defined(__USE_PUBLIC_HEADERS__) && __USE_PUBLIC_HEADERS__) || (defined(USE_AUDIOTOOLBOX_PUBLIC_HEADERS) && USE_AUDIOTOOLBOX_PUBLIC_HEADERS) || !__has_include(<AudioToolboxCore/CAShow.h>)
/*!
@file CAShow.h
@framework AudioToolbox.framework
@copyright (c) 2002-2018 by Apple, Inc., all rights reserved.
@abstract Interfaces to log the internal state of various AudioToolbox objects.
*/
#ifndef AudioToolbox_CAShow_h
#define AudioToolbox_CAShow_h
#include <Availability.h>
#include <CoreFoundation/CFBase.h>
#include <os/base.h>
#include <stdio.h>
CF_ASSUME_NONNULL_BEGIN
#ifdef __cplusplus
extern "C" {
#endif
/// Print the internal state of an object to os_log.
OS_EXPORT void CAShow(void *inObject)
API_AVAILABLE(macos(10.2), ios(2.0), watchos(2.0), tvos(9.0));
/// Print the internal state of an object to the supplied FILE*.
OS_EXPORT void CAShowFile(void *inObject, FILE *inFile)
API_AVAILABLE(macos(10.2), ios(2.0), watchos(2.0), tvos(9.0));
#ifdef __cplusplus
}
#endif
CF_ASSUME_NONNULL_END
#endif /* AudioToolbox_CAShow_h */
#else
#include <AudioToolboxCore/CAShow.h>
#endif
|
0 | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/AudioToolbox.framework | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/AudioToolbox.framework/Headers/MusicPlayer.h | /*!
@file MusicPlayer.h
@framework AudioToolbox.framework
@copyright (c) 2000-2015 by Apple, Inc., all rights reserved.
@abstract API's for Music sequencing and playing services
@discussion
The objects in this API set include:
- Music Sequence: a container of music tracks
- Music Track: a time ordered list of events
- Music Track Iterator: an object to iterate over events in a track
- Music Player: an object used to play a sequence
A MusicSequence contains an arbitrary number of tracks (MusicTrack) each of which contains
time-stamped (in units of beats) events in time-increasing order. There are various types of
events, defined below, including the expected MIDI events, tempo, and extended events.
A MusicTrack has properties which may be inspected and assigned, including support for
looping, muting/soloing, and time-stamp interpretation. APIs exist for iterating through the
events in a MusicTrack, and for performing editing operations on them.
A MusicPlayer is used to play a sequence and provides control of playback rate and setting
to a particular time.
Each MusicSequence may have an associated AUGraph object, which represents a set of
AudioUnits and the connections between them. Then, each MusicTrack of the MusicSequence may
address its events to a specific AudioUnit within the AUGraph. In such a manner, it's
possible to automate arbitrary parameters of AudioUnits, and schedule notes to be played to
MusicDevices (AudioUnit software synthesizers) within an arbitrary audio processing network
(AUGraph). A MusicSequence or its tracks can also address a CoreMIDI endpoint directly.
*/
#ifndef AudioToolbox_MusicPlayer_h
#define AudioToolbox_MusicPlayer_h
#include <Availability.h>
#include <CoreFoundation/CoreFoundation.h>
#include <AudioToolbox/MusicDevice.h>
#include <AudioToolbox/AUGraph.h>
#if __has_include(<CoreMIDI/MIDIServices.h>)
#include <CoreMIDI/MIDIServices.h>
#else
typedef UInt32 MIDIEndpointRef;
#endif
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wold-style-cast"
CF_ASSUME_NONNULL_BEGIN
#if defined(__cplusplus)
extern "C"
{
#endif
/*!
enum MusicEventType
@abstract Music event types, including both MIDI and "extended" protocol
@constant kMusicEventType_NULL
@constant kMusicEventType_ExtendedNote
Note with variable number of arguments (non-MIDI).
@constant kMusicEventType_ExtendedTempo
Tempo change in BPM.
@constant kMusicEventType_User
User defined data.
@constant kMusicEventType_Meta
Standard MIDI File meta-event.
@constant kMusicEventType_MIDINoteMessage
MIDI note-on with duration (for note-off).
@constant kMusicEventType_MIDIChannelMessage
MIDI channel message (other than note-on/off).
@constant kMusicEventType_MIDIRawData
For MIDI system exclusive data.
@constant kMusicEventType_Parameter
General purpose AudioUnit parameter, added in macOS 10.2.
@constant kMusicEventType_AUPreset
An AudioUnit's user preset CFDictionaryRef (the ClassInfo property), added 10.3.
*/
CF_ENUM(UInt32)
{
kMusicEventType_NULL = 0,
kMusicEventType_ExtendedNote = 1,
kMusicEventType_ExtendedTempo = 3,
kMusicEventType_User = 4,
kMusicEventType_Meta = 5,
kMusicEventType_MIDINoteMessage = 6,
kMusicEventType_MIDIChannelMessage = 7,
kMusicEventType_MIDIRawData = 8,
kMusicEventType_Parameter = 9,
kMusicEventType_AUPreset = 10
};
typedef UInt32 MusicEventType;
/*!
@enum MusicSequenceLoadFlags
@abstract Flags used to customise loading behaviour
@constant kMusicSequenceLoadSMF_PreserveTracks
If this flag is set the resultant Sequence will contain:
a tempo track
a track for each track found in the SMF
This is the default behavior
@constant kMusicSequenceLoadSMF_ChannelsToTracks
If this flag is set the resultant Sequence will contain:
a tempo track
1 track for each MIDI Channel that is found in the SMF
1 track for SysEx or MetaEvents - this will be the last track
in the sequence after the LoadSMFWithFlags calls
*/
typedef CF_OPTIONS(UInt32, MusicSequenceLoadFlags)
{
kMusicSequenceLoadSMF_PreserveTracks = 0,
kMusicSequenceLoadSMF_ChannelsToTracks = (1 << 0)
};
/*!
@enum MusicSequenceType
@abstract A sequence type
@discussion Different sequence types to describe the basic mode of operation of a sequence's time line
You cannot change a music sequence's type to samples/seconds if there are tempo events
The type will also define how the sequence is saved to a MIDI file:
Beats - normal midi file
Seconds - midi file with SMPTE time
Samples - cannot be saved to a midi file
@constant kMusicSequenceType_Beats
The default/normal type of a sequence.
Tempo track defines the number of beats per second and can have multiple tempo events
@constant kMusicSequenceType_Seconds
A music sequence with a single 60bpm tempo event
@constant kMusicSequenceType_Samples
A music sequence with a single tempo event that represents the audio sample rate
*/
typedef CF_ENUM(UInt32, MusicSequenceType) {
kMusicSequenceType_Beats = 'beat',
kMusicSequenceType_Seconds = 'secs',
kMusicSequenceType_Samples = 'samp'
};
/*!
@enum MusicSequenceFileTypeID
@abstract describes different types of files that can be parsed by a music sequence
@constant kMusicSequenceFile_AnyType
let the system read iMelody files and read and write MIDI files (and any future types)
@constant kMusicSequenceFile_MIDIType
read and write MIDI files
@constant kMusicSequenceFile_iMelodyType
read iMelody files
*/
typedef CF_ENUM(UInt32, MusicSequenceFileTypeID) {
kMusicSequenceFile_AnyType = 0,
kMusicSequenceFile_MIDIType = 'midi',
kMusicSequenceFile_iMelodyType = 'imel'
};
/*!
@enum MusicSequenceFileFlags
@abstract controls the behaviour of the create file calls
@constant kMusicSequenceFileFlags_Default
Does not overwrite existing files. Attempts to save over an existing file
will return kAudio_FilePermissionError
@constant kMusicSequenceFileFlags_EraseFile
Erase an existing file when creating a new file
*/
typedef CF_OPTIONS(UInt32, MusicSequenceFileFlags) {
kMusicSequenceFileFlags_Default = 0,
kMusicSequenceFileFlags_EraseFile = 1
};
/*!
@typedef MusicTimeStamp
@abstract The type used to refer to time values in a music sequence
*/
typedef Float64 MusicTimeStamp;
/*!
@struct kMusicTimeStamp_EndOfTrack
@abstract used to signal end of track
@discussion Pass this value in to indicate a time passed the last event in the track.
In this way, it's possible to perform edits on tracks which include all events
starting at some particular time up to and including the last event
*/
#define kMusicTimeStamp_EndOfTrack DBL_MAX
/*!
@struct MIDINoteMessage
@discussion The parameters to specify a MIDI note
*/
typedef struct MIDINoteMessage
{
UInt8 channel;
UInt8 note;
UInt8 velocity;
UInt8 releaseVelocity; // was "reserved". 0 is the correct value when you don't know.
Float32 duration;
} MIDINoteMessage;
/*!
@struct MIDIChannelMessage
@discussion The parameters to specify a MIDI channel message
*/
typedef struct MIDIChannelMessage
{
UInt8 status; // contains message and channel
// message specific data
UInt8 data1;
UInt8 data2;
UInt8 reserved;
} MIDIChannelMessage;
/*!
@struct MIDIRawData
@discussion Generally used to represent a MIDI SysEx message
*/
typedef struct MIDIRawData
{
UInt32 length;
UInt8 data[1];
} MIDIRawData;
/*!
@struct MIDIMetaEvent
@discussion The parameters to specify a MIDI meta event
*/
typedef struct MIDIMetaEvent
{
UInt8 metaEventType;
UInt8 unused1;
UInt8 unused2;
UInt8 unused3;
UInt32 dataLength;
UInt8 data[1];
} MIDIMetaEvent;
/*!
@struct MusicEventUserData
@discussion Provides a general struct for specifying a user defined event.
@var length
the size in bytes of the data
@var data
size bytes of user defined event data
*/
typedef struct MusicEventUserData
{
UInt32 length;
UInt8 data[1];
} MusicEventUserData;
/*!
@struct ExtendedNoteOnEvent
@discussion The parameters to specify an extended note on event
*/
typedef struct ExtendedNoteOnEvent
{
MusicDeviceInstrumentID instrumentID;
MusicDeviceGroupID groupID;
Float32 duration;
MusicDeviceNoteParams extendedParams;
} ExtendedNoteOnEvent;
/*!
@struct ParameterEvent
@discussion The parameters to specify a parameter event to an audio unit.
*/
typedef struct ParameterEvent
{
AudioUnitParameterID parameterID;
AudioUnitScope scope;
AudioUnitElement element;
AudioUnitParameterValue value;
} ParameterEvent;
/*!
@struct ExtendedTempoEvent
@discussion specifies the value for a tempo in beats per minute
*/
typedef struct ExtendedTempoEvent
{
Float64 bpm;
} ExtendedTempoEvent;
/*!
@struct AUPresetEvent
@discussion The parameters to specify a preset for an audio unit.
*/
typedef struct AUPresetEvent
{
AudioUnitScope scope;
AudioUnitElement element;
CFPropertyListRef preset;
} AUPresetEvent;
/*!
@struct CABarBeatTime
@abstract A display representation of a musical time in beats.
A clock's internal representation of musical time is in beats based on the
beginning of the timeline. Normally, such times should be displayed to the user
in terms of bars, beats, and subbeats (sometimes called "units" or "parts per
quarter" [PPQ]). This data structure is such a display representation.
By convention, bar 1 is the beginning of the sequence. Beat 1 is the first beat
of the measure. In 4/4 time, beat will have a value from 1 to 4. Music
applications often use beat divisions such as 480 and 960.
@var bar
A measure number.
@var beat
A beat number (1..n).
@var subbeat
The numerator of the fractional number of beats.
@var subbeatDivisor
The denominator of the fractional number of beats.
@var reserved
Must be 0.
*/
struct CABarBeatTime {
SInt32 bar;
UInt16 beat;
UInt16 subbeat;
UInt16 subbeatDivisor;
UInt16 reserved;
};
typedef struct CABarBeatTime CABarBeatTime;
typedef struct OpaqueMusicPlayer *MusicPlayer;
typedef struct OpaqueMusicSequence *MusicSequence;
typedef struct OpaqueMusicTrack *MusicTrack;
typedef struct OpaqueMusicEventIterator *MusicEventIterator;
/*!
@typedef MusicSequenceUserCallback
@discussion See MusicSequenceSetUserCallback
*/
typedef void (*MusicSequenceUserCallback)( void * __nullable inClientData,
MusicSequence inSequence,
MusicTrack inTrack,
MusicTimeStamp inEventTime,
const MusicEventUserData * inEventData,
MusicTimeStamp inStartSliceBeat,
MusicTimeStamp inEndSliceBeat);
/*!
enum MusicPlayerErrors
@constant kAudioToolboxErr_InvalidSequenceType
@constant kAudioToolboxErr_TrackIndexError
@constant kAudioToolboxErr_TrackNotFound
@constant kAudioToolboxErr_EndOfTrack
@constant kAudioToolboxErr_StartOfTrack
@constant kAudioToolboxErr_IllegalTrackDestination
@constant kAudioToolboxErr_NoSequence
@constant kAudioToolboxErr_InvalidEventType
@constant kAudioToolboxErr_InvalidPlayerState
@constant kAudioToolboxErr_CannotDoInCurrentContext
*/
CF_ENUM(OSStatus)
{
kAudioToolboxErr_InvalidSequenceType = -10846,
kAudioToolboxErr_TrackIndexError = -10859,
kAudioToolboxErr_TrackNotFound = -10858,
kAudioToolboxErr_EndOfTrack = -10857,
kAudioToolboxErr_StartOfTrack = -10856,
kAudioToolboxErr_IllegalTrackDestination = -10855,
kAudioToolboxErr_NoSequence = -10854,
kAudioToolboxErr_InvalidEventType = -10853,
kAudioToolboxErr_InvalidPlayerState = -10852,
kAudioToolboxErr_CannotDoInCurrentContext = -10863,
kAudioToolboxError_NoTrackDestination = -66720
};
/*!
enum MusicTrackProperties
@discussion Property values are always get and set by reference
@constant kSequenceTrackProperty_LoopInfo
read/write - MusicTrackLoopInfo
The default looping behaviour is off (track plays once)
Looping is set by specifying the length of the loop. It loops from
(TrackLength - loop length) to Track Length
If numLoops is set to zero, it will loop forever.
To turn looping off, you set this with loop length equal to zero.
@constant kSequenceTrackProperty_OffsetTime
read/write - MusicTimeStamp
offset's the track's start time to the specified beat. By default this value is zero.
@constant kSequenceTrackProperty_MuteStatus
read/write - Boolean
mute state of a track. By default this value is false (not muted)
@constant kSequenceTrackProperty_SoloStatus
read/write - Boolean
solo state of a track. By default this value is false (not soloed)
@constant kSequenceTrackProperty_AutomatedParameters
read/write - UInt32
Determines whether a track is used for automating parameters.
If set to != 0 the track is used to automate parameter events to an AUNode.
The track can only contain parameter events and these events are interpreted
as points in the automation curve
@constant kSequenceTrackProperty_TrackLength
read/write - MusicTimeStamp
The time of the last event in the track plus any additional time that is allowed for fading out of ending notes
or round a loop point to musical bar, etc.
If this is not set, the track length will always be adjusted to the end of the last active event in a track and
is adjusted dynamically as events are added or removed.
The property will return the max of the user set track length, or the calculated length
@constant kSequenceTrackProperty_TimeResolution
read only - SInt16 (only valid on the Tempo track)
This retrieves the time resolution value for a sequence. This time resolution can be the resolution that
was contained within the midi file used to construct a sequence. If you want to keep a time resolution
when writing a new file, you can retrieve this value and then specify it when creating a new file from a sequence.
It has no direct baring on the rendering or notion of time of the sequence itself (just its representation in file
formats such as MIDI files). By default this is set to either:
480 if the sequence is created manually
some_value based on what was in a MIDI file if the sequence was created from a MIDI file
*/
CF_ENUM(UInt32)
{
kSequenceTrackProperty_LoopInfo = 0,
kSequenceTrackProperty_OffsetTime = 1,
kSequenceTrackProperty_MuteStatus = 2,
kSequenceTrackProperty_SoloStatus = 3,
// added in 10.2
kSequenceTrackProperty_AutomatedParameters = 4,
// added in 10.3
kSequenceTrackProperty_TrackLength = 5,
// added in 10.5
kSequenceTrackProperty_TimeResolution = 6
};
/*!
@struct MusicTrackLoopInfo
@discussion Used to control the looping behaviour of a track
*/
typedef struct MusicTrackLoopInfo
{
MusicTimeStamp loopDuration;
SInt32 numberOfLoops;
} MusicTrackLoopInfo;
//=====================================================================================================================
#pragma mark -
//=====================================================================================================================
#pragma mark Music Player
/*!
@functiongroup Music Player
*/
/*!
@function NewMusicPlayer
@abstract Create a new music player
@discussion A music player is used to play a sequence back. This call is used to create a player
When a sequence is to be played by a player, it can play to either an AUGraph, a MIDI Destination or a
mixture/combination of both.
@param outPlayer the newly created player
*/
extern OSStatus
NewMusicPlayer( MusicPlayer __nullable * __nonnull outPlayer) API_AVAILABLE(macos(10.0), ios(5.0), watchos(2.0), tvos(9.0));
/*!
@function DisposeMusicPlayer
@abstract Dispose a music player
@param inPlayer the player to dispose
*/
extern OSStatus
DisposeMusicPlayer( MusicPlayer inPlayer) API_AVAILABLE(macos(10.0), ios(5.0), watchos(2.0), tvos(9.0));
/*!
@function MusicPlayerSetSequence
@abstract Set the sequence for the player to play
@discussion A Sequence cannot be set on a player while it is playing. Setting a sequence
will overide the currently set sequence.
@param inPlayer the player
@param inSequence the sequence for the player to play
*/
extern OSStatus
MusicPlayerSetSequence( MusicPlayer inPlayer,
MusicSequence __nullable inSequence) API_AVAILABLE(macos(10.0), ios(5.0), watchos(2.0), tvos(9.0));
/*!
@function MusicPlayerGetSequence
@abstract Get the sequence attached to a player
@discussion If the player does not have a sequence set, this will return the _NoSequence error
@param inPlayer the player
@param outSequence the sequence currently set on the player
*/
extern OSStatus
MusicPlayerGetSequence( MusicPlayer inPlayer,
MusicSequence __nullable * __nonnull outSequence) API_AVAILABLE(macos(10.3), ios(5.0), watchos(2.0), tvos(9.0));
/*!
@function MusicPlayerSetTime
@abstract Set the current time on the player
@discussion The Get and Set Time calls take a specification of time as beats. This positions the player
to the specified time based on the currently set sequence. No range checking on the time value
is done. This can be set on a playing player (in which case playing will be resumed from the
new time).
@param inPlayer the player
@param inTime the new time value
*/
extern OSStatus
MusicPlayerSetTime( MusicPlayer inPlayer,
MusicTimeStamp inTime) API_AVAILABLE(macos(10.0), ios(5.0), watchos(2.0), tvos(9.0));
/*!
@function MusicPlayerGetTime
@abstract Get the current time of the player
@discussion The Get and Set Time calls take a specification of time as beats. This retrieves the player's
current time. If it is playing this time is the time of the player at the time the call was made.
@param inPlayer the player
@param outTime the current time value
*/
extern OSStatus
MusicPlayerGetTime( MusicPlayer inPlayer,
MusicTimeStamp *outTime) API_AVAILABLE(macos(10.0), ios(5.0), watchos(2.0), tvos(9.0));
/*!
@function MusicPlayerGetHostTimeForBeats
@abstract Returns the host time that will be (or was) played at the specified beat.
@discussion This call is only valid if the player is playing and will return an error if the player is not playing
or if the starting position of the player (its "starting beat") was after the specified beat.
For general translation of beats to time in a sequence, see the MusicSequence calls for beat<->seconds.
The call uses the player's sequence's tempo map to translate a beat time from the starting time and beat
of the player.
@param inPlayer the player
@param inBeats the specified beat-time value
@param outHostTime the corresponding host time
*/
extern OSStatus
MusicPlayerGetHostTimeForBeats( MusicPlayer inPlayer,
MusicTimeStamp inBeats,
UInt64 * outHostTime) API_AVAILABLE(macos(10.2), ios(5.0), watchos(2.0), tvos(9.0));
/*!
@function MusicPlayerGetBeatsForHostTime
@abstract Returns the beat that will be (or was) played at the specified host time.
@discussion This call is only valid if the player is playing and will return an error if the player is not playing
or if the starting time of the player was after the specified host time.
For general translation of beats to time in a sequence, see the MusicSequence calls for beat<->seconds.
The call uses the player's sequence's tempo map to retrieve a beat time from the starting and specified host time.
@param inPlayer the player
@param inHostTime the specified host time value
@param outBeats the corresponding beat time
*/
extern OSStatus
MusicPlayerGetBeatsForHostTime( MusicPlayer inPlayer,
UInt64 inHostTime,
MusicTimeStamp *outBeats) API_AVAILABLE(macos(10.2), ios(5.0), watchos(2.0), tvos(9.0));
/*!
@function MusicPlayerPreroll
@abstract Prepare the player for playing
@discussion Allows the player to prepare its state so that starting is has a lower latency. If a player is started without
being prerolled, the player will pre-roll itself and then start.
@param inPlayer the player
*/
extern OSStatus
MusicPlayerPreroll( MusicPlayer inPlayer) API_AVAILABLE(macos(10.0), ios(5.0), watchos(2.0), tvos(9.0));
/*!
@function MusicPlayerStart
@abstract Start the player
@discussion If the player has not been prerolled, it will pre-roll itself and then start.
@param inPlayer the player
*/
extern OSStatus
MusicPlayerStart( MusicPlayer inPlayer) API_AVAILABLE(macos(10.0), ios(5.0), watchos(2.0), tvos(9.0));
/*!
@function MusicPlayerStop
@abstract Stop the player
@param inPlayer the player
*/
extern OSStatus
MusicPlayerStop( MusicPlayer inPlayer) API_AVAILABLE(macos(10.0), ios(5.0), watchos(2.0), tvos(9.0));
//
/*!
@function MusicPlayerIsPlaying
@abstract Returns the playing state of the player. "Is it playing?"
@discussion This call returns a non-zero value in outIsPlaying if the player has been
started and not stopped. It may have "played" past the events of the attached
MusicSequence, but it is still considered to be playing (and its time value increasing)
until it is explicitly stopped
@param inPlayer the player
@param outIsPlaying false if not, true (non-zero) if is playing
*/
extern OSStatus
MusicPlayerIsPlaying( MusicPlayer inPlayer,
Boolean * outIsPlaying) API_AVAILABLE(macos(10.2), ios(5.0), watchos(2.0), tvos(9.0));
/*!
@function MusicPlayerSetPlayRateScalar
@abstract Scale the playback rate of the player
@param inPlayer the player
@param inScaleRate a scalar that will be applied to the playback rate. If 2, playback is twice as fast, if
0.5 it is half as fast. As a scalar, the value must be greater than zero.
*/
extern OSStatus
MusicPlayerSetPlayRateScalar( MusicPlayer inPlayer,
Float64 inScaleRate) API_AVAILABLE(macos(10.3), ios(5.0), watchos(2.0), tvos(9.0));
/*!
@function MusicPlayerGetPlayRateScalar
@abstract Get the playback rate scalar of the player
@param inPlayer the player
@param outScaleRate the current scalar being applied to the player. Default value is 1.0
*/
extern OSStatus
MusicPlayerGetPlayRateScalar( MusicPlayer inPlayer,
Float64 * outScaleRate) API_AVAILABLE(macos(10.3), ios(5.0), watchos(2.0), tvos(9.0));
//=====================================================================================================================
#pragma mark -
//=====================================================================================================================
#pragma mark Music Sequence
/*!
@functiongroup Music Sequence
*/
/*!
@function NewMusicSequence
@abstract Create a new empty sequence
@discussion A new music sequence will only have a tempo track (with a default tempo of 120 bpm),
and the default type is beat based.
When a sequence is to be played by a player, it can play to either an AUGraph, a MIDI Destination or a
mixture/combination of both. See MusicSequenceSetAUGraph and MusicSequenceSetMIDIEndpoint for the generic
destination assignments. Specific tracks can also be assigned nodes of a graph or a MIDI endpoint as targets
for the events that they contain; see MusicTrackSetDestNode and MusicTrackSetDestMIDIEndpoint.
@param outSequence the new sequence
*/
extern OSStatus
NewMusicSequence( MusicSequence __nullable * __nonnull outSequence) API_AVAILABLE(macos(10.0), ios(5.0), watchos(2.0), tvos(9.0));
/*!
@function DisposeMusicSequence
@abstract Dispose the sequence
@discussion A sequence cannot be disposed while a MusicPlayer has it.
@param inSequence the sequence
*/
extern OSStatus
DisposeMusicSequence( MusicSequence inSequence) API_AVAILABLE(macos(10.0), ios(5.0), watchos(2.0), tvos(9.0));
/*!
@function MusicSequenceNewTrack
@abstract Add a new (empty) track to the sequence
@param inSequence the sequence
@param outTrack the new track (it is always appended to any existing tracks)
*/
extern OSStatus
MusicSequenceNewTrack( MusicSequence inSequence,
MusicTrack __nullable * __nonnull outTrack) API_AVAILABLE(macos(10.0), ios(5.0), watchos(2.0), tvos(9.0));
/*!
@function MusicSequenceDisposeTrack
@abstract Remove and dispose a track from a sequence
@param inSequence the sequence
@param inTrack the track to remove and dispose
*/
extern OSStatus
MusicSequenceDisposeTrack( MusicSequence inSequence,
MusicTrack inTrack) API_AVAILABLE(macos(10.0), ios(5.0), watchos(2.0), tvos(9.0));
/*!
@function MusicSequenceGetTrackCount
@abstract The number of tracks in a sequence.
The track count and accessors exclude the tempo track (which is treated as a special case)
@param inSequence the sequence
@param outNumberOfTracks the number of tracks
*/
extern OSStatus
MusicSequenceGetTrackCount( MusicSequence inSequence,
UInt32 *outNumberOfTracks) API_AVAILABLE(macos(10.0), ios(5.0), watchos(2.0), tvos(9.0));
/*!
@function MusicSequenceGetIndTrack
@abstract Get a track at the specified index
@discussion Index is zero based. It will return kAudio_ParamError if index is not in the range: 0 < TrackCount
The track count and accessors exclude the tempo track (which is treated as a special case)
@param inSequence the sequence
@param inTrackIndex the index
@param outTrack the track at that index
*/
extern OSStatus
MusicSequenceGetIndTrack( MusicSequence inSequence,
UInt32 inTrackIndex,
MusicTrack __nullable * __nonnull outTrack) API_AVAILABLE(macos(10.0), ios(5.0), watchos(2.0), tvos(9.0));
/*!
@function MusicSequenceGetTrackIndex
@abstract Get the index for a specific track
@discussion Index is zero based. It will return an error if the track is not a member of the sequence.
The track count and accessors exclude the tempo track (which is treated as a special case)
@param inSequence the sequence
@param inTrack the track
@param outTrackIndex the index of the track
*/
extern OSStatus
MusicSequenceGetTrackIndex( MusicSequence inSequence,
MusicTrack inTrack,
UInt32 *outTrackIndex) API_AVAILABLE(macos(10.0), ios(5.0), watchos(2.0), tvos(9.0));
/*!
@function MusicSequenceGetTempoTrack
@abstract Get the tempo track of the sequence
@discussion Each sequence has a single tempo track. All tempo events are placed into this tempo track (as well
as other appropriate events (time sig for instance from a MIDI file). The tempo track, once retrieved
can be edited and iterated upon as any other track. Non-tempo events in a tempo track are ignored.
@param inSequence the sequence
@param outTrack the tempo track of the sequence
*/
extern OSStatus
MusicSequenceGetTempoTrack( MusicSequence inSequence,
MusicTrack __nullable * __nonnull outTrack) API_AVAILABLE(macos(10.1), ios(5.0), watchos(2.0), tvos(9.0));
/*!
@function MusicSequenceSetAUGraph
@abstract Set the graph to be associated with the sequence
@discussion A sequence can be associated with an AUGraph and this graph will be used to render the events as
controlled by the sequence when it is played. By default, all of the tracks of a sequence will
find the first AUNode that is an instance of an Apple MusicDevice audio unit (see MusicSequenceGetAUGraph).
Specific nodes of the graph can be targeted for different tracks (see MusicTrackSetDestNode). To render a
multi-track GM MIDI sequence on iOS, create a custom graph with a MIDISynth audio unit as the MusicDevice.
If inGraph is set to NULL, the sequence will reset to use the default graph.
@param inSequence the sequence
@param inGraph the graph
*/
extern OSStatus
MusicSequenceSetAUGraph( MusicSequence inSequence,
AUGraph __nullable inGraph) API_AVAILABLE(macos(10.0), ios(5.0), watchos(2.0), tvos(9.0));
/*!
@function MusicSequenceGetAUGraph
@abstract Gets the graph currently associated with a sequence
@discussion By default if no graph is assigned to a sequence then the sequence will create a default graph.
This default graph contains a MusicDevice and a DynamicsProcessor and all tracks will be targeted
to the MusicDevice. On macOS, this MusicDevice is an instance of a software synthesizer that is
compatible with the GM and GS MIDI standards. On iOS, it is an instance of a monotimbral software
synthesizer designed to render events from a single MIDI channel. To render multi-track GM MIDI
sequences on iOS, create a custom graph with a MIDISynth audio unit as the MusicDevice.
This call will thus either return the graph as set by the user, or this default graph.
@param inSequence the sequence
@param outGraph the graph
*/
extern OSStatus
MusicSequenceGetAUGraph( MusicSequence inSequence,
AUGraph __nullable * __nonnull outGraph) API_AVAILABLE(macos(10.0), ios(5.0), watchos(2.0), tvos(9.0));
/*!
@function MusicSequenceSetMIDIEndpoint
@abstract Makes the target of all of the tracks in the sequence a MIDI endpoint
@discussion This is a convenience function, and is equivalent to iterating through all of the tracks in a sequence
and targeting each track to the MIDI endpoint
@param inSequence the sequence
@param inEndpoint the MIDI endpoint
*/
extern OSStatus
MusicSequenceSetMIDIEndpoint( MusicSequence inSequence,
MIDIEndpointRef inEndpoint) API_AVAILABLE(macos(10.1), ios(5.0), tvos(12.0)) __WATCHOS_PROHIBITED;
/*!
@function MusicSequenceSetSequenceType
@abstract Set the sequence type (the default is beats)
@discussion
These two calls allow you to get and set a MusicSequence type; specifying
kMusicSequenceType_Beats = 'beat',
kMusicSequenceType_Seconds = 'secs',
kMusicSequenceType_Samples = 'samp'
The sequence type can be set to beats at any time. The sequence type can only be set to
seconds or samples if there are NO tempo events already in the sequence.
For beats - it can have as many tempo events as you want
For Samples and Seconds - you should add a single tempo event after setting the type
Samples - the tempo is the desired sample rate - e.g. 44100 and each "beat" in the sequence will be
interpreted as a sample count at that sample rate (so beat == 44100 is a second)
Seconds - the tempo should be set to 60 - a beat is a second.
Beats is the default (and is the behaviour on pre 10.5 systems)
A meta event of interest for Seconds based MIDI files is the SMPTE Offset meta event - stored in the tempo track.
The sequence doesn't do anything with this event (except store/write it)
@param inSequence the sequence
@param inType the sequence type
*/
extern OSStatus
MusicSequenceSetSequenceType( MusicSequence inSequence,
MusicSequenceType inType) API_AVAILABLE(macos(10.5), ios(5.0), watchos(2.0), tvos(9.0));
/*!
@function MusicSequenceGetSequenceType
@abstract Get the sequence type
@discussion See SetSequence for a full description
@param inSequence the sequence
@param outType the type
*/
extern OSStatus
MusicSequenceGetSequenceType( MusicSequence inSequence,
MusicSequenceType * outType) API_AVAILABLE(macos(10.5), ios(5.0), watchos(2.0), tvos(9.0));
/*!
@function MusicSequenceFileLoad
@abstract Load the data contained within the referenced file to the sequence
@discussion This function will parse the file referenced by the URL and add the events to the sequence.
@param inSequence the sequence
@param inFileRef a file:// URL that references a file
@param inFileTypeHint provides a hint to the sequence on the file type being imported. Can be zero in many cases.
@param inFlags flags that can control how the data is parsed in the file and laid out in the tracks
that will be created and added to the sequence in this operation
*/
extern OSStatus
MusicSequenceFileLoad(MusicSequence inSequence,
CFURLRef inFileRef,
MusicSequenceFileTypeID inFileTypeHint,
MusicSequenceLoadFlags inFlags) API_AVAILABLE(macos(10.5), ios(5.0), watchos(2.0), tvos(9.0));
/*!
@function MusicSequenceFileLoadData
@abstract Load the data to the sequence
@discussion This function will parse the data and add the events to the sequence. The data provided needs to
be of a particular file type as specified by the fileTypeHint.
@param inSequence the sequence
@param inData the contents of a valid file loaded into a CFData object
@param inFileTypeHint provides a hint to the sequence on the file type being imported. Can be zero in many cases.
@param inFlags flags that can control how the data is parsed in the file and laid out in the tracks
that will be created and added to the sequence in this operation
*/
extern OSStatus
MusicSequenceFileLoadData(MusicSequence inSequence,
CFDataRef inData,
MusicSequenceFileTypeID inFileTypeHint,
MusicSequenceLoadFlags inFlags) API_AVAILABLE(macos(10.5), ios(5.0), watchos(2.0), tvos(9.0));
/*!
@function MusicSequenceSetSMPTEResolution
@abstract Helper function to establish the SMPTE based MIDI file resolution for the specified ticks
@discussion SMPTE resolution helpers for dealing with the interpretation and creation of
tick values for standard MIDI files (see MusicSequenceFileCreate)
@param fps the frames per second
@param ticks the ticks per quarter note
@result the resolution that can be used when creating a MIDI file derived from the two parameters
*/
CF_INLINE SInt16
MusicSequenceSetSMPTEResolution (SignedByte fps, Byte ticks)
{
SInt8 res8 = fps < 0 ? fps : -fps;
SInt16 res = (SInt16) (res8 << 8);
res += ticks;
return res;
}
/*!
@function MusicSequenceGetSMPTEResolution
@abstract Helper function to get the fps and ticks from their representation in a SMPTE based MIDI file
@discussion SMPTE resolution helpers for dealing with the interpretation and creation of
tick values for standard MIDI files (see MusicSequenceFileCreate)
@param inRes the resolution from a MIDI file
@param fps the frames per second
@param ticks the ticks per quarter note
*/
CF_INLINE void
MusicSequenceGetSMPTEResolution (SInt16 inRes, SignedByte * fps, Byte * ticks)
{
*fps = (SignedByte)((0xFF00 & inRes) >> 8);
*ticks = 0x7F & inRes;
}
/*!
@function MusicSequenceFileCreate
@abstract Create a file from a sequence
@discussion This function can be (and is most commonly) used to create a MIDI file from the events in a sequence.
Only MIDI based events are used when creating the MIDI file. MIDI files are normally beat based, but
can also have a SMPTE (or real-time rather than beat time) representation.
inResolution is relationship between "tick" and quarter note for saving to Standard MIDI File
- pass in zero to use default - this will be the value that is currently set on the tempo track
- see the comments for the set track property's time resolution
The different Sequence types determine the kinds of files that can be created:
Beats
When saving a MIDI file, it saves a beats (PPQ) based axis
Seconds
When saving a MIDI file, it will save it as a SMPTE resolution - so you should specify this resolution
when creating the MIDI file.
If zero is specified, 25 fps and 40 ticks/frame is used (a time scale of a millisecond)
Samples
You cannot save to a MIDI file with this sequence type
The complete meaning of the 16-bit "division" field in a MIDI File's MThd chunk.
If it is positive, then a tick represents 1/D quarter notes.
If it negative:
bits 14-8 are a signed 7-bit number representing the SMPTE format:
-24, -25, -29 (drop), -30
bits 7-0 represents the number of ticks per SMPTE frame
typical values: 4, 10, 80, 100
You can obtain millisecond resolution by specifying 25 frames/sec and 40 divisions/frame.
30 fps with 80 bits (ticks) per frame: 0xE250 ((char)0xE2 == -30)
@param inSequence the sequence
@param inFileRef the location of the file to create
@param inFileType the type of file to create
@param inFlags flags to control the file creation
@param inResolution the resolution (depending on file type and sequence type)
*/
extern OSStatus
MusicSequenceFileCreate (MusicSequence inSequence,
CFURLRef inFileRef,
MusicSequenceFileTypeID inFileType,
MusicSequenceFileFlags inFlags,
SInt16 inResolution) API_AVAILABLE(macos(10.5), ios(5.0), watchos(2.0), tvos(9.0));
/*!
@function MusicSequenceFileCreateData
@abstract Create a data object from a sequence
@discussion The same basic parameters apply to this as with the MusicSequenceFileCreate function. The difference
being that that function will create a file on disk, whereas this one will create a CFData object
that is a file in memory. The CFData object should be released by the caller.
@param inSequence the sequence
@param inFileType the type of file to create
@param inFlags flags to control the file creation
@param inResolution the resolution (depending on file type and sequence type)
@param outData the resulting data object
*/
extern OSStatus
MusicSequenceFileCreateData (MusicSequence inSequence,
MusicSequenceFileTypeID inFileType,
MusicSequenceFileFlags inFlags,
SInt16 inResolution,
CFDataRef __nullable * __nonnull outData) API_AVAILABLE(macos(10.5), ios(5.0), watchos(2.0), tvos(9.0));
/*!
@function MusicSequenceReverse
@abstract Reverse in time all events in a sequence, including the tempo events
@param inSequence the sequence
*/
extern OSStatus
MusicSequenceReverse( MusicSequence inSequence) API_AVAILABLE(macos(10.0), ios(5.0), watchos(2.0), tvos(9.0));
/*!
@function MusicSequenceGetSecondsForBeats
@abstract Returns a seconds value that would correspond to the supplied beats
@discussion Uses the sequence's tempo events
@param inSequence the sequence
@param inBeats the beats
@param outSeconds the seconds (time from 0 beat)
*/
extern OSStatus
MusicSequenceGetSecondsForBeats( MusicSequence inSequence,
MusicTimeStamp inBeats,
Float64 * outSeconds) API_AVAILABLE(macos(10.2), ios(5.0), watchos(2.0), tvos(9.0));
/*!
@function MusicSequenceGetBeatsForSeconds
@abstract Returns a beat value that would correspond to the supplied seconds from zero.
@discussion Uses the sequence's tempo events
@param inSequence the sequence
@param inSeconds the seconds
@param outBeats the corresponding beat
*/
extern OSStatus
MusicSequenceGetBeatsForSeconds( MusicSequence inSequence,
Float64 inSeconds,
MusicTimeStamp * outBeats) API_AVAILABLE(macos(10.2), ios(5.0), watchos(2.0), tvos(9.0));
/*!
@function MusicSequenceSetUserCallback
@abstract Establish a user callback for a sequence
@discussion This call is used to register (or remove if inCallback is NULL) a callback
that the MusicSequence will call for ANY UserEvents that are added to any of the
tracks of the sequence.
If there is a callback registered, then UserEvents will be chased when
MusicPlayerSetTime is called. In that case the inStartSliceBeat and inEndSliceBeat
will both be the same value and will be the beat that the player is chasing too.
In normal cases, where the sequence data is being scheduled for playback, the
following will apply:
inStartSliceBeat <= inEventTime < inEndSliceBeat
The only exception to this is if the track that owns the MusicEvent is looping.
In this case the start beat will still be less than the end beat (so your callback
can still determine that it is playing, and what beats are currently being scheduled),
however, the inEventTime will be the original time-stamped time of the user event.
@param inSequence the sequence
@param inCallback the callback
@param inClientData client (user supplied) data provided back to the callback when it is called by the sequence
*/
extern OSStatus
MusicSequenceSetUserCallback( MusicSequence inSequence,
MusicSequenceUserCallback __nullable inCallback,
void * __nullable inClientData) API_AVAILABLE(macos(10.3), ios(5.0), watchos(2.0), tvos(9.0));
/*!
@function MusicSequenceBeatsToBarBeatTime
@abstract Convenience function to format a sequence's beat time to its bar-beat time
@discussion The sequence's tempo track Time Sig events are used to
to calculate the bar-beat representation. If there are no Time Sig events added to the sequence
4/4 is assumed. A Time Sig event is a MIDI Meta Event as specified for MIDI files.
@param inSequence the sequence
@param inBeats the beat which should be represented by the bar-beat
@param inSubbeatDivisor The denominator of the fractional number of beats.
@param outBarBeatTime the formatted bar/beat time
*/
extern OSStatus
MusicSequenceBeatsToBarBeatTime(MusicSequence inSequence,
MusicTimeStamp inBeats,
UInt32 inSubbeatDivisor,
CABarBeatTime * outBarBeatTime) API_AVAILABLE(macos(10.5), ios(5.0), watchos(2.0), tvos(9.0));
/*!
@function MusicSequenceBarBeatTimeToBeats
@abstract Convenience function to format a bar-beat time to a sequence's beat time
@discussion The sequence's tempo track Time Sig events are used to
to calculate the bar-beat representation. If there are no Time Sig events added to the sequence
4/4 is assumed. A Time Sig event is a MIDI Meta Event as specified for MIDI files.
@param inSequence the sequence
@param inBarBeatTime the bar-beat time
@param outBeats the sequence's beat time for that bar-beat time
*/
extern OSStatus
MusicSequenceBarBeatTimeToBeats(MusicSequence inSequence,
const CABarBeatTime * inBarBeatTime,
MusicTimeStamp * outBeats) API_AVAILABLE(macos(10.5), ios(5.0), watchos(2.0), tvos(9.0));
/*!
@function MusicSequenceGetInfoDictionary
@abstract Returns a dictionary containing meta-data derived from a sequence
@discussion The dictionary can contain one or more of the kAFInfoDictionary_*
keys specified in <AudioToolbox/AudioFile.h>
The caller should release the returned dictionary. If the call fails it will return NULL
@param inSequence the sequence
@result a CFDictionary or NULL if the call fails.
*/
CF_IMPLICIT_BRIDGING_ENABLED
extern CFDictionaryRef
MusicSequenceGetInfoDictionary( MusicSequence inSequence) API_AVAILABLE(macos(10.5), ios(5.0), watchos(2.0), tvos(9.0));
CF_IMPLICIT_BRIDGING_DISABLED
//=====================================================================================================================
#pragma mark -
//=====================================================================================================================
#pragma mark Music Track
/*!
@functiongroup Music Track
*/
/*!
@function MusicTrackGetSequence
@abstract Gets the sequence which the track is a member of
@param inTrack the track
@param outSequence the track's sequence
*/
extern OSStatus
MusicTrackGetSequence( MusicTrack inTrack,
MusicSequence __nullable * __nonnull outSequence) API_AVAILABLE(macos(10.0), ios(5.0), watchos(2.0), tvos(9.0));
/*!
@function MusicTrackSetDestNode
@abstract Sets the track's target to the specified AUNode
@discussion The node must be a member of the graph that the track's sequence is using. When played, the track
will send all of its events to that node.
@param inTrack the track
@param inNode the new node
*/
extern OSStatus
MusicTrackSetDestNode( MusicTrack inTrack,
AUNode inNode) API_AVAILABLE(macos(10.0), ios(5.0), watchos(2.0), tvos(9.0));
/*!
@function MusicTrackSetDestMIDIEndpoint
@abstract Sets the track's target to the specified MIDI endpoint
@discussion When played, the track will send all of its events to the specified MIDI Endpoint.
@param inTrack the track
@param inEndpoint the new MIDI endpoint
*/
extern OSStatus
MusicTrackSetDestMIDIEndpoint( MusicTrack inTrack,
MIDIEndpointRef inEndpoint) API_AVAILABLE(macos(10.1), ios(5.0), tvos(12.0)) __WATCHOS_PROHIBITED;
/*!
@function MusicTrackGetDestNode
@abstract Gets the track's target if it is an AUNode
@discussion Returns kAudioToolboxErr_IllegalTrackDestination if the track's target is a MIDIEndpointRef
and NOT an AUNode
@param inTrack the track
@param outNode the node target for the track
*/
extern OSStatus
MusicTrackGetDestNode( MusicTrack inTrack,
AUNode * outNode) API_AVAILABLE(macos(10.1), ios(5.0), watchos(2.0), tvos(9.0));
/*!
@function MusicTrackGetDestMIDIEndpoint
@abstract Gets the track's target if it is a MIDI Endpoint
@discussion Returns kAudioToolboxErr_IllegalTrackDestination if the track's target is an AUNode
and NOT a MIDI Endpoint
@param inTrack the track
@param outEndpoint the MIDI Endpoint target for the track
*/
extern OSStatus
MusicTrackGetDestMIDIEndpoint( MusicTrack inTrack,
MIDIEndpointRef * outEndpoint) API_AVAILABLE(macos(10.1), ios(5.0), tvos(12.0)) __WATCHOS_PROHIBITED;
/*!
@function MusicTrackSetProperty
@abstract Sets the specified property value
@discussion Property values are always get and set by reference
@param inTrack the track
@param inPropertyID the property ID
@param inData the new property value
@param inLength the size of the property value being set
*/
extern OSStatus
MusicTrackSetProperty( MusicTrack inTrack,
UInt32 inPropertyID,
void *inData,
UInt32 inLength) API_AVAILABLE(macos(10.0), ios(5.0), watchos(2.0), tvos(9.0));
/*!
@function MusicTrackGetProperty
@abstract Gets the specified property value
@discussion If outData is NULL, then the size of the data will be passed back in ioLength
This allows the client to allocate a buffer of the correct size (useful for variable
length properties -- currently all properties have fixed size)
Property values are always get and set by reference
@param inTrack the track
@param inPropertyID the property ID
@param outData if not NULL, points to data of size ioLength
@param ioLength on input the available size of outData, on output the size of the valid data that outData
will then point too.
*/
extern OSStatus
MusicTrackGetProperty( MusicTrack inTrack,
UInt32 inPropertyID,
void *outData,
UInt32 *ioLength) API_AVAILABLE(macos(10.0), ios(5.0), watchos(2.0), tvos(9.0));
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// Editing operations on sequence tracks
/*!
@function MusicTrackMoveEvents
@abstract Move events in a track
@discussion Moves all of the events in the specified time range by the moveTime. MoveTime maybe negative to
move events backwards (towards zero).
All time ranges are [starttime < endtime]
@param inTrack the track
@param inStartTime the start time for the range of events
@param inEndTime the end time up to which will form the range of the events to move
@param inMoveTime amount of beats to move the selected events.
*/
extern OSStatus
MusicTrackMoveEvents( MusicTrack inTrack,
MusicTimeStamp inStartTime,
MusicTimeStamp inEndTime,
MusicTimeStamp inMoveTime) API_AVAILABLE(macos(10.0), ios(5.0), watchos(2.0), tvos(9.0));
/*!
@function MusicTrackClear
@abstract Removes all events within the specified range
@discussion All time ranges are [starttime < endtime]
@param inTrack the track
@param inStartTime the start time for the range of events
@param inEndTime the end time up to which will form the range of the events to clear
*/
extern OSStatus
MusicTrackClear( MusicTrack inTrack,
MusicTimeStamp inStartTime,
MusicTimeStamp inEndTime) API_AVAILABLE(macos(10.0), ios(5.0), watchos(2.0), tvos(9.0));
/*!
@function MusicTrackCut
@abstract Removes all the events within the specified range
@discussion Events that fall past the specified range will be moved back by the specified range time.
All time ranges are [starttime < endtime]
@param inTrack the track
@param inStartTime the start time for the range of events
@param inEndTime the end time up to which will form the range of the events to cut out
*/
extern OSStatus
MusicTrackCut( MusicTrack inTrack,
MusicTimeStamp inStartTime,
MusicTimeStamp inEndTime) API_AVAILABLE(macos(10.0), ios(5.0), watchos(2.0), tvos(9.0));
/*!
@function MusicTrackCopyInsert
@abstract Copies events from one track and inserts them into another
@discussion Copies all of the events with the specified time range of the source track. It then inserts
those events into the destination track. All events at and after inDestInsertTime in inDestTrack
are moved forward by the range's duration
All time ranges are [starttime < endtime]
@param inSourceTrack the source track
@param inSourceStartTime the start time for the range of events
@param inSourceEndTime the end time up to which will form the range of the events to copy from the source track
@param inDestTrack the destination track to copy too
@param inDestInsertTime the time at which the copied events will be inserted.
*/
extern OSStatus
MusicTrackCopyInsert( MusicTrack inSourceTrack,
MusicTimeStamp inSourceStartTime,
MusicTimeStamp inSourceEndTime,
MusicTrack inDestTrack,
MusicTimeStamp inDestInsertTime) API_AVAILABLE(macos(10.0), ios(5.0), watchos(2.0), tvos(9.0));
/*!
@function MusicTrackMerge
@abstract Copies events from one track and merges them into another
@discussion Copies all of the events with the specified time range of the source track. It then merges
those events into the destination track starting at inDestInsertTime.
All time ranges are [starttime < endtime]
@param inSourceTrack the source track
@param inSourceStartTime the start time for the range of events
@param inSourceEndTime the end time up to which will form the range of the events to copy from the source track
@param inDestTrack the destination track to copy too
@param inDestInsertTime the time at which the copied events will be merged.
*/
extern OSStatus
MusicTrackMerge( MusicTrack inSourceTrack,
MusicTimeStamp inSourceStartTime,
MusicTimeStamp inSourceEndTime,
MusicTrack inDestTrack,
MusicTimeStamp inDestInsertTime) API_AVAILABLE(macos(10.0), ios(5.0), watchos(2.0), tvos(9.0));
//=====================================================================================================================
#pragma mark -
//=====================================================================================================================
#pragma mark Music Events
/*!
@functiongroup Music Events
*/
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// adding time-stamped events to the track
/*!
@function MusicTrackNewMIDINoteEvent
@abstract Adds a MIDINoteMessage event to a track
@discussion The event is added at the specified time stamp. The time stamp should not be less than zero.
@param inTrack the track
@param inTimeStamp the time stamp
@param inMessage the event
*/
extern OSStatus
MusicTrackNewMIDINoteEvent( MusicTrack inTrack,
MusicTimeStamp inTimeStamp,
const MIDINoteMessage * inMessage) API_AVAILABLE(macos(10.0), ios(5.0), watchos(2.0), tvos(9.0));
/*!
@function MusicTrackNewMIDIChannelEvent
@abstract Adds a MIDIChannelMessage event to a track
@discussion The event is added at the specified time stamp. The time stamp should not be less than zero.
@param inTrack the track
@param inTimeStamp the time stamp
@param inMessage the event
*/
extern OSStatus
MusicTrackNewMIDIChannelEvent( MusicTrack inTrack,
MusicTimeStamp inTimeStamp,
const MIDIChannelMessage * inMessage) API_AVAILABLE(macos(10.0), ios(5.0), watchos(2.0), tvos(9.0));
/*!
@function MusicTrackNewMIDIRawDataEvent
@abstract Adds a MIDIRawData event to a track
@discussion The event is added at the specified time stamp. The time stamp should not be less than zero.
@param inTrack the track
@param inTimeStamp the time stamp
@param inRawData the event
*/
extern OSStatus
MusicTrackNewMIDIRawDataEvent( MusicTrack inTrack,
MusicTimeStamp inTimeStamp,
const MIDIRawData * inRawData) API_AVAILABLE(macos(10.0), ios(5.0), watchos(2.0), tvos(9.0));
/*!
@function MusicTrackNewExtendedNoteEvent
@abstract Adds a ExtendedNoteOnEvent to a track
@discussion The event is added at the specified time stamp. The time stamp should not be less than zero.
@param inTrack the track
@param inTimeStamp the time stamp
@param inInfo the event
*/
extern OSStatus
MusicTrackNewExtendedNoteEvent( MusicTrack inTrack,
MusicTimeStamp inTimeStamp,
const ExtendedNoteOnEvent *inInfo) API_AVAILABLE(macos(10.0), ios(5.0), watchos(2.0), tvos(9.0));
/*!
@function MusicTrackNewParameterEvent
@abstract Adds a ParameterEvent to a track
@discussion The event is added at the specified time stamp. The time stamp should not be less than zero.
@param inTrack the track
@param inTimeStamp the time stamp
@param inInfo the event
*/
extern OSStatus
MusicTrackNewParameterEvent( MusicTrack inTrack,
MusicTimeStamp inTimeStamp,
const ParameterEvent * inInfo) API_AVAILABLE(macos(10.2), ios(5.0), watchos(2.0), tvos(9.0));
/*!
@function MusicTrackNewExtendedTempoEvent
@abstract Adds a tempo event to a track
@discussion The event is added at the specified time stamp. The time stamp should not be less than zero.
@param inTrack the track
@param inTimeStamp the time stamp
@param inBPM the event
*/
extern OSStatus
MusicTrackNewExtendedTempoEvent( MusicTrack inTrack,
MusicTimeStamp inTimeStamp,
Float64 inBPM) API_AVAILABLE(macos(10.0), ios(5.0), watchos(2.0), tvos(9.0));
/*!
@function MusicTrackNewMetaEvent
@abstract Adds a MIDIMetaEvent to a track
@discussion The event is added at the specified time stamp. The time stamp should not be less than zero.
@param inTrack the track
@param inTimeStamp the time stamp
@param inMetaEvent the event
*/
extern OSStatus
MusicTrackNewMetaEvent( MusicTrack inTrack,
MusicTimeStamp inTimeStamp,
const MIDIMetaEvent * inMetaEvent) API_AVAILABLE(macos(10.0), ios(5.0), watchos(2.0), tvos(9.0));
/*!
@function MusicEventUserData
@abstract Adds a MusicEventUserData event to a track
@discussion The event is added at the specified time stamp. The time stamp should not be less than zero.
@param inTrack the track
@param inTimeStamp the time stamp
@param inUserData the event
*/
extern OSStatus
MusicTrackNewUserEvent( MusicTrack inTrack,
MusicTimeStamp inTimeStamp,
const MusicEventUserData * inUserData) API_AVAILABLE(macos(10.0), ios(5.0), watchos(2.0), tvos(9.0));
/*!
@function MusicTrackNewAUPresetEvent
@abstract Adds a AUPresetEvent to a track
@discussion The event is added at the specified time stamp. The time stamp should not be less than zero.
@param inTrack the track
@param inTimeStamp the time stamp
@param inPresetEvent the event
*/
extern OSStatus
MusicTrackNewAUPresetEvent( MusicTrack inTrack,
MusicTimeStamp inTimeStamp,
const AUPresetEvent * inPresetEvent) API_AVAILABLE(macos(10.3), ios(5.0), watchos(2.0), tvos(9.0));
//=====================================================================================================================
#pragma mark -
//=====================================================================================================================
#pragma mark Music Event Iterator
/*!
@functiongroup Music Event Iterator
*/
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// actual event representation and manipulation within a track....
//
// Here we need to be very careful to be able to deal with both SMF type of MIDI events, and
// also be upwardly compatible with an extended MPEG4-SA like paradigm!
//
// The solution is to hide the internal event representation from the client
// and allow access to the events through accessor functions. The user, in this way, can
// examine and create standard events, or any user-defined event.
/*!
@function NewMusicEventIterator
@abstract Creates an iterator to iterator over a track's events
@discussion The iterator should be considered invalid if a track is edited. In that case you should create a new
iterator and seek it to the desired position.
@param inTrack the track upon which to iterate
@param outIterator the new iterator
*/
extern OSStatus
NewMusicEventIterator( MusicTrack inTrack,
MusicEventIterator __nullable * __nonnull outIterator) API_AVAILABLE(macos(10.0), ios(5.0), watchos(2.0), tvos(9.0));
/*!
@function DisposeMusicEventIterator
@abstract Dispose an iterator
@param inIterator the iterator
*/
extern OSStatus
DisposeMusicEventIterator( MusicEventIterator inIterator) API_AVAILABLE(macos(10.0), ios(5.0), watchos(2.0), tvos(9.0));
/*!
@function MusicEventIteratorSeek
@abstract Move the iterator to an event at the specified time
@discussion If there is no event at the specified time, the iterator will point to the first event after
that time.
By specifying kMusicTimeStamp_EndOfTrack you will position the iterator to the end of track
(which is pointing to the space just AFTER the last event). You can use MusicEventIteratorPreviousEvent
to backup to the last event.
By specifying 0, you will position the iterator at the first event
@param inIterator the iterator
@param inTimeStamp the time stamp to seek too
*/
extern OSStatus
MusicEventIteratorSeek( MusicEventIterator inIterator,
MusicTimeStamp inTimeStamp) API_AVAILABLE(macos(10.0), ios(5.0), watchos(2.0), tvos(9.0));
/*!
@function MusicEventIteratorNextEvent
@abstract Move the iterator to the next event
@discussion If the iterator was at the last event, then it will move past the last event and will no longer point
to an event. You can use check MusicEventIteratorHasCurrentEvent to see if there is an event at the
iterator's current position. See also MusicEventIteratorHasNextEvent.
Typically this call is used to move the iterator forwards through the track's events.
@param inIterator the iterator
*/
extern OSStatus
MusicEventIteratorNextEvent( MusicEventIterator inIterator) API_AVAILABLE(macos(10.0), ios(5.0), watchos(2.0), tvos(9.0));
/*!
@function MusicEventIteratorPreviousEvent
@abstract Move the iterator to the previous event
@discussion If the iterator was at the first event, then it will leave the iterator unchanged and return an error.
See also MusicEventIteratorHasPreviousEvent
Typically this call is used to move the iterator backwards through the track's events.
@param inIterator the iterator
*/
extern OSStatus
MusicEventIteratorPreviousEvent( MusicEventIterator inIterator) API_AVAILABLE(macos(10.0), ios(5.0), watchos(2.0), tvos(9.0));
/*!
@function MusicEventIteratorGetEventInfo
@abstract Retrieves the event data at the iterator.
@discussion Retrieves the event and other information from the iterator's current position.
If you do not want specific information (eg, the time stamp) pass in NULL for that parameter.
@param inIterator the iterator
@param outTimeStamp the time stamp of the event
@param outEventType one of kMusicEventType_XXX that indicates what kind of event type the iterator
is currently pointing too
@param outEventData a reference to the event data. The type of data is described by the eventType. This data
is read only and should not be edited in place.
@param outEventDataSize the size of the data referenced by outEventData
*/
extern OSStatus
MusicEventIteratorGetEventInfo( MusicEventIterator inIterator,
MusicTimeStamp * outTimeStamp,
MusicEventType * outEventType,
const void * __nullable * __nonnull outEventData,
UInt32 * outEventDataSize) API_AVAILABLE(macos(10.0), ios(5.0), watchos(2.0), tvos(9.0));
/*!
@function MusicEventIteratorSetEventInfo
@abstract Changes the type or value of an event
@discussion Allows you to change either the event type, or the values of the event data, that the iterator is
currently pointing too. You cannot change the event's time (to do that you should use
MusicEventIteratorSetEventTime).
@param inIterator the iterator
@param inEventType the new (or existing) type of the event you are changing
@param inEventData the new event data. The size and type of this event data must match the inEventType
*/
extern OSStatus
MusicEventIteratorSetEventInfo( MusicEventIterator inIterator,
MusicEventType inEventType,
const void * inEventData) API_AVAILABLE(macos(10.2), ios(5.0), watchos(2.0), tvos(9.0));
/*!
@function MusicEventIteratorSetEventTime
@abstract Set a new time for an event
@discussion The iterator will still be pointing to the same event, but as the event will have moved,
it may or may not have a next or previous event now (depending of course on the time
you moved it too).
@param inIterator the iterator
@param inTimeStamp the new time stamp of the event
*/
extern OSStatus
MusicEventIteratorSetEventTime( MusicEventIterator inIterator,
MusicTimeStamp inTimeStamp) API_AVAILABLE(macos(10.0), ios(5.0), watchos(2.0), tvos(9.0));
/*!
@function MusicEventIteratorDeleteEvent
@abstract Deletes the event pointed to by the iterator
@discussion The iterator will reference the next event after the event has been deleted.
@param inIterator the iterator
*/
extern OSStatus
MusicEventIteratorDeleteEvent( MusicEventIterator inIterator) API_AVAILABLE(macos(10.0), ios(5.0), watchos(2.0), tvos(9.0));
/*!
@function MusicEventIteratorHasPreviousEvent
@abstract Does the track have an event previous to the event the iterator is pointing to?
@discussion To use the iterator going backwards through a track:
iter = New Iterator (points at first event)
MusicEventIteratorSeek (iter, kMusicTimeStamp_EndOfTrack) // will point it past the last event
bool hasPreviousEvent;
MusicEventIteratorHasPreviousEvent (iter, &hasPreviousEvent)
while (hasPreviousEvent) {
MusicEventIteratorPreviousEvent (iter)
// do work... MusicEventIteratorGetEventInfo (iter, ...
MusicEventIteratorHasPreviousEvent (iter, &hasPreviousEvent);
}
@param inIterator the iterator
@param outHasPrevEvent true if there is a previous event, false if not
*/
extern OSStatus
MusicEventIteratorHasPreviousEvent( MusicEventIterator inIterator,
Boolean * outHasPrevEvent) API_AVAILABLE(macos(10.0), ios(5.0), watchos(2.0), tvos(9.0));
/*!
@function MusicEventIteratorHasNextEvent
@abstract Does the track have an event past the event the iterator is pointing too?
@discussion To use the iterator going forwards through a track:
iter = New Iterator (points at first event)
bool hasCurrentEvent;
MusicEventIteratorHasCurrentEvent(iter, &hasCurrentEvent);
while (hasCurrentEvent) {
// do work... MusicEventIteratorGetEventInfo (iter, ...
MusicEventIteratorNextEvent (iter)
MusicEventIteratorHasCurrentEvent(iter, &hasCurrentEvent);
}
@param inIterator the iterator
@param outHasNextEvent true if there is a next event, false if not
*/
extern OSStatus
MusicEventIteratorHasNextEvent( MusicEventIterator inIterator,
Boolean * outHasNextEvent) API_AVAILABLE(macos(10.0), ios(5.0), watchos(2.0), tvos(9.0));
/*!
@function MusicEventIteratorHasCurrentEvent
@abstract Is there an event at the iterator's current position?
@param inIterator the iterator
@param outHasCurEvent true if there is an event, false if not
*/
extern OSStatus
MusicEventIteratorHasCurrentEvent( MusicEventIterator inIterator,
Boolean * outHasCurEvent) API_AVAILABLE(macos(10.2), ios(5.0), watchos(2.0), tvos(9.0));
//=====================================================================================================================
#pragma mark -
#pragma mark -- Deprecated
// standard MIDI files (SMF, and RMF)
// MusicSequenceLoadSMF() also intelligently parses an RMID file to extract SMF part
#if !TARGET_RT_64_BIT
extern OSStatus
MusicSequenceLoadSMFData( MusicSequence inSequence,
CFDataRef inData) API_DEPRECATED("no longer supported", macos(10.2, 10.5)) API_UNAVAILABLE(ios, watchos, tvos);
#endif // !TARGET_RT_64_BIT
// passing a value of zero for the flags makes this call equivalent to MusicSequenceLoadSMFData
// a kAudio_ParamError is returned if the sequence has ANY data in it and the flags value is != 0
// This will create a sequence with the first tracks containing MIDI Channel data
// IF the MIDI file had Meta events or SysEx data, then the last track in the sequence
// will contain that data.
extern OSStatus
MusicSequenceLoadSMFWithFlags( MusicSequence inSequence,
const struct FSRef * inFileRef,
MusicSequenceLoadFlags inFlags) API_DEPRECATED("no longer supported", macos(10.3, 10.5)) API_UNAVAILABLE(ios, watchos, tvos);
extern OSStatus
MusicSequenceLoadSMFDataWithFlags( MusicSequence inSequence,
CFDataRef inData,
MusicSequenceLoadFlags inFlags) API_DEPRECATED("no longer supported", macos(10.3, 10.5)) API_UNAVAILABLE(ios, watchos, tvos);
// inFlags must be zero
extern OSStatus
MusicSequenceSaveMIDIFile( MusicSequence inSequence,
const struct FSRef *inParentDirectory,
CFStringRef inFileName,
UInt16 inResolution,
UInt32 inFlags) API_DEPRECATED("no longer supported", macos(10.4, 10.5)) API_UNAVAILABLE(ios, watchos, tvos);
extern OSStatus
MusicSequenceSaveSMFData( MusicSequence inSequence,
CFDataRef __nullable * __nonnull outData,
UInt16 inResolution) API_DEPRECATED("no longer supported", macos(10.2, 10.5)) API_UNAVAILABLE(ios, watchos, tvos);
extern OSStatus
NewMusicTrackFrom( MusicTrack inSourceTrack,
MusicTimeStamp inSourceStartTime,
MusicTimeStamp inSourceEndTime,
MusicTrack __nullable * __nonnull outNewTrack) API_DEPRECATED("no longer supported", macos(10.0, 10.6)) API_UNAVAILABLE(ios, watchos, tvos);
#if !TARGET_OS_IPHONE
enum {
kMusicEventType_ExtendedControl = 2
};
typedef struct ExtendedControlEvent
{
MusicDeviceGroupID groupID;
AudioUnitParameterID controlID;
AudioUnitParameterValue value;
} ExtendedControlEvent;
extern OSStatus
MusicTrackNewExtendedControlEvent( MusicTrack inTrack,
MusicTimeStamp inTimeStamp,
const ExtendedControlEvent *inInfo)
API_DEPRECATED("no longer supported", macos(10.0, 10.7)) API_UNAVAILABLE(ios, watchos, tvos);
#endif
#if defined(__cplusplus)
}
#endif
CF_ASSUME_NONNULL_END
#pragma clang diagnostic pop
#endif // AudioToolbox_MusicPlayer_h
|
0 | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/AudioToolbox.framework | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/AudioToolbox.framework/Headers/AudioHardwareService.h | /*!
@file AudioHardwareService.h
@framework AudioToolbox.framework
@copyright (c) 2006-2015 by Apple, Inc., all rights reserved.
@abstract API's for general high level audio services.
@discussion
The Audio Hardware Service (AHS) provides a way for applications to query and manipulate the
aspects of an audio hardware device without incurring the overhead of loading the full audio
HAL. AHS provides access to all the AudioObjects and their properties on the system. However,
access is limited to only those properties that do not directly impact IO. For example, you can
query the device's format but you can't query its IO buffer size. As such, the AHS API directly
incorporates the various structures and constants in HAL's API, with the caveat that the
AudioObjectIDs used in AHS cannot be used with the HAL.
*/
#ifndef AudioHardwareService_h
#define AudioHardwareService_h
#if !TARGET_OS_IPHONE
#if !defined(__COREAUDIO_USE_FLAT_INCLUDES__)
#include <Availability.h>
#include <CoreAudio/AudioHardware.h>
#else
#include <AudioHardware.h>
#endif
#endif
#if !TARGET_OS_IPHONE
#if defined(__cplusplus)
extern "C"
{
#endif
//==================================================================================================
#pragma mark Audio Hardware Service Properties
/*!
@enum Audio Hardware Service Properties
@abstract AudioObjectPropertySelector values that apply to various kinds of AudioObjects
only when accessed via the Audio Hardware Service API.
@constant kAudioHardwareServiceProperty_ServiceRestarted
A Float32 whose value has no meaning. Rather, this property exists so that
clients can be informed when the service has been reset for some reason.
When a reset happens, any state the client has with AHS, such as cached data
or added listeners, must be re-established by the client.
@constant kAudioHardwareServiceDeviceProperty_VirtualMainVolume
A Float32 that represents the value of the volume control. The range is
between 0.0 and 1.0 (inclusive). This actual volume controls this property
manipulates depends on what the device provides. If the device has a true
main volume control, this property directly controls that. If the device
has individual channel volume controls, this property will apply to those
identified by the device's preferred multi-channel layout (or preferred
stereo pair if the device is stereo only). Note that this control maintains
the relative balance between all the channels it affects.
@constant kAudioHardwareServiceDeviceProperty_VirtualMainBalance
A Float32 that represents the value of the stereo balance control. The range
is from 0.0 (all power to the left) to 1.0 (all power to the right) with
the value of 0.5 signifying that the channels have equal power. This control
is only present for devices that have individual channel volume controls. It
manipulates the relative balance between the volume controls on the channels
identified as the device's default stereo pair.
*/
CF_ENUM(AudioObjectPropertySelector)
{
kAudioHardwareServiceProperty_ServiceRestarted = 'srst',
kAudioHardwareServiceDeviceProperty_VirtualMainVolume = 'vmvc',
kAudioHardwareServiceDeviceProperty_VirtualMasterVolume API_DEPRECATED_WITH_REPLACEMENT("kAudioHardwareServiceDeviceProperty_VirtualMainVolume", macos(10.5, 10.5)) API_UNAVAILABLE(ios, watchos, tvos) = kAudioHardwareServiceDeviceProperty_VirtualMainVolume,
kAudioHardwareServiceDeviceProperty_VirtualMainBalance = 'vmbc',
kAudioHardwareServiceDeviceProperty_VirtualMasterBalance API_DEPRECATED_WITH_REPLACEMENT("kAudioHardwareServiceDeviceProperty_VirtualMainBalance", macos(10.5, 10.5)) API_UNAVAILABLE(ios, watchos, tvos) = kAudioHardwareServiceDeviceProperty_VirtualMainBalance,
};
//==================================================================================================
#pragma mark Audio Hardware Service Functions
/*!
@functiongroup Audio Hardware Service
*/
/*!
@function AudioHardwareServiceHasProperty
@abstract Queries an AudioObject about whether or not it has the given property.
@param inObjectID
The AudioObject to query.
@param inAddress
An AudioObjectPropertyAddress indicating which property is being queried.
@result A Boolean indicating whether or not the AudioObject has the given property.
*/
extern Boolean
AudioHardwareServiceHasProperty( AudioObjectID inObjectID,
const AudioObjectPropertyAddress* inAddress)
API_DEPRECATED("no longer supported", macos(10.5, 10.11)) API_UNAVAILABLE(ios, watchos, tvos);
/*!
@function AudioHardwareServiceIsPropertySettable
@abstract Queries an AudioObject about whether or not the given property can be set using
AudioHardwareServiceSetPropertyData.
@param inObjectID
The AudioObject to query.
@param inAddress
An AudioObjectPropertyAddress indicating which property is being queried.
@param outIsSettable
A Boolean indicating whether or not the property can be set.
@result An OSStatus indicating success or failure.
*/
extern OSStatus
AudioHardwareServiceIsPropertySettable( AudioObjectID inObjectID,
const AudioObjectPropertyAddress* inAddress,
Boolean* outIsSettable)
API_DEPRECATED("no longer supported", macos(10.5, 10.11)) API_UNAVAILABLE(ios, watchos, tvos);
/*!
@function AudioHardwareServiceGetPropertyDataSize
@abstract Queries an AudioObject to find the size of the data for the given property.
@param inObjectID
The AudioObject to query.
@param inAddress
An AudioObjectPropertyAddress indicating which property is being queried.
@param inQualifierDataSize
A UInt32 indicating the size of the buffer pointed to by inQualifierData.
Note that not all properties require qualification, in which case this
value will be 0.
@param inQualifierData
A buffer of data to be used in determining the data of the property being
queried. Note that not all properties require qualification, in which case
this value will be NULL.
@param outDataSize
A UInt32 indicating how many bytes the data for the given property occupies.
@result An OSStatus indicating success or failure.
*/
extern OSStatus
AudioHardwareServiceGetPropertyDataSize( AudioObjectID inObjectID,
const AudioObjectPropertyAddress* inAddress,
UInt32 inQualifierDataSize,
const void* inQualifierData,
UInt32* outDataSize)
API_DEPRECATED("no longer supported", macos(10.5, 10.11)) API_UNAVAILABLE(ios, watchos, tvos);
/*!
@function AudioHardwareServiceGetPropertyData
@abstract Queries an AudioObject to get the data of the given property and places it in
the provided buffer.
@param inObjectID
The AudioObject to query.
@param inAddress
An AudioObjectPropertyAddress indicating which property is being queried.
@param inQualifierDataSize
A UInt32 indicating the size of the buffer pointed to by inQualifierData.
Note that not all properties require qualification, in which case this
value will be 0.
@param inQualifierData
A buffer of data to be used in determining the data of the property being
queried. Note that not all properties require qualification, in which case
this value will be NULL.
@param ioDataSize
A UInt32 which on entry indicates the size of the buffer pointed to by
outData and on exit indicates how much of the buffer was used.
@param outData
The buffer into which the AudioObject will put the data for the given
property.
@result An OSStatus indicating success or failure.
*/
extern OSStatus
AudioHardwareServiceGetPropertyData( AudioObjectID inObjectID,
const AudioObjectPropertyAddress* inAddress,
UInt32 inQualifierDataSize,
const void* inQualifierData,
UInt32* ioDataSize,
void* outData)
API_DEPRECATED("no longer supported", macos(10.5, 10.11)) API_UNAVAILABLE(ios, watchos, tvos);
/*!
@function AudioHardwareServiceSetPropertyData
@abstract Tells an AudioObject to change the value of the given property using the
provided data.
@discussion Note that the value of the property should not be considered changed until the
HAL has called the listeners as many properties values are changed
asynchronously.
@param inObjectID
The AudioObject to change.
@param inAddress
An AudioObjectPropertyAddress indicating which property is being changed.
@param inQualifierDataSize
A UInt32 indicating the size of the buffer pointed to by inQualifierData.
Note that not all properties require qualification, in which case this
value will be 0.
@param inQualifierData
A buffer of data to be used in determining the data of the property being
queried. Note that not all properties require qualification, in which case
this value will be NULL.
@param inDataSize
A UInt32 indicating the size of the buffer pointed to by inData.
@param inData
The buffer containing the data to be used to change the property's value.
@result An OSStatus indicating success or failure.
*/
extern OSStatus
AudioHardwareServiceSetPropertyData( AudioObjectID inObjectID,
const AudioObjectPropertyAddress* inAddress,
UInt32 inQualifierDataSize,
const void* inQualifierData,
UInt32 inDataSize,
const void* inData)
API_DEPRECATED("no longer supported", macos(10.5, 10.11)) API_UNAVAILABLE(ios, watchos, tvos);
/*!
@function AudioHardwareServiceAddPropertyListener
@abstract Registers the given AudioObjectPropertyListenerProc to receive notifications
when the given properties change.
@param inObjectID
The AudioObject to register the listener with.
@param inAddress
The AudioObjectPropertyAddresses indicating which property the listener
should be notified about.
@param inListener
The AudioObjectPropertyListenerProc to call.
@param inClientData
A pointer to client data that is passed to the listener when it is called.
@result An OSStatus indicating success or failure.
*/
extern OSStatus
AudioHardwareServiceAddPropertyListener( AudioObjectID inObjectID,
const AudioObjectPropertyAddress* inAddress,
AudioObjectPropertyListenerProc inListener,
void* inClientData)
API_DEPRECATED("no longer supported", macos(10.5, 10.11)) API_UNAVAILABLE(ios, watchos, tvos);
/*!
@function AudioHardwareServiceRemovePropertyListener
@abstract Unregisters the given AudioObjectPropertyListenerProc from receiving
notifications when the given properties change.
@param inObjectID
The AudioObject to unregister the listener from.
@param inAddress
The AudioObjectPropertyAddresses indicating which property the listener
will stop being notified about.
@param inListener
The AudioObjectPropertyListenerProc being removed.
@param inClientData
A pointer to client data that is passed to the listener when it is called.
@result An OSStatus indicating success or failure.
*/
extern OSStatus
AudioHardwareServiceRemovePropertyListener( AudioObjectID inObjectID,
const AudioObjectPropertyAddress* inAddress,
AudioObjectPropertyListenerProc inListener,
void* inClientData)
API_DEPRECATED("no longer supported", macos(10.5, 10.11)) API_UNAVAILABLE(ios, watchos, tvos);
#if defined(__cplusplus)
}
#endif
#endif //!TARGET_OS_IPHONE
#endif /* AudioHardwareService_h */
|
0 | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/AudioToolbox.framework | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/AudioToolbox.framework/Headers/AudioFile.h | #if (defined(__USE_PUBLIC_HEADERS__) && __USE_PUBLIC_HEADERS__) || (defined(USE_AUDIOTOOLBOX_PUBLIC_HEADERS) && USE_AUDIOTOOLBOX_PUBLIC_HEADERS) || !__has_include(<AudioToolboxCore/AudioFile.h>)
/*!
@file AudioFile.h
@framework AudioToolbox.framework
@copyright (c) 1985-2015 by Apple, Inc., all rights reserved.
@abstract API's to read and write audio files in the filesystem or in memory.
*/
#ifndef AudioToolbox_AudioFile_h
#define AudioToolbox_AudioFile_h
//=============================================================================
// Includes
//=============================================================================
#include <Availability.h>
#include <CoreAudioTypes/CoreAudioTypes.h>
#include <CoreFoundation/CoreFoundation.h>
CF_ASSUME_NONNULL_BEGIN
#if defined(__cplusplus)
extern "C"
{
#endif
/*!
@typedef AudioFileTypeID
@abstract Identifier for an audio file type.
*/
typedef UInt32 AudioFileTypeID;
/*!
Audio File Types
@abstract Constants for the built-in audio file types.
@discussion These constants are used to indicate the type of file to be written, or as a hint to
what type of file to expect from data provided.
@constant kAudioFileAIFFType
Audio Interchange File Format (AIFF)
@constant kAudioFileAIFCType
Audio Interchange File Format Compressed (AIFF-C)
@constant kAudioFileWAVEType
Microsoft WAVE
@constant kAudioFileRF64Type
File Format specified in EBU Tech 3306
@constant kAudioFileBW64Type
File Format specified in ITU-R BS.2088
@constant kAudioFileWave64Type
Sony Pictures Digital Wave 64
@constant kAudioFileSoundDesigner2Type
Sound Designer II
@constant kAudioFileNextType
NeXT / Sun
@constant kAudioFileMP3Type
MPEG Audio Layer 3 (.mp3)
@constant kAudioFileMP2Type
MPEG Audio Layer 2 (.mp2)
@constant kAudioFileMP1Type
MPEG Audio Layer 1 (.mp1)
@constant kAudioFileAC3Type
AC-3
@constant kAudioFileAAC_ADTSType
Advanced Audio Coding (AAC) Audio Data Transport Stream (ADTS)
@constant kAudioFileMPEG4Type
@constant kAudioFileM4AType
@constant kAudioFileM4BType
@constant kAudioFileCAFType
CoreAudio File Format
@constant kAudioFile3GPType
@constant kAudioFile3GP2Type
@constant kAudioFileAMRType
@constant kAudioFileFLACType
Free Lossless Audio Codec
@constant kAudioFileLATMInLOASType
Low-overhead audio stream with low-overhead audio transport multiplex, per ISO/IEC 14496-3.
Support is limited to AudioSyncStream using AudioMuxElement with mux config present.
*/
CF_ENUM(AudioFileTypeID) {
kAudioFileAIFFType = 'AIFF',
kAudioFileAIFCType = 'AIFC',
kAudioFileWAVEType = 'WAVE',
kAudioFileRF64Type = 'RF64',
kAudioFileBW64Type = 'BW64',
kAudioFileWave64Type = 'W64f',
kAudioFileSoundDesigner2Type = 'Sd2f',
kAudioFileNextType = 'NeXT',
kAudioFileMP3Type = 'MPG3', // mpeg layer 3
kAudioFileMP2Type = 'MPG2', // mpeg layer 2
kAudioFileMP1Type = 'MPG1', // mpeg layer 1
kAudioFileAC3Type = 'ac-3',
kAudioFileAAC_ADTSType = 'adts',
kAudioFileMPEG4Type = 'mp4f',
kAudioFileM4AType = 'm4af',
kAudioFileM4BType = 'm4bf',
kAudioFileCAFType = 'caff',
kAudioFile3GPType = '3gpp',
kAudioFile3GP2Type = '3gp2',
kAudioFileAMRType = 'amrf',
kAudioFileFLACType = 'flac',
kAudioFileLATMInLOASType = 'loas'
};
/*!
AudioFile error codes
@abstract These are the error codes returned from the AudioFile API.
@constant kAudioFileUnspecifiedError
An unspecified error has occurred.
@constant kAudioFileUnsupportedFileTypeError
The file type is not supported.
@constant kAudioFileUnsupportedDataFormatError
The data format is not supported by this file type.
@constant kAudioFileUnsupportedPropertyError
The property is not supported.
@constant kAudioFileBadPropertySizeError
The size of the property data was not correct.
@constant kAudioFilePermissionsError
The operation violated the file permissions. For example, trying to write to a file opened with kAudioFileReadPermission.
@constant kAudioFileNotOptimizedError
There are chunks following the audio data chunk that prevent extending the audio data chunk.
The file must be optimized in order to write more audio data.
@constant kAudioFileInvalidChunkError
The chunk does not exist in the file or is not supported by the file.
@constant kAudioFileDoesNotAllow64BitDataSizeError
The a file offset was too large for the file type. AIFF and WAVE have a 32 bit file size limit.
@constant kAudioFileInvalidPacketOffsetError
A packet offset was past the end of the file, or not at the end of the file when writing a VBR format,
or a corrupt packet size was read when building the packet table.
@constant kAudioFileInvalidPacketDependencyError
Either the packet dependency info that's necessary for the audio format has not been provided,
or the provided packet dependency info indicates dependency on a packet that's unavailable.
@constant kAudioFileInvalidFileError
The file is malformed, or otherwise not a valid instance of an audio file of its type.
@constant kAudioFileOperationNotSupportedError
The operation cannot be performed. For example, setting kAudioFilePropertyAudioDataByteCount to increase
the size of the audio data in a file is not a supported operation. Write the data instead.
@constant kAudioFileNotOpenError
The file is closed.
@constant kAudioFileEndOfFileError
End of file.
@constant kAudioFilePositionError
Invalid file position.
@constant kAudioFileFileNotFoundError
File not found.
*/
CF_ENUM(OSStatus) {
kAudioFileUnspecifiedError = 'wht?', // 0x7768743F, 2003334207
kAudioFileUnsupportedFileTypeError = 'typ?', // 0x7479703F, 1954115647
kAudioFileUnsupportedDataFormatError = 'fmt?', // 0x666D743F, 1718449215
kAudioFileUnsupportedPropertyError = 'pty?', // 0x7074793F, 1886681407
kAudioFileBadPropertySizeError = '!siz', // 0x2173697A, 561211770
kAudioFilePermissionsError = 'prm?', // 0x70726D3F, 1886547263
kAudioFileNotOptimizedError = 'optm', // 0x6F70746D, 1869640813
// file format specific error codes
kAudioFileInvalidChunkError = 'chk?', // 0x63686B3F, 1667787583
kAudioFileDoesNotAllow64BitDataSizeError = 'off?', // 0x6F66663F, 1868981823
kAudioFileInvalidPacketOffsetError = 'pck?', // 0x70636B3F, 1885563711
kAudioFileInvalidPacketDependencyError = 'dep?', // 0x6465703F, 1684369471
kAudioFileInvalidFileError = 'dta?', // 0x6474613F, 1685348671
kAudioFileOperationNotSupportedError = 0x6F703F3F, // 'op??', integer used because of trigraph
// general file error codes
kAudioFileNotOpenError = -38,
kAudioFileEndOfFileError = -39,
kAudioFilePositionError = -40,
kAudioFileFileNotFoundError = -43
};
/*!
@enum AudioFileFlags
@abstract These are flags that can be used with the CreateURL API call
@constant kAudioFileFlags_EraseFile
If set, then the CreateURL call will erase the contents of an existing file
If not set, then the CreateURL call will fail if the file already exists
@constant kAudioFileFlags_DontPageAlignAudioData
Normally, newly created and optimized files will have padding added in order to page align
the data to 4KB boundaries. This makes reading the data more efficient.
When disk space is a concern, this flag can be set so that the padding will not be added.
*/
typedef CF_OPTIONS(UInt32, AudioFileFlags) {
kAudioFileFlags_EraseFile = 1,
kAudioFileFlags_DontPageAlignAudioData = 2
};
typedef CF_ENUM(SInt8, AudioFilePermissions) {
kAudioFileReadPermission = 0x01,
kAudioFileWritePermission = 0x02,
kAudioFileReadWritePermission = 0x03
};
//=============================================================================
// Types specific to the Audio File API
//=============================================================================
/*!
@typedef AudioFileID
@abstract An opaque reference to an AudioFile object.
*/
typedef struct OpaqueAudioFileID *AudioFileID;
/*!
@typedef AudioFilePropertyID
@abstract A constant for an AudioFile property.
*/
typedef UInt32 AudioFilePropertyID;
/*!
enum AudioFileLoopDirection
@abstract These constants describe the playback direction of a looped segment of a file.
@constant kAudioFileLoopDirection_NoLooping
The segment is not looped.
@constant kAudioFileLoopDirection_Forward
play segment forward.
@constant kAudioFileLoopDirection_Backward
play segment backward.
@constant kAudioFileLoopDirection_ForwardAndBackward
play segment forward and backward.
*/
CF_ENUM(UInt32) {
kAudioFileLoopDirection_NoLooping = 0,
kAudioFileLoopDirection_Forward = 1,
kAudioFileLoopDirection_ForwardAndBackward = 2,
kAudioFileLoopDirection_Backward = 3
};
//=============================================================================
// Markers, Regions
//=============================================================================
/*!
@struct AudioFile_SMPTE_Time
@abstract A struct for describing a SMPTE time.
@var mHours The hours.
@var mMinutes The minutes.
@var mSeconds The seconds.
@var mFrames The frames.
@var mSubFrameSampleOffset The sample offset within a frame.
*/
struct AudioFile_SMPTE_Time
{
SInt8 mHours;
UInt8 mMinutes;
UInt8 mSeconds;
UInt8 mFrames;
UInt32 mSubFrameSampleOffset;
};
typedef struct AudioFile_SMPTE_Time AudioFile_SMPTE_Time;
/*!
enum AudioFileMarkerType
@abstract constants for types of markers within a file. Used in the mType field of AudioFileMarker.
@constant kAudioFileMarkerType_Generic
A generic marker. See CAFFile.h for marker types specific to CAF files.
*/
CF_ENUM(UInt32) {
kAudioFileMarkerType_Generic = 0,
};
/*!
@struct AudioFileMarker
@abstract A marker annotates a position in an audio file with additional information.
@discussion (description)
@var mFramePosition The frame in the file counting from the start of the audio data.
@var mName The name of this marker.
@var mMarkerID A unique ID for this marker.
@var mSMPTETime The SMPTE time for this marker.
@var mType The marker type.
@var mReserved A reserved field. Set to zero.
@var mChannel The channel number that the marker refers to. Set to zero if marker applies to all channels.
*/
struct AudioFileMarker
{
Float64 mFramePosition;
CFStringRef __nullable mName;
SInt32 mMarkerID;
AudioFile_SMPTE_Time mSMPTETime;
UInt32 mType;
UInt16 mReserved;
UInt16 mChannel;
};
typedef struct AudioFileMarker AudioFileMarker;
/*!
@struct AudioFileMarkerList
@abstract A list of AudioFileMarker.
@var mSMPTE_TimeType
This defines the SMPTE timing scheme used in the marker list. See CAFFile.h for the values used here.
@var mNumberMarkers
The number of markers in the mMarkers list.
@var mMarkers
A list of AudioFileMarker.
*/
struct AudioFileMarkerList
{
UInt32 mSMPTE_TimeType;
UInt32 mNumberMarkers;
AudioFileMarker mMarkers[1]; // this is a variable length array of mNumberMarkers elements
};
typedef struct AudioFileMarkerList AudioFileMarkerList;
/*!
@function NumBytesToNumAudioFileMarkers
@abstract Converts a size in bytes to the number of AudioFileMarkers that can be contained in that number of bytes.
@discussion This can be used for the kAudioFilePropertyMarkerList property when calculating the number of
markers that will be returned.
@param inNumBytes
a number of bytes.
@result the number of AudioFileMarkers that can be contained in that number of bytes.
*/
#ifdef CF_INLINE
CF_INLINE size_t NumBytesToNumAudioFileMarkers(size_t inNumBytes)
{
return (inNumBytes<offsetof(AudioFileMarkerList, mMarkers[0]) ? 0 : (inNumBytes - offsetof(AudioFileMarkerList, mMarkers[0])) / sizeof(AudioFileMarker));
}
#else
#define NumBytesToNumAudioFileMarkers(inNumBytes) \
((inNumBytes)<offsetof(AudioFileMarkerList, mMarkers[0])?0:((inNumBytes) - offsetof(AudioFileMarkerList, mMarkers[0])) / sizeof(AudioFileMarker))
#endif
/*!
@function NumAudioFileMarkersToNumBytes
@abstract Converts a number of AudioFileMarkers to a size in bytes.
@discussion This can be used for the kAudioFilePropertyMarkerList property when calculating the size required to
contain a number of AudioFileMarkers.
@param inNumMarkers
a number of AudioFileMarkers.
@result the size in bytes required to contain that number of AudioFileMarkers.
*/
#ifdef CF_INLINE
CF_INLINE size_t NumAudioFileMarkersToNumBytes(size_t inNumMarkers)
{
return (offsetof(AudioFileMarkerList, mMarkers) + (inNumMarkers) * sizeof(AudioFileMarker));
}
#else
#define NumAudioFileMarkersToNumBytes(inNumMarkers) \
(offsetof(AudioFileMarkerList, mMarkers) + (inNumMarkers) * sizeof(AudioFileMarker))
#endif
/*!
@enum AudioFileRegionFlags
@abstract These are flags for an AudioFileRegion that specify a playback direction.
@discussion One or multiple of these flags can be set. For example, if both kAudioFileRegionFlag_LoopEnable and
kAudioFileRegionFlag_PlayForward are set, then the region will play as a forward loop. If only
kAudioFileRegionFlag_PlayForward is set, then the region will be played forward once.
@constant kAudioFileRegionFlag_LoopEnable
If this flag is set, the region will be looped. One or both of the following must also be set.
@constant kAudioFileRegionFlag_PlayForward
If this flag is set, the region will be played forward.
@constant kAudioFileRegionFlag_PlayBackward
If this flag is set, the region will be played backward.
*/
typedef CF_OPTIONS(UInt32, AudioFileRegionFlags) {
kAudioFileRegionFlag_LoopEnable = 1,
kAudioFileRegionFlag_PlayForward = 2,
kAudioFileRegionFlag_PlayBackward = 4
};
/*!
@struct AudioFileRegion
@abstract An AudioFileRegion specifies a segment of audio data.
@discussion Generally a region consists of at least two markers marking the beginning and end of the segment.
There may also be other markers defining other meta information such as sync point.
@var mRegionID
each region must have a unique ID.
@var mName
The name of the region.
@var mFlags
AudioFileRegionFlags.
@var mNumberMarkers
The number of markers in the mMarkers array.
@var mMarkers
A variable length array of AudioFileMarkers.
*/
struct AudioFileRegion
{
UInt32 mRegionID;
CFStringRef mName;
AudioFileRegionFlags mFlags;
UInt32 mNumberMarkers;
AudioFileMarker mMarkers[1]; // this is a variable length array of mNumberMarkers elements
};
typedef struct AudioFileRegion AudioFileRegion;
/*!
@struct AudioFileRegionList
@abstract A list of the AudioFileRegions in a file.
@discussion This is the struct used by the kAudioFilePropertyRegionList property.
@var mSMPTE_TimeType
This defines the SMPTE timing scheme used in the file. See CAFFile.h for the values used here.
@var mNumberRegions
The number of regions in the mRegions list.
@var mRegions
A list of AudioFileRegions. Note that AudioFileMarkers are variable length, so this list cannot
be accessed as an array. Use the NextAudioFileRegion macro for traversing the list instead.
*/
struct AudioFileRegionList
{
UInt32 mSMPTE_TimeType;
UInt32 mNumberRegions;
AudioFileRegion mRegions[1]; // this is a variable length array of mNumberRegions elements
};
typedef struct AudioFileRegionList AudioFileRegionList;
/*!
@function NextAudioFileRegion
@abstract convenience macro for traversing the region list.
@discussion because AudioFileRegions are variable length, you cannot access them as an array. Use NextAudioFileRegion
to walk the list.
@param inAFRegionPtr
a pointer to the current region.
@result a pointer to the region after the current region. This does not protect you from walking off the end of the list,
so obey mNumberRegions.
*/
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wold-style-cast"
#pragma clang diagnostic ignored "-Wcast-qual"
#pragma clang diagnostic ignored "-Wcast-align"
#ifdef CF_INLINE
CF_INLINE AudioFileRegion *NextAudioFileRegion(const AudioFileRegion *inAFRegionPtr)
{
return ((AudioFileRegion*)((char*)inAFRegionPtr + offsetof(AudioFileRegion, mMarkers) + (inAFRegionPtr->mNumberMarkers)*sizeof(AudioFileMarker)));
}
#else
#define NextAudioFileRegion(inAFRegionPtr) \
((AudioFileRegion*)((char*)(inAFRegionPtr) + offsetof(AudioFileRegion, mMarkers) + ((inAFRegionPtr)->mNumberMarkers)*sizeof(AudioFileMarker)))
#endif
#pragma clang diagnostic pop
/*!
@struct AudioFramePacketTranslation
@abstract used for properties kAudioFilePropertyPacketToFrame and kAudioFilePropertyFrameToPacket
@discussion See description of kAudioFilePropertyPacketToFrame and kAudioFilePropertyFrameToPacket
@var mFrame a frame number.
@var mPacket a packet number.
@var mFrameOffsetInPacket a frame offset in a packet.
*/
struct AudioFramePacketTranslation
{
SInt64 mFrame;
SInt64 mPacket;
UInt32 mFrameOffsetInPacket;
};
typedef struct AudioFramePacketTranslation AudioFramePacketTranslation;
/*!
@enum AudioBytePacketTranslation Flags
@abstract flags for the AudioBytePacketTranslation mFlags field
@discussion There is currently only one flag.
@constant kBytePacketTranslationFlag_IsEstimate
If the set then the result value is an estimate.
*/
typedef CF_OPTIONS(UInt32, AudioBytePacketTranslationFlags) {
kBytePacketTranslationFlag_IsEstimate = 1
};
/*!
@struct AudioBytePacketTranslation
@abstract used for properties kAudioFileByteToPacket and kAudioFilePacketToByte
@discussion See description of kAudioFileByteToPacket and kAudioFilePacketToByte
@var mByte a byte number.
@var mPacket a packet number.
@var mByteOffsetInPacket a byte offset in a packet.
@var mFlags if kBytePacketTranslationFlag_IsEstimate is set, then the value is an estimate.
*/
struct AudioBytePacketTranslation
{
SInt64 mByte;
SInt64 mPacket;
UInt32 mByteOffsetInPacket;
AudioBytePacketTranslationFlags mFlags;
};
typedef struct AudioBytePacketTranslation AudioBytePacketTranslation;
/*!
@struct AudioFilePacketTableInfo
@abstract This contains information about the number of valid frames in a file and where they begin and end.
@discussion Some data formats may have packets whose contents are not completely valid, but represent priming or remainder
frames that are not meant to be played. For example a file with 100 packets of AAC is nominally 1024 * 100 = 102400 frames
of data. However the first 2112 frames of that may be priming frames and there may be some
number of remainder frames added to pad out to a full packet of 1024 frames. The priming and remainder frames should be
discarded. The total number of packets in the file times the frames per packet (or counting each packet's frames
individually for a variable frames per packet format) minus mPrimingFrames, minus mRemainderFrames, should
equal mNumberValidFrames.
@var mNumberValidFrames the number of valid frames in the file.
@var mPrimingFrames the number of invalid frames at the beginning of the file.
@var mRemainderFrames the number of invalid frames at the end of the file.
*/
struct AudioFilePacketTableInfo
{
SInt64 mNumberValidFrames;
SInt32 mPrimingFrames;
SInt32 mRemainderFrames;
};
typedef struct AudioFilePacketTableInfo AudioFilePacketTableInfo;
/*!
@struct AudioPacketRangeByteCountTranslation
@abstract used for property kAudioFilePropertyPacketRangeByteCountUpperBound
@discussion See description of kAudioFilePropertyPacketRangeByteCountUpperBound
@var mPacket a packet number.
@var mPacketCount a packet count.
@var mByteCountUpperBound an upper bound for the total size of the specified packets.
*/
struct AudioPacketRangeByteCountTranslation
{
SInt64 mPacket;
SInt64 mPacketCount;
SInt64 mByteCountUpperBound;
};
typedef struct AudioPacketRangeByteCountTranslation AudioPacketRangeByteCountTranslation;
/*!
@struct AudioPacketRollDistanceTranslation
@abstract used for property kAudioFilePropertyPacketToRollDistance
@discussion See descriptions of kAudioFilePropertyPacketToRollDistance and kAudioFilePropertyRestrictsRandomAccess
@var mPacket a packet number
@var mRollDistance a count of packets that must be decoded prior to the packet with the specified number in order to achieve the best practice for the decoding of that packet
*/
struct AudioPacketRollDistanceTranslation
{
SInt64 mPacket;
SInt64 mRollDistance;
};
typedef struct AudioPacketRollDistanceTranslation AudioPacketRollDistanceTranslation;
/*!
@struct AudioIndependentPacketTranslation
@abstract used for property kAudioFilePropertyPreviousIndependentPacket and kAudioFilePropertyNextIndependentPacket
@discussion See descriptions of kAudioFilePropertyPreviousIndependentPacket and kAudioFilePropertyNextIndependentPacket
@var mPacket a packet number
@var mIndependentlyDecodablePacket a packet number not equal to mPacket of an independent packet
*/
struct AudioIndependentPacketTranslation
{
SInt64 mPacket;
SInt64 mIndependentlyDecodablePacket;
};
typedef struct AudioIndependentPacketTranslation AudioIndependentPacketTranslation;
/*!
@struct AudioPacketDependencyInfoTranslation
@abstract used for property kAudioFilePropertyPacketToDependencyInfo
@discussion See descriptions of kAudioFilePropertyPacketToDependencyInfo and kAudioFilePropertyRestrictsRandomAccess
@var mPacket a packet number
@var mIsIndependentlyDecodable 1 means that the specified packet is independently decodable; 0 means it's not
@var mNumberPrerollPackets if the packet is independently decodable, the count of packets that must be decoded after the packet with the specified number in order to refresh the decoder
*/
struct AudioPacketDependencyInfoTranslation
{
SInt64 mPacket;
UInt32 mIsIndependentlyDecodable;
UInt32 mNumberPrerollPackets;
};
typedef struct AudioPacketDependencyInfoTranslation AudioPacketDependencyInfoTranslation;
//=============================================================================
// Info String Keys
//=============================================================================
// Get key values from the InfoDictionary by making CFStrings from the following constants
#define kAFInfoDictionary_Album "album"
#define kAFInfoDictionary_ApproximateDurationInSeconds "approximate duration in seconds"
#define kAFInfoDictionary_Artist "artist"
#define kAFInfoDictionary_ChannelLayout "channel layout"
#define kAFInfoDictionary_Comments "comments"
#define kAFInfoDictionary_Composer "composer"
#define kAFInfoDictionary_Copyright "copyright"
#define kAFInfoDictionary_EncodingApplication "encoding application"
#define kAFInfoDictionary_Genre "genre"
#define kAFInfoDictionary_ISRC "ISRC" // International Standard Recording Code
#define kAFInfoDictionary_KeySignature "key signature"
#define kAFInfoDictionary_Lyricist "lyricist"
#define kAFInfoDictionary_NominalBitRate "nominal bit rate"
#define kAFInfoDictionary_RecordedDate "recorded date"
#define kAFInfoDictionary_SourceBitDepth "source bit depth"
#define kAFInfoDictionary_SourceEncoder "source encoder"
#define kAFInfoDictionary_SubTitle "subtitle"
#define kAFInfoDictionary_Tempo "tempo"
#define kAFInfoDictionary_TimeSignature "time signature"
#define kAFInfoDictionary_Title "title"
#define kAFInfoDictionary_TrackNumber "track number"
#define kAFInfoDictionary_Year "year"
//=============================================================================
// Routines
//=============================================================================
/*!
@function AudioFileCreateWithURL
@abstract creates a new audio file (or initialises an existing file)
@discussion creates a new (or initialises an existing) audio file specified by the URL.
Upon success, an AudioFileID is returned which can be used for subsequent calls
to the AudioFile APIs.
@param inFileRef an CFURLRef fully specifying the path of the file to create/initialise
@param inFileType an AudioFileTypeID indicating the type of audio file to create.
@param inFormat an AudioStreamBasicDescription describing the data format that will be
added to the audio file.
@param inFlags relevant flags for creating/opening the file.
if kAudioFileFlags_EraseFile is set, it will erase an existing file
if not set, then the Create call will fail if the URL is an existing file
@param outAudioFile if successful, an AudioFileID that can be used for subsequent AudioFile calls.
@result returns noErr if successful.
*/
extern OSStatus
AudioFileCreateWithURL (CFURLRef inFileRef,
AudioFileTypeID inFileType,
const AudioStreamBasicDescription *inFormat,
AudioFileFlags inFlags,
AudioFileID __nullable * __nonnull outAudioFile) API_AVAILABLE(macos(10.5), ios(2.0), watchos(2.0), tvos(9.0));
/*!
@function AudioFileOpenURL
@abstract Open an existing audio file.
@discussion Open an existing audio file for reading or reading and writing.
@param inFileRef the CFURLRef of an existing audio file.
@param inPermissions use the permission constants
@param inFileTypeHint For files which have no filename extension and whose type cannot be easily or
uniquely determined from the data (ADTS,AC3), this hint can be used to indicate the file type.
Otherwise you can pass zero for this. The hint is only used on OS versions 10.3.1 or greater.
For OS versions prior to that, opening files of the above description will fail.
@param outAudioFile upon success, an AudioFileID that can be used for subsequent
AudioFile calls.
@result returns noErr if successful.
*/
extern OSStatus
AudioFileOpenURL ( CFURLRef inFileRef,
AudioFilePermissions inPermissions,
AudioFileTypeID inFileTypeHint,
AudioFileID __nullable * __nonnull outAudioFile) API_AVAILABLE(macos(10.5), ios(2.0), watchos(2.0), tvos(9.0));
/*!
@typedef AudioFile_ReadProc
@abstract A callback for reading data. used with AudioFileOpenWithCallbacks or AudioFileInitializeWithCallbacks.
@discussion a function that will be called when AudioFile needs to read data.
@param inClientData A pointer to the client data as set in the inClientData parameter to AudioFileXXXWithCallbacks.
@param inPosition An offset into the data from which to read.
@param requestCount The number of bytes to read.
@param buffer The buffer in which to put the data read.
@param actualCount The callback should set this to the number of bytes successfully read.
@result The callback should return noErr on success, or an appropriate error code on failure.
*/
typedef OSStatus (*AudioFile_ReadProc)(
void * inClientData,
SInt64 inPosition,
UInt32 requestCount,
void * buffer,
UInt32 * actualCount);
/*!
@typedef AudioFile_WriteProc
@abstract A callback for writing data. used with AudioFileOpenWithCallbacks or AudioFileInitializeWithCallbacks.
@discussion a function that will be called when AudioFile needs to write data.
@param inClientData A pointer to the client data as set in the inClientData parameter to AudioFileXXXWithCallbacks.
@param inPosition An offset into the data from which to read.
@param requestCount The number of bytes to write.
@param buffer The buffer containing the data to write.
@param actualCount The callback should set this to the number of bytes successfully written.
@result The callback should return noErr on success, or an appropriate error code on failure.
*/
typedef OSStatus (*AudioFile_WriteProc)(
void * inClientData,
SInt64 inPosition,
UInt32 requestCount,
const void *buffer,
UInt32 * actualCount);
/*!
@typedef AudioFile_GetSizeProc
@abstract A callback for getting the size of the file data. used with AudioFileOpenWithCallbacks or AudioFileInitializeWithCallbacks.
@discussion a function that will be called when AudioFile needs to determine the size of the file data. This size is for all of the
data in the file, not just the audio data.
@param inClientData A pointer to the client data as set in the inClientData parameter to AudioFileXXXWithCallbacks.
@result The callback should return the size of the data.
*/
typedef SInt64 (*AudioFile_GetSizeProc)(
void * inClientData);
/*!
@typedef AudioFile_SetSizeProc
@abstract A callback for setting the size of the file data. used with AudioFileOpenWithCallbacks or AudioFileInitializeWithCallbacks.
@discussion a function that will be called when AudioFile needs to set the size of the file data. This size is for all of the
data in the file, not just the audio data. This will only be called if the file is written to.
@param inClientData A pointer to the client data as set in the inClientData parameter to AudioFileXXXWithCallbacks.
@result The callback should return the size of the data.
*/
typedef OSStatus (*AudioFile_SetSizeProc)(
void * inClientData,
SInt64 inSize);
/*!
@function AudioFileInitializeWithCallbacks
@abstract Wipe clean an existing file. You provide callbacks that the AudioFile API
will use to get the data.
@param inClientData a constant that will be passed to your callbacks.
@param inReadFunc a function that will be called when AudioFile needs to read data.
@param inWriteFunc a function that will be called when AudioFile needs to write data.
@param inGetSizeFunc a function that will be called when AudioFile needs to know the file size.
@param inSetSizeFunc a function that will be called when AudioFile needs to set the file size.
@param inFileType an AudioFileTypeID indicating the type of audio file to which to initialize the file.
@param inFormat an AudioStreamBasicDescription describing the data format that will be
added to the audio file.
@param inFlags flags for creating/opening the file. Currently zero.
@param outAudioFile upon success, an AudioFileID that can be used for subsequent
AudioFile calls.
@result returns noErr if successful.
*/
extern OSStatus
AudioFileInitializeWithCallbacks (
void * inClientData,
AudioFile_ReadProc inReadFunc,
AudioFile_WriteProc inWriteFunc,
AudioFile_GetSizeProc inGetSizeFunc,
AudioFile_SetSizeProc inSetSizeFunc,
AudioFileTypeID inFileType,
const AudioStreamBasicDescription *inFormat,
AudioFileFlags inFlags,
AudioFileID __nullable * __nonnull outAudioFile) API_AVAILABLE(macos(10.3), ios(2.0), watchos(2.0), tvos(9.0));
/*!
@function AudioFileOpenWithCallbacks
@abstract Open an existing file. You provide callbacks that the AudioFile API
will use to get the data.
@param inClientData a constant that will be passed to your callbacks.
@param inReadFunc a function that will be called when AudioFile needs to read data.
@param inWriteFunc a function that will be called when AudioFile needs to write data.
@param inGetSizeFunc a function that will be called when AudioFile needs to know the total file size.
@param inSetSizeFunc a function that will be called when AudioFile needs to set the file size.
@param inFileTypeHint For files which have no filename extension and whose type cannot be easily or
uniquely determined from the data (ADTS,AC3), this hint can be used to indicate the file type.
Otherwise you can pass zero for this. The hint is only used on OS versions 10.3.1 or greater.
For OS versions prior to that, opening files of the above description will fail.
@param outAudioFile upon success, an AudioFileID that can be used for subsequent
AudioFile calls.
@result returns noErr if successful.
*/
extern OSStatus
AudioFileOpenWithCallbacks (
void * inClientData,
AudioFile_ReadProc inReadFunc,
AudioFile_WriteProc __nullable inWriteFunc,
AudioFile_GetSizeProc inGetSizeFunc,
AudioFile_SetSizeProc __nullable inSetSizeFunc,
AudioFileTypeID inFileTypeHint,
AudioFileID __nullable * __nonnull outAudioFile) API_AVAILABLE(macos(10.3), ios(2.0), watchos(2.0), tvos(9.0));
/*!
@function AudioFileClose
@abstract Close an existing audio file.
@param inAudioFile an AudioFileID.
@result returns noErr if successful.
*/
extern OSStatus
AudioFileClose (AudioFileID inAudioFile) API_AVAILABLE(macos(10.2), ios(2.0), watchos(2.0), tvos(9.0));
/*!
@function AudioFileOptimize
@abstract Move the audio data to the end of the file and other internal optimizations of the file structure.
@discussion Optimize the file so additional audio data can be appended to
the existing data. Generally, this will place the audio data at
the end of the file so additional writes can be placed to the
file end. This can be a potentially expensive and time-consuming operation
and should not be used during time critical operations. There is
a kAudioFilePropertyIsOptimized property for checking on the optimized state
of the file.
@param inAudioFile an AudioFileID.
@result returns noErr if successful.
*/
extern OSStatus
AudioFileOptimize (AudioFileID inAudioFile) API_AVAILABLE(macos(10.2), ios(2.0), watchos(2.0), tvos(9.0));
/*!
@function AudioFileReadBytes
@abstract Read bytes of audio data from the audio file.
@discussion Returns kAudioFileEndOfFileError when read encounters end of file.
@param inAudioFile an AudioFileID.
@param inUseCache true if it is desired to cache the data upon read, else false
@param inStartingByte the byte offset of the audio data desired to be returned
@param ioNumBytes on input, the number of bytes to read, on output, the number of
bytes actually read.
@param outBuffer outBuffer should be a void * to user allocated memory large enough for the requested bytes.
@result returns noErr if successful.
*/
extern OSStatus
AudioFileReadBytes ( AudioFileID inAudioFile,
Boolean inUseCache,
SInt64 inStartingByte,
UInt32 *ioNumBytes,
void *outBuffer) API_AVAILABLE(macos(10.2), ios(2.0), watchos(2.0), tvos(9.0));
/*!
@function AudioFileWriteBytes
@abstract Write bytes of audio data to the audio file.
@param inAudioFile an AudioFileID.
@param inUseCache true if it is desired to cache the data upon write, else false
@param inStartingByte the byte offset where the audio data should be written
@param ioNumBytes on input, the number of bytes to write, on output, the number of
bytes actually written.
@param inBuffer inBuffer should be a void * containing the bytes to be written
@result returns noErr if successful.
*/
extern OSStatus
AudioFileWriteBytes ( AudioFileID inAudioFile,
Boolean inUseCache,
SInt64 inStartingByte,
UInt32 *ioNumBytes,
const void *inBuffer) API_AVAILABLE(macos(10.2), ios(2.0), watchos(2.0), tvos(9.0));
/*!
@function AudioFileReadPacketData
@abstract Read packets of audio data from the audio file.
@discussion AudioFileReadPacketData reads as many of the requested number of packets
as will fit in the buffer size given by ioNumPackets.
Unlike the deprecated AudioFileReadPackets, ioNumPackets must be initialized.
If the byte size of the number packets requested is
less than the buffer size, ioNumBytes will be reduced.
If the buffer is too small for the number of packets
requested, ioNumPackets and ioNumBytes will be reduced
to the number of packets that can be accommodated and their byte size.
Returns kAudioFileEndOfFileError when read encounters end of file.
For all uncompressed formats, packets == frames.
@param inAudioFile an AudioFileID.
@param inUseCache true if it is desired to cache the data upon read, else false
@param ioNumBytes on input the size of outBuffer in bytes.
on output, the number of bytes actually returned.
@param outPacketDescriptions An array of packet descriptions describing the packets being returned.
The size of the array must be greater or equal to the number of packets requested.
On return the packet description will be filled out with the packet offsets and sizes.
Packet descriptions are ignored for CBR data.
@param inStartingPacket The packet index of the first packet desired to be returned
@param ioNumPackets on input, the number of packets to read, on output, the number of
packets actually read.
@param outBuffer outBuffer should be a pointer to user allocated memory.
@result returns noErr if successful.
*/
extern OSStatus
AudioFileReadPacketData ( AudioFileID inAudioFile,
Boolean inUseCache,
UInt32 * ioNumBytes,
AudioStreamPacketDescription * __nullable outPacketDescriptions,
SInt64 inStartingPacket,
UInt32 * ioNumPackets,
void * __nullable outBuffer) API_AVAILABLE(macos(10.6), ios(2.2), watchos(2.0), tvos(9.0));
/*!
@function AudioFileReadPackets
@abstract Read packets of audio data from the audio file.
@discussion AudioFileReadPackets is DEPRECATED. Use AudioFileReadPacketData instead.
READ THE HEADER DOC FOR AudioFileReadPacketData. It is not a drop-in replacement.
In particular, for AudioFileReadPacketData ioNumBytes must be initialized to the buffer size.
AudioFileReadPackets assumes you have allocated your buffer to ioNumPackets times the maximum packet size.
For many compressed formats this will only use a portion of the buffer since the ratio of the maximum
packet size to the typical packet size can be large. Use AudioFileReadPacketData instead.
@param inAudioFile an AudioFileID.
@param inUseCache true if it is desired to cache the data upon read, else false
@param outNumBytes on output, the number of bytes actually returned
@param outPacketDescriptions on output, an array of packet descriptions describing
the packets being returned. NULL may be passed for this
parameter. Nothing will be returned for linear pcm data.
@param inStartingPacket the packet index of the first packet desired to be returned
@param ioNumPackets on input, the number of packets to read, on output, the number of
packets actually read.
@param outBuffer outBuffer should be a pointer to user allocated memory of size:
number of packets requested times file's maximum (or upper bound on)
packet size.
@result returns noErr if successful.
*/
extern OSStatus
AudioFileReadPackets ( AudioFileID inAudioFile,
Boolean inUseCache,
UInt32 * outNumBytes,
AudioStreamPacketDescription * __nullable outPacketDescriptions,
SInt64 inStartingPacket,
UInt32 * ioNumPackets,
void * __nullable outBuffer) API_DEPRECATED("no longer supported", macos(10.2, 10.10), ios(2.0, 8.0)) __WATCHOS_PROHIBITED __TVOS_PROHIBITED;
/*!
@function AudioFileWritePackets
@abstract Write packets of audio data to the audio file.
@discussion For all uncompressed formats, packets == frames.
@param inAudioFile an AudioFileID.
@param inUseCache true if it is desired to cache the data upon write, else false
@param inNumBytes the number of bytes being provided for write
@param inPacketDescriptions an array of packet descriptions describing the packets being
provided. Not all formats require packet descriptions to be
provided. NULL may be passed if no descriptions are required.
@param inStartingPacket the packet index of where the first packet provided should be placed.
@param ioNumPackets on input, the number of packets to write, on output, the number of
packets actually written.
@param inBuffer a void * to user allocated memory containing the packets to write.
@result returns noErr if successful.
*/
extern OSStatus
AudioFileWritePackets ( AudioFileID inAudioFile,
Boolean inUseCache,
UInt32 inNumBytes,
const AudioStreamPacketDescription * __nullable inPacketDescriptions,
SInt64 inStartingPacket,
UInt32 *ioNumPackets,
const void *inBuffer) API_AVAILABLE(macos(10.2), ios(2.0), watchos(2.0), tvos(9.0));
/*!
@function AudioFileCountUserData
@abstract Get the number of user data items with a certain ID in the file
@discussion "User Data" refers to chunks in AIFF, CAF and WAVE files, or resources
in Sound Designer II files, and possibly other things in other files.
For simplicity, referred to below as "chunks".
@param inAudioFile an AudioFileID.
@param inUserDataID the four char code of the chunk.
@param outNumberItems on output, if successful, number of chunks of this type in the file.
@result returns noErr if successful.
*/
extern OSStatus
AudioFileCountUserData ( AudioFileID inAudioFile,
UInt32 inUserDataID,
UInt32 *outNumberItems) API_AVAILABLE(macos(10.4), ios(2.0), watchos(2.0), tvos(9.0));
/*!
@function AudioFileGetUserDataSize
@abstract Get the size of user data in a file
@param inAudioFile an AudioFileID.
@param inUserDataID the four char code of the chunk.
@param inIndex an index specifying which chunk if there are more than one.
@param outUserDataSize on output, if successful, the size of the user data chunk.
@result returns noErr if successful.
*/
extern OSStatus
AudioFileGetUserDataSize ( AudioFileID inAudioFile,
UInt32 inUserDataID,
UInt32 inIndex,
UInt32 *outUserDataSize) API_AVAILABLE(macos(10.4), ios(2.0), watchos(2.0), tvos(9.0));
/*!
@function AudioFileGetUserData
@abstract Get the data of a chunk in a file.
@param inAudioFile an AudioFileID.
@param inUserDataID the four char code of the chunk.
@param inIndex an index specifying which chunk if there are more than one.
@param ioUserDataSize the size of the buffer on input, size of bytes copied to buffer on output
@param outUserData a pointer to a buffer in which to copy the chunk data.
@result returns noErr if successful.
*/
extern OSStatus
AudioFileGetUserData ( AudioFileID inAudioFile,
UInt32 inUserDataID,
UInt32 inIndex,
UInt32 *ioUserDataSize,
void *outUserData) API_AVAILABLE(macos(10.4), ios(2.0), watchos(2.0), tvos(9.0));
/*!
@function AudioFileSetUserData
@abstract Set the data of a chunk in a file.
@param inAudioFile an AudioFileID.
@param inUserDataID the four char code of the chunk.
@param inIndex an index specifying which chunk if there are more than one.
@param inUserDataSize on input the size of the data to copy, on output, size of bytes copied from the buffer
@param inUserData a pointer to a buffer from which to copy the chunk data
(only the contents of the chunk, not including the chunk header).
@result returns noErr if successful.
*/
extern OSStatus
AudioFileSetUserData ( AudioFileID inAudioFile,
UInt32 inUserDataID,
UInt32 inIndex,
UInt32 inUserDataSize,
const void *inUserData) API_AVAILABLE(macos(10.4), ios(2.0), watchos(2.0), tvos(9.0));
/*!
@function AudioFileRemoveUserData
@abstract Remove a user chunk in a file.
@param inAudioFile an AudioFileID.
@param inUserDataID the four char code of the chunk.
@param inIndex an index specifying which chunk if there are more than one.
@result returns noErr if successful.
*/
extern OSStatus
AudioFileRemoveUserData ( AudioFileID inAudioFile,
UInt32 inUserDataID,
UInt32 inIndex) API_AVAILABLE(macos(10.5), ios(2.0), watchos(2.0), tvos(9.0));
//=============================================================================
// Audio File Properties
//=============================================================================
/*!
@enum Audio File Properties
@abstract constants for AudioFile get/set property calls
@constant kAudioFilePropertyFileFormat
An AudioFileTypeID that identifies the format of the file
@constant kAudioFilePropertyDataFormat
An AudioStreamBasicDescription describing the format of the audio data
@constant kAudioFilePropertyFormatList
In order to support formats such as AAC SBR where an encoded data stream can be decoded to
multiple destination formats, this property returns an array of AudioFormatListItems (see AudioFormat.h) of those formats.
The default behavior is to return the an AudioFormatListItem that has the same AudioStreamBasicDescription
that kAudioFilePropertyDataFormat returns.
@constant kAudioFilePropertyIsOptimized
A UInt32 indicating whether an Audio File has been optimized.
Optimized means it is ready to start having sound data written to it.
A value of 0 indicates the file needs to be optimized.
A value of 1 indicates the file is currently optimized.
@constant kAudioFilePropertyMagicCookieData
A void * pointing to memory set up by the caller.
Some file types require that a magic cookie be provided before packets can be written
to the file, so this property should be set before calling
AudioFileWriteBytes()/AudioFileWritePackets() if a magic cookie exists.
@constant kAudioFilePropertyAudioDataByteCount
a UInt64 that indicates the number of bytes of audio data contained in the file
@constant kAudioFilePropertyAudioDataPacketCount
a UInt64 that indicates the number of packets of audio data contained in the file
@constant kAudioFilePropertyMaximumPacketSize
a UInt32 that indicates the maximum size of a packet for the data contained in the file
@constant kAudioFilePropertyDataOffset
a SInt64 that indicates the byte offset in the file of the audio data.
@constant kAudioFilePropertyChannelLayout
An AudioChannelLayout struct.
@constant kAudioFilePropertyDeferSizeUpdates
A UInt32. If 1, then updating the files sizes in the header is not done for every write,
but deferred until the file is read, optimized or closed. This is more efficient, but less safe
since, if the application crashes before the size is updated, the file may not be readable.
The default value is one, it doesn't update the header.
@constant kAudioFilePropertyDataFormatName
This is deprecated. Use kAudioFormatProperty_FormatName in AudioFormat.h instead.
@constant kAudioFilePropertyMarkerList
access the list of markers defined in the file. returns an AudioFileMarkerList.
The CFStringRefs in the returned structs must be released by the client.
(available in 10.2.4 and later)
@constant kAudioFilePropertyRegionList
access the list of regions defined in the file. returns an Array of AudioFileRegions.
The CFStringRefs in the returned structs must be released by the client.
(available in 10.2.4 and later)
@constant kAudioFilePropertyPacketToFrame
pass a AudioFramePacketTranslation with mPacket filled out and get mFrame back. mFrameOffsetInPacket is ignored.
@constant kAudioFilePropertyFrameToPacket
pass a AudioFramePacketTranslation with mFrame filled out and get mPacket and mFrameOffsetInPacket back.
@constant kAudioFilePropertyRestrictsRandomAccess
A UInt32 indicating whether an Audio File contains packets that cannot be used as random access points.
A value of 0 indicates that any packet can be used as a random access point, i.e. that a decoder can start decoding with any packet.
A value of 1 indicates that some packets cannot be used as random access points, i.e. that kAudioFilePropertyPacketToRollDistance must be employed in order to identify an appropriate initial packet for decoding.
@constant kAudioFilePropertyPacketToRollDistance
Pass an AudioPacketRollDistanceTranslation with mPacket filled out and get mRollDistance back.
The roll distance indicates the count of packets that must be decoded prior to the packet with the specified number in order to achieve the best practice for the decoding of that packet.
For file types for which a minimal roll distance is prohibitively expensive to determine per packet, the value returned may be derived from an upper bound for all packet roll distances.
If the value of kAudioFilePropertyRestrictsRandomAccess is 1, either kAudioFilePropertyPacketToRollDistance
or kAudioFilePropertyPacketToDependencyInfo must be used in order to identify an appropriate random access point.
If the value of kAudioFilePropertyRestrictsRandomAccess is 0, kAudioFilePropertyPacketToRollDistance can be used in
order to identify the best available random access point, which may be prior to the specified packet even if the specified
packet can be used as a random access point.
@constant kAudioFilePropertyPreviousIndependentPacket
@constant kAudioFilePropertyNextIndependentPacket
Pass an AudioIndependentPacketTranslation with mPacket filled out and get mIndependentlyDecodablePacket back.
A value of -1 means that no independent packet is present in the stream in the direction of interest. Otherwise,
for kAudioFilePropertyPreviousIndependentPacket, mIndependentlyDecodablePacket will be less than mPacket, and
for kAudioFilePropertyNextIndependentPacket, mIndependentlyDecodablePacket will be greater than mPacket.
@constant kAudioFilePropertyPacketToDependencyInfo
Pass an AudioPacketDependencyInfoTranslation with mPacket filled out and get mIsIndependentlyDecodable
and mPrerollPacketCount back.
A value of 0 for mIsIndependentlyDecodable indicates that the specified packet is not independently decodable.
A value of 1 for mIsIndependentlyDecodable indicates that the specified packet is independently decodable.
For independently decodable packets, mPrerollPacketCount indicates the count of packets that must be decoded
after the packet with the specified number in order to refresh the decoder.
If the value of kAudioFilePropertyRestrictsRandomAccess is 1, either kAudioFilePropertyPacketToRollDistance or
kAudioFilePropertyPacketToDependencyInfo must be used in order to identify an appropriate random access point.
@constant kAudioFilePropertyPacketToByte
pass an AudioBytePacketTranslation struct with mPacket filled out and get mByte back.
mByteOffsetInPacket is ignored. If the mByte value is an estimate then
kBytePacketTranslationFlag_IsEstimate will be set in the mFlags field.
@constant kAudioFilePropertyByteToPacket
pass an AudioBytePacketTranslation struct with mByte filled out and get mPacket and
mByteOffsetInPacket back. If the mPacket value is an estimate then
kBytePacketTranslationFlag_IsEstimate will be set in the mFlags field.
@constant kAudioFilePropertyChunkIDs
returns an array of OSType four char codes for each kind of chunk in the file.
@constant kAudioFilePropertyInfoDictionary
returns a CFDictionary filled with information about the data contained in the file.
See dictionary key constants already defined for info string types.
AudioFileComponents are free to add keys to the dictionaries that they return for this property...
caller is responsible for releasing the CFObject
@constant kAudioFilePropertyPacketTableInfo
Gets or sets an AudioFilePacketTableInfo struct for the file types that support it.
When setting, the sum of mNumberValidFrames, mPrimingFrames and mRemainderFrames must be the same as the total
number of frames in all packets. If not you will get a kAudio_ParamError. The best way to ensure this is to get the value of
the property and make sure the sum of the three values you set has the same sum as the three values you got.
@constant kAudioFilePropertyPacketSizeUpperBound
a UInt32 for the theoretical maximum packet size in the file (without actually scanning
the whole file to find the largest packet, as may happen with kAudioFilePropertyMaximumPacketSize).
@constant kAudioFilePropertyPacketRangeByteCountUpperBound
Pass an AudioPacketRangeByteCountTranslation with mPacket and mPacketCount filled out
and get mByteCountUpperBound back. The value of mByteCountUpperBound can be used to allocate a buffer
for use with AudioFileReadPacketData in order to accommodate the entire packet range.
May require scanning in order to obtain the requested information, but even if so, no scanning will occur
beyond the last packet in the specified range.
For file formats in which packets are directly accessible and stored both contiguously and byte-aligned,
the returned upper bound will be equal to the total size of the packets in the range. Otherwise the
upper bound may reflect per-packet storage overhead.
@constant kAudioFilePropertyReserveDuration
The value is a Float64 of the duration in seconds of data that is expected to be written.
Setting this property before any data has been written reserves space in the file header for a packet table
and/or other information so that it can appear before the audio data. Otherwise the packet table may get written at the
end of the file, preventing the file from being streamable.
@constant kAudioFilePropertyEstimatedDuration
The value is a Float64 representing an estimated duration in seconds. If duration can be calculated without scanning the entire file,
or all the audio data packets have been scanned, the value will accurately reflect the duration of the audio data.
@constant kAudioFilePropertyBitRate
Returns the bit rate for the audio data as a UInt32. For some formats this will be approximate.
@constant kAudioFilePropertyID3Tag
A void * pointing to memory set up by the caller to contain a fully formatted ID3 tag (get/set v2.2, v2.3, or v2.4, v1 get only).
The ID3 tag is not manipulated in any way either for read or write.
When setting, this property must be called before calling AudioFileWritePackets.
@constant kAudioFilePropertyID3TagOffset
Returns the offset of a leading ID3v2 tag, if present, and otherwise the offset of a trailing ID3v1 tag, if present, as an SInt64. (get property only)
Note that for some file formats the offset of a leading ID3v2 tag when present may not be 0.
@constant kAudioFilePropertySourceBitDepth
For encoded data this property returns the bit depth of the source as an SInt32, if known.
The bit depth is expressed as a negative number if the source was floating point, e.g. -32 for float, -64 for double.
@constant kAudioFilePropertyAlbumArtwork
returns a CFDataRef filled with the Album Art or NULL.
The caller is responsible for releasing a non-NULL CFDataRef.
In order to parse the contents of the data, CGImageSourceCreateWithData may be used.
@constant kAudioFilePropertyAudioTrackCount
a UInt32 that indicates the number of audio tracks contained in the file. (get property only)
@constant kAudioFilePropertyUseAudioTrack
a UInt32 that indicates the number of audio tracks contained in the file. (set property only)
*/
CF_ENUM(AudioFilePropertyID)
{
kAudioFilePropertyFileFormat = 'ffmt',
kAudioFilePropertyDataFormat = 'dfmt',
kAudioFilePropertyIsOptimized = 'optm',
kAudioFilePropertyMagicCookieData = 'mgic',
kAudioFilePropertyAudioDataByteCount = 'bcnt',
kAudioFilePropertyAudioDataPacketCount = 'pcnt',
kAudioFilePropertyMaximumPacketSize = 'psze',
kAudioFilePropertyDataOffset = 'doff',
kAudioFilePropertyChannelLayout = 'cmap',
kAudioFilePropertyDeferSizeUpdates = 'dszu',
kAudioFilePropertyDataFormatName = 'fnme',
kAudioFilePropertyMarkerList = 'mkls',
kAudioFilePropertyRegionList = 'rgls',
kAudioFilePropertyPacketToFrame = 'pkfr',
kAudioFilePropertyFrameToPacket = 'frpk',
kAudioFilePropertyRestrictsRandomAccess = 'rrap',
kAudioFilePropertyPacketToRollDistance = 'pkrl',
kAudioFilePropertyPreviousIndependentPacket = 'pind',
kAudioFilePropertyNextIndependentPacket = 'nind',
kAudioFilePropertyPacketToDependencyInfo = 'pkdp',
kAudioFilePropertyPacketToByte = 'pkby',
kAudioFilePropertyByteToPacket = 'bypk',
kAudioFilePropertyChunkIDs = 'chid',
kAudioFilePropertyInfoDictionary = 'info',
kAudioFilePropertyPacketTableInfo = 'pnfo',
kAudioFilePropertyFormatList = 'flst',
kAudioFilePropertyPacketSizeUpperBound = 'pkub',
kAudioFilePropertyPacketRangeByteCountUpperBound = 'prub',
kAudioFilePropertyReserveDuration = 'rsrv',
kAudioFilePropertyEstimatedDuration = 'edur',
kAudioFilePropertyBitRate = 'brat',
kAudioFilePropertyID3Tag = 'id3t',
kAudioFilePropertyID3TagOffset = 'id3o',
kAudioFilePropertySourceBitDepth = 'sbtd',
kAudioFilePropertyAlbumArtwork = 'aart',
kAudioFilePropertyAudioTrackCount = 'atct',
kAudioFilePropertyUseAudioTrack = 'uatk'
};
/*!
@function AudioFileGetPropertyInfo
@abstract Get information about the size of a property of an AudioFile and whether it can be set.
@param inAudioFile an AudioFileID.
@param inPropertyID an AudioFileProperty constant.
@param outDataSize the size in bytes of the current value of the property. In order to get the property value,
you will need a buffer of this size.
@param isWritable will be set to 1 if writable, or 0 if read only.
@result returns noErr if successful.
*/
extern OSStatus
AudioFileGetPropertyInfo( AudioFileID inAudioFile,
AudioFilePropertyID inPropertyID,
UInt32 * __nullable outDataSize,
UInt32 * __nullable isWritable) API_AVAILABLE(macos(10.2), ios(2.0), watchos(2.0), tvos(9.0));
/*!
@function AudioFileGetProperty
@abstract Copies the value for a property of an AudioFile into a buffer.
@param inAudioFile an AudioFileID.
@param inPropertyID an AudioFileProperty constant.
@param ioDataSize on input the size of the outPropertyData buffer. On output the number of bytes written to the buffer.
@param outPropertyData the buffer in which to write the property data.
@result returns noErr if successful.
*/
extern OSStatus
AudioFileGetProperty( AudioFileID inAudioFile,
AudioFilePropertyID inPropertyID,
UInt32 *ioDataSize,
void *outPropertyData) API_AVAILABLE(macos(10.2), ios(2.0), watchos(2.0), tvos(9.0));
/*!
@function AudioFileSetProperty
@abstract Sets the value for a property of an AudioFile .
@param inAudioFile an AudioFileID.
@param inPropertyID an AudioFileProperty constant.
@param inDataSize the size of the property data.
@param inPropertyData the buffer containing the property data.
@result returns noErr if successful.
*/
extern OSStatus
AudioFileSetProperty( AudioFileID inAudioFile,
AudioFilePropertyID inPropertyID,
UInt32 inDataSize,
const void *inPropertyData) API_AVAILABLE(macos(10.2), ios(2.0), watchos(2.0), tvos(9.0));
//=============================================================================
// Audio File Global Info Properties
//=============================================================================
/*!
@enum Audio File Global Info Properties
@abstract constants for AudioFileGetGlobalInfo properties
@constant kAudioFileGlobalInfo_ReadableTypes
No specifier needed. Must be set to NULL.
Returns an array of UInt32 containing the file types
(i.e. AIFF, WAVE, etc) that can be opened for reading.
@constant kAudioFileGlobalInfo_WritableTypes
No specifier needed. Must be set to NULL.
Returns an array of UInt32 containing the file types
(i.e. AIFF, WAVE, etc) that can be opened for writing.
@constant kAudioFileGlobalInfo_FileTypeName
Specifier is a pointer to a AudioFileTypeID containing a file type.
Returns a CFString containing the name for the file type.
@constant kAudioFileGlobalInfo_AvailableFormatIDs
Specifier is a pointer to a AudioFileTypeID containing a file type.
Returns a array of format IDs for formats that can be read.
@constant kAudioFileGlobalInfo_AvailableStreamDescriptionsForFormat
Specifier is a pointer to a AudioFileTypeAndFormatID struct defined below.
Returns an array of AudioStreamBasicDescriptions which have all of the
formats for a particular file type and format ID. The AudioStreamBasicDescriptions
have the following fields filled in: mFormatID, mFormatFlags, mBitsPerChannel
writing new files.
@constant kAudioFileGlobalInfo_AllExtensions
No specifier needed. Must be set to NULL.
Returns a CFArray of CFStrings containing all file extensions
that are recognized. The array be used when creating an NSOpenPanel.
@constant kAudioFileGlobalInfo_AllHFSTypeCodes
No specifier needed. Must be set to NULL.
Returns an array of HFSTypeCode's containing all HFSTypeCodes
that are recognized.
@constant kAudioFileGlobalInfo_AllUTIs
No specifier needed. Must be set to NULL.
Returns a CFArray of CFString of all Universal Type Identifiers
that are recognized by AudioFile.
The caller is responsible for releasing the CFArray.
@constant kAudioFileGlobalInfo_AllMIMETypes
No specifier needed. Must be set to NULL.
Returns a CFArray of CFString of all MIME types
that are recognized by AudioFile.
The caller is responsible for releasing the CFArray.
@constant kAudioFileGlobalInfo_ExtensionsForType
Specifier is a pointer to a AudioFileTypeID containing a file type.
Returns a CFArray of CFStrings containing the file extensions
that are recognized for this file type.
@constant kAudioFileGlobalInfo_HFSTypeCodesForType
Specifier is a pointer to an AudioFileTypeID.
Returns an array of HFSTypeCodes corresponding to that file type.
The first type in the array is the preferred one for use when
@constant kAudioFileGlobalInfo_UTIsForType
Specifier is a pointer to an AudioFileTypeID.
Returns a CFArray of CFString of all Universal Type Identifiers
that are recognized by the file type.
The caller is responsible for releasing the CFArray.
@constant kAudioFileGlobalInfo_MIMETypesForType
Specifier is a pointer to an AudioFileTypeID.
Returns a CFArray of CFString of all MIME types
that are recognized by the file type.
The caller is responsible for releasing the CFArray.
these are inverses of the above:
@constant kAudioFileGlobalInfo_TypesForExtension
Specifier is a CFStringRef containing a file extension.
Returns an array of all AudioFileTypeIDs that support the extension.
@constant kAudioFileGlobalInfo_TypesForHFSTypeCode
Specifier is an HFSTypeCode.
Returns an array of all AudioFileTypeIDs that support the HFSTypeCode.
@constant kAudioFileGlobalInfo_TypesForUTI
Specifier is a CFStringRef containing a Universal Type Identifier.
Returns an array of all AudioFileTypeIDs that support the UTI.
@constant kAudioFileGlobalInfo_TypesForMIMEType
Specifier is a CFStringRef containing a MIME Type.
Returns an array of all AudioFileTypeIDs that support the MIME type.
*/
CF_ENUM(AudioFilePropertyID)
{
kAudioFileGlobalInfo_ReadableTypes = 'afrf',
kAudioFileGlobalInfo_WritableTypes = 'afwf',
kAudioFileGlobalInfo_FileTypeName = 'ftnm',
kAudioFileGlobalInfo_AvailableStreamDescriptionsForFormat = 'sdid',
kAudioFileGlobalInfo_AvailableFormatIDs = 'fmid',
kAudioFileGlobalInfo_AllExtensions = 'alxt',
kAudioFileGlobalInfo_AllHFSTypeCodes = 'ahfs',
kAudioFileGlobalInfo_AllUTIs = 'auti',
kAudioFileGlobalInfo_AllMIMETypes = 'amim',
kAudioFileGlobalInfo_ExtensionsForType = 'fext',
kAudioFileGlobalInfo_HFSTypeCodesForType = 'fhfs',
kAudioFileGlobalInfo_UTIsForType = 'futi',
kAudioFileGlobalInfo_MIMETypesForType = 'fmim',
kAudioFileGlobalInfo_TypesForMIMEType = 'tmim',
kAudioFileGlobalInfo_TypesForUTI = 'tuti',
kAudioFileGlobalInfo_TypesForHFSTypeCode = 'thfs',
kAudioFileGlobalInfo_TypesForExtension = 'text'
};
/*!
@struct AudioFileTypeAndFormatID
@abstract This is used as a specifier for kAudioFileGlobalInfo_AvailableStreamDescriptions
@discussion This struct is used to specify a desired audio file type and data format ID so
that a list of stream descriptions of available formats can be obtained.
@var mFileType
a four char code for the file type such as kAudioFileAIFFType, kAudioFileCAFType, etc.
@var mFormatID
a four char code for the format ID such as kAudioFormatLinearPCM, kAudioFormatMPEG4AAC, etc.
*/
struct AudioFileTypeAndFormatID
{
AudioFileTypeID mFileType;
UInt32 mFormatID;
};
typedef struct AudioFileTypeAndFormatID AudioFileTypeAndFormatID;
/*!
@function AudioFileGetGlobalInfoSize
@abstract Get the size of a global property.
@param inPropertyID an AudioFileGlobalInfo property constant.
@param inSpecifierSize The size of the specifier data.
@param inSpecifier A specifier is a buffer of data used as an input argument to some of the global info properties.
@param outDataSize the size in bytes of the current value of the property. In order to get the property value,
you will need a buffer of this size.
@result returns noErr if successful.
*/
extern OSStatus
AudioFileGetGlobalInfoSize( AudioFilePropertyID inPropertyID,
UInt32 inSpecifierSize,
void * __nullable inSpecifier,
UInt32 *outDataSize) API_AVAILABLE(macos(10.3), ios(2.0), watchos(2.0), tvos(9.0));
/*!
@function AudioFileGetGlobalInfo
@abstract Copies the value for a global property into a buffer.
@param inPropertyID an AudioFileGlobalInfo property constant.
@param inSpecifierSize The size of the specifier data.
@param inSpecifier A specifier is a buffer of data used as an input argument to some of the global info properties.
@param ioDataSize on input the size of the outPropertyData buffer. On output the number of bytes written to the buffer.
@param outPropertyData the buffer in which to write the property data.
@result returns noErr if successful.
*/
extern OSStatus
AudioFileGetGlobalInfo( AudioFilePropertyID inPropertyID,
UInt32 inSpecifierSize,
void * __nullable inSpecifier,
UInt32 *ioDataSize,
void *outPropertyData) API_AVAILABLE(macos(10.3), ios(2.0), watchos(2.0), tvos(9.0));
#pragma mark - Deprecated
#if !TARGET_OS_IPHONE
struct FSRef;
/*!
@function AudioFileCreate
@abstract creates a new audio file
@discussion creates a new audio file located in the parent directory
provided. Upon success, an AudioFileID is returned which can
be used for subsequent calls to the AudioFile APIs.
@param inParentRef an FSRef to the directory where the new file should be created.
@param inFileName a CFStringRef containing the name of the file to be created.
@param inFileType an AudioFileTypeID indicating the type of audio file to create.
@param inFormat an AudioStreamBasicDescription describing the data format that will be
added to the audio file.
@param inFlags relevant flags for creating/opening the file.
@param outNewFileRef if successful, the FSRef of the newly created file.
@param outAudioFile if successful, an AudioFileID that can be used for subsequent AudioFile calls.
@result returns noErr if successful.
@deprecated in macOS 10.6, see AudioFileCreateWithURL
*/
extern OSStatus
AudioFileCreate ( const struct FSRef *inParentRef,
CFStringRef inFileName,
AudioFileTypeID inFileType,
const AudioStreamBasicDescription *inFormat,
AudioFileFlags inFlags,
struct FSRef *outNewFileRef,
AudioFileID __nullable * __nonnull outAudioFile) API_DEPRECATED("no longer supported", macos(10.2, 10.6)) API_UNAVAILABLE(ios, watchos, tvos);
/*!
@function AudioFileInitialize
@abstract Write over an existing audio file.
@discussion Use AudioFileInitialize to wipe clean an existing audio file
and prepare it to be populated with new data.
@param inFileRef the FSRef of an existing audio file.
@param inFileType an AudioFileTypeID indicating the type of audio file to initialize the file to.
@param inFormat an AudioStreamBasicDescription describing the data format that will be
added to the audio file.
@param inFlags flags for creating/opening the file. Currently zero.
@param outAudioFile upon success, an AudioFileID that can be used for subsequent
AudioFile calls.
@result returns noErr if successful.
@deprecated in macOS 10.6, see AudioFileCreateWithURL
*/
extern OSStatus
AudioFileInitialize ( const struct FSRef *inFileRef,
AudioFileTypeID inFileType,
const AudioStreamBasicDescription *inFormat,
AudioFileFlags inFlags,
AudioFileID __nullable * __nonnull outAudioFile) API_DEPRECATED("no longer supported", macos(10.2, 10.6)) API_UNAVAILABLE(ios, watchos, tvos);
/*!
@function AudioFileOpen
@abstract Open an existing audio file.
@discussion Open an existing audio file for reading or reading and writing.
@param inFileRef the FSRef of an existing audio file.
@param inPermissions use the permission constants
@param inFileTypeHint For files which have no filename extension and whose type cannot be easily or
uniquely determined from the data (ADTS,AC3), this hint can be used to indicate the file type.
Otherwise you can pass zero for this. The hint is only used on OS versions 10.3.1 or greater.
For OS versions prior to that, opening files of the above description will fail.
@param outAudioFile upon success, an AudioFileID that can be used for subsequent
AudioFile calls.
@result returns noErr if successful.
@deprecated in macOS 10.6, see AudioFileOpenURL
*/
extern OSStatus
AudioFileOpen ( const struct FSRef *inFileRef,
AudioFilePermissions inPermissions,
AudioFileTypeID inFileTypeHint,
AudioFileID __nullable * __nonnull outAudioFile) API_DEPRECATED("no longer supported", macos(10.2, 10.6)) API_UNAVAILABLE(ios, watchos, tvos);
#endif
#if defined(__cplusplus)
}
#endif
CF_ASSUME_NONNULL_END
#endif // AudioToolbox_AudioFile_h
#else
#include <AudioToolboxCore/AudioFile.h>
#endif
|
0 | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/AudioToolbox.framework | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/AudioToolbox.framework/Headers/AudioCodec.h | #if (defined(__USE_PUBLIC_HEADERS__) && __USE_PUBLIC_HEADERS__) || (defined(USE_AUDIOTOOLBOX_PUBLIC_HEADERS) && USE_AUDIOTOOLBOX_PUBLIC_HEADERS) || !__has_include(<AudioToolboxCore/AudioCodec.h>)
/*==================================================================================================
File: AudioToolbox/AudioCodec.h
Contains: A component API for encoding/decoding audio data.
Copyright: (c) 1985-2015 by Apple, Inc., all rights reserved.
Bugs?: For bug reports, consult the following page on
the World Wide Web:
http://developer.apple.com/bugreporter/
==================================================================================================*/
#ifndef AudioUnit_AudioCodec_h
#define AudioUnit_AudioCodec_h
/*!
@header AudioCodec
This header defines the property sets and the public API for various audio codecs.
<h2>Theory of Operation</h2>
AudioCodec components translate audio data from one format to another. There
are three kinds of AudioCodec components. Decoder components ('adec')
translate data that isn't in linear PCM into linear PCM formatted data.
Encoder components ('aenc') translate linear PCM data into some other format.
Unity codecs ('acdc') translate between different flavors of the same type
(e.g. 16 bit signed integer linear PCM into 32 bit floating point linear PCM).
AudioCodec components are standard components and are managed by the Component
Manager.
Once an AudioCodec is found that implements the translation in question,
it has to be set up to do the translation. This can be done by setting the
appropriate properties or by calling AudioCodecInitialize. If the translation
is specified by properties, AudioCodecInitialize still needs to be called
prior to appending input data or producing output data.
AudioCodecInitialize puts the codec into the "initialized" state. In this state,
the format information for the translation cannot be changed. The codec
has to be in the initialized state for AudioCodecAppendInputData and
AudioCodecProduceOutputData to work. They will return kAudioCodecStateError
if the codec isn't initialized.
AudioCodecUninitialize will return the codec to the uninitialized state and
release any allocated resources. The codec may then be configured freely. It is not
necessary to call AudioCodecUninitialize prior to closing the codec.
Once in the initialized state, the codec is ready to receive input and produce
output using the AudioCodecAppendInputData and AudioCodecProduceOutputData
routines. Input data can be fed into an encoder and some decoders in any size (even
byte by byte). Input data fed to a decoder should be in terms of whole packets in the
encoded format if the format is variable bit rate and is not self framing (e.g. MPEG-4 AAC).
Output data can only be produced in whole packet sizes. Both routines will return
the amount of data they consume/produce.
AudioCodecProduceOutputData also returns a status code to the caller that
indicates the result of the operation (success or failure) as well as the
state of the input buffer.
The combination of AppendInputData and ProduceOutputPackets can be thought of a "push-pull"
model of data handling. First, the input data is pushed into the component and the
resulting output data gets pulled out of that same component.
Basic Workflow
1. Find the appropriate codec component
2. Open the codec component
3. Configure it (AudioCodecGetPropertyInfo, AudioCodecGetProperty, AudioCodecSetProperty)
4. AudioCodecInitialize
5. Loop
a. AppendInputData (EOF is signaled by passing a 0-sized buffer)
b. ProduceOutputPackets
6. Close the codec component
*/
//=============================================================================
#include <TargetConditionals.h>
#include <Availability.h>
#include <AudioToolbox/AudioComponent.h>
#if defined(__cplusplus)
extern "C"
{
#endif
CF_ASSUME_NONNULL_BEGIN
//=============================================================================
#pragma mark Types specific to AudioCodecs
//=============================================================================
typedef AudioComponentInstance AudioCodec;
typedef UInt32 AudioCodecPropertyID;
/*!
@struct AudioCodecMagicCookieInfo
@abstract Structure holding the <em>magic cookie</em> information.
@discussion Passed as input to AudioCodecGetProperty for kAudioCodecPropertyFormatList.
The first four + sizeof(void *) bytes of the buffer pointed at by outPropertyData
will contain this struct.
@var mMagicCookieSize
The size of the magic cookie
@var mMagicCookie
Generic const pointer to magic cookie
*/
struct AudioCodecMagicCookieInfo
{
UInt32 mMagicCookieSize;
const void* __nullable mMagicCookie;
};
typedef struct AudioCodecMagicCookieInfo AudioCodecMagicCookieInfo;
//=============================================================================
#pragma mark AudioCodec Component Constants
//=============================================================================
#if !TARGET_OS_IPHONE
/*!
@enum AudioCodecComponentType
@discussion Collection of audio codec component types
@constant kAudioDecoderComponentType
A codec that translates data in some other format into linear PCM.
The component subtype specifies the format ID of the other format.
@constant kAudioEncoderComponentType
A codec that translates linear PCM data into some other format
The component subtype specifies the format ID of the other format
@constant kAudioUnityCodecComponentType
A codec that translates between different flavors of the same format
The component subtype specifies the format ID of this format.
*/
CF_ENUM(UInt32)
{
kAudioDecoderComponentType = 'adec',
kAudioEncoderComponentType = 'aenc',
kAudioUnityCodecComponentType = 'acdc'
};
#endif
//=============================================================================
#pragma mark Global Codec Properties
// Used with the AudioCodecXXXXPropertyXXXX family of routines.
// All Audio Codec properties are readable only.
//=============================================================================
/*!
@enum AudioCodecGlobalProperty
@discussion These properties reflect the capabilities of the underlying codec.
The values of these properties are independent of the codec's internal
state.
These properties can be read at any time the codec is open.
@constant kAudioCodecPropertySupportedInputFormats
An array of AudioStreamBasicDescription structs describing what formats
the codec supports for input data
@constant kAudioCodecPropertySupportedOutputFormats
An array of AudioStreamBasicDescription structs describing what formats
the codec supports for output data
@constant kAudioCodecPropertyAvailableInputSampleRates
An array of AudioValueRange indicating the valid ranges for the
input sample rate of the codec.
Required for encoders.
(see also kAudioCodecPropertyApplicableInputSampleRates)
@constant kAudioCodecPropertyAvailableOutputSampleRates
An array of AudioValueRange indicating the valid ranges for the
output sample rate of the codec.
Required for encoders.
(see also kAudioCodecPropertyApplicableOutputSampleRates)
@constant kAudioCodecPropertyAvailableBitRateRange
An array of AudioValueRange that indicate the target bit rates
supported by the encoder. This can be total bit rate or bit
rate per channel as appropriate.
This property is only relevant to encoders.
(see also kAudioCodecPropertyApplicableBitRateRange)
@constant kAudioCodecPropertyMinimumNumberInputPackets
A UInt32 indicating the minimum number of input packets
that need to be supplied to the codec. The actual input the
codec accepts could be less than this.
For most codecs this value will be 1.
@constant kAudioCodecPropertyMinimumNumberOutputPackets
A UInt32 indicating the minimum number of output packets
that need to be handled from the codec. The actual output
might be less than this.
For most codecs this value will be 1.
@constant kAudioCodecPropertyAvailableNumberChannels
An array of UInt32 that specifies the number of channels the codec is
capable of encoding or decoding to. 0xFFFFFFFF means any number
of channels.
@constant kAudioCodecPropertyDoesSampleRateConversion
A UInt32 indicating if the codec wants to do a sample rate conversion (if
necessary) because it can do it in a way that is meaningful for quality.
Value is 1 if true, 0 otherwise.
@constant kAudioCodecPropertyAvailableInputChannelLayoutTags
An array of AudioChannelLayoutTag that specifies what channel layouts the codec is
capable of using on input.
@constant kAudioCodecPropertyAvailableOutputChannelLayoutTags
An array of AudioChannelLayoutTag that specifies what channel layouts the codec is
capable of using on output.
@constant kAudioCodecPropertyInputFormatsForOutputFormat
An array of AudioStreamBasicDescription indicating what the codec supports
for input data given an output format that's passed in as the first member of
the array (and is overwritten on the reply). Always a subset of
kAudioCodecPropertySupportedInputFormats
@constant kAudioCodecPropertyOutputFormatsForInputFormat
An array of AudioStreamBasicDescription indicating what the codec supports
for output data given an input format that's passed in as the first member of
the array (and is overwritten on the reply). Always a subset of
kAudioCodecPropertySupportedOutputFormats
@constant kAudioCodecPropertyFormatInfo
Takes an AudioFormatInfo on input. This AudioformatInfo is validated either through
the provided magic cookie or the AudioStreamBasicDescription and where applicable,
wildcards are overwritten with default values.
*/
CF_ENUM(AudioCodecPropertyID)
{
kAudioCodecPropertySupportedInputFormats = 'ifm#',
kAudioCodecPropertySupportedOutputFormats = 'ofm#',
kAudioCodecPropertyAvailableInputSampleRates = 'aisr',
kAudioCodecPropertyAvailableOutputSampleRates = 'aosr',
kAudioCodecPropertyAvailableBitRateRange = 'abrt',
kAudioCodecPropertyMinimumNumberInputPackets = 'mnip',
kAudioCodecPropertyMinimumNumberOutputPackets = 'mnop',
kAudioCodecPropertyAvailableNumberChannels = 'cmnc',
kAudioCodecPropertyDoesSampleRateConversion = 'lmrc',
kAudioCodecPropertyAvailableInputChannelLayoutTags = 'aicl',
kAudioCodecPropertyAvailableOutputChannelLayoutTags = 'aocl',
kAudioCodecPropertyInputFormatsForOutputFormat = 'if4o',
kAudioCodecPropertyOutputFormatsForInputFormat = 'of4i',
kAudioCodecPropertyFormatInfo = 'acfi'
};
//=============================================================================
#pragma mark Instance Codec Properties
// Used with the AudioCodecXXXXPropertyXXXX family of routines.
//=============================================================================
/*!
@enum AudioCodecInstanceProperty
@discussion Properties which can be set or read on an instance of the
underlying audio codec. These properties are dependent on the
codec's current state. A property may be read/write or read
only, depending on the data format of the codec.
These properties may have different values depending on whether the
codec is initialized or not. All properties can be read at any time
the codec is open. However, to ensure the codec is in a valid
operational state and therefore the property value is valid the codec
must be initialized at the time the property is read.
Properties that are writable are only writable when the codec
is not initialized.
@constant kAudioCodecPropertyInputBufferSize
A UInt32 indicating the maximum input buffer size for the codec
in bytes.
Not writable, but can vary on some codecs depending on the bit stream
format being handled.
@constant kAudioCodecPropertyPacketFrameSize
A UInt32 indicating the number of frames of audio data encapsulated in each
packet of data in the codec's format. For encoders, this is the
output format. For decoders this is the input format.
Formats with variable frames per packet should return a maximum value
for this property.
Not writable.
@constant kAudioCodecPropertyHasVariablePacketByteSizes
A UInt32 where 0 indicates that all packets in the codec's format
have the same byte size (sometimes referred to as CBR codecs),
and 1 indicates that they vary in size (sometimes referred to as
VBR codecs). The maximum size of a variable packet is up to
the one indicated in kAudioCodecPropertyMaximumPacketByteSize.
Any codec that reports 1 for this property must be able to handle packet
descriptions, though it does not have to require them.
May be writable.
@constant kAudioCodecPropertyEmploysDependentPackets
A UInt32 where 0 indicates that all packets in the codec's format
are independently decodable, and 1 indicates that some may not be
independently decodable.
@constant kAudioCodecPropertyMaximumPacketByteSize
A UInt32 indicating the maximum number of bytes a packet of data
in the codec's format will be. If the format is constant bit rate,
all packets will be this size. If it is variable bit rate, the packets
will never exceed this size.
This always refers to the encoded data, so for encoders it refers to the
output data and for decoders the input data.
Not writable.
@constant kAudioCodecPropertyPacketSizeLimitForVBR
A UInt32 indicating the maximum number of bits in an output packet of an encoder.
The output packet size will not exceed this number. The size should be smaller
than kAudioCodecPropertyMaximumPacketByteSize. This property will configure the
encoder to VBR mode with the highest VBR quality that can maintain the packet
size limit. kAudioCodecPropertySoundQualityForVBR can be used to retrieve the
quality setting that will be used given that packet size limit.
Writeable if supported.
@constant kAudioCodecPropertyCurrentInputFormat
An AudioStreamBasicDescription describing the format the codec
expects its input data in
Almost always writable, but if the codec only supports one unique input format
it does not have to be
@constant kAudioCodecPropertyCurrentOutputFormat
An AudioStreamBasicDescription describing the format the codec
provides its output data in
Almost always writable, but if the codec only supports one unique output format
it does not have to be
@constant kAudioCodecPropertyMagicCookie
An untyped buffer of out of band configuration data the codec
requires to process the stream of data correctly. The contents
of this data is private to the codec.
Not all codecs have magic cookies. If a call to AudioCodecGetPropertyInfo
returns a size greater than 0 then the codec may take one.
Writable if present.
@constant kAudioCodecPropertyUsedInputBufferSize
A UInt32 indicating the number of bytes in the codec's input
buffer. The amount of available buffer space is simply the
answer from kAudioCodecPropertyInputBufferSize minus the answer
from this property.
Not writable.
@constant kAudioCodecPropertyIsInitialized
A UInt32 where 0 means the codec is uninitialized and anything
else means the codec is initialized. This should never be settable directly.
Must be set by AudioCodecInitialize and AudioCodecUninitialize.
@constant kAudioCodecPropertyCurrentTargetBitRate
A UInt32 containing the number of bits per second to aim for when encoding
data. This property is usually only relevant to encoders, but if a decoder
can know what bit rate it's set to it may report it.
This property is irrelevant if the encoder is configured as kAudioCodecBitRateControlMode_Variable.
Writable on encoders if supported.
@constant kAudioCodecPropertyCurrentInputSampleRate
A Float64 containing the current input sample rate in Hz. No Default.
May be writable. If only one sample rate is supported it does not have to be.
@constant kAudioCodecPropertyCurrentOutputSampleRate
A Float64 containing the current output sample rate in Hz. No Default.
May be writable. If only one sample rate is supported it does not have to be.
@constant kAudioCodecPropertyQualitySetting
A UInt32 that sets the tradeoff between sound quality and CPU time consumption.
The property value is between [0 - 0x7F].
Some enum constants are defined below for convenience.
Writable if supported.
@constant kAudioCodecPropertyApplicableBitRateRange
An array of AudioValueRange indicating the target bit rates
supported by the encoder in its current configuration.
This property is only relevant to encoders.
See also kAudioCodecPropertyAvailableBitRateRange.
Not writable.
@constant kAudioCodecPropertyRecommendedBitRateRange
An array of AudioValueRange indicating the recommended bit rates
at given sample rate.
This property is only relevant to encoders.
Not writable.
@constant kAudioCodecPropertyApplicableInputSampleRates
An array of AudioValueRange indicating the valid ranges for the
input sample rate of the codec for the current bit rate.
This property is only relevant to encoders.
See also kAudioCodecPropertyAvailableInputSampleRates.
Not writable.
@constant kAudioCodecPropertyApplicableOutputSampleRates
An array of AudioValueRange indicating the valid ranges for the
output sample rate of the codec for the current bit rate.
This property is only relevant to encoders.
See also kAudioCodecPropertyAvailableOutputSampleRates.
Not writable.
@constant kAudioCodecPropertyPaddedZeros
A UInt32 indicating the number of zeros (samples) that were appended
to the last packet of input data to make a complete packet encoding.
Encoders only. No default.
Not writable.
@constant kAudioCodecPropertyPrimeMethod
A UInt32 specifying priming method.
See enum below.
May be writable. Some encoders offer the option of padding out the last packet, and this
may be set here.
@constant kAudioCodecPropertyPrimeInfo
A pointer to an AudioCodecPrimeInfo struct.
Not writable on encoders. On decoders this may be writable, telling the decoder to trim the
first and/or last packet.
@constant kAudioCodecPropertyCurrentInputChannelLayout
An AudioChannelLayout that specifies the channel layout that the codec is using for input.
May be writable. If only one channel layout is supported it does not have to be.
@constant kAudioCodecPropertyCurrentOutputChannelLayout
An AudioChannelLayout that specifies the channel layout that the codec is using for output.
If settable on a encoder, it means the encoder can re-map channels
May be writable. If only one channel layout is supported or the codec does no channel remapping
(ie, output channel layout always equals the input channel layout) it does not have to be.
@constant kAudioCodecPropertySettings
A CFDictionaryRef that lists both the settable codec settings and their values.
Encoders only.
Obviously this will be linked to many of the other properties listed herein and as such
it potentially will cause synchronization problems. Therefore, when setting this property
on an encoder a GetProperty should be done first to retrieve the current dictionary,
and only one setting within the dictionary should change with each SetProperty call,
as it is not guaranteed that changing one property will not have side effects.
Writable if supported.
@constant kAudioCodecPropertyBitRateControlMode
A UInt32 indicating which bit rate control mode will be applied to encoders that
can produce variable packet sizes (sometimes referred to as VBR encoders).
Although the packet size may be variable, a constant bit rate can be maintained
over a transmission channel when decoding in real-time with a fixed end-to-end audio delay.
E.g., MP3 and MPEG-AAC use a bit reservoir mechanism to meet that constraint.
See enum below.
Only needs to be settable if the codec supports multiple bit rate control strategies.
@constant kAudioCodecPropertyFormatList
An array of AudioFormatListItem structs list all formats that can be handled by the decoder
For decoders, takes a Magic Cookie that gets passed in on the GetProperty call. No default.
On input, the outPropertyData parameter passed to GetProperty should begin with a
AudioCodecMagicCookieInfo struct which will be overwritten by the AudioFormatListItems
returned from the property. For encoders, returns a list of formats which will be in the
bitstream. No input data required.
Important note: this encoder property is only applicable to audio formats which are made of
two or more layers where the base layers(s) can be decoded by systems which aren't capable of
handling the enhancement layers. For example, a High Efficiency AAC bitstream which contains
an AAC Low Complexity base layer can be decoded by any AAC decoder.
@constant kAudioCodecPropertySoundQualityForVBR
A UInt32 that sets a target sound quality level.
Unlike kAudioCodecPropertyQualitySetting which is relevant to all BitRate Control Modes,
this property only needs to be set by an encoder configured at kAudioCodecBitRateControlMode_Variable.
The property value is between [0 - 0x7F].
See also kAudioCodecPropertyQualitySetting
Writable if supported.
@constant kAudioCodecPropertyBitRateForVBR
A UInt32 that can be used to set the target bit rate when the encoder is configured
for VBR mode (kAudioCodecBitRateControlMode_Variable). Writable if supported.
@constant kAudioCodecPropertyDelayMode
A UInt32 specifying the delay mode. See enum below.
Writable if supported.
@constant kAudioCodecPropertyAdjustLocalQuality
An SInt32 number in the range [-128, 127] to allow encoding quality adjustements on a packet by packet basis.
This property can be set on an initialized encoder object without having to uninitialize and re-intialize it
and allows to adjust the encoder quality level for every packet. This is useful for packets streamed over
unreliable IP networks where the encoder needs to adapt immediately to network condition changes.
Escape property ID's start with a '^' symbol as the first char code. This bypasses the initilization check.
@constant kAudioCodecPropertyProgramTargetLevel
A Float32 specifying the program target level in dB FS for decoders.
Supported target levels are in the range of -31.0 to -20.0dB.
This property controls the decoding of broadcast loudness
normalization metadata with goal of achieving consistent loudness across various
programs. The property complies with the target level defined in the MPEG Audio
standard ISO/IEC 14496-3. It will override kAudioCodecPropertyProgramTargetLevelConstant.
@constant kAudioCodecPropertyProgramTargetLevelConstant
A UInt32 specifying the program target level constant in dB FS (Full Scale) for decoders.
Supported target levels are defined as enum with the prefix kProgramTargetLevel
(see below). This property controls the decoding of broadcast loudness
normalization metadata with the goal of achieving consistent loudness across various
programs. The property complies with the target level defined in the MPEG Audio
standard ISO/IEC 14496-3. The default is kProgramTargetLevel_None.
@constant kAudioCodecPropertyDynamicRangeControlMode
A UInt32 specifying the DRC mode. Supported modes are defined as enum with the
prefix kDynamicRangeControlMode (see below). This property controls which
dynamic range compression scheme is applied if the information is present in
the bitstream. The default is kDynamicRangeControlMode_None.
*/
CF_ENUM(AudioCodecPropertyID)
{
kAudioCodecPropertyInputBufferSize = 'tbuf',
kAudioCodecPropertyPacketFrameSize = 'pakf',
kAudioCodecPropertyHasVariablePacketByteSizes = 'vpk?',
kAudioCodecPropertyEmploysDependentPackets = 'dpk?',
kAudioCodecPropertyMaximumPacketByteSize = 'pakb',
kAudioCodecPropertyPacketSizeLimitForVBR = 'pakl',
kAudioCodecPropertyCurrentInputFormat = 'ifmt',
kAudioCodecPropertyCurrentOutputFormat = 'ofmt',
kAudioCodecPropertyMagicCookie = 'kuki',
kAudioCodecPropertyUsedInputBufferSize = 'ubuf',
kAudioCodecPropertyIsInitialized = 'init',
kAudioCodecPropertyCurrentTargetBitRate = 'brat',
kAudioCodecPropertyCurrentInputSampleRate = 'cisr',
kAudioCodecPropertyCurrentOutputSampleRate = 'cosr',
kAudioCodecPropertyQualitySetting = 'srcq',
kAudioCodecPropertyApplicableBitRateRange = 'brta',
kAudioCodecPropertyRecommendedBitRateRange = 'brtr',
kAudioCodecPropertyApplicableInputSampleRates = 'isra',
kAudioCodecPropertyApplicableOutputSampleRates = 'osra',
kAudioCodecPropertyPaddedZeros = 'pad0',
kAudioCodecPropertyPrimeMethod = 'prmm',
kAudioCodecPropertyPrimeInfo = 'prim',
kAudioCodecPropertyCurrentInputChannelLayout = 'icl ',
kAudioCodecPropertyCurrentOutputChannelLayout = 'ocl ',
kAudioCodecPropertySettings = 'acs ',
kAudioCodecPropertyFormatList = 'acfl',
kAudioCodecPropertyBitRateControlMode = 'acbf',
kAudioCodecPropertySoundQualityForVBR = 'vbrq',
kAudioCodecPropertyBitRateForVBR = 'vbrb',
kAudioCodecPropertyDelayMode = 'dmod',
kAudioCodecPropertyAdjustLocalQuality = '^qal',
kAudioCodecPropertyProgramTargetLevel = 'pptl',
kAudioCodecPropertyDynamicRangeControlMode = 'mdrc',
kAudioCodecPropertyProgramTargetLevelConstant = 'ptlc',
};
/*!
@enum AudioCodecQuality
@discussion Constants to be used with kAudioCodecPropertyQualitySetting
@constant kAudioCodecQuality_Max
@constant kAudioCodecQuality_High
@constant kAudioCodecQuality_Medium
@constant kAudioCodecQuality_Low
@constant kAudioCodecQuality_Min
*/
CF_ENUM(UInt32)
{
kAudioCodecQuality_Max = 0x7F,
kAudioCodecQuality_High = 0x60,
kAudioCodecQuality_Medium = 0x40,
kAudioCodecQuality_Low = 0x20,
kAudioCodecQuality_Min = 0
};
/*!
@enum AudioCodecPrimeMethod
@discussion Constants to be used with kAudioCodecPropertyPrimeMethod.
@constant kAudioCodecPrimeMethod_Pre
Primes with leading and trailing input frames
@constant kAudioCodecPrimeMethod_Normal
Only primes with trailing (zero latency)
leading frames are assumed to be silence
@constant kAudioCodecPrimeMethod_None
Acts in "latency" mode
both leading and trailing frames assumed to be silence
*/
CF_ENUM(UInt32)
{
kAudioCodecPrimeMethod_Pre = 0,
kAudioCodecPrimeMethod_Normal = 1,
kAudioCodecPrimeMethod_None = 2
};
/*!
@enum kAudioCodecPropertyBitRateControlMode
@discussion Constants defining various bit rate control modes
to be used with kAudioCodecPropertyBitRateControlMode.
These modes are only applicable to encoders that can produce
variable packet sizes, such as AAC.
@constant kAudioCodecBitRateControlMode_Constant
The encoder maintains a constant bit rate suitable for use over a transmission
channel when decoding in real-time with a fixed end-to-end audio delay.
Note that while a constant bit rate is maintained in this mode, the number of bits
allocated to encode each fixed length of audio data may be variable
(ie. packet sizes are variable).
E.g., MP3 and MPEG-AAC use a bit reservoir mechanism to meet that constraint.
@constant kAudioCodecBitRateControlMode_LongTermAverage
The provided target bit rate is achieved over a long term average
(typically after the first 1000 packets). This mode is similar to
kAudioCodecBitRateControlMode_Constant in the sense that the
target bit rate will be maintained in a long term average. However, it does not
provide constant delay when using constant bit rate transmission. This mode offers
a better sound quality than kAudioCodecBitRateControlMode_Constant
can, that is, a more efficient encoding is performed.
@constant kAudioCodecBitRateControlMode_VariableConstrained
Encoder dynamically allocates the bit resources according to the characteristics
of the underlying signal. However, some constraints are applied in order to limit
the variation of the bit rate.
@constant kAudioCodecBitRateControlMode_Variable
Similar to the VBR constrained mode, however the packet size is virtually unconstrained.
The coding process targets constant sound quality, and the sound quality level is
set by kAudioCodecPropertySoundQualityForVBR.
This mode usually provides the best tradeoff between quality and bit rate.
*/
CF_ENUM(UInt32)
{
kAudioCodecBitRateControlMode_Constant = 0,
kAudioCodecBitRateControlMode_LongTermAverage = 1,
kAudioCodecBitRateControlMode_VariableConstrained = 2,
kAudioCodecBitRateControlMode_Variable = 3,
};
/*!
@enum AudioCodecDelayMode
@discussion Constants defining various delay modes to be used with kAudioCodecPropertyDelayMode.
The resulting priming frames are reflected in the kAudioCodecPropertyPrimeInfo property.
Note that for layered streams like aach and aacp, the priming information always refers
to the base layer.
@constant kAudioCodecDelayMode_Compatibility
In compatibility delay mode, the resulting priming corresponds to the default value defined by the
underlying codecs. For aac this number equals 2112 regardless of the sample rate and other settings.
@constant kAudioCodecDelayMode_Minimum
Sets the encoder, where applicable, in it's lowest possible delay mode. Any additional delays, like the one
introduced by filters/sample rate converters etc, aren't compensated by the encoder.
@constant kAudioCodecDelayMode_Optimal
In this mode, the resulting bitstream has the minimum amount of priming necessary for the decoder.
For aac this number is 1024 which corresponds to exactly one packet.
*/
CF_ENUM(UInt32)
{
kAudioCodecDelayMode_Compatibility = 0,
kAudioCodecDelayMode_Minimum = 1,
kAudioCodecDelayMode_Optimal = 2
};
/*!
@enum ProgramTargetLevel
@discussion Constants to be used with kAudioCodecPropertyProgramTargetLevelConstant
@constant kProgramTargetLevel_None
@constant kProgramTargetLevel_Minus31dB
@constant kProgramTargetLevel_Minus23dB
@constant kProgramTargetLevel_Minus20dB
*/
CF_ENUM(UInt32)
{
kProgramTargetLevel_None = 0,
kProgramTargetLevel_Minus31dB = 1,
kProgramTargetLevel_Minus23dB = 2,
kProgramTargetLevel_Minus20dB = 3
};
/*!
@enum DynamicRangeControlMode
@discussion Constants to be used with kAudioCodecPropertyDynamicRangeControlMode
@constant kDynamicRangeControlMode_None
Dynamic range compression disabled
@constant kDynamicRangeControlMode_Light
Light compression according to MPEG-Audio ISO/IEC 14496
@constant kDynamicRangeControlMode_Heavy
Heavy compression according to ETSI TS 101 154
*/
CF_ENUM(UInt32)
{
kDynamicRangeControlMode_None = 0,
kDynamicRangeControlMode_Light = 1,
kDynamicRangeControlMode_Heavy = 2
};
/*!
@struct AudioCodecPrimeInfo
@discussion Specifies the number of leading and trailing empty frames
which have to be inserted.
@var leadingFrames
An unsigned integer specifying the number of leading empty frames
@var trailingFrames
An unsigned integer specifying the number of trailing empty frames
*/
typedef struct AudioCodecPrimeInfo
{
UInt32 leadingFrames;
UInt32 trailingFrames;
} AudioCodecPrimeInfo;
//=============================================================================
#pragma mark -
#pragma mark Constants for kAudioCodecPropertySettings
//=============================================================================
#define kAudioSettings_TopLevelKey "name"
#define kAudioSettings_Version "version"
#define kAudioSettings_Parameters "parameters"
#define kAudioSettings_SettingKey "key"
#define kAudioSettings_SettingName "name"
#define kAudioSettings_ValueType "value type"
#define kAudioSettings_AvailableValues "available values"
#define kAudioSettings_LimitedValues "limited values"
#define kAudioSettings_CurrentValue "current value"
#define kAudioSettings_Summary "summary"
#define kAudioSettings_Hint "hint"
#define kAudioSettings_Unit "unit"
/*!
@enum AudioSettingsFlags
@discussion Constants to be used with kAudioSettings_Hint
in the kAudioCodecPropertySettings property dictionary.
Indicates any special characteristics of each parameter within the dictionary,
@constant kAudioSettingsFlags_ExpertParameter
If set, then the parameter is an expert parameter.
@constant kAudioSettingsFlags_InvisibleParameter
If set, then the parameter should not be displayed.
@constant kAudioSettingsFlags_MetaParameter
If set, then changing this parameter may affect the values of other parameters.
If not set, then this parameter can be set without affecting the values of other parameters.
@constant kAudioSettingsFlags_UserInterfaceParameter
If set, then this is only a user interface element and not reflected in the codec's bit stream.
*/
typedef CF_OPTIONS(UInt32, AudioSettingsFlags) {
kAudioSettingsFlags_ExpertParameter = (1L << 0),
kAudioSettingsFlags_InvisibleParameter = (1L << 1),
kAudioSettingsFlags_MetaParameter = (1L << 2),
kAudioSettingsFlags_UserInterfaceParameter = (1L << 3)
};
//=============================================================================
#pragma mark -
#pragma mark Status values returned from the AudioCodecProduceOutputPackets routine
//=============================================================================
/*!
@enum AudioCodecProduceOutputPacketStatus
@discussion Possible return status
@constant kAudioCodecProduceOutputPacketFailure
Couldn't complete the request due to an error. It is possible
that some output data was produced. This is reflected in the value
returned in ioNumberPackets.
@constant kAudioCodecProduceOutputPacketSuccess
The number of requested output packets was produced without incident
and there isn't any more input data to process
@constant kAudioCodecProduceOutputPacketSuccessHasMore
The number of requested output packets was produced and there is
enough input data to produce at least one more packet of output data
@constant kAudioCodecProduceOutputPacketNeedsMoreInputData
There was insufficient input data to produce the requested
number of output packets, The value returned in ioNumberPackets
holds the number of output packets produced.
@constant kAudioCodecProduceOutputPacketAtEOF
The end-of-file marker was hit during the processing. Fewer
than the requested number of output packets may have been
produced. Check the value returned in ioNumberPackets for the
actual number produced. Note that not all formats have EOF
markers in them.
*/
CF_ENUM(UInt32)
{
kAudioCodecProduceOutputPacketFailure = 1,
kAudioCodecProduceOutputPacketSuccess = 2,
kAudioCodecProduceOutputPacketSuccessHasMore = 3,
kAudioCodecProduceOutputPacketNeedsMoreInputData = 4,
kAudioCodecProduceOutputPacketAtEOF = 5
};
//=============================================================================
#pragma mark -
#pragma mark Selectors for the component routines
//=============================================================================
/*!
@enum AudioCodecSelectors
@discussion Allows selection of component routines supported the the AudioCodec API
Used by the Component Manager.
@constant kAudioCodecGetPropertyInfoSelect
@constant kAudioCodecGetPropertySelect
@constant kAudioCodecSetPropertySelect
@constant kAudioCodecInitializeSelect
@constant kAudioCodecUninitializeSelect
@constant kAudioCodecAppendInputDataSelect
@constant kAudioCodecProduceOutputDataSelect
@constant kAudioCodecResetSelect
@constant kAudioCodecAppendInputBufferListSelect
@constant kAudioCodecProduceOutputBufferListSelect
*/
CF_ENUM(UInt32)
{
kAudioCodecGetPropertyInfoSelect = 0x0001,
kAudioCodecGetPropertySelect = 0x0002,
kAudioCodecSetPropertySelect = 0x0003,
kAudioCodecInitializeSelect = 0x0004,
kAudioCodecUninitializeSelect = 0x0005,
kAudioCodecAppendInputDataSelect = 0x0006,
kAudioCodecProduceOutputDataSelect = 0x0007,
kAudioCodecResetSelect = 0x0008,
kAudioCodecAppendInputBufferListSelect = 0x0009,
kAudioCodecProduceOutputBufferListSelect = 0x000A
};
//=============================================================================
#pragma mark -
#pragma mark Errors
//=============================================================================
/*!
@enum AudioCodecErrors
@discussion Possible errors returned by audio codec components
@constant kAudioCodecNoError
@constant kAudioCodecUnspecifiedError
@constant kAudioCodecUnknownPropertyError
@constant kAudioCodecBadPropertySizeError
@constant kAudioCodecIllegalOperationError
@constant kAudioCodecUnsupportedFormatError
@constant kAudioCodecStateError
@constant kAudioCodecNotEnoughBufferSpaceError
@constant kAudioCodecBadDataError
*/
CF_ENUM(OSStatus)
{
kAudioCodecNoError = 0,
kAudioCodecUnspecifiedError = 'what',
kAudioCodecUnknownPropertyError = 'who?',
kAudioCodecBadPropertySizeError = '!siz',
kAudioCodecIllegalOperationError = 'nope',
kAudioCodecUnsupportedFormatError = '!dat',
kAudioCodecStateError = '!stt',
kAudioCodecNotEnoughBufferSpaceError = '!buf',
kAudioCodecBadDataError = 'bada'
};
//=============================================================================
#pragma mark -
#pragma mark Codec Property Management
//=============================================================================
/*!
@function AudioCodecGetPropertyInfo
@discussion Retrieve information about the given property. The outSize argument
will return the size in bytes of the current value of the property.
The outWritable argument will return whether or not the property
in question can be changed.
@param inCodec
An AudioCodec instance
@param inPropertyID
Property ID whose value should be read
@param outSize
Size in bytes of the property
@param outWritable
Flag indicating wether the underlying property can be modified or not
@result The OSStatus value
*/
extern OSStatus
AudioCodecGetPropertyInfo( AudioCodec inCodec,
AudioCodecPropertyID inPropertyID,
UInt32* __nullable outSize,
Boolean* __nullable outWritable) API_AVAILABLE(macos(10.2), ios(2.0), watchos(2.0), tvos(9.0));
/*!
@function AudioCodecGetProperty
@discussion Retrieve the indicated property data. On input, ioDataSize has the size
of the data pointed to by outPropertyData. On output, ioDataSize will contain
the amount written.
@param inCodec
An AudioCodec instance
@param inPropertyID
Property ID whose value should be read
@param ioPropertyDataSize
Size in bytes of the property data
@param outPropertyData
Pointer to the property data buffer
@result The OSStatus value
*/
extern OSStatus
AudioCodecGetProperty( AudioCodec inCodec,
AudioCodecPropertyID inPropertyID,
UInt32* ioPropertyDataSize,
void* outPropertyData) API_AVAILABLE(macos(10.2), ios(2.0), watchos(2.0), tvos(9.0));
/*!
@function AudioCodecSetProperty
@discussion Set the indicated property data.
@param inCodec
An AudioCodec instance
@param inPropertyID
Property ID whose value should be changed
@param inPropertyDataSize
Size in bytes of the property data
@param inPropertyData
Pointer to the property data buffer
@result The OSStatus value
*/
extern OSStatus
AudioCodecSetProperty( AudioCodec inCodec,
AudioCodecPropertyID inPropertyID,
UInt32 inPropertyDataSize,
const void* inPropertyData) API_AVAILABLE(macos(10.2), ios(2.0), watchos(2.0), tvos(9.0));
//=============================================================================
#pragma mark -
#pragma mark Codec Data Handling Routines
//=============================================================================
/*!
@function AudioCodecInitialize
@discussion This call will allocate any buffers needed and otherwise set the codec
up to perform the indicated translation. If an argument is NULL, any
previously set properties will be used for preparing the codec for work.
Note that this routine will also validate the format information as useable.
@param inCodec
An AudioCodec instance
@param inInputFormat
Pointer to an input format structure
@param inOutputFormat
Pointer to an output format structure
@param inMagicCookie
Pointer to the magic cookie
@param inMagicCookieByteSize
Size in bytes of the magic cookie
@result The OSStatus value
*/
extern OSStatus
AudioCodecInitialize( AudioCodec inCodec,
const AudioStreamBasicDescription* __nullable inInputFormat,
const AudioStreamBasicDescription* __nullable inOutputFormat,
const void* __nullable inMagicCookie,
UInt32 inMagicCookieByteSize)
API_AVAILABLE(macos(10.2), ios(2.0), watchos(2.0), tvos(9.0));
/*!
@function AudioCodecUninitialize
@discussion This call will move the codec from the initialized state back to the
uninitialized state. The codec will release any resources it allocated
or claimed in AudioCodecInitialize.
@param inCodec
An AudioCodec instance
@result The OSStatus value
*/
extern OSStatus
AudioCodecUninitialize(AudioCodec inCodec) API_AVAILABLE(macos(10.2), ios(2.0), watchos(2.0), tvos(9.0));
/*!
@function AudioCodecAppendInputData
@discussion Append as much of the given data in inInputData to the codec's input buffer as possible
and return in ioInputDataByteSize the amount of data used.
The inPacketDescription argument is an array of AudioStreamPacketDescription
structs that describes the packet layout. The number of elements in this array
is indicated on input by ioNumberPackets. On return, this number indicates the number
of packets consumed.
Note also in this case that it is an error to supply less than a full packet
of data at a time.
@param inCodec
An AudioCodec instance
@param inInputData
A const pointer to the input data
@param ioInputDataByteSize
The size in bytes of the input data in inInputData on input,
the number of bytes consumed on output
@param ioNumberPackets
The number of packets
@param inPacketDescription
The packet description pointer
@result The OSStatus value
*/
extern OSStatus
AudioCodecAppendInputData( AudioCodec inCodec,
const void* inInputData,
UInt32* ioInputDataByteSize,
UInt32* ioNumberPackets,
const AudioStreamPacketDescription* __nullable inPacketDescription)
API_AVAILABLE(macos(10.2), ios(2.0), watchos(2.0), tvos(9.0));
/*!
@function AudioCodecProduceOutputPackets
@discussion Produce as many output packets as requested and the amount of input data
allows for. The outStatus argument returns information about the codec's
status to allow for proper data management. See the constants above for
the possible values that can be returned.
The outPacketDescription argument is an array of AudioStreamPacketDescription
structs that describes the packet layout returned in outOutputData. This
argument is optional. Pass NULL if this information is not to be returned.
Note that this information is only provided when the output format isn't
linear PCM.
Note that decoders will always only produce linear PCM data in multiples of
the number frames in a packet of the encoded format (as returned by
kAudioCodecPropertyPacketFrameSize). Encoders will consume this many frames
of linear PCM data to produce a packet of their format.
@param inCodec
The AudioCodec instance
@param outOutputData
Pointer to the output data buffer
@param ioOutputDataByteSize
A pointer to the size
@param ioNumberPackets
number of input/output packets
@result The OSStatus value
*/
extern OSStatus
AudioCodecProduceOutputPackets( AudioCodec inCodec,
void* outOutputData,
UInt32* ioOutputDataByteSize,
UInt32* ioNumberPackets,
AudioStreamPacketDescription* __nullable outPacketDescription,
UInt32* outStatus)
API_AVAILABLE(macos(10.2), ios(2.0), watchos(2.0), tvos(9.0));
extern OSStatus
AudioCodecAppendInputBufferList( AudioCodec inCodec,
const AudioBufferList * inBufferList,
UInt32* ioNumberPackets,
const AudioStreamPacketDescription* __nullable inPacketDescription,
UInt32* outBytesConsumed)
API_AVAILABLE(macos(10.7), ios(4.0), watchos(2.0), tvos(9.0));
extern OSStatus
AudioCodecProduceOutputBufferList( AudioCodec inCodec,
AudioBufferList * ioBufferList,
UInt32* ioNumberPackets,
AudioStreamPacketDescription* __nullable outPacketDescription,
UInt32* outStatus)
API_AVAILABLE(macos(10.7), ios(4.0), watchos(2.0), tvos(9.0));
/*!
@function AudioCodecReset
@discussion Flushes all the data in the codec and clears the input buffer. Note that
the formats, and magic cookie will be retained so they won't need to be
set up again to decode the same data.
@param inCodec The audio codec descriptor
@result the OSStatus value
*/
extern OSStatus
AudioCodecReset(AudioCodec inCodec) API_AVAILABLE(macos(10.2), ios(2.0), watchos(2.0), tvos(9.0));
//=====================================================================================================================
typedef OSStatus
(*AudioCodecGetPropertyInfoProc)(void *self, AudioCodecPropertyID inPropertyID, UInt32 * __nullable outSize, Boolean * __nullable outWritable);
typedef OSStatus
(*AudioCodecGetPropertyProc)(void *self, AudioCodecPropertyID inPropertyID, UInt32 *ioPropertyDataSize,
void *outPropertyData);
typedef OSStatus
(*AudioCodecSetPropertyProc)(void *self, AudioCodecPropertyID inPropertyID, UInt32 inPropertyDataSize,
const void *inPropertyData);
typedef OSStatus
(*AudioCodecInitializeProc)(void *self, const AudioStreamBasicDescription * __nullable inInputFormat,
const AudioStreamBasicDescription * __nullable inOutputFormat, const void * __nullable inMagicCookie,
UInt32 inMagicCookieByteSize);
typedef OSStatus
(*AudioCodecUninitializeProc)(void *self);
typedef OSStatus
(*AudioCodecAppendInputDataProc)(void *self, const void *inInputData, UInt32 *ioInputDataByteSize, UInt32 *ioNumberPackets,
const AudioStreamPacketDescription * __nullable inPacketDescription);
typedef OSStatus
(*AudioCodecProduceOutputPacketsProc)(void *self, void *outOutputData, UInt32 *ioOutputDataByteSize, UInt32 *ioNumberPackets,
AudioStreamPacketDescription * __nullable outPacketDescription, UInt32 *outStatus);
typedef OSStatus
(*AudioCodecResetProc)(void *self);
typedef OSStatus
(*AudioCodecAppendInputBufferListProc)(void *self, const AudioBufferList *ioBufferList, UInt32 *inNumberPackets,
const AudioStreamPacketDescription * __nullable inPacketDescription, UInt32 *outBytesConsumed);
typedef OSStatus
(*AudioCodecProduceOutputBufferListProc)(void *self, AudioBufferList *ioBufferList, UInt32 *ioNumberPackets,
AudioStreamPacketDescription *__nullable outPacketDescription, UInt32 *outStatus);
//=====================================================================================================================
#pragma mark -
#pragma mark Deprecated Properties
/*!
@enum AudioCodecProperty
@deprecated
@constant kAudioCodecPropertyMinimumDelayMode
A UInt32 equal 1 sets the encoder, where applicable, in it's lowest possible delay mode. An encoder
may prepend zero valued samples to the input signal in order to make additional delays, like e.g.
from a filter, coincide on a block boundary. This operation, however, results in an increased
encoding/ decoding delay which may be undesired and turned off with this property.
Use the kAudioCodecPropertyDelayMode property instead with the value set to kAudioCodecDelayMode_Minimum
*/
CF_ENUM(AudioCodecPropertyID)
{
kAudioCodecPropertyMinimumDelayMode = 'mdel'
};
/*!
@enum AudioCodecProperty
@deprecated in version 10.7
@constant kAudioCodecPropertyNameCFString
The name of the codec component as a CFStringRef. The CFStringRef
retrieved via this property must be released by the caller.
@constant kAudioCodecPropertyManufacturerCFString
The manufacturer of the codec as a CFStringRef. The CFStringRef
retrieved via this property must be released by the caller.
@constant kAudioCodecPropertyFormatCFString
The name of the codec's format as a CFStringRef. The CFStringRef
retrieved via this property must be released by the caller.
*/
CF_ENUM(AudioCodecPropertyID)
{
kAudioCodecPropertyNameCFString = 'lnam',
kAudioCodecPropertyManufacturerCFString = 'lmak',
kAudioCodecPropertyFormatCFString = 'lfor'
};
/*!
@enum AudioCodecProperty
@deprecated in version 10.5
@constant kAudioCodecPropertyRequiresPacketDescription
A UInt32 where a non-zero value indicates that the format the codec implements
requires that an AudioStreamPacketDescription array must be supplied with any data
in that format. Note that this implies that data must also be handled strictly in
packets. For a decoder, this applies to input data. For an encoder, it applies to
output data, which means that the encoder will be filling out provided packet descriptions
on output.
A decoder must be able to handle packet descriptions even if it does not require them.
An encoder does not have to fill out packet descriptions if it does not require them.
Redundant due to kAudioCodecPropertyHasVariablePacketByteSizes. Codecs with variable-sized
packets must handle packet descriptions while codecs with constant-sized packets do not
have to.
@constant kAudioCodecPropertyAvailableBitRates
An array of UInt32 that indicates the target bit rates
supported by the encoder. This property is only relevant to
encoders. Replaced with kAudioCodecPropertyAvailableBitRateRange
@constant kAudioCodecExtendFrequencies
A UInt32 indicating whether an encoder should extend its cutoff frequency
if such an option exists. 0 == extended frequencies off, 1 == extended frequencies on
e.g. some encoders normally cut off the signal at 16 kHz but can encode up to 20 kHz if
asked to.
Redundant.
@constant kAudioCodecUseRecommendedSampleRate
For encoders that do sample rate conversion, a UInt32 indicating whether or
not the encoder is using the recommended sample rate for the given input.
A value of 0 indicates it isn't, 1 indicates it is.
This property is read only and indicates whether or not a user has explicitly set an output
sample rate.
Redundant as 0.0 for a sample rate means let the codec decide.
@constant kAudioCodecOutputPrecedence
For encoders that do sample rate conversion, a UInt32 indicating whether the
bit rate, sample rate, or neither have precedence over the other. See enum below.
Redundant because precedence is implicitly set by either providing a non-zero bit rate or
sample rate and setting the other to zero (which allows the encoder to choose any applicable rate).
If both values are set to non-zero, neither value has precedence.
@constant kAudioCodecDoesSampleRateConversion
Renamed to kAudioCodecPropertyDoesSampleRateConversion
@constant kAudioCodecBitRateFormat
Renamed to kAudioCodecPropertyBitRateControlMode
@constant kAudioCodecInputFormatsForOutputFormat
Renamed to kAudioCodecPropertyInputFormatsForOutputFormat
@constant kAudioCodecOutputFormatsForInputFormat
Renamed to kAudioCodecPropertyOutputFormatsForInputFormat
@constant kAudioCodecPropertyInputChannelLayout
Renamed to kAudioCodecPropertyCurrentInputChannelLayout
@constant kAudioCodecPropertyOutputChannelLayout
Renamed to kAudioCodecPropertyCurrentOutputChannelLayout
@constant kAudioCodecPropertyZeroFramesPadded
Renamed to kAudioCodecPropertyPaddedZeros
*/
CF_ENUM(AudioCodecPropertyID)
{
kAudioCodecPropertyRequiresPacketDescription = 'pakd',
kAudioCodecPropertyAvailableBitRates = 'brt#',
kAudioCodecExtendFrequencies = 'acef',
kAudioCodecUseRecommendedSampleRate = 'ursr',
kAudioCodecOutputPrecedence = 'oppr',
kAudioCodecBitRateFormat = kAudioCodecPropertyBitRateControlMode,
kAudioCodecDoesSampleRateConversion = kAudioCodecPropertyDoesSampleRateConversion,
kAudioCodecInputFormatsForOutputFormat = kAudioCodecPropertyInputFormatsForOutputFormat,
kAudioCodecOutputFormatsForInputFormat = kAudioCodecPropertyOutputFormatsForInputFormat,
kAudioCodecPropertyInputChannelLayout = kAudioCodecPropertyCurrentInputChannelLayout,
kAudioCodecPropertyOutputChannelLayout = kAudioCodecPropertyCurrentOutputChannelLayout,
kAudioCodecPropertyAvailableInputChannelLayouts = kAudioCodecPropertyAvailableInputChannelLayoutTags,
kAudioCodecPropertyAvailableOutputChannelLayouts = kAudioCodecPropertyAvailableOutputChannelLayoutTags,
kAudioCodecPropertyZeroFramesPadded = kAudioCodecPropertyPaddedZeros
};
/*!
@enum AudioCodecBitRateFormat
@deprecated in version 10.5
@discussion Constants to be used with kAudioCodecBitRateFormat.
This is deprecated.
Use kAudioCodecPropertyBitRateControlMode instead.
@constant kAudioCodecBitRateFormat_CBR is mapped to kAudioCodecBitRateControlMode_Constant
@constant kAudioCodecBitRateFormat_ABR is mapped to kAudioCodecBitRateControlMode_LongTermAverage
@constant kAudioCodecBitRateFormat_VBR is mapped to kAudioCodecBitRateControlMode_VariableConstrained
*/
CF_ENUM(UInt32)
{
kAudioCodecBitRateFormat_CBR = kAudioCodecBitRateControlMode_Constant,
kAudioCodecBitRateFormat_ABR = kAudioCodecBitRateControlMode_LongTermAverage,
kAudioCodecBitRateFormat_VBR = kAudioCodecBitRateControlMode_VariableConstrained
};
/*!
@enum AudioCodecOutputPrecedence
@deprecated in version 10.5
@discussion Constants to be used with kAudioCodecOutputPrecedence
@constant kAudioCodecOutputPrecedenceNone
Change in the bit rate or the sample rate are constrained by
the other value.
@constant kAudioCodecOutputPrecedenceBitRate
The bit rate may be changed freely,
adjusting the sample rate if necessary
@constant kAudioCodecOutputPrecedenceSampleRate
The sample rate may be changed freely,
adjusting the bit rate if necessary
*/
CF_ENUM(UInt32)
{
kAudioCodecOutputPrecedenceNone = 0,
kAudioCodecOutputPrecedenceBitRate = 1,
kAudioCodecOutputPrecedenceSampleRate = 2
};
/*!
@typedef MagicCookieInfo
@deprecated in version 10.5
@discussion renamed to AudioCodecMagicCookieInfo
*/
typedef struct AudioCodecMagicCookieInfo MagicCookieInfo __attribute__((deprecated));
/*!
@enum AudioCodecSettingsHint
@deprecated in version 10.4
@discussion Constants to be used with kAudioSettings_Hint.
This is deprecated.
Use AudioSettingsFlag instead.
@constant kHintBasic
@constant kHintAdvanced
@constant kHintHidden
*/
CF_ENUM(UInt32)
{
kHintBasic = 0,
kHintAdvanced = 1,
kHintHidden = 2
};
#if defined(__cplusplus)
}
#endif
CF_ASSUME_NONNULL_END
#endif // AudioUnit_AudioCodec_h
#else
#include <AudioToolboxCore/AudioCodec.h>
#endif
|
0 | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/AudioToolbox.framework | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/AudioToolbox.framework/Headers/AudioOutputUnit.h | #if (defined(__USE_PUBLIC_HEADERS__) && __USE_PUBLIC_HEADERS__) || (defined(USE_AUDIOTOOLBOX_PUBLIC_HEADERS) && USE_AUDIOTOOLBOX_PUBLIC_HEADERS) || !__has_include(<AudioToolboxCore/AudioOutputUnit.h>)
/*!
@file AudioOutputUnit.h
@framework AudioToolbox.framework
@copyright (c) 2000-2015 Apple, Inc. All rights reserved.
@brief Additional Audio Unit API for audio input/output units.
*/
#ifndef AudioUnit_AudioOutputUnit_h
#define AudioUnit_AudioOutputUnit_h
#include <AudioToolbox/AUComponent.h>
CF_ASSUME_NONNULL_BEGIN
#ifdef __cplusplus
extern "C" {
#endif
//-----------------------------------------------------------------------------
// Start/stop methods for output units
//-----------------------------------------------------------------------------
extern OSStatus
AudioOutputUnitStart( AudioUnit ci) API_AVAILABLE(macos(10.0), ios(2.0), watchos(2.0), tvos(9.0));
extern OSStatus
AudioOutputUnitStop( AudioUnit ci) API_AVAILABLE(macos(10.0), ios(2.0), watchos(2.0), tvos(9.0));
//-----------------------------------------------------------------------------
// Selectors for component and audio plugin calls
//-----------------------------------------------------------------------------
enum {
kAudioOutputUnitRange = 0x0200, // selector range
kAudioOutputUnitStartSelect = 0x0201,
kAudioOutputUnitStopSelect = 0x0202
};
/*!
*/
typedef OSStatus (*AudioOutputUnitStartProc) (void *self);
/*!
*/
typedef OSStatus (*AudioOutputUnitStopProc) (void *self);
#ifdef __cplusplus
}
#endif
CF_ASSUME_NONNULL_END
#endif /* AudioUnit_AudioOutputUnit_h */
#else
#include <AudioToolboxCore/AudioOutputUnit.h>
#endif
|
0 | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/AudioToolbox.framework | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/AudioToolbox.framework/Headers/AudioUnitParameters.h | #if (defined(__USE_PUBLIC_HEADERS__) && __USE_PUBLIC_HEADERS__) || (defined(USE_AUDIOTOOLBOX_PUBLIC_HEADERS) && USE_AUDIOTOOLBOX_PUBLIC_HEADERS) || !__has_include(<AudioToolboxCore/AudioUnitParameters.h>)
/*!
@file AudioUnitParameters.h
@framework AudioToolbox.framework
@copyright (c) 2000-2015 Apple, Inc. All rights reserved.
@abstract Constants for the parameters of Apple audio units.
*/
#ifndef AudioUnit_AudioUnitParameters_h
#define AudioUnit_AudioUnitParameters_h
#include <AudioToolbox/AUComponent.h>
#pragma mark General Declarations
/* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The following specifies the equivalent parameterID's for the Group scope for standard
MIDI Controllers. This list is not exhaustive. It represents the parameters, and their corresponding
MIDI messages, that should be supported in Group scope by MIDI capable AUs.
Group scope parameter IDs from 0 < 512 are reserved for mapping MIDI controllers.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
CF_ENUM(AudioUnitParameterID) {
kAUGroupParameterID_Volume = 7, // value 0 < 128
kAUGroupParameterID_Sustain = 64, // value 0-63 (off), 64-127 (on)
kAUGroupParameterID_Sostenuto = 66, // value 0-63 (off), 64-127 (on)
kAUGroupParameterID_AllNotesOff = 123, // value ignored
kAUGroupParameterID_ModWheel = 1, // value 0 < 128
kAUGroupParameterID_PitchBend = 0xE0, // value -8192 - 8191
kAUGroupParameterID_AllSoundOff = 120, // value ignored
kAUGroupParameterID_ResetAllControllers = 121, // value ignored
kAUGroupParameterID_Pan = 10, // value 0 < 128
kAUGroupParameterID_Foot = 4, // value 0 < 128
kAUGroupParameterID_ChannelPressure = 0xD0, // value 0 < 128
kAUGroupParameterID_KeyPressure = 0xA0, // values 0 < 128
kAUGroupParameterID_Expression = 11, // value 0 < 128
kAUGroupParameterID_DataEntry = 6, // value 0 < 128
kAUGroupParameterID_Volume_LSB = kAUGroupParameterID_Volume + 32, // value 0 < 128
kAUGroupParameterID_ModWheel_LSB = kAUGroupParameterID_ModWheel + 32, // value 0 < 128
kAUGroupParameterID_Pan_LSB = kAUGroupParameterID_Pan + 32, // value 0 < 128
kAUGroupParameterID_Foot_LSB = kAUGroupParameterID_Foot + 32, // value 0 < 128
kAUGroupParameterID_Expression_LSB = kAUGroupParameterID_Expression + 32, // value 0 < 128
kAUGroupParameterID_DataEntry_LSB = kAUGroupParameterID_DataEntry + 32, // value 0 < 128
kAUGroupParameterID_KeyPressure_FirstKey = 256, // value 0 < 128
kAUGroupParameterID_KeyPressure_LastKey = 383 // value 0 < 128
};
/* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Supporting the kAUGroupParameterID_KeyPressure parameter indicates to hosts that your audio unit
supports polyphonic "aftertouch" key pressure.
Each of the 128 MIDI key numbers can have its own value for polyphonic aftertouch. To respond to
aftertouch for a particular key, your audio unit needs to support an additional parameter
specifically for that key. The aftertouch parameter ID for a given MIDI key is equal to the MIDI
key number plus 256. For example, the aftertouch parameter ID for MIDI key #60 (middle C) is:
60 + kAUGroupParameterID_KeyPressure_FirstKey = 316
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
/* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The following sections specify the parameter IDs for the audio units included in macOS.
Host applications can use these IDs to directly address these parameters without first discovering
them through the AUParameterInfo mechanism (see the AudioUnitProperties.h header file)
Each parameter is preceeded by a comment that indicates scope, unit of measurement, minimum
value, maximum value, and default value.
See the AudioUnitProperties.h header file for additional information that a parameter may report
When displaying to the user information about a parameter, a host application should always
get the parameter information from the audio unit itself.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
#if !TARGET_OS_IPHONE
// Parameters for all Panner AudioUnits
CF_ENUM(AudioUnitParameterID) {
// Global, Linear, 0->1, 1
kPannerParam_Gain = 0,
// Global, Degrees, -180->180, 0
kPannerParam_Azimuth = 1,
// Global, Degrees, -90->90, 0
kPannerParam_Elevation = 2,
// Global, Linear, 0->1, 1
kPannerParam_Distance = 3, // 0 .. 1
// Global, Meters, 0.01->1000, 1
kPannerParam_CoordScale = 4,
// Global, Meters, 0.01->1000, 1
kPannerParam_RefDistance = 5,
};
#endif // !TARGET_OS_IPHONE
#pragma mark Apple Specific
// Parameters for the AUSpatialMixer unit
CF_ENUM(AudioUnitParameterID) {
// Input, Degrees, -180->180, 0
kSpatialMixerParam_Azimuth = 0,
// Input, Degrees, -90->90, 0
kSpatialMixerParam_Elevation = 1,
// Input, Metres, 0->10000, 0
kSpatialMixerParam_Distance = 2,
// Input/Output, dB, -120->20, 0
kSpatialMixerParam_Gain = 3,
// Input, rate scaler 0.5 -> 2.0, 1.0
kSpatialMixerParam_PlaybackRate = 4,
// bus enable : 0 or 1, 1
kSpatialMixerParam_Enable = 5,
// Minimum input gain constraint : 0.0 -> 10.0, 0.0
kSpatialMixerParam_MinGain = 6,
// Maximum input gain constraint : 0.0 -> 10.0, 10.0
kSpatialMixerParam_MaxGain = 7,
// Input, Dry/Wet equal-power blend, % 0.0 -> 100.0, 30.0
kSpatialMixerParam_ReverbBlend = 8,
// Global, dB, -40.0 -> +40.0, 0.0
kSpatialMixerParam_GlobalReverbGain = 9,
// Input, Lowpass filter attenuation at 5KHz : decibels -100.0dB -> 0.0dB, 0.0dB
// smaller values make both direct and reverb sound more muffled; a value of 0.0 indicates no filtering
// Occlusion is a filter applied to the sound prior to the reverb send
kSpatialMixerParam_OcclusionAttenuation = 10,
// Input, Lowpass filter attenuation at 5KHz : decibels -100.0dB -> 0.0dB, 0.0dB
// smaller values make direct sound more muffled; a value of 0.0 indicates no filtering
// Obstruction is a filter applied to the "direct" part of the sound (so is post reverb send)
kSpatialMixerParam_ObstructionAttenuation = 11,
// Global, Degrees, -180->180, 0
kSpatialMixerParam_HeadYaw = 19,
// Global, Degrees, -90->90, 0
kSpatialMixerParam_HeadPitch = 20,
// Global, Degrees, -180->180, 0
kSpatialMixerParam_HeadRoll = 21
};
// Reverb parameters applicable to AUSpatialMixer
CF_ENUM(AudioUnitParameterID) {
// Global, Hertz, 10.0 -> 20000.0, 800.0
kReverbParam_FilterFrequency = 14,
// Global, Octaves, 0.05 -> 4.0, 3.0
kReverbParam_FilterBandwidth = 15,
// Global, Decibels, -18.0 -> +18.0, 0.0
kReverbParam_FilterGain = 16,
// Global, Indexed, 0->kNumAUNBandEQFilterTypes-1, 0
kReverbParam_FilterType = 17, // only available for AUSpatialMixer
// Global, Boolean, 0->1, 1
kReverbParam_FilterEnable = 18 // only available for AUSpatialMixer
};
// Parameters for the AUMixer3D unit
CF_ENUM(AudioUnitParameterID) {
// Input, Degrees, -180->180, 0
k3DMixerParam_Azimuth = 0,
// Input, Degrees, -90->90, 0
k3DMixerParam_Elevation = 1,
// Input, Metres, 0->10000, 0
k3DMixerParam_Distance = 2,
// Input/Output, dB, -120->20, 0
k3DMixerParam_Gain = 3,
// Input, rate scaler 0.5 -> 2.0
k3DMixerParam_PlaybackRate = 4,
// bus enable : 0.0 or 1.0
k3DMixerParam_BusEnable API_AVAILABLE(macos(10.15), ios(13.0), tvos(9.0), watchos(6.0)) = 20,
// Input/Output, dB, -120->20, 0
k3DMixerParam_MinGainInDecibels API_AVAILABLE(macos(10.15), ios(13.0), tvos(9.0), watchos(6.0)) = 21,
// Input/Output, dB, -120->20, 0
k3DMixerParam_MaxGainInDecibels API_AVAILABLE(macos(10.15), ios(13.0), tvos(9.0), watchos(6.0)) = 22,
// Input, Dry/Wet equal-power blend, % 0.0 -> 100.0
k3DMixerParam_DryWetReverbBlend API_AVAILABLE(macos(10.15), ios(13.0), tvos(9.0), watchos(6.0)) = 23,
// Global, dB, -40.0 -> +40.0
k3DMixerParam_GlobalReverbGainInDecibels API_AVAILABLE(macos(10.15), ios(13.0), tvos(9.0), watchos(6.0)) = 24,
// Input, Lowpass filter attenuation at 5KHz : decibels -100.0dB -> 0.0dB
// smaller values make both direct and reverb sound more muffled; a value of 0.0 indicates no filtering
// Occlusion is a filter applied to the sound prior to the reverb send
k3DMixerParam_OcclusionAttenuationInDecibels API_AVAILABLE(macos(10.15), ios(13.0), tvos(9.0), watchos(6.0)) = 25,
// Input, Lowpass filter attenuation at 5KHz : decibels -100.0dB -> 0.0dB
// smaller values make direct sound more muffled; a value of 0.0 indicates no filtering
// Obstruction is a filter applied to the "direct" part of the sound (so is post reverb send)
k3DMixerParam_ObstructionAttenuationInDecibels API_AVAILABLE(macos(10.15), ios(13.0), tvos(9.0), watchos(6.0)) = 26,
#if TARGET_OS_IPHONE && !TARGET_OS_MACCATALYST
// iPhone specific 3D mixer parameters -- deprecated
// bus enable : 0.0 or 1.0
k3DMixerParam_Enable API_DEPRECATED_WITH_REPLACEMENT("k3DMixerParam_BusEnable", ios(2.0, API_TO_BE_DEPRECATED), watchos(2.0, API_TO_BE_DEPRECATED), tvos(9.0, API_TO_BE_DEPRECATED)) API_UNAVAILABLE(macos) = 5,
// Minimum input gain constraint : 0.0 -> 1.0 (available on iphone only)
k3DMixerParam_MinGain API_DEPRECATED_WITH_REPLACEMENT("k3DMixerParam_MinGainInDecibels", ios(2.0, API_TO_BE_DEPRECATED), watchos(2.0, API_TO_BE_DEPRECATED), tvos(9.0, API_TO_BE_DEPRECATED)) API_UNAVAILABLE(macos) = 6,
// Maximum input gain constraint : 0.0 -> 1.0 (available on iphone only)
k3DMixerParam_MaxGain API_DEPRECATED_WITH_REPLACEMENT("k3DMixerParam_MaxGainInDecibels", ios(2.0, API_TO_BE_DEPRECATED), watchos(2.0, API_TO_BE_DEPRECATED), tvos(9.0, API_TO_BE_DEPRECATED)) API_UNAVAILABLE(macos) = 7,
// Input, Dry/Wet equal-power blend, % 0.0 -> 100.0
k3DMixerParam_ReverbBlend API_DEPRECATED_WITH_REPLACEMENT("k3DMixerParam_DryWetReverbBlend", ios(2.0, API_TO_BE_DEPRECATED), watchos(2.0, API_TO_BE_DEPRECATED), tvos(9.0, API_TO_BE_DEPRECATED)) API_UNAVAILABLE(macos) = 8,
// Global, dB, -40.0 -> +40.0
k3DMixerParam_GlobalReverbGain API_DEPRECATED_WITH_REPLACEMENT("k3DMixerParam_GlobalReverbGainInDecibels", ios(2.0, API_TO_BE_DEPRECATED), watchos(2.0, API_TO_BE_DEPRECATED), tvos(9.0, API_TO_BE_DEPRECATED)) API_UNAVAILABLE(macos) = 9,
// Input, Lowpass filter attenuation at 5KHz : decibels -100.0dB -> 0.0dB
// smaller values make both direct and reverb sound more muffled; a value of 0.0 indicates no filtering
// Occlusion is a filter applied to the sound prior to the reverb send
k3DMixerParam_OcclusionAttenuation API_DEPRECATED_WITH_REPLACEMENT("k3DMixerParam_OcclusionAttenuationInDecibels", ios(2.0, API_TO_BE_DEPRECATED), watchos(2.0, API_TO_BE_DEPRECATED), tvos(9.0, API_TO_BE_DEPRECATED)) API_UNAVAILABLE(macos) = 10,
// Input, Lowpass filter attenuation at 5KHz : decibels -100.0dB -> 0.0dB
// smaller values make direct sound more muffled; a value of 0.0 indicates no filtering
// Obstruction is a filter applied to the "direct" part of the sound (so is post reverb send)
k3DMixerParam_ObstructionAttenuation API_DEPRECATED_WITH_REPLACEMENT("k3DMixerParam_ObstructionAttenuationInDecibels", ios(2.0, API_TO_BE_DEPRECATED), watchos(2.0, API_TO_BE_DEPRECATED), tvos(9.0, API_TO_BE_DEPRECATED)) API_UNAVAILABLE(macos) = 11,
#endif
#if TARGET_OS_OSX
// Desktop specific 3D mixer parameters -- deprecated
// Input, Dry/Wet equal-power blend, % 0.0 -> 100.0
k3DMixerParam_ReverbBlend API_DEPRECATED_WITH_REPLACEMENT("k3DMixerParam_DryWetReverbBlend", macos(10.0, API_TO_BE_DEPRECATED)) API_UNAVAILABLE(ios, watchos, tvos) = 5,
// Global, dB, -40.0 -> +40.0
k3DMixerParam_GlobalReverbGain API_DEPRECATED_WITH_REPLACEMENT("k3DMixerParam_GlobalReverbGainInDecibels", macos(10.0, API_TO_BE_DEPRECATED)) API_UNAVAILABLE(ios, watchos, tvos) = 6,
// Input, Lowpass filter attenuation at 5KHz : decibels -100.0dB -> 0.0dB
// smaller values make both direct and reverb sound more muffled; a value of 0.0 indicates no filtering
// Occlusion is a filter applied to the sound prior to the reverb send
k3DMixerParam_OcclusionAttenuation API_DEPRECATED_WITH_REPLACEMENT("k3DMixerParam_OcclusionAttenuationInDecibels", macos(10.0, API_TO_BE_DEPRECATED)) API_UNAVAILABLE(ios, watchos, tvos) = 7,
// Input, Lowpass filter attenuation at 5KHz : decibels -100.0dB -> 0.0dB
// smaller values make direct sound more muffled; a value of 0.0 indicates no filtering
// Obstruction is a filter applied to the "direct" part of the sound (so is post reverb send)
k3DMixerParam_ObstructionAttenuation API_DEPRECATED_WITH_REPLACEMENT("k3DMixerParam_ObstructionAttenuationInDecibels", macos(10.0, API_TO_BE_DEPRECATED)) API_UNAVAILABLE(ios, watchos, tvos) = 8,
// Input/Output, dB, -120->20, 0
k3DMixerParam_MinGain API_DEPRECATED_WITH_REPLACEMENT("k3DMixerParam_MinGainInDecibels", macos(10.0, API_TO_BE_DEPRECATED)) API_UNAVAILABLE(ios, watchos, tvos) = 9,
// Input/Output, dB, -120->20, 0
k3DMixerParam_MaxGain API_DEPRECATED_WITH_REPLACEMENT("k3DMixerParam_MaxGainInDecibels", macos(10.0, API_TO_BE_DEPRECATED)) API_UNAVAILABLE(ios, watchos, tvos) = 10,
#endif
// read-only
//
// For each of the following, use the parameter ID plus the channel number
// to get the specific parameter ID for a given channel.
// For example, k3DMixerParam_PostAveragePower indicates the left channel
// while k3DMixerParam_PostAveragePower + 1 indicates the right channel.
k3DMixerParam_PreAveragePower = 1000,
k3DMixerParam_PrePeakHoldLevel = 2000,
k3DMixerParam_PostAveragePower = 3000,
k3DMixerParam_PostPeakHoldLevel = 4000
};
// Parameters for the AUMultiChannelMixer unit
// these are available for both desktop and iphone
CF_ENUM(AudioUnitParameterID) {
// Global, Linear Gain, 0->1, 1. (the volume value can actually be any finite number, including negative.)
kMultiChannelMixerParam_Volume = 0,
// Global, Boolean, 0->1, 1
kMultiChannelMixerParam_Enable = 1,
// Global, Pan, -1->1, 0
kMultiChannelMixerParam_Pan = 2, // -1 - 0 - 1, only valid when output is not mono
// setting kAudioUnitProperty_MatrixLevels overrides any
// previously set kMultiChannelMixerParam_Pan and vice versa
// read-only, Input or Output scope.
// these report level in dB, as do the other mixers
kMultiChannelMixerParam_PreAveragePower = 1000,
kMultiChannelMixerParam_PrePeakHoldLevel = 2000,
kMultiChannelMixerParam_PostAveragePower = 3000,
kMultiChannelMixerParam_PostPeakHoldLevel = 4000
};
// Parameters for the AUMatrixMixer unit
CF_ENUM(AudioUnitParameterID) {
kMatrixMixerParam_Volume = 0,
kMatrixMixerParam_Enable = 1,
// read-only
// these report level in dB, as do the other mixers
kMatrixMixerParam_PreAveragePower = 1000,
kMatrixMixerParam_PrePeakHoldLevel = 2000,
kMatrixMixerParam_PostAveragePower = 3000,
kMatrixMixerParam_PostPeakHoldLevel = 4000,
// these report linear levels - for "expert" use only.
kMatrixMixerParam_PreAveragePowerLinear = 5000,
kMatrixMixerParam_PrePeakHoldLevelLinear = 6000,
kMatrixMixerParam_PostAveragePowerLinear = 7000,
kMatrixMixerParam_PostPeakHoldLevelLinear = 8000
};
// Output Units
// Parameters for the AudioDeviceOutput, DefaultOutputUnit, and SystemOutputUnit units
CF_ENUM(AudioUnitParameterID) {
// Global, LinearGain, 0->1, 1
kHALOutputParam_Volume = 14
};
// Parameters for the AUTimePitch, AUTimePitch (offline), AUPitch units
CF_ENUM(AudioUnitParameterID) {
kTimePitchParam_Rate = 0,
kTimePitchParam_Pitch = 1,
kTimePitchParam_EffectBlend = 2 // only for the AUPitch unit
};
// Parameters for AUNewTimePitch
CF_ENUM(AudioUnitParameterID) {
// rate control.
// Global, rate, 1/32 -> 32.0, 1.0
kNewTimePitchParam_Rate = 0,
// pitch shift in cents.
// Global, Cents, -2400 -> 2400, 1.0
kNewTimePitchParam_Pitch = 1,
// Overlap is the number of overlapped spectral windows that are used to produce the output.
// The value of overlap is directly proportional to CPU cost. More overlaps can make smooth
// passages sound smoother. For percussive sound, a lower overlap may be better.
// Global, generic, 3.0 -> 32.0, 8.0
kNewTimePitchParam_Overlap = 4,
// Peak locking enforces phase coherence of spectral peaks.
// Peak locking adds some expense but results in a less "phasey"
// or reverberant sound, sometimes also called loss of presence.
// However the flip side is that it can sound more stuttery for some content.
// Global, Boolean, 0->1, 1
kNewTimePitchParam_EnablePeakLocking = 6
};
// Parameters for the AUSampler unit
CF_ENUM(AudioUnitParameterID) {
// Global, dB, -90->12, 0
kAUSamplerParam_Gain = 900,
// Global, Semitones, -24->24, 0
kAUSamplerParam_CoarseTuning = 901,
// Global, Cents, -99->99, 0
kAUSamplerParam_FineTuning = 902,
// Global, -1.0->1.0, 0
kAUSamplerParam_Pan = 903
};
// Effect units
// The values for some effect unit parameters depend on the audio unit's sample rate.
// For example, maximum values are typically the Nyquist frequency (indicated here as
// SampleRate/2).
// Parameters for the AUBandpass unit
CF_ENUM(AudioUnitParameterID) {
// Global, Hz, 20->(SampleRate/2), 5000
kBandpassParam_CenterFrequency = 0,
// Global, Cents, 100->12000, 600
kBandpassParam_Bandwidth = 1
};
// Parameters for the AUHipass unit
CF_ENUM(AudioUnitParameterID) {
// Global, Hz, 10->(SampleRate/2), 6900
kHipassParam_CutoffFrequency = 0,
// Global, dB, -20->40, 0
kHipassParam_Resonance = 1
};
// Parameters for the AULowpass unit
CF_ENUM(AudioUnitParameterID) {
// Global, Hz, 10->(SampleRate/2), 6900
kLowPassParam_CutoffFrequency = 0,
// Global, dB, -20->40, 0
kLowPassParam_Resonance = 1
};
// Parameters for the AUHighShelfFilter unit
CF_ENUM(AudioUnitParameterID) {
// Global, Hz, 10000->(SampleRate/2), 10000
kHighShelfParam_CutOffFrequency = 0,
// Global, dB, -40->40, 0
kHighShelfParam_Gain = 1
};
// Parameters for the AULowShelfFilter unit
CF_ENUM(AudioUnitParameterID) {
// Global, Hz, 10->200, 80
kAULowShelfParam_CutoffFrequency = 0,
// Global, dB, -40->40, 0
kAULowShelfParam_Gain = 1
};
// Parameters for the AUParametricEQ unit
CF_ENUM(AudioUnitParameterID) {
// Global, Hz, 20->(SampleRate/2), 2000
kParametricEQParam_CenterFreq = 0,
// Global, Hz, 0.1->20, 1.0
kParametricEQParam_Q = 1,
// Global, dB, -20->20, 0
kParametricEQParam_Gain = 2
};
// Parameters for the AUPeakLimiter unit
CF_ENUM(AudioUnitParameterID) {
// Global, Secs, 0.001->0.03, 0.012
kLimiterParam_AttackTime = 0,
// Global, Secs, 0.001->0.06, 0.024
kLimiterParam_DecayTime = 1,
// Global, dB, -40->40, 0
kLimiterParam_PreGain = 2
};
// Parameters for the AUDynamicsProcessor unit
// Note that the dynamics processor does not have fixed compression ratios.
// Instead, kDynamicsProcessorParam_HeadRoom adjusts the amount of compression.
// Lower kDynamicsProcessorParam_HeadRoom values results in higher compression.
// The compression ratio is automatically adjusted to not exceed kDynamicsProcessorParam_Threshold + kDynamicsProcessorParam_HeadRoom values.
CF_ENUM(AudioUnitParameterID) {
// Global, dB, -40->20, -20
kDynamicsProcessorParam_Threshold = 0,
// Global, dB, 0.1->40.0, 5
kDynamicsProcessorParam_HeadRoom = 1,
// Global, rate, 1->50.0, 2
kDynamicsProcessorParam_ExpansionRatio = 2,
// Global, dB
kDynamicsProcessorParam_ExpansionThreshold = 3,
// Global, secs, 0.0001->0.2, 0.001
kDynamicsProcessorParam_AttackTime = 4,
// Global, secs, 0.01->3, 0.05
kDynamicsProcessorParam_ReleaseTime = 5,
// Global, dB, -40->40, 0
kDynamicsProcessorParam_OverallGain = 6,
kDynamicsProcessorParam_MasterGain API_DEPRECATED_WITH_REPLACEMENT("kDynamicsProcessorParam_OverallGain", ios(2.0, 2.0), watchos(2.0, 2.0), tvos(9.0, 9.0) ,macos(10.5,10.5)) = kDynamicsProcessorParam_OverallGain,
// Global, dB, read-only parameter
kDynamicsProcessorParam_CompressionAmount = 1000,
kDynamicsProcessorParam_InputAmplitude = 2000,
kDynamicsProcessorParam_OutputAmplitude = 3000
};
// Parameters for the AUVarispeed unit
CF_ENUM(AudioUnitParameterID) {
// Global, Rate, 0.25 -> 4.0, 1.0
kVarispeedParam_PlaybackRate = 0,
// Global, Cents, -2400 -> 2400, 0.0
kVarispeedParam_PlaybackCents = 1
};
// Parameters for the Distortion unit
CF_ENUM(AudioUnitParameterID) {
// Global, Milliseconds, 0.1 -> 500, 0.1
kDistortionParam_Delay = 0,
// Global, Rate, 0.1 -> 50, 1.0
kDistortionParam_Decay = 1,
// Global, Percent, 0 -> 100, 50
kDistortionParam_DelayMix = 2,
// Global, Percent, 0 -> 100
kDistortionParam_Decimation = 3,
// Global, Percent, 0 -> 100, 0
kDistortionParam_Rounding = 4,
// Global, Percent, 0 -> 100, 50
kDistortionParam_DecimationMix = 5,
// Global, Linear Gain, 0 -> 1, 1
kDistortionParam_LinearTerm = 6,
// Global, Linear Gain, 0 -> 20, 0
kDistortionParam_SquaredTerm = 7,
// Global, Linear Gain, 0 -> 20, 0
kDistortionParam_CubicTerm = 8,
// Global, Percent, 0 -> 100, 50
kDistortionParam_PolynomialMix = 9,
// Global, Hertz, 0.5 -> 8000, 100
kDistortionParam_RingModFreq1 = 10,
// Global, Hertz, 0.5 -> 8000, 100
kDistortionParam_RingModFreq2 = 11,
// Global, Percent, 0 -> 100, 50
kDistortionParam_RingModBalance = 12,
// Global, Percent, 0 -> 100, 0
kDistortionParam_RingModMix = 13,
// Global, dB, -80 -> 20, -6
kDistortionParam_SoftClipGain = 14,
// Global, Percent, 0 -> 100, 50
kDistortionParam_FinalMix = 15
};
// Parameters for the AUDelay unit
CF_ENUM(AudioUnitParameterID) {
// Global, EqPow Crossfade, 0->100, 50
kDelayParam_WetDryMix = 0,
// Global, Secs, 0->2, 1
kDelayParam_DelayTime = 1,
// Global, Percent, -100->100, 50
kDelayParam_Feedback = 2,
// Global, Hz, 10->(SampleRate/2), 15000
kDelayParam_LopassCutoff = 3
};
// Parameters for the AUSampleDelay unit
CF_ENUM(AudioUnitParameterID) {
// Global, Samples, 0->(SampleRate), 0
kSampleDelayParam_DelayFrames = 0
};
// Parameters for the AUNBandEQ unit
// Note that the parameter IDs listed correspond to band 0 (zero) of the unit. The parameter IDs for
// higher bands can be obtained by adding the zero-indexed band number to the corresponding band 0
// parameter ID up to the number of bands minus one, where the number of bands is described by the
// AUNBandEQ property kAUNBandEQProperty_NumberOfBands. For example, the parameter ID corresponding
// to the filter type of band 4 would be kAUNBandEQParam_FilterType + 3.
// kAUNBandEQParam_GlobalsGain is an overall gain and does not have a band.
CF_ENUM(AudioUnitParameterID) {
// Global, dB, -96->24, 0
kAUNBandEQParam_GlobalGain = 0,
// Global, Boolean, 0 or 1, 1
kAUNBandEQParam_BypassBand = 1000,
// Global, Indexed, 0->kNumAUNBandEQFilterTypes-1, 0
kAUNBandEQParam_FilterType = 2000,
// Global, Hz, 20->(SampleRate/2), 1000
kAUNBandEQParam_Frequency = 3000,
// Global, dB, -96->24, 0
kAUNBandEQParam_Gain = 4000,
// Global, octaves, 0.05->5.0, 0.5
kAUNBandEQParam_Bandwidth = 5000
};
/*!
@enum AUNBandEQ filter types
@brief Constants available as values for the kAUNBandEQParam_FilterType parameter defined above
@constant kAUNBandEQFilterType_Parametric
Parametric filter based on Butterworth analog prototype. Uses parameterization where
the bandwidth is specifed as the relationship of the upper bandedge frequency to the
lower bandedge frequency in octaves, where the upper and lower bandedge frequencies are
the respective frequencies above and below the center frequency at which the gain is
equal to half the peak gain.
Applicable parameters:
- kAUNBandEQParam_Frequency (center frequency)
- kAUNBandEQParam_Gain (peak gain)
- kAUNBandEQParam_Bandwidth
@constant kAUNBandEQFilterType_2ndOrderButterworthLowPass
Simple Butterworth 2nd order low pass filter
Applicable parameters:
- kAUNBandEQParam_Frequency (-3 dB cutoff frequency)
@constant kAUNBandEQFilterType_2ndOrderButterworthHighPass
Simple Butterworth 2nd order high pass filter
Applicable parameters:
- kAUNBandEQParam_Frequency (-3 dB cutoff frequency)
@constant kAUNBandEQFilterType_ResonantLowPass
Low pass filter with resonance support (via bandwidth parameter)
Applicable parameters:
- kAUNBandEQParam_Frequency (-3 dB cutoff frequency)
- kAUNBandEQParam_Bandwidth
@constant kAUNBandEQFilterType_ResonantHighPass
High pass filter with resonance support (via bandwidth parameter)
Applicable parameters:
- kAUNBandEQParam_Frequency (-3 dB cutoff frequency)
- kAUNBandEQParam_Bandwidth
@constant kAUNBandEQFilterType_BandPass
Band pass filter
Applicable parameters:
- kAUNBandEQParam_Frequency (center frequency)
- kAUNBandEQParam_Bandwidth
@constant kAUNBandEQFilterType_BandStop
Band stop filter (aka "notch filter")
Applicable parameters:
- kAUNBandEQParam_Frequency (center frequency)
- kAUNBandEQParam_Bandwidth
@constant kAUNBandEQFilterType_LowShelf
Low shelf filter
Applicable parameters:
- kAUNBandEQParam_Frequency (center frequency)
- kAUNBandEQParam_Gain (shelf gain)
@constant kAUNBandEQFilterType_HighShelf
High shelf filter
Applicable parameters:
- kAUNBandEQParam_Frequency (center frequency)
- kAUNBandEQParam_Gain (shelf gain)
@constant kAUNBandEQFilterType_ResonantLowShelf
Low shelf filter with resonance support (via bandwidth parameter)
Applicable parameters:
- kAUNBandEQParam_Frequency (center frequency)
- kAUNBandEQParam_Gain (shelf gain)
- kAUNBandEQParam_Bandwidth
@constant kAUNBandEQFilterType_ResonantHighShelf
High shelf filter with resonance support (via bandwidth parameter)
Applicable parameters:
- kAUNBandEQParam_Frequency (center frequency)
- kAUNBandEQParam_Gain (shelf gain)
- kAUNBandEQParam_Bandwidth
*/
CF_ENUM(long) {
kAUNBandEQFilterType_Parametric = 0,
kAUNBandEQFilterType_2ndOrderButterworthLowPass = 1,
kAUNBandEQFilterType_2ndOrderButterworthHighPass = 2,
kAUNBandEQFilterType_ResonantLowPass = 3,
kAUNBandEQFilterType_ResonantHighPass = 4,
kAUNBandEQFilterType_BandPass = 5,
kAUNBandEQFilterType_BandStop = 6,
kAUNBandEQFilterType_LowShelf = 7,
kAUNBandEQFilterType_HighShelf = 8,
kAUNBandEQFilterType_ResonantLowShelf = 9,
kAUNBandEQFilterType_ResonantHighShelf = 10,
kNumAUNBandEQFilterTypes = 11
};
// Parameters for the AURoundTripAACParam unit
CF_ENUM(AudioUnitParameterID) {
// Global, indexed : AAC, HE-AAC, HE-AACv2
kRoundTripAACParam_Format = 0,
// Global, indexed
kRoundTripAACParam_EncodingStrategy = 1,
// Global, indexed
kRoundTripAACParam_RateOrQuality = 2,
// These are deprecated:
#if !TARGET_OS_IPHONE
kRoundTripAACParam_BitRate = 1,
kRoundTripAACParam_Quality = 2,
kRoundTripAACParam_CompressedFormatSampleRate = 3
#endif
};
#pragma mark Apple Specific - Desktop
#if !TARGET_OS_IPHONE
// Some parameters for the AUGraphicEQ unit
CF_ENUM(AudioUnitParameterID) {
// Global, Indexed, currently either 10 or 31
kGraphicEQParam_NumberOfBands = 10000
};
// Parameters for the AUMatrixReverb unit
CF_ENUM(AudioUnitParameterID) {
// Global, EqPow CrossFade, 0->100, 100
kReverbParam_DryWetMix = 0,
// Global, EqPow CrossFade, 0->100, 50
kReverbParam_SmallLargeMix = 1,
// Global, Secs, 0.005->0.020, 0.06
kReverbParam_SmallSize = 2,
// Global, Secs, 0.4->10.0, 3.07
kReverbParam_LargeSize = 3,
// Global, Secs, 0.001->0.03, 0.025
kReverbParam_PreDelay = 4,
// Global, Secs, 0.001->0.1, 0.035
kReverbParam_LargeDelay = 5,
// Global, Genr, 0->1, 0.28
kReverbParam_SmallDensity = 6,
// Global, Genr, 0->1, 0.82
kReverbParam_LargeDensity = 7,
// Global, Genr, 0->1, 0.3
kReverbParam_LargeDelayRange = 8,
// Global, Genr, 0.1->1, 0.96
kReverbParam_SmallBrightness = 9,
// Global, Genr, 0.1->1, 0.49
kReverbParam_LargeBrightness = 10,
// Global, Genr, 0->1 0.5
kReverbParam_SmallDelayRange = 11,
// Global, Hz, 0.001->2.0, 1.0
kReverbParam_ModulationRate = 12,
// Global, Genr, 0.0 -> 1.0, 0.2
kReverbParam_ModulationDepth = 13,
};
// Parameters for the AUMultibandCompressor unit
CF_ENUM(AudioUnitParameterID) {
// Global, dB, -40 -> 40, 0
kMultibandCompressorParam_Pregain = 0,
// Global, dB, -40 -> 40, 0
kMultibandCompressorParam_Postgain = 1,
// Global, Hertz, 20 -> (SampleRate/2), 120.0
kMultibandCompressorParam_Crossover1 = 2,
// Global, Hertz, 20 -> (SampleRate/2), 700.0
kMultibandCompressorParam_Crossover2 = 3,
// Global, Hertz, 20 -> (SampleRate/2), 3000.0
kMultibandCompressorParam_Crossover3 = 4,
// Global, dB, -100.0 -> 0.0, -22.0
kMultibandCompressorParam_Threshold1 = 5,
// Global, dB, -100.0 -> 0.0, -32.0
kMultibandCompressorParam_Threshold2 = 6,
// Global, dB, -100.0 -> 0.0, -33.0
kMultibandCompressorParam_Threshold3 = 7,
// Global, dB, -100.0 -> 0.0, -36.0
kMultibandCompressorParam_Threshold4 = 8,
// Global, dB, 0.1 -> 40.0, 5.0
kMultibandCompressorParam_Headroom1 = 9,
// Global, dB, 0.1 -> 40.0, 12.0
kMultibandCompressorParam_Headroom2 = 10,
// Global, dB, 0.1 -> 40.0, 5.0
kMultibandCompressorParam_Headroom3 = 11,
// Global, dB, 0.1 -> 40.0, 7.5
kMultibandCompressorParam_Headroom4 = 12,
// Global, Secs, 0.001 -> 0.200, 0.080
kMultibandCompressorParam_AttackTime = 13,
// Global, Secs, 0.010 -> 3.0, 0.120
kMultibandCompressorParam_ReleaseTime = 14,
// Global, dB, -20 -> 20, 0
kMultibandCompressorParam_EQ1 = 15,
// Global, dB, -20 -> 20, 0
kMultibandCompressorParam_EQ2 = 16,
// Global, dB, -20 -> 20, 0
kMultibandCompressorParam_EQ3 = 17,
// Global, dB, -20 -> 20, 0
kMultibandCompressorParam_EQ4 = 18,
// read-only parameters
// Global, dB, 0 -> 20
kMultibandCompressorParam_CompressionAmount1 = 1000,
// Global, dB, 0 -> 20
kMultibandCompressorParam_CompressionAmount2 = 2000,
// Global, dB, 0 -> 20
kMultibandCompressorParam_CompressionAmount3 = 3000,
// Global, dB, 0 -> 20
kMultibandCompressorParam_CompressionAmount4 = 4000,
// Global, dB, -120 -> 20
kMultibandCompressorParam_InputAmplitude1 = 5000,
// Global, dB, -120 -> 20
kMultibandCompressorParam_InputAmplitude2 = 6000,
// Global, dB, -120 -> 20
kMultibandCompressorParam_InputAmplitude3 = 7000,
// Global, dB, -120 -> 20
kMultibandCompressorParam_InputAmplitude4 = 8000,
// Global, dB, -120 -> 20
kMultibandCompressorParam_OutputAmplitude1 = 9000,
// Global, dB, -120 -> 20
kMultibandCompressorParam_OutputAmplitude2 = 10000,
// Global, dB, -120 -> 20
kMultibandCompressorParam_OutputAmplitude3 = 11000,
// Global, dB, -120 -> 20
kMultibandCompressorParam_OutputAmplitude4 = 12000
};
// Parameters for the AUFilter unit
CF_ENUM(AudioUnitParameterID)
{
// Global, indexed, 0 -> 1, 0
kMultibandFilter_LowFilterType = 0,
// Global, Hertz, 10 -> (SampleRate/2), 100
kMultibandFilter_LowFrequency = 1,
// Global, dB, -18 -> +18, 0
kMultibandFilter_LowGain = 2,
// Global, Hertz, 10 -> (SampleRate/2), 100
kMultibandFilter_CenterFreq1 = 3,
// Global, dB, -18 -> +18, 0
kMultibandFilter_CenterGain1 = 4,
// Global, Octaves, 0.05 -> 3.0, 2.0
kMultibandFilter_Bandwidth1 = 5,
// Global, Hertz, 10 -> (SampleRate/2), 100
kMultibandFilter_CenterFreq2 = 6,
// Global, dB, -18 -> +18, 0
kMultibandFilter_CenterGain2 = 7,
// Global, Octaves, 0.05 -> 3.0, 2.0
kMultibandFilter_Bandwidth2 = 8,
// Global, Hertz, 10 -> (SampleRate/2), 100
kMultibandFilter_CenterFreq3 = 9,
// Global, dB, -18 -> +18, 0
kMultibandFilter_CenterGain3 = 10,
// Global, Octaves, 0.05 -> 3.0, 2.0
kMultibandFilter_Bandwidth3 = 11,
// Global, indexed, 0 -> 1, 0
kMultibandFilter_HighFilterType = 12,
// Global, Hertz, 10 -> (SampleRate/2), 100
kMultibandFilter_HighFrequency = 13,
// Global, dB, -18 -> +18, 0
kMultibandFilter_HighGain = 14
};
// Parameters for AURogerBeep
CF_ENUM(AudioUnitParameterID) {
// Global, dB, -80 -> 0, -6
kRogerBeepParam_InGateThreshold = 0,
// Global, Milliseconds, 0 -> 1000, 1000
kRogerBeepParam_InGateThresholdTime = 1,
// Global, dB, -80 -> 0, -6
kRogerBeepParam_OutGateThreshold = 2,
// Global, Milliseconds, 0 -> 1000, 1000
kRogerBeepParam_OutGateThresholdTime = 3,
// Global, indexed, 0 -> 2, 2
kRogerBeepParam_Sensitivity = 4,
// Global, indexed, 0 -> 2, 0
kRogerBeepParam_RogerType = 5,
// Global, dB, -80 -> 20, -6
kRogerBeepParam_RogerGain = 6
};
// Mixer Units
// Parameters for the Stereo Mixer unit
CF_ENUM(AudioUnitParameterID) {
// Input/Output, Mixer Fader Curve, 0->1, 1
kStereoMixerParam_Volume = 0,
// Input, Pan, 0->1, 0.5
kStereoMixerParam_Pan = 1,
// read-only
//
// For each of the following, use the parameter ID for the left channel
// and the parameter ID plus one for the right channel.
// For example, kStereoMixerParam_PostAveragePower indicates the left channel
// while kStereiMixerParam_PostAveragePower + 1 indicates the right channel.
kStereoMixerParam_PreAveragePower = 1000,
kStereoMixerParam_PrePeakHoldLevel = 2000,
kStereoMixerParam_PostAveragePower = 3000,
kStereoMixerParam_PostPeakHoldLevel = 4000
};
// Parameters for the AUNetReceive unit
CF_ENUM(AudioUnitParameterID) {
// Global, indexed, 0 -> 5, read only
kAUNetReceiveParam_Status = 0,
kAUNetReceiveParam_NumParameters = 1
};
// Parameters for the AUNetSend unit
CF_ENUM(AudioUnitParameterID) {
// Global, indexed, 0 -> 5, read only
kAUNetSendParam_Status = 0,
kAUNetSendParam_NumParameters = 1
};
// Status values for the AUNetSend and AUNetReceive units
enum {
kAUNetStatus_NotConnected = 0,
kAUNetStatus_Connected = 1,
kAUNetStatus_Overflow = 2,
kAUNetStatus_Underflow = 3,
kAUNetStatus_Connecting = 4,
kAUNetStatus_Listening = 5
};
// Music Device
// Parameters for the DLSMusicDevice unit - defined and reported in the global scope
CF_ENUM(AudioUnitParameterID) {
// Global, Cents, -1200, 1200, 0
kMusicDeviceParam_Tuning = 0,
// Global, dB, -120->40, 0
kMusicDeviceParam_Volume = 1,
// Global, dB, -120->40, 0
kMusicDeviceParam_ReverbVolume = 2
};
// In macOS v10.5, the DLSMusicDevice audio unit does not report parameters in the Group scope.
// However, parameter values can be set in Group scope that correspond to controller values defined
// by the MIDI specification. This includes the standard MIDI Controller values (such as Volume and
// Mod Wheel) as well as MIDI status messages (such as Pitch Bend and Channel Pressure) and the
// MIDI RPN control messages.
// For MIDI status messages, use a value of 0 for the "channel part" (lower four bits) when setting
// these parameters. This allows audio units to distinguish these IDs from the 0-127
// values used by MIDI controllers in the first byte of status messages.
//
// The element ID represents the group or channel number.
//
// You can use the MusicDeviceMIDIEvent function to send a MIDI formatted control command to a device.
//
// You can use the SetParameter API calls, declared in the AUComponent.h header file, as follows:
//
// scope == kAudioUnitScope_Group
// element == groupID -> in MIDI equivalent to channel number 0->15,
// but this is not a limitation of the MusicDevice and values greater than 15 can be specified
// paramID == midi controller value (0->127), (status bytes corresponding to pitch bend, channel pressure)
// value == typically the range associated with the corresponding MIDI message (7 bit, 0->127)
// pitch bend is specified as a 14 bit value
// See the MusicDevice.h header file for more about using the extended control semantics
// of this API.
#endif // !TARGET_OS_IPHONE
// `Analog' AudioUnits
// Parameters for the AURandom unit
CF_ENUM(AudioUnitParameterID) {
kRandomParam_BoundA = 0,
kRandomParam_BoundB = 1,
kRandomParam_Curve = 2
};
#pragma mark Apple Specific - iOS
// Parameters for the iOS reverb unit
CF_ENUM(AudioUnitParameterID) {
// Global, CrossFade, 0->100, 100
kReverb2Param_DryWetMix = 0,
// Global, Decibels, -20->20, 0
kReverb2Param_Gain = 1,
// Global, Secs, 0.0001->1.0, 0.008
kReverb2Param_MinDelayTime = 2,
// Global, Secs, 0.0001->1.0, 0.050
kReverb2Param_MaxDelayTime = 3,
// Global, Secs, 0.001->20.0, 1.0
kReverb2Param_DecayTimeAt0Hz = 4,
// Global, Secs, 0.001->20.0, 0.5
kReverb2Param_DecayTimeAtNyquist = 5,
// Global, Integer, 1->1000
kReverb2Param_RandomizeReflections = 6,
};
#endif //AudioUnit_AudioUnitParameters_h
#else
#include <AudioToolboxCore/AudioUnitParameters.h>
#endif
|
0 | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/AudioToolbox.framework | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/AudioToolbox.framework/Headers/CoreAudioClock.h | /*!
@file CoreAudioClock.h
@framework AudioToolbox.framework
@copyright (c) 2004-2015 by Apple, Inc., all rights reserved.
@abstract Services for audio and MIDI-related synchronization and
time unit conversions.
*/
#ifndef AudioToolbox_CoreAudioClock_h
#define AudioToolbox_CoreAudioClock_h
//==================================================================================================
#include <TargetConditionals.h>
#if TARGET_OS_OSX
#include <Availability.h>
#include <CoreAudioTypes/CoreAudioTypes.h>
#include <AudioToolbox/MusicPlayer.h>
CF_ASSUME_NONNULL_BEGIN
//==================================================================================================
/*!
@enum CAClockPropertyID
@abstract The properties of a CoreAudioClock, accessible via CAClockGetProperty and
CAClockSetProperty.
@constant kCAClockProperty_InternalTimebase
Type: CAClockTimebase. Selects the internal time reference for the clock
(currently, host time, an audio device, or audio output unit).
@constant kCAClockProperty_TimebaseSource
Type: according to the internal timebase. If the timebase is
kCAClockTimebase_AudioDevice, the value is an AudioDeviceID. For
kCAClockTimebase_AudioOutputUnit, the value is an AudioUnit.
@constant kCAClockProperty_SyncMode
Type: CAClockSyncMode. Selects between internal synchronization and multiple
external synchronization modes such as MIDI Time Code and MIDI beat clock.
@constant kCAClockProperty_SyncSource
Type: according to the sync mode. For kCAClockSyncMode_MIDIClockTransport or
kCAClockSyncMode_MTCTransport, the value is a MIDIEndpointRef.
@constant kCAClockProperty_SMPTEFormat
Type: CAClockSMPTEFormat. Specifies the SMPTE format (fps, drop or non-drop)
expected for received SMPTE messages, and used for transmitted SMPTE
messages and SMPTE time representations.
@constant kCAClockProperty_SMPTEOffset
Type: CAClockSeconds. The SMPTE time, represented in seconds since
00:00:00:00, corresponding to a timeline position of 0 seconds.
@constant kCAClockProperty_MIDIClockDestinations
Type: array of MIDIEndpointRef. When non-empty, the clock will transmit
MIDI beat clock to the MIDI endpoints in this list. (As of macOS 10.6,
the endpoints may be virtual sources. Previously, they had to be destinations.)
@constant kCAClockProperty_MTCDestinations
Type: array of MIDIEndpointRef. When non-empty, the clock will transmit
MIDI Time Code to the MIDI endpoints in this list. (As of macOS 10.6,
the endpoints may be virtual sources. Previously, they had to be destinations.)
@constant kCAClockProperty_MTCFreewheelTime
Type: CAClockSeconds. When the sync mode is MIDI Time Code, this controls
how long the reader will keep running after the last MTC message is received
before stopping (default: 1 sec). Should be at least ~4 SMPTE frames in
duration.
@constant kCAClockProperty_TempoMap
Type: array of CATempoMapEntry. Specifies a tempo map for the clock,
defining the relationship between timeline positions in seconds and musical
beats. Defaults to a constant tempo of 120 bpm.
@constant kCAClockProperty_MeterTrack
Type: array of CAMeterTrackEntry. Specifies the positions of musical time
signature changes in the timeline. Used only for converting between beats
and CABarBeatTime's (a display representation of a beat time).
@constant kCAClockProperty_Name
Type: CFStringRef. Sets a name for the clock. When a client sets the
property, the clock retains a reference to the string. When a client gets
the property, it receives a borrowed reference (i.e. the client must not
release the string).
@constant kCAClockProperty_SendMIDISPP
Type: UInt32. Specifies whether MIDI Song Position Pointer messages are
sent to the clock's MIDI clock destinations (if any). Available starting
in macOS 10.6.
*/
typedef CF_ENUM(UInt32, CAClockPropertyID) {
kCAClockProperty_InternalTimebase = 'intb',
kCAClockProperty_TimebaseSource = 'itbs',
kCAClockProperty_SyncMode = 'synm',
kCAClockProperty_SyncSource = 'syns',
kCAClockProperty_SMPTEFormat = 'smpf',
kCAClockProperty_SMPTEOffset = 'smpo',
kCAClockProperty_MIDIClockDestinations = 'mbcd',
kCAClockProperty_MTCDestinations = 'mtcd',
kCAClockProperty_MTCFreewheelTime = 'mtfw',
kCAClockProperty_TempoMap = 'tmpo',
kCAClockProperty_MeterTrack = 'metr',
kCAClockProperty_Name = 'name',
kCAClockProperty_SendMIDISPP = 'mspp'
};
/*!
@enum CAClockTimebase
@abstract The available internal hardware time references for a clock.
@constant kCAClockTimebase_HostTime
The clock's reference time is host time (as returned
by <code>mach_absolute_time()</code> or
<code>HostTime()</code>).
@constant kCAClockTimebase_AudioDevice
The clock's reference time is derived from an audio
device.
@constant kCAClockTimebase_AudioOutputUnit
The clock's reference time is derived from the audio
device addressed by an output Audio Unit.
*/
typedef CF_ENUM(UInt32, CAClockTimebase) {
kCAClockTimebase_HostTime = 'host',
kCAClockTimebase_AudioDevice = 'audi',
kCAClockTimebase_AudioOutputUnit = 'auou'
};
/*!
@enum CAClockSyncMode
@abstract Specifies internal synchronization, or an external sync source type.
@constant kCAClockSyncMode_Internal
The clock is not driven by an external sync source.
@constant kCAClockSyncMode_MIDIClockTransport
The clock is driven by MIDI beat clock received from a CoreMIDI source
endpoint.
@constant kCAClockSyncMode_MTCTransport
The clock is driven by MIDI Time Code received from a CoreMIDI source
endpoint.
*/
typedef CF_ENUM(UInt32, CAClockSyncMode) {
kCAClockSyncMode_Internal = 'intr', // sync to the internal timebase
kCAClockSyncMode_MIDIClockTransport = 'mclk', // sync to MIDI beat clock, external transport
kCAClockSyncMode_MTCTransport = 'mmtc' // sync to MIDI Time Code, external transport
};
/* From CoreAudioTypes.h:
enum {
kSMPTETimeType24 = 0,
kSMPTETimeType25 = 1,
kSMPTETimeType30Drop = 2,
kSMPTETimeType30 = 3,
kSMPTETimeType2997 = 4,
kSMPTETimeType2997Drop = 5
};
*/
// we can remove this after the SDK's have the real declaration.
#if !defined(COREAUDIOTYPES_VERSION) || COREAUDIOTYPES_VERSION <= 1051
#define SMPTETimeType UInt32
#endif
/*!
@typedef CAClockSMPTEFormat
@abstract A SMPTE format, specifying the frames per second (fps) and
whether it is drop frame.
The possible values of a CAClockSMPTEFormat are found in <CoreAudioTypes/CoreAudioTypes.h>.
Values include kSMPTETimeType30, kSMPTETimeType30Drop, etc. Note that formats with more than 30
fps are not usable with MIDI Time Code.
*/
typedef SMPTETimeType CAClockSMPTEFormat;
/*!
@enum CAClockMessage
@abstract The messages sent to a CAClockListenerProc to notify the client of
changes to the clock's state.
@constant kCAClockMessage_StartTimeSet
A new start time was set or received from an external sync source.
@constant kCAClockMessage_Started
The clock's time has started moving.
@constant kCAClockMessage_Stopped
The clock's time has stopped moving.
@constant kCAClockMessage_Armed
The client has called CAClockArm().
@constant kCAClockMessage_Disarmed
The client has called CAClockDisarm().
@constant kCAClockMessage_PropertyChanged
A clock property has been changed.
@constant kCAClockMessage_WrongSMPTEFormat
The clock is receiving SMPTE (MTC) messages in a SMPTE format that does not
match the clock's SMPTE format.
*/
typedef CF_ENUM(UInt32, CAClockMessage) {
kCAClockMessage_StartTimeSet = 'stim',
kCAClockMessage_Started = 'strt',
kCAClockMessage_Stopped = 'stop',
kCAClockMessage_Armed = 'armd',
kCAClockMessage_Disarmed = 'darm',
kCAClockMessage_PropertyChanged = 'pchg',
kCAClockMessage_WrongSMPTEFormat = '?smp'
};
/*!
@enum CAClockTimeFormat
@abstract The various units in which a clock can represent and report time.
@constant kCAClockTimeFormat_HostTime
Absolute host time, as returned by <code>mach_absolute_time()</code>.
@constant kCAClockTimeFormat_Samples
Absolute audio samples, as a Float64. Available when the internal timebase
is an audio device (or audio output unit). The units are in arbitrary sample
numbers, corresponding to the audio device's current time, and at the
device's current sample rate.
@constant kCAClockTimeFormat_Beats
Musical beats, as a Float64. This is a position on the clock's timeline.
@constant kCAClockTimeFormat_Seconds
Seconds, as a Float64. This is a position on the clock's timeline.
@constant kCAClockTimeFormat_SMPTESeconds
Seconds, as a Float64. This is the same as kCAClockTimeFormat_Seconds,
except that the clock's SMPTE offset has been applied.
@constant kCAClockTimeFormat_SMPTETime
SMPTETime structure.
*/
typedef CF_ENUM(UInt32, CAClockTimeFormat) {
kCAClockTimeFormat_HostTime = 'host',
kCAClockTimeFormat_Samples = 'samp',
kCAClockTimeFormat_Beats = 'beat', // relative position on media timeline
kCAClockTimeFormat_Seconds = 'secs', // relative position on media timeline
kCAClockTimeFormat_SMPTESeconds = 'smps', // absolute SMPTE position in seconds
kCAClockTimeFormat_SMPTETime = 'smpt', // SMPTETime structure
kCAClockTimeFormat_AbsoluteSeconds = 'asec'
};
CF_ENUM(OSStatus) { // errors
kCAClock_UnknownPropertyError = -66816,
kCAClock_InvalidPropertySizeError = -66815,
kCAClock_InvalidTimeFormatError = -66814,
kCAClock_InvalidSyncModeError = -66813,
kCAClock_InvalidSyncSourceError = -66812,
kCAClock_InvalidTimebaseError = -66811,
kCAClock_InvalidTimebaseSourceError = -66810,
kCAClock_InvalidSMPTEFormatError = -66809,
kCAClock_InvalidSMPTEOffsetError = -66808,
kCAClock_InvalidUnitError = -66807, // e.g. asking for audio samples when sync source
// not associated with an audio device
kCAClock_InvalidPlayRateError = -66806,
kCAClock_CannotSetTimeError = -66805 // can't SetCurrentTime unless stopped
// or can't SetCurrentTempo unless running
};
//==================================================================================================
/*!
@typedef CAClockRef
@abstract A reference to a Core Audio Clock object.
*/
typedef struct OpaqueCAClock * CAClockRef;
/*!
@typedef CAClockBeats
@abstract MIDI quarter notes (see MIDI specs)
*/
typedef Float64 CAClockBeats;
/*!
@typedef CAClockTempo
@abstract A musical tempo in beats per minute.
*/
typedef Float64 CAClockTempo; // beats per minute
/*
@typedef CAClockSamples
@abstract Audio samples.
*/
typedef Float64 CAClockSamples;
/*
@typedef CAClockSeconds
@abstract Seconds.
*/
typedef Float64 CAClockSeconds;
struct MIDIPacketList;
//==================================================================================================
/*!
@typedef CAClockListenerProc
@abstract A client-supplied function called when the clock's state changes.
@param userData
The value passed to CAClockAddListener when the callback function
was installed.
@param message
Signifies the kind of event which occurred.
@param param
This value is specific to the message (currently no messages have values).
*/
typedef void (*CAClockListenerProc)(void *userData, CAClockMessage message, const void *param);
/*!
@struct CAClockTime
@abstract Represents a time value using one of several possible units.
@var format
Specifies the time's format and units.
@var reserved
Must be 0.
@var time
The time value. Use the member of the union appropriate to the format (see the
description of CAClockTimeFormat).
*/
struct CAClockTime {
CAClockTimeFormat format;
UInt32 reserved;
union {
UInt64 hostTime;
CAClockSamples samples;
CAClockBeats beats;
CAClockSeconds seconds;
SMPTETime smpte;
} time;
};
typedef struct CAClockTime CAClockTime;
/*!
@struct CATempoMapEntry
@abstract A tempo change event.
The clock's tempo map defines the correspondence between seconds and musical
beats, and is used in conversions between the two.
@var beats
The beat time at which the tempo changes.
@var tempoBPM
The new tempo as of that time.
*/
struct CATempoMapEntry {
CAClockBeats beats;
CAClockTempo tempoBPM; // beats per minute
};
typedef struct CATempoMapEntry CATempoMapEntry;
/*!
@struct CAMeterTrackEntry
@abstract A time signature change event.
The meter track is used for converting between beats as floating-point
numbers (CAClockBeats) and their display representations (CABarBeatTime).
@var beats
The beat time at which the time signature (meter) changes.
@var meterNumer
The numerator of the new time signature.
@var meterDenom
The denominator of the new time signature (1, 2, 4, 8, etc.).
*/
struct CAMeterTrackEntry {
CAClockBeats beats;
UInt16 meterNumer;
UInt16 meterDenom; // 1,2,4,8 etc.
};
typedef struct CAMeterTrackEntry CAMeterTrackEntry;
//==================================================================================================
#ifdef __cplusplus
extern "C" {
#endif
// -----------------------------------------------------------------------------
/*!
@function CAClockNew
@abstract Create a new clock object.
@param inReservedFlags
Must be 0.
@param outCAClock
Must be non-null. On successful return, the new clock object.
@result An OSStatus error code.
*/
extern OSStatus
CAClockNew( UInt32 inReservedFlags,
CAClockRef __nullable * __nonnull outCAClock) API_AVAILABLE(macos(10.4)) API_UNAVAILABLE(ios, watchos, tvos);
// -----------------------------------------------------------------------------
/*!
@function CAClockDispose
@abstract Dispose a clock object.
@param inCAClock
The clock object to be disposed.
@result An OSStatus error code.
*/
extern OSStatus
CAClockDispose( CAClockRef inCAClock) API_AVAILABLE(macos(10.4)) API_UNAVAILABLE(ios, watchos, tvos);
// -----------------------------------------------------------------------------
/*!
@function CAClockGetPropertyInfo
@abstract Gets information about a clock's property.
@param inCAClock
The clock object.
@param inPropertyID
The property being queried.
@param outSize
If non-null, on exit, this is set to the size of the
property's value.
@param outWritable
If non-null, on exit, this indicates whether the
property value is settable.
@result An OSStatus error code.
*/
extern OSStatus
CAClockGetPropertyInfo( CAClockRef inCAClock,
CAClockPropertyID inPropertyID,
UInt32 * __nullable outSize,
Boolean * __nullable outWritable) API_AVAILABLE(macos(10.4)) API_UNAVAILABLE(ios, watchos, tvos);
// -----------------------------------------------------------------------------
/*!
@function CAClockGetProperty
@abstract Gets the current value of a clock's property.
@param inCAClock
The clock object.
@param inPropertyID
The property being fetched.
@param ioPropertyDataSize
On entry, the size (in bytes) of the memory pointed to
by outPropertyData. On exit, the actual size of the
property data returned.
@param outPropertyData
The value of the property is copied to the memory
this points to.
@result An OSStatus error code.
*/
extern OSStatus
CAClockGetProperty( CAClockRef inCAClock,
CAClockPropertyID inPropertyID,
UInt32 * ioPropertyDataSize,
void * outPropertyData) API_AVAILABLE(macos(10.4)) API_UNAVAILABLE(ios, watchos, tvos);
// -----------------------------------------------------------------------------
/*!
@function CAClockSetProperty
@abstract Changes the value of a clock's property.
@param inCAClock
The clock object.
@param inPropertyID
The property being set.
@param inPropertyDataSize
The size of the property data, in bytes.
@param inPropertyData
Points to the property's new value.
@result An OSStatus error code.
*/
extern OSStatus
CAClockSetProperty( CAClockRef inCAClock,
CAClockPropertyID inPropertyID,
UInt32 inPropertyDataSize,
const void * inPropertyData) API_AVAILABLE(macos(10.4)) API_UNAVAILABLE(ios, watchos, tvos);
// -----------------------------------------------------------------------------
/*!
@function CAClockAddListener
@abstract Adds a callback function to receive notifications of changes to the clock's
state.
Note: The CAClockListenerProc may be called on a realtime thread internal to
the clock object.
@param inCAClock
The clock object.
@param inListenerProc
The callback function.
@param inUserData
This value is passed to the callback function, in the userData
parameter.
@result An OSStatus error code.
*/
extern OSStatus
CAClockAddListener( CAClockRef inCAClock,
CAClockListenerProc inListenerProc,
void * inUserData) API_AVAILABLE(macos(10.4)) API_UNAVAILABLE(ios, watchos, tvos);
// -----------------------------------------------------------------------------
/*!
@function CAClockRemoveListener
@abstract Removes a listener callback function.
@param inCAClock
The clock object.
@param inListenerProc
The callback function.
@param inUserData
The same value as was passed for inUserData when this
function was registered with CAClockAddListener. (This
allows a single callback function to be registered more
than once, with different userData arguments.)
@result An OSStatus error code.
*/
extern OSStatus
CAClockRemoveListener( CAClockRef inCAClock,
CAClockListenerProc inListenerProc,
void * inUserData) API_AVAILABLE(macos(10.4)) API_UNAVAILABLE(ios, watchos, tvos);
// -----------------------------------------------------------------------------
/*!
@function CAClockSetCurrentTime
@abstract Sets the clock's current position on the media timeline.
Call this to specify where on the media timeline playback will begin. The
supplied time must be in seconds, beats, or SMPTE (not host time or audio
samples). Must only be called when stopped.
@param inCAClock
The clock object.
@param inTime
The new time position.
@result An OSStatus error code.
*/
extern OSStatus
CAClockSetCurrentTime( CAClockRef inCAClock,
const CAClockTime * inTime) API_AVAILABLE(macos(10.4)) API_UNAVAILABLE(ios, watchos, tvos);
// -----------------------------------------------------------------------------
/*!
@function CAClockGetCurrentTime
@abstract Obtain the clock's current position on the media timeline.
@param inCAClock
The clock object.
@param inTimeFormat
Specifies the desired format for outTime.
@param outTime
On exit, the clock's current time position.
@result An OSStatus error code.
*/
extern OSStatus
CAClockGetCurrentTime( CAClockRef inCAClock,
CAClockTimeFormat inTimeFormat,
CAClockTime * outTime) API_AVAILABLE(macos(10.4)) API_UNAVAILABLE(ios, watchos, tvos);
// -----------------------------------------------------------------------------
/*!
@function CAClockGetStartTime
@abstract Obtain the position on the media timeline where playback will start,
or has already started.
@param inCAClock
The clock object.
@param inTimeFormat
Specifies the desired format for outTime.
@param outTime
On exit, the clock's start time position.
@result An OSStatus error code.
*/
extern OSStatus
CAClockGetStartTime( CAClockRef inCAClock,
CAClockTimeFormat inTimeFormat,
CAClockTime * outTime) API_AVAILABLE(macos(10.4)) API_UNAVAILABLE(ios, watchos, tvos);
// -----------------------------------------------------------------------------
/*!
@function CAClockTranslateTime
@abstract Convert between time units.
@param inCAClock
The clock object.
@param inTime
The time to be converted.
@param inOutputTimeFormat
Specifies the desired format for outTime
@param outTime
On exit, a time corresponding to inTime, converted to the desired
time format.
@result An OSStatus error code.
*/
extern OSStatus
CAClockTranslateTime( CAClockRef inCAClock,
const CAClockTime * inTime,
CAClockTimeFormat inOutputTimeFormat,
CAClockTime * outTime) API_AVAILABLE(macos(10.4)) API_UNAVAILABLE(ios, watchos, tvos);
// -----------------------------------------------------------------------------
/*!
@function CAClockStart
@abstract Begin advancing the clock on its media timeline.
@param inCAClock
The clock object.
@result An OSStatus error code.
*/
extern OSStatus
CAClockStart( CAClockRef inCAClock) API_AVAILABLE(macos(10.4)) API_UNAVAILABLE(ios, watchos, tvos);
// -----------------------------------------------------------------------------
/*!
@function CAClockStop
@abstract Stop advancing the clock on its media timeline.
@param inCAClock
The clock object.
@result An OSStatus error code.
*/
extern OSStatus
CAClockStop( CAClockRef inCAClock) API_AVAILABLE(macos(10.4)) API_UNAVAILABLE(ios, watchos, tvos);
// -----------------------------------------------------------------------------
/*!
@function CAClockArm
@abstract Allow received sync messages to start the clock.
If a clock is following and being controlled by an external transport
(e.g. MIDI Time Code), call this to indicate that the client is ready to
start its transport in response to the external transport having started.
The external time source will set the clock's start position and start
the clock.
@param inCAClock
The clock object.
@result An OSStatus error code.
*/
extern OSStatus
CAClockArm( CAClockRef inCAClock) API_AVAILABLE(macos(10.4)) API_UNAVAILABLE(ios, watchos, tvos);
// -----------------------------------------------------------------------------
/*!
@function CAClockDisarm
@abstract Disallow received sync messages from starting the clock.
@param inCAClock
The clock object.
@result An OSStatus error code.
*/
extern OSStatus
CAClockDisarm( CAClockRef inCAClock) API_AVAILABLE(macos(10.4)) API_UNAVAILABLE(ios, watchos, tvos);
// -----------------------------------------------------------------------------
/*!
@function CAClockSetPlayRate
@abstract Alter the clock's playback rate.
Adjusts the ratio between the timebase and media time; e.g. at 0.5, the
media time will move half as quickly as timebase time.
@param inCAClock
The clock object.
@param inPlayRate
The clock's desired play rate.
@result An OSStatus error code.
*/
extern OSStatus
CAClockSetPlayRate( CAClockRef inCAClock,
Float64 inPlayRate) API_AVAILABLE(macos(10.4)) API_UNAVAILABLE(ios, watchos, tvos);
// -----------------------------------------------------------------------------
/*!
@function CAClockGetPlayRate
@abstract Obtain the clock's playback rate.
Returns the clock's current play rate. If the clock is internally synced,
this will be the last rate set by CAClockSetPlayRate. If the clock is
externally synced, it will be the rate of the external sync source, where
1.0 means that it is running at exactly the same rate as the clock's
timebase. (2.0 means twice as fast).
@param inCAClock
The clock object.
@param outPlayRate
On exit, the clock's playback rate.
@result An OSStatus error code.
*/
extern OSStatus
CAClockGetPlayRate( CAClockRef inCAClock,
Float64 * outPlayRate) API_AVAILABLE(macos(10.4)) API_UNAVAILABLE(ios, watchos, tvos);
// -----------------------------------------------------------------------------
/*!
@function CAClockGetCurrentTempo
@abstract Obtain the clock's current musical tempo.
Returns the current instantaneous tempo and a timestamp indicating where on the
timeline the tempo most recently changed.
If the clock is externally synced, the returned tempo will not reflect the
effective tempo; this routine always reflects the client-specified tempo. To
obtain the effective tempo, multiply the current tempo by the current play
rate.
@param inCAClock
The clock object.
@param outTempo
On exit, the current tempo.
@param outTimestamp
If non-null, on exit, the time at which the tempo last changed.
@result An OSStatus error code.
*/
extern OSStatus
CAClockGetCurrentTempo( CAClockRef inCAClock,
CAClockTempo * outTempo,
CAClockTime * __nullable outTimestamp) API_AVAILABLE(macos(10.4)) API_UNAVAILABLE(ios, watchos, tvos);
// -----------------------------------------------------------------------------
/*!
@function CAClockSetCurrentTempo
@abstract Manually override the clock's musical tempo during playback.
Effects a manual override of the tempo map while running. After stopping and
restarting, the original tempo map will be used again.
@param inCAClock
The clock object.
@param inTempo
The new desired tempo.
@param inTimestamp
Specifies a precise point on the timeline where the tempo change is to
take effect. If null, the tempo change takes effect immediately.
@result
An OSStatus error code. If this call is made while stopped,
kCAClock_CannotSetTimeError is returned.
*/
extern OSStatus
CAClockSetCurrentTempo( CAClockRef inCAClock,
CAClockTempo inTempo,
const CAClockTime * __nullable inTimestamp) API_AVAILABLE(macos(10.4)) API_UNAVAILABLE(ios, watchos, tvos);
// -----------------------------------------------------------------------------
/*!
@function CAClockSecondsToSMPTETime
@abstract Converts seconds to a SMPTE time representation.
Converts seconds on the media timeline to a SMPTE time. The clock's current
SMPTE format and offset must be set appropriately.
@param inCAClock
The clock object.
@param inSeconds
The number of seconds to be converted (e.g. 3600 = 1 hour).
@param inSubframeDivisor
The number of subframes per frame desired in outSMPTETime.
@param outSMPTETime
On exit, the SMPTE time corresponding to inSeconds.
@result An OSStatus error code.
*/
extern OSStatus
CAClockSecondsToSMPTETime( CAClockRef inCAClock,
CAClockSeconds inSeconds,
UInt16 inSubframeDivisor,
SMPTETime * outSMPTETime) API_AVAILABLE(macos(10.4)) API_UNAVAILABLE(ios, watchos, tvos);
// -----------------------------------------------------------------------------
/*!
@function CAClockSMPTETimeToSeconds
@abstract Converts a SMPTE time representation to seconds.
Converts SMPTE time to seconds on the media timeline. The clock's current
SMPTE format and offset must be set appropriately.
@param inCAClock
The clock object.
@param inSMPTETime
The SMPTE time to be converted to seconds.
@param outSeconds
On exit, the number of seconds corresponding to inSMPTETime.
@result An OSStatus error code.
*/
extern OSStatus
CAClockSMPTETimeToSeconds( CAClockRef inCAClock,
const SMPTETime * inSMPTETime,
CAClockSeconds * outSeconds) API_AVAILABLE(macos(10.4)) API_UNAVAILABLE(ios, watchos, tvos);
// -----------------------------------------------------------------------------
/*!
@function CAClockBeatsToBarBeatTime
@abstract Converts a number of beats to a CABarBeatTime structure.
Converts a beat position on the media timeline to a CABarBeatTime, using the
clock's meter track. Examples using 4/4 time and a subbeat divisor of 480:
inBeats | outBarBeatTime: bars . beats . units
--------|-------------------------------------
0 | 1.1.0
1 | 1.2.0
4 | 2.1.0
4.5 | 2.1.240
@param inCAClock
The clock object.
@param inBeats
The absolute beat count to be converted.
@param inSubbeatDivisor
The number of units per beat.
@param outBarBeatTime
On exit, the bar/beat/subbeat time corresponding to inBeats.
@result An OSStatus error code.
*/
extern OSStatus
CAClockBeatsToBarBeatTime( CAClockRef inCAClock,
CAClockBeats inBeats,
UInt16 inSubbeatDivisor,
CABarBeatTime * outBarBeatTime) API_AVAILABLE(macos(10.4)) API_UNAVAILABLE(ios, watchos, tvos);
// -----------------------------------------------------------------------------
/*!
@function CAClockBarBeatTimeToBeats
@abstract Converts a CABarBeatTime structure to a number of beats.
Converts a CABarBeatTime structure (bars/beats/subbeats) to a beat
position, using the clock's meter track.
@param inCAClock
The clock object.
@param inBarBeatTime
The bar/beat/subunit time to be converted to beats.
@param outBeats
On exit, the number of absolute beats corresponding to inBarBeatTime.
@result An OSStatus error code.
*/
extern OSStatus
CAClockBarBeatTimeToBeats( CAClockRef inCAClock,
const CABarBeatTime *inBarBeatTime,
CAClockBeats * outBeats) API_AVAILABLE(macos(10.4)) API_UNAVAILABLE(ios, watchos, tvos);
// -----------------------------------------------------------------------------
/*!
@function CAClockParseMIDI
@abstract Provides MIDI messages to a clock without using CoreMIDI
In some situations, a client may wish to drive a clock using MIDI Time Code or
beat clock obtained from a source other than Core MIDI. To do so,
construct MIDIPacketLists containing the timecode or beat clock messages,
and pass them to this function.
@param inCAClock
The clock object.
@param inMIDIPacketList
The MIDI events to be parsed.
@result An OSStatus error code.
*/
extern OSStatus
CAClockParseMIDI( CAClockRef inCAClock,
const struct MIDIPacketList *inMIDIPacketList) API_AVAILABLE(macos(10.5)) API_UNAVAILABLE(ios, watchos, tvos);
#ifdef __cplusplus
}
#endif
CF_ASSUME_NONNULL_END
#endif // TARGET_OS_OSX
#endif // AudioToolbox_CoreAudioClock_h
|
0 | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/AudioToolbox.framework | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/AudioToolbox.framework/Headers/AudioQueue.h | /*!
@file AudioQueue.h
@framework AudioToolbox.framework
@copyright (c) 2006-2015 by Apple, Inc., all rights reserved.
@abstract API's to record and play audio buffers.
Audio queues are software objects you use for recording or playing audio. Audio
queues perform the following tasks:
- Connect to audio hardware
- Manage audio data buffers
- Employ codecs, as necessary, for compressed audio formats
- Mediate playback or recording
Audio queues can record and play audio in linear PCM, in compressed formats (such as Apple
Lossless, AAC, and MP3), and in other formats for which users have installed codecs. The API set
includes high-level support for the use of hardware recording and playback devices, and lets you
use sophisticated codecs without knowledge of how they work.
Additional advanced features support scheduled playback and synchronization of multiple audio
queues and synchronization of audio with video.
*/
#ifndef AudioToolbox_AudioQueue_h
#define AudioToolbox_AudioQueue_h
#include <Availability.h>
#include <CoreAudioTypes/CoreAudioTypes.h>
#include <CoreFoundation/CoreFoundation.h>
#if defined(__BLOCKS__)
#include <dispatch/dispatch.h>
#endif
CF_ASSUME_NONNULL_BEGIN
#ifdef __cplusplus
extern "C" {
#endif
#pragma mark -
#pragma mark Constants
#pragma mark -
#pragma mark Types
//==================================================================================================
// TYPES
//==================================================================================================
/*!
@typedef AudioQueuePropertyID
@abstract A value that uniquely identifies an audio queue property.
*/
typedef UInt32 AudioQueuePropertyID;
/*!
@typedef AudioQueueParameterID
@abstract A value that uniquely identifies an audio queue parameter.
*/
typedef UInt32 AudioQueueParameterID;
/*!
@typedef AudioQueueParameterValue
@abstract A value for an audio queue parameter.
*/
typedef Float32 AudioQueueParameterValue;
/*!
@typedef AudioQueueRef
@abstract An opaque data type that represents an audio queue.
*/
typedef struct OpaqueAudioQueue * AudioQueueRef;
/*!
@typedef AudioQueueTimelineRef
@abstract An opaque data type that represents an audio queue timeline.
You can use this object to observe any overloads in the audio device associated with the
audio queue. A timeline object receives notifications of discontinuities in the audio
hardware's sample timeline--for instance, a period of silence when sound was expected.
Causes of discontinuities include changes in the device state or processing overloads.
See Technical Q & A: QA 1467 for a discussion of Core Audio overload warnings. These
warnings indicate you are taking too long to process audio data and the system has cut
you off. You query a timeline object by passing it as a parameter to
AudioQueueGetCurrentTime, which means a discontinuity has occurred.
*/
typedef struct OpaqueAudioQueueTimeline * AudioQueueTimelineRef;
//==================================================================================================
// CONSTANTS
//==================================================================================================
/*!
@enum Result Codes
@abstract The OSStatus result codes returned by Audio Queue functions.
@constant kAudioQueueErr_InvalidBuffer
The specified buffer does not belong to the audio queue.
@constant kAudioQueueErr_BufferEmpty
The buffer is empty (that is, the mAudioDataByteSize field = 0).
@constant kAudioQueueErr_DisposalPending
The function cannot act on the audio queue because it is being asynchronously
disposed of.
@constant kAudioQueueErr_InvalidProperty
The specified property ID is invalid.
@constant kAudioQueueErr_InvalidPropertySize
The size of the specified property is invalid.
@constant kAudioQueueErr_InvalidParameter
The specified parameter ID is invalid.
@constant kAudioQueueErr_CannotStart
The audio queue has encountered a problem and cannot start.
@constant kAudioQueueErr_InvalidDevice
The device assigned to the queue could not be located, or is not properly
configured.
@constant kAudioQueueErr_BufferInQueue
The buffer cannot be disposed of when it is enqueued.
@constant kAudioQueueErr_InvalidRunState
The queue is running but the function can only operate on the queue when it is
stopped, or vice versa.
@constant kAudioQueueErr_InvalidQueueType
The queue is an input queue but the function can only operate on an output
queue, or vice versa.
@constant kAudioQueueErr_Permissions
You do not have the required permissions to call the function
@constant kAudioQueueErr_InvalidPropertyValue
The specified property value is invalid.
@constant kAudioQueueErr_PrimeTimedOut
During Prime, the queue's AudioConverter failed to convert the requested number
of sample frames.
@constant kAudioQueueErr_CodecNotFound
The required audio codec was not found.
@constant kAudioQueueErr_InvalidCodecAccess
Access to the required codec is not permitted (possibly due to incompatible
AudioSession settings on iOS).
@constant kAudioQueueErr_QueueInvalidated
On iOS, the audio server has exited, causing this audio queue to have become
invalid.
@constant kAudioQueueErr_TooManyTaps
There can only be one processing tap per audio queue.
@constant kAudioQueueErr_InvalidTapContext
GetTapSourceAudio can only be called from the tap's callback.
@constant kAudioQueueErr_InvalidTapType
GetTapQueueTime can only be called on an output queue's tap.
@constant kAudioQueueErr_RecordUnderrun
During recording, data was lost because there was no enqueued buffer into which
to store it.
@constant kAudioQueueErr_BufferEnqueuedTwice
A buffer was enqueued twice on an input queue (before being returned as a result
of being filled or from Reset).
@constant kAudioQueueErr_CannotStartYet
Starting the audio queue failed because an internal reconfiguration (typically
initiated by a hardware stream format or sample rate change) was in progress.
Sleeping briefly and retrying is recommended.
@constant kAudioQueueErr_EnqueueDuringReset
During Reset, Stop, or Dispose, it is not permitted to enqueue buffers.
@constant kAudioQueueErr_InvalidOfflineMode
The operation requires the queue to be in offline mode but it isn't, or vice
versa. (Offline mode is entered and exited via
AudioQueueSetOfflineRenderFormat).
*/
CF_ENUM(OSStatus) {
kAudioQueueErr_InvalidBuffer = -66687,
kAudioQueueErr_BufferEmpty = -66686,
kAudioQueueErr_DisposalPending = -66685,
kAudioQueueErr_InvalidProperty = -66684,
kAudioQueueErr_InvalidPropertySize = -66683,
kAudioQueueErr_InvalidParameter = -66682,
kAudioQueueErr_CannotStart = -66681,
kAudioQueueErr_InvalidDevice = -66680,
kAudioQueueErr_BufferInQueue = -66679,
kAudioQueueErr_InvalidRunState = -66678,
kAudioQueueErr_InvalidQueueType = -66677,
kAudioQueueErr_Permissions = -66676,
kAudioQueueErr_InvalidPropertyValue = -66675,
kAudioQueueErr_PrimeTimedOut = -66674,
kAudioQueueErr_CodecNotFound = -66673,
kAudioQueueErr_InvalidCodecAccess = -66672,
kAudioQueueErr_QueueInvalidated = -66671,
kAudioQueueErr_TooManyTaps = -66670,
kAudioQueueErr_InvalidTapContext = -66669,
kAudioQueueErr_RecordUnderrun = -66668,
kAudioQueueErr_InvalidTapType = -66667,
kAudioQueueErr_BufferEnqueuedTwice = -66666,
kAudioQueueErr_CannotStartYet = -66665,
kAudioQueueErr_EnqueueDuringReset = -66632,
kAudioQueueErr_InvalidOfflineMode = -66626,
};
/*!
@enum Audio Queue Property IDs
@abstract Constants that identify properties for audio queues.
@constant kAudioQueueProperty_IsRunning
A read-only property whose value is a UInt32 that indicates whether or not the queue is
running. A notification is sent when the audio device starts or stops, which is not
necessarily when the start or stop function is called.
@constant kAudioQueueDeviceProperty_SampleRate
A read-only property whose value is a Float64 that indicates the sampling rate of the
associated audio device.
@constant kAudioQueueDeviceProperty_NumberChannels
A read-only property whose value is a UInt32 that indicates the number of channels in
the associated audio device.
@constant kAudioQueueProperty_CurrentDevice
A read/write property whose value is a CFStringRef that contains the unique identifier
(UID) of the associated audio device.
If the audio queue is tracking the default system device and the device changes, it will
generate a property changed notification for this property. You can then query the HAL
for info on the new default system device.
@constant kAudioQueueProperty_MagicCookie
A read/write property whose value is an audio format magic cookie. If the audio format
requires a magic cookie, you must set this property before enqueuing any buffers.
@constant kAudioQueueProperty_MaximumOutputPacketSize
A read-only UInt32 that indicates the size in bytes of the largest single packet of
data in the output format. This is mostly useful for recording/encoding variable bit rate
compressed data.
@constant kAudioQueueProperty_StreamDescription
A read-only AudioStreamBasicDescription that indicates the queue's recording format.
This is useful when recording, where you may specify a sample rate of 0 during
construction,
@constant kAudioQueueProperty_ChannelLayout
A read/write property whose value is an audio channel layout structure that describes
the audio queue's channel layout. The number of channels must match the format of the
queue. If more than two channels (for instance, a five-channel surround sound) exist in
the queue, there may be a need to specify a channel layout. This layout indicates the
specific order in which the channels do appear, such as left, then center, then right.
@constant kAudioQueueProperty_EnableLevelMetering
A read-write property whose value is a UInt32 that indicates whether metering of
audio levels is enabled for the audio queue. (0=off, 1=on).
@constant kAudioQueueProperty_CurrentLevelMeter
A read-only property whose value is an array of AudioQueueLevelMeter structures, one
array element per audio channel. The values in the AudioQueueLevelMeters are in the
range 0-1.
@constant kAudioQueueProperty_CurrentLevelMeterDB
A read-only property whose value is an array of AudioQueueLevelMeter structures, one
array element per audio channel. The values in the AudioQueueLevelMeters are in
decibels.
@constant kAudioQueueProperty_DecodeBufferSizeFrames
A read/write property whose value is a UInt32 that is the size of the buffer into which
an output audio queue decodes buffers. A large buffer provides more reliability and
better long-term performance at the expense of memory and decreased responsiveness
in some situations.
@constant kAudioQueueProperty_ConverterError
A read-only property whose value is a UInt32 indicating the most recent error (if any)
encountered by the queue's internal encoding/decoding process.
@constant kAudioQueueProperty_EnableTimePitch
A read/write property whose value is a UInt32 describing whether there is a time/pitch unit
inserted into the queue's audio signal chain. This property may only be set while
the queue is stopped.
@constant kAudioQueueProperty_TimePitchAlgorithm
A read/write property whose value is a UInt32 describing the time/pitch algorithm in use.
This property is only valid while a time/pitch has been inserted, and may only be changed
when the queue is not running.
@constant kAudioQueueProperty_TimePitchBypass
A read/write property whose value is a UInt32 describing whether the time/pitch unit
has been bypassed (1=bypassed, 0=not bypassed).
*/
CF_ENUM(AudioQueuePropertyID) {
kAudioQueueProperty_IsRunning = 'aqrn', //!< value is UInt32
kAudioQueueDeviceProperty_SampleRate = 'aqsr', // value is Float64
kAudioQueueDeviceProperty_NumberChannels = 'aqdc', // value is UInt32
kAudioQueueProperty_CurrentDevice = 'aqcd', // value is CFStringRef
kAudioQueueProperty_MagicCookie = 'aqmc', // value is void*
kAudioQueueProperty_MaximumOutputPacketSize = 'xops', // value is UInt32
kAudioQueueProperty_StreamDescription = 'aqft', // value is AudioStreamBasicDescription
kAudioQueueProperty_ChannelLayout = 'aqcl', // value is AudioChannelLayout
kAudioQueueProperty_EnableLevelMetering = 'aqme', // value is UInt32
kAudioQueueProperty_CurrentLevelMeter = 'aqmv', // value is array of AudioQueueLevelMeterState, 1 per channel
kAudioQueueProperty_CurrentLevelMeterDB = 'aqmd', // value is array of AudioQueueLevelMeterState, 1 per channel
kAudioQueueProperty_DecodeBufferSizeFrames = 'dcbf', // value is UInt32
kAudioQueueProperty_ConverterError = 'qcve', // value is UInt32
kAudioQueueProperty_EnableTimePitch = 'q_tp', // value is UInt32, 0/1
kAudioQueueProperty_TimePitchAlgorithm = 'qtpa', // value is UInt32. See values below.
kAudioQueueProperty_TimePitchBypass = 'qtpb', // value is UInt32, 1=bypassed
};
/*!
@enum Time/Pitch algorithms
@abstract Constants that identify values of kAudioQueueProperty_TimePitchAlgorithm
@constant kAudioQueueTimePitchAlgorithm_Spectral
Highest quality, most computationally expensive. Suitable for music.
Default algorithm on macOS.
@constant kAudioQueueTimePitchAlgorithm_TimeDomain
Modest quality, less expensive. Suitable for voice.
@constant kAudioQueueTimePitchAlgorithm_Varispeed
High quality, but pitch varies with rate.
*/
CF_ENUM(UInt32) {
kAudioQueueTimePitchAlgorithm_Spectral = 'spec',
kAudioQueueTimePitchAlgorithm_TimeDomain = 'tido',
kAudioQueueTimePitchAlgorithm_Varispeed = 'vspd'
};
#if TARGET_OS_IPHONE && !TARGET_OS_MACCATALYST
/*! @enum Time/Pitch algorithms (iOS only)
@constant kAudioQueueTimePitchAlgorithm_LowQualityZeroLatency
Low quality, very inexpensive. Suitable for brief fast-forward/rewind effects,
low quality voice. Default algorithm on iOS.
*/
CF_ENUM(UInt32) {
kAudioQueueTimePitchAlgorithm_LowQualityZeroLatency API_DEPRECATED("Low Quality Zero Latency algorithm is now Deprecated. Please choose from other available options", ios(2.0, 13.0), watchos(2.0, 6.0), tvos(9.0, 13.0)) API_UNAVAILABLE(macos) = 'lqzl',
};
#endif
#if TARGET_OS_IPHONE
/*!
@enum Audio Queue Property IDs
@abstract Audio Queue Property IDs (iOS 3.0 or greater only)
@constant kAudioQueueProperty_HardwareCodecPolicy
A UInt32 describing how the audio queue is to choose between a hardware or
software version of the codec required for its audio format. Its value is one of
the AudioQueueHardwareCodecPolicy constants below.
If the chosen codec is not available, or if a hardware codec is chosen and the
AudioSession category does not permit use of hardware codecs, attempts to Prime or Start
the queue will fail.
Use kAudioFormatProperty_Encoders or kAudioFormatProperty_Decoders to determine
whether the codec you are interested in using is available in hardware form,
software, or both.
Changing this property is not permitted while the queue is primed or running. Changing
this property at other times may cause any properties set on the codec to be lost.
DEPRECATED: Hardware codecs are no longer supported.
*/
CF_ENUM(AudioQueuePropertyID) {
kAudioQueueProperty_HardwareCodecPolicy = 'aqcp' // value is UInt32
};
/*!
@enum AudioQueueHardwareCodecPolicy constants
@abstract Values of kAudioQueueProperty_HardwareCodecPolicy (iOS 3.0 or greater only)
@constant kAudioQueueHardwareCodecPolicy_Default
If the required codec is available in both hardware and software forms, the audio queue
will choose a hardware codec if its AudioSession category permits, software otherwise.
If the required codec is only available in one form, that codec is chosen.
@constant kAudioQueueHardwareCodecPolicy_UseSoftwareOnly
The audio queue will choose a software codec if one is available.
@constant kAudioQueueHardwareCodecPolicy_UseHardwareOnly
The audio queue will choose a hardware codec if one is available and its use permitted
by the AudioSession category.
@constant kAudioQueueHardwareCodecPolicy_PreferSoftware
The audio queue will choose a software codec if one is available; if not, it will choose a
hardware codec if one is available and its use permitted by the AudioSession category.
@constant kAudioQueueHardwareCodecPolicy_PreferHardware
The audio queue will choose a hardware codec if one is available and its use permitted
by the AudioSession category; otherwise, it will choose a software codec if one is available.
DEPRECATED: Hardware codecs are no longer supported.
*/
CF_ENUM(UInt32) {
kAudioQueueHardwareCodecPolicy_Default = 0,
kAudioQueueHardwareCodecPolicy_UseSoftwareOnly = 1,
kAudioQueueHardwareCodecPolicy_UseHardwareOnly = 2,
kAudioQueueHardwareCodecPolicy_PreferSoftware = 3,
kAudioQueueHardwareCodecPolicy_PreferHardware = 4
};
#endif // TARGET_OS_IPHONE
/*!
@enum Audio Queue Property IDs
@abstract Audio Queue Property IDs (iOS 6.0 or greater only)
@constant kAudioQueueProperty_ChannelAssignments
A write-only property whose value is an array of AudioQueueChannelAssignment. There must be
one array element for each channel of the queue's format as specified in the
AudioStreamBasicDescription passed to AudioQueueNewOutput or AudioQueueNewInput.
(New in iOS 6.0).
*/
CF_ENUM(AudioQueuePropertyID) {
kAudioQueueProperty_ChannelAssignments = 'aqca'
} API_AVAILABLE(ios(9.0), watchos(2.0), tvos(9.0), macos(10.15));
/*!
@enum AudioQueue parameter IDs
@abstract Constants that identify the parameters for audio queues.
You can set a parameter in one of two ways:
- Assign a parameter value to an audio queue to take effect immediately using
AudioQueueSetParameter.
- Schedule a parameter to take effect when a buffer is enqueued. You supply the
parameter when you queue a buffer, and the new value of the parameter is applied
when that buffer is rendered.
AudioQueueGetParameter always returns the current value of the parameter
@constant kAudioQueueParam_Volume
A value from 0.0 to 1.0 indicating the linearly scaled gain for the queue. A value of
1.0 (the default) indicates unity gain. A value of 0.0 indicates zero gain, or silence.
@constant kAudioQueueParam_PlayRate
A value from 0.5 to 2.0 indicating the rate at which the queue is to play. A value of
1.0 (the default) indicates that the queue should play at its normal rate. Only
applicable when the time/pitch processor has been enabled and on macOS 10.6 and higher.
@constant kAudioQueueParam_Pitch
A value from -2400 to 2400 indicating the number of cents to pitch-shift the queue's
playback. (1200 cents is one octave.) Only applicable when the time/pitch processor has
been enabled with the spectral algorithm, and on macOS 10.6 and higher.
@constant kAudioQueueParam_VolumeRampTime
A value indicating the number of seconds over which subsequent volume changes will be
ramped. For example, to fade out from full unity gain to silence over the course of 1
second, set kAudioQueueParam_VolumeRampTime to 1 then kAudioQueueParam_Volume to 0.
@constant kAudioQueueParam_Pan
A value from -1 to 1 indicating the pan position of a mono source (-1 = hard left, 0 =
center, 1 = hard right). For a stereo source this parameter affects left/right balance.
For multi-channel sources, this parameter has no effect.
*/
CF_ENUM(AudioQueueParameterID)
{
kAudioQueueParam_Volume = 1,
kAudioQueueParam_PlayRate = 2,
kAudioQueueParam_Pitch = 3,
kAudioQueueParam_VolumeRampTime = 4,
kAudioQueueParam_Pan = 13
};
/*!
@enum AudioQueueProcessingTapFlags
@abstract Flags used in conjunction with processing taps
In the flags passed to AudioQueueProcessingTapNew, either the PreEffects
or PostEffects flag must be set, but not both.
@constant kAudioQueueProcessingTap_PreEffects
Signifies that the processing tap is inserted before any effects.
Passed to AudioQueueProcessingTapNew and to the callback.
@constant kAudioQueueProcessingTap_PostEffects
Signifies that the processing tap is inserted after any effects.
Passed to AudioQueueProcessingTapNew and to the callback.
@constant kAudioQueueProcessingTap_Siphon
Signifies that the processing tap is a siphon; it does not call
GetSourceAudio. The callback instead receives the source audio
and may not modify it. Passed to AudioQueueProcessingTapNew and to the callback.
@constant kAudioQueueProcessingTap_StartOfStream
Signifies that the source audio is the beginning of a continuous stream,
i.e. following the beginning or resumption of playback or recording.
Returned from GetSourceAudio.
@constant kAudioQueueProcessingTap_EndOfStream
Signifies that the source audio is past the end of stream. This happens when
the audio queue is being stopped asynchronously and has finished playing
all of its data. Returned from GetSourceAudio and should be propagated
on return from the callback.
*/
typedef CF_OPTIONS(UInt32, AudioQueueProcessingTapFlags) {
// these are flags that are passed to both the constructor and the callback
kAudioQueueProcessingTap_PreEffects = (1 << 0), // 0x01
kAudioQueueProcessingTap_PostEffects = (1 << 1), // 0x02
kAudioQueueProcessingTap_Siphon = (1 << 2), // 0x04
// these are flags that are passed to the callback and from GetSourceAudio
kAudioQueueProcessingTap_StartOfStream = (1 << 8), // 0x100
kAudioQueueProcessingTap_EndOfStream = (1 << 9), // 0x200
};
#pragma mark -
#pragma mark Structs
//==================================================================================================
// STRUCTS
//==================================================================================================
/*!
@struct AudioQueueBuffer
@abstract Defines a buffer of audio data to be managed by an audio queue.
Each audio queue has an associated set of audio queue buffers. You can request that a
queue allocate buffers using the AudioQueueAllocateBuffer function and dispose of them
using the AudioQueueFreeBuffer function.
You may also use AudioQueueAllocateBufferWithPacketDescriptions to allocate buffers
with space for AudioPacketDescriptions, as used in VBR formats. The
mPacketDescriptionCapacity, mmPacketDescriptions, and mPacketDescriptionCount
fields may only be used with buffers allocated with this function.
@var mAudioDataBytesCapacity
The size of the buffer, in bytes. This size is set when the buffer is allocated and
cannot be changed.
@var mAudioData
A pointer to the audio data in the buffer. Although you can write data to this buffer,
you cannot make it point to another address.
@var mAudioDataByteSize
The number of bytes of valid audio data in the buffer. You set this value when providing
data for playback; the audio queue sets this value when recording data from a recording
queue.
@var mUserData
A value you may specify to identify the buffer when it is passed back in recording or
playback callback functions.
@var mPacketDescriptionCapacity
The maximum number of packet descriptions that can be stored in mPacketDescriptions.
@var mPacketDescriptions
An array of AudioStreamPacketDescriptions associated with the buffer.
@var mPacketDescriptionCount
The number of valid packet descriptions in the buffer. You set this value when providing
buffers for playback; the audio queue sets this value when returning buffers from
a recording queue.
*/
typedef struct AudioQueueBuffer {
const UInt32 mAudioDataBytesCapacity;
void * const mAudioData;
UInt32 mAudioDataByteSize;
void * __nullable mUserData;
const UInt32 mPacketDescriptionCapacity;
AudioStreamPacketDescription * const __nullable mPacketDescriptions;
UInt32 mPacketDescriptionCount;
#ifdef __cplusplus
AudioQueueBuffer() : mAudioDataBytesCapacity(0), mAudioData(0), mPacketDescriptionCapacity(0), mPacketDescriptions(0) { }
#endif
} AudioQueueBuffer;
/*!
@typedef AudioQueueBufferRef
@abstract An pointer to an AudioQueueBuffer.
*/
typedef AudioQueueBuffer *AudioQueueBufferRef;
/*!
@struct AudioQueueParameterEvent
@abstract Specifies a value for an audio queue parameter.
Two ways are available to supply an audio queue with parameters:
- Provide one or more parameters by calling the AudioQueueEnqueueBufferWithParameters
function. In this case, the parameters are applied to the specified buffer when it is
played.
- Assign a parameter value immediately to an audio queue by calling the
AudioQueueSetParameter function.
Note that the AudioQueueGetParameter function always returns the actual value of the
parameter.
In macOS v10.5, audio queues have one parameter available: kAudioQueueParam_Volume,
which controls the queue's playback volume.
@var mID
The parameter.
@var mValue
The value of the specified parameter.
*/
struct AudioQueueParameterEvent {
AudioQueueParameterID mID;
AudioQueueParameterValue mValue;
};
typedef struct AudioQueueParameterEvent AudioQueueParameterEvent;
/*!
@struct AudioQueueLevelMeterState
@abstract Specifies the current level metering information for one channel of an audio queue.
@var mAveragePower
The audio channel's average RMS power.
@var mPeakPower
The audio channel's peak RMS power
*/
typedef struct AudioQueueLevelMeterState {
Float32 mAveragePower;
Float32 mPeakPower;
} AudioQueueLevelMeterState;
/*!
@typedef AudioQueueProcessingTapRef
@abstract An object for intercepting and processing audio within an audio queue.
*/
typedef struct OpaqueAudioQueueProcessingTap * AudioQueueProcessingTapRef;
/*!
@struct AudioQueueChannelAssignment
@abstract Specifies an audio device channel to which the queue will play or from which
it will record.
@var mDeviceUID
On iOS, this is a port UID obtained from AVAudioSession. On macOS, this is the UID
obtained from an AudioDeviceID.
@var mChannelNumber
The 1-based index of the channel.
*/
typedef struct AudioQueueChannelAssignment {
CFStringRef mDeviceUID;
UInt32 mChannelNumber;
} AudioQueueChannelAssignment;
#pragma mark -
#pragma mark Callbacks
//==================================================================================================
// CALLBACKS
//==================================================================================================
#if defined(__BLOCKS__)
/*!
@typedef AudioQueueOutputCallbackBlock
@abstract Defines a pointer to a block that is called when a playback audio
queue has finished taking data from a buffer.
A playback buffer callback is invoked when the audio queue has finished with the data to
be played and the buffer is available to your application for reuse. Your application
might want to immediately refill and re-enqueue the completed buffer at this time.
@param inAQ
The audio queue that invoked the callback.
@param inBuffer
The audio queue buffer made available by the audio queue.
*/
typedef void (^AudioQueueOutputCallbackBlock)(
AudioQueueRef inAQ,
AudioQueueBufferRef inBuffer);
/*!
@typedef AudioQueueInputCallbackBlock
@abstract Defines a pointer to a block that is called when a recording audio
queue has finished filling a buffer.
You specify a recording buffer callback when calling AudioQueueNewInput. Your callback
is invoked each time the recording audio queue has filled a buffer with input data.
Typically, your callback should write the audio queue buffer's data to a file or other
buffer, and then re-queue the audio queue buffer to receive more data.
@param inAQ
The audio queue that invoked the callback.
@param inBuffer
An audio queue buffer, newly filled by the audio queue, containing the new audio data
your callback needs to write.
@param inStartTime
A pointer to an audio time stamp structure corresponding to the first sample contained
in the buffer. This contains the sample time of the first sample in the buffer.
@param inNumberPacketDescriptions
The number of audio packets contained in the data provided to the callback
@param inPacketDescs
For compressed formats which require packet descriptions, the packet descriptions
produced by the encoder for the incoming buffer.
*/
typedef void (^AudioQueueInputCallbackBlock)(
AudioQueueRef inAQ,
AudioQueueBufferRef inBuffer,
const AudioTimeStamp * inStartTime,
UInt32 inNumberPacketDescriptions,
const AudioStreamPacketDescription * __nullable inPacketDescs);
#endif // defined(__BLOCKS__)
/*!
@typedef AudioQueueOutputCallback
@abstract Defines a pointer to a callback function that is called when a playback audio
queue has finished taking data from a buffer.
A playback buffer callback is invoked when the audio queue has finished with the data to
be played and the buffer is available to your application for reuse. Your application
might want to immediately refill and re-enqueue the completed buffer at this time.
@param inUserData
The value specified by the inUserData parameter of the AudioQueueNewOutput function.
@param inAQ
The audio queue that invoked the callback.
@param inBuffer
The audio queue buffer made available by the audio queue.
*/
typedef void (*AudioQueueOutputCallback)(
void * __nullable inUserData,
AudioQueueRef inAQ,
AudioQueueBufferRef inBuffer);
/*!
@typedef AudioQueueInputCallback
@abstract Defines a pointer to a callback function that is called when a recording audio
queue has finished filling a buffer.
You specify a recording buffer callback when calling AudioQueueNewInput. Your callback
is invoked each time the recording audio queue has filled a buffer with input data.
Typically, your callback should write the audio queue buffer's data to a file or other
buffer, and then re-queue the audio queue buffer to receive more data.
@param inUserData
The value you've specified in the inUserData parameter of the AudioQueueNewInput
function.
@param inAQ
The audio queue that invoked the callback.
@param inBuffer
An audio queue buffer, newly filled by the audio queue, containing the new audio data
your callback needs to write.
@param inStartTime
A pointer to an audio time stamp structure corresponding to the first sample contained
in the buffer. This contains the sample time of the first sample in the buffer.
@param inNumberPacketDescriptions
The number of audio packets contained in the data provided to the callback
@param inPacketDescs
For compressed formats which require packet descriptions, the packet descriptions
produced by the encoder for the incoming buffer.
*/
typedef void (*AudioQueueInputCallback)(
void * __nullable inUserData,
AudioQueueRef inAQ,
AudioQueueBufferRef inBuffer,
const AudioTimeStamp * inStartTime,
UInt32 inNumberPacketDescriptions,
const AudioStreamPacketDescription * __nullable inPacketDescs);
/*!
@typedef AudioQueuePropertyListenerProc
@abstract Defines a pointer to a callback function that is called when a specified
property changes value.
You assign a property listener callback when calling AudioQueueAddPropertyListener.
@param inUserData
A pointer to the data specified by the inUserData parameter of the
AudioQueueAddPropertyListener function.
@param inAQ
The audio queue that invoked the callback.
@param inID
The ID of the property that invoked the callback.
*/
typedef void (*AudioQueuePropertyListenerProc)(
void * __nullable inUserData,
AudioQueueRef inAQ,
AudioQueuePropertyID inID);
/*!
@typedef AudioQueueProcessingTapCallback
@abstract A function called when an audio queue has data to be processed by its tap
A processing callback is invoked when the audio queue has data that can be processed by a given
tap.
The audio queue will call the processing callback when it has sufficient data to provide for
processing.
In the case of a siphoning tap, the callback function can inspect the audio data in ioData, but
should not otherwise modify it. The callback should not call
AudioQueueProcessingTapGetSourceAudio.
A non-siphoning callback should call AudioQueueProcessingTapGetSourceAudio to request from the
queue as much source data as it needs in order to produce the requested number of output
samples. When the callback requests source data it may receive less data than it requests.
In the case of a tap on an audio output queue, the tap must emit the exact number of sample
frames that the queue requests. In normal circumstances, the tap's requests for source data will
be satisfied (as the client running the audio queue is also providing the queue with the audio
source material). If there is insufficient source data available (this is indicated by the
outNumberFrames from the GetSource call), then the processing tap should deal as best as it can;
it can either return less data than was requested or insert silence, noise, etc. itself. If it
returns less data than requested, the hosting audio queue will fill in the remainder with
silence.
In the case of a tap on an audio input queue, the tap may provide back less audio data than is
being requested. Typically this will occur because the tap will ask for source data that is not
available at this time (the audio input hasn't arrived yet), so the tap should cache the source
data that it needs and return as many processed samples as it can. If the processing tap falls
behind and is not providing data quickly enough silence will be generated in the data provided
to the client (and there is no signal about this either).
A processing tap executes in a semi-real-time context, so the general limitations for real-time
processing apply. Avoid using API's which may block. In particular, it is not safe to call the
audio queue on which the tap was installed, with the exceptions of
AudioQueueProcessingTapGetSourceAudio and AudioQueueProcessingTapGetQueueTime.
In normal operation the source data will be continuous from the last time the callback was
called and the processed samples should be continuous from the previous samples returned. If
there is any discontinuity between the last samples provided for processing the audio queue will
set the bit for kAudioQueueProcessing_StartOfStream in the inFlags. After a discontinuity the
first sample that the processing tap outputs should correspond to the first sample that was
provided in the source samples (so a reset and then consequent process serves to re-anchor a
relationship between the processing tap's source and processed samples). In this case the
processing tap will typically discard any previous state (for instance, if a processing tap was
adding a reverb to a signal, then the discontinuity flag would act the same as AudioUnitReset;
any previous source information in the processing tap should be discarded).
The caller is responsible for absorbing any processing delays. For example, if the processing is
to be done by an audio unit that reports a processing latency, then the caller should remove
those latency samples from the audio unit's rendering and not return them to the audio queue.
The processing tap is able to operate on the provided source data in place (that is, it can do
"in place processing") and return pointers to that buffer rather than its own. This works in a
similar way as AudioUnit render operations.
When an output audio queue is being stopped asynchronously, the processing tap will see the
kAudioQueueProcessingTap_EndOfStream bit set on return from GetSourceAudio, and is responsible
for propagating this bit from the callback when its processing has reached this point.
A processing tap will NEVER see the same source data again, so, it should keep its own copy if
it needs to keep it for further reference past the duration of this call. It also cannot assume
that the pointers to the source data that it retrieves will remain valid AFTER the processing
tap has executed.
The processing tap should ensure that the data pointers it provides in outProcessedData remain
valid until the tap is executed again.
A processing tap is destroyed implicitly when its audio queue is disposed. It may also be
removed explicitly, via AudioQueueProcessingTapDispose.
@param inClientData
the client data pointer passed to AudioQueueProcessingTapNew
@param inAQTap
The tap for this callback.
@param inNumberFrames
The requested number of sample frames to be rendered.
@param ioFlags
On entry, the flags passed at construction time are provided. On exit,
the start/end of stream flags should be set when appropriate.
@param ioTimeStamp
On an input audio queue, the timestamp must be returned from this function.
On an output audio queue, the callback is provided a continuous timestamp.
@param outNumberFrames
The number of frames of audio data provided in the processed data. Can be 0.
@param ioData
For non-siphoning taps, on entry, the buffer pointers are null and the lengths
are zero. On exit, they should contain the tap's output.
Siphoning taps receive valid buffers which they must not alter.
*/
typedef void (*AudioQueueProcessingTapCallback)(
void * inClientData,
AudioQueueProcessingTapRef inAQTap,
UInt32 inNumberFrames,
AudioTimeStamp * ioTimeStamp,
AudioQueueProcessingTapFlags * ioFlags,
UInt32 * outNumberFrames,
AudioBufferList * ioData);
//==================================================================================================
// FUNCTIONS
//==================================================================================================
#pragma mark -
#pragma mark Creating/destroying queues
//=============================================================================
// Creating/destroying queues
//=============================================================================
/*!
@function AudioQueueNewOutput
@abstract Creates a new audio queue for playing audio data.
To create an playback audio queue, you allocate buffers, then queue buffers (using
AudioQueueEnqueueBuffer). The callback receives buffers and typically queues them again.
To schedule a buffer for playback, providing parameter and start time information, call
AudioQueueEnqueueBufferWithParameters.
@param inFormat
A pointer to a structure describing the format of the audio data to be played. For
linear PCM, only interleaved formats are supported. Compressed formats are supported.
@param inCallbackProc
A pointer to a callback function to be called when the audio queue has finished playing
a buffer.
@param inUserData
A value or pointer to data that you specify to be passed to the callback function.
@param inCallbackRunLoop
The event loop on which inCallbackProc is to be called. If you specify NULL, the
callback is called on one of the audio queue's internal threads.
@param inCallbackRunLoopMode
The run loop mode in which to call the callback. Typically, you pass
kCFRunLoopCommonModes. (NULL also specifies kCFRunLoopCommonModes). Other
possibilities are implementation specific. You can choose to create your own thread with
your own run loops. For more information on run loops, see Run Loops or CFRunLoop
Reference.
@param inFlags
Reserved for future use. Pass 0.
@param outAQ
On return, this variable contains a pointer to the newly created playback audio queue
object.
@result An OSStatus result code.
*/
extern OSStatus
AudioQueueNewOutput( const AudioStreamBasicDescription *inFormat,
AudioQueueOutputCallback inCallbackProc,
void * __nullable inUserData,
CFRunLoopRef __nullable inCallbackRunLoop,
CFStringRef __nullable inCallbackRunLoopMode,
UInt32 inFlags,
AudioQueueRef __nullable * __nonnull outAQ) API_AVAILABLE(macos(10.5), ios(2.0), watchos(2.0), tvos(9.0));
/*!
@function AudioQueueNewInput
@abstract Creates a new audio queue for recording audio data.
Outline of how to use the queue for input:
- create input queue
- allocate buffers
- enqueue buffers (AudioQueueEnqueueBuffer, not with parameters, no packet descriptions)
- the callback receives buffers and re-enqueues them
@param inFormat
A pointer to a structure describing the format of the audio data to be recorded. For
linear PCM, only interleaved formats are supported. Compressed formats are supported.
@param inCallbackProc
A pointer to a callback function to be called when the audio queue has finished filling
a buffer.
@param inUserData
A value or pointer to data that you specify to be passed to the callback function.
@param inCallbackRunLoop
The event loop on which inCallbackProc is to be called. If you specify NULL, the
callback is called on one of the audio queue's internal threads.
@param inCallbackRunLoopMode
The run loop mode in which to call the callback. Typically, you pass
kCFRunLoopCommonModes. (NULL also specifies kCFRunLoopCommonModes). Other
possibilities are implementation specific. You can choose to create your own thread with
your own run loops. For more information on run loops, see Run Loops or CFRunLoop
Reference.
@param inFlags
Reserved for future use. Pass 0.
@param outAQ
On return, this variable contains a pointer to the newly created recording audio queue
object.
@result An OSStatus result code.
*/
extern OSStatus
AudioQueueNewInput( const AudioStreamBasicDescription *inFormat,
AudioQueueInputCallback inCallbackProc,
void * __nullable inUserData,
CFRunLoopRef __nullable inCallbackRunLoop,
CFStringRef __nullable inCallbackRunLoopMode,
UInt32 inFlags,
AudioQueueRef __nullable * __nonnull outAQ) API_AVAILABLE(macos(10.5), ios(2.0), watchos(2.0), tvos(9.0));
#if defined(__BLOCKS__)
/*!
@function AudioQueueNewOutputWithDispatchQueue
@abstract Creates a new audio queue for playing audio data.
To create an playback audio queue, you allocate buffers, then queue buffers (using
AudioQueueEnqueueBuffer). The callback receives buffers and typically queues them again.
To schedule a buffer for playback, providing parameter and start time information, call
AudioQueueEnqueueBufferWithParameters.
@param outAQ
On return, this variable contains a pointer to the newly created playback audio queue
object.
@param inFormat
A pointer to a structure describing the format of the audio data to be played. For
linear PCM, only interleaved formats are supported. Compressed formats are supported.
@param inFlags
Reserved for future use. Pass 0.
@param inCallbackDispatchQueue
The dispatch queue from which inCallbackBlock is to be called.
@param inCallbackBlock
A pointer to a callback block to be called when the audio queue has finished playing
a buffer.
@result An OSStatus result code.
*/
extern OSStatus
AudioQueueNewOutputWithDispatchQueue(AudioQueueRef __nullable * __nonnull outAQ,
const AudioStreamBasicDescription *inFormat,
UInt32 inFlags,
dispatch_queue_t inCallbackDispatchQueue,
AudioQueueOutputCallbackBlock inCallbackBlock)
API_AVAILABLE(macos(10.6), ios(10.0), watchos(3.0), tvos(10.0));
/*!
@function AudioQueueNewInputWithDispatchQueue
@abstract Creates a new audio queue for recording audio data.
Outline of how to use the queue for input:
- create input queue
- allocate buffers
- enqueue buffers (AudioQueueEnqueueBuffer, not with parameters, no packet descriptions)
- the callback receives buffers and re-enqueues them
@param outAQ
On return, this variable contains a pointer to the newly created recording audio queue
object.
@param inFormat
A pointer to a structure describing the format of the audio data to be recorded. For
linear PCM, only interleaved formats are supported. Compressed formats are supported.
@param inFlags
Reserved for future use. Pass 0.
@param inCallbackDispatchQueue
The dispatch queue from which inCallbackBlock is to be called.
@param inCallbackBlock
A pointer to a callback block to be called when the audio queue has finished filling
a buffer.
@result An OSStatus result code.
*/
extern OSStatus
AudioQueueNewInputWithDispatchQueue(AudioQueueRef __nullable * __nonnull outAQ,
const AudioStreamBasicDescription *inFormat,
UInt32 inFlags,
dispatch_queue_t inCallbackDispatchQueue,
AudioQueueInputCallbackBlock inCallbackBlock)
API_AVAILABLE(macos(10.6), ios(10.0), watchos(3.0), tvos(10.0));
#endif // defined(__BLOCKS__)
/*!
@function AudioQueueDispose
@abstract Disposes an existing audio queue.
Disposing of the audio queue also disposes of all its resources, including its buffers.
@param inAQ
The audio queue you want to dispose of
@param inImmediate
If you pass true, the audio queue is disposed of immediately (that is, synchronously).
If you pass false, disposal does not take place until all enqueued buffers are
processed. Whether you call AudioQueueDispose synchronously or asynchronously, you can
no longer interact with the queue, and the queue no longer invokes any callbacks to your
application after the function returns.
Note that if AudioQueueDispose is called from a buffer completion callback or property
listener, you may receive further callbacks afterwards.
@result An OSStatus result code.
*/
extern OSStatus
AudioQueueDispose( AudioQueueRef inAQ,
Boolean inImmediate) API_AVAILABLE(macos(10.5), ios(2.0), watchos(2.0), tvos(9.0));
#pragma mark -
#pragma mark Buffer Management
//=============================================================================
// Buffer Management
//=============================================================================
/*!
@function AudioQueueAllocateBuffer
@abstract Asks an audio queue to allocate a buffer.
Once allocated, the pointer to the buffer and the buffer's size are fixed and cannot be
changed. The mAudioDataByteSize field in the audio queue buffer structure,
AudioQueueBuffer, is initially set to 0.
@param inAQ
The audio queue you want to allocate a buffer.
@param inBufferByteSize
The desired size of the new buffer, in bytes. An appropriate buffer size depends on the
processing you will perform on the data as well as on the audio data format.
@param outBuffer
On return, points to the newly created audio buffer. The mAudioDataByteSize field in the
audio queue buffer structure, AudioQueueBuffer, is initially set to 0.
@result An OSStatus result code.
*/
extern OSStatus
AudioQueueAllocateBuffer( AudioQueueRef inAQ,
UInt32 inBufferByteSize,
AudioQueueBufferRef __nullable * __nonnull outBuffer) API_AVAILABLE(macos(10.5), ios(2.0), watchos(2.0), tvos(9.0));
/*!
@function AudioQueueAllocateBufferWithPacketDescriptions
@abstract Asks an audio queue to allocate a buffer with space for packet descriptions.
Once allocated, the pointer to the buffer and the buffer's size are fixed and cannot be
changed. The mAudioDataByteSize field in the audio queue buffer structure,
AudioQueueBuffer, is initially set to 0.
@param inAQ
The audio queue you want to allocate a buffer.
@param inBufferByteSize
The desired size of the new buffer, in bytes. An appropriate buffer size depends on the
processing you will perform on the data as well as on the audio data format.
@param inNumberPacketDescriptions
The desired capacity of the packet description array in the new buffer.
@param outBuffer
On return, points to the newly created audio buffer. The mAudioDataByteSize field in the
audio queue buffer structure, AudioQueueBuffer, is initially set to 0.
@result An OSStatus result code.
*/
extern OSStatus
AudioQueueAllocateBufferWithPacketDescriptions(
AudioQueueRef inAQ,
UInt32 inBufferByteSize,
UInt32 inNumberPacketDescriptions,
AudioQueueBufferRef __nullable * __nonnull outBuffer) API_AVAILABLE(macos(10.6), ios(2.0), watchos(2.0), tvos(9.0));
/*!
@function AudioQueueFreeBuffer
@abstract Disposes of an audio queue buffer.
This function disposes of the buffer allocated by AudioQueueAllocateBuffer. Disposing of
an audio queue also automatically disposes of any associated buffers and timeline
objects. Call this function only if you want to dispose of a particular buffer while
continuing to use an audio queue. You can dispose of buffers only when the associated
queue is stopped (that is, not processing audio data).
@param inAQ
The queue from which the buffer was allocated.
@param inBuffer
The buffer to be disposed.
@result An OSStatus result code.
*/
extern OSStatus
AudioQueueFreeBuffer( AudioQueueRef inAQ,
AudioQueueBufferRef inBuffer) API_AVAILABLE(macos(10.5), ios(2.0), watchos(2.0), tvos(9.0));
/*!
@function AudioQueueEnqueueBuffer
@abstract Assigns a buffer to an audio queue for recording or playback.
If the buffer was allocated with AudioQueueAllocateBufferWithPacketDescriptions,
the client should provide packet descriptions in the buffer's mPacketDescriptions
and mPacketDescriptionCount fields rather than in inPacketDescs and
inNumPacketDescs, which should be NULL and 0, respectively, in this case.
For an input queue, pass 0 and NULL for inNumPacketDescs and inPacketDescs,
respectively. Your callback will receive packet descriptions owned by the audio queue.
@param inAQ
The audio queue you are assigning the buffer to.
@param inBuffer
The buffer to queue (that is, to be recorded into or played from).
@param inNumPacketDescs
The number of packet descriptions pointed to by the inPacketDescs pointer. Applicable
only for output queues and required only for variable-bit-rate (VBR) audio formats. Pass
0 for input queues (no packet descriptions are required).
@param inPacketDescs
An array of packet descriptions. Applicable only for output queues and required only for
variable-bit-rate (VBR) audio formats. Pass NULL for input queues (no packet
descriptions are required).
@result An OSStatus result code.
*/
extern OSStatus
AudioQueueEnqueueBuffer( AudioQueueRef inAQ,
AudioQueueBufferRef inBuffer,
UInt32 inNumPacketDescs,
const AudioStreamPacketDescription * __nullable inPacketDescs) API_AVAILABLE(macos(10.5), ios(2.0), watchos(2.0), tvos(9.0));
/*!
@function AudioQueueEnqueueBufferWithParameters
@abstract Assigns a buffer to an audio queue for playback, providing parameters
and start time information.
You can exert some control of the buffer queue by using this function. You can assign
audio queue settings that are in effect carried by an audio queue buffer as you enqueue
it. Hence, these changes only take effect when an audio queue buffer begins playing.
This function queues a buffer for playback only, not for recording. Audio queues for
recording have no parameters, do not support variable-bit-rate (VBR) formats (which
might require trimming), and have a different way to handle timing. When queued for
playback, the buffer must contain the audio data to be played back. See
AudioQueueEnqueueBuffer for details on queuing a buffer for recording.
If the buffer was allocated with AudioQueueAllocateBufferWithPacketDescriptions,
the client should provide packet descriptions in the buffer's mPacketDescriptions
and mPacketDescriptionCount fields rather than in inPacketDescs and
inNumPacketDescs, which should be NULL and 0, respectively, in this case.
@param inAQ
The audio queue associated with the buffer.
@param inBuffer
The buffer to be played from.
@param inNumPacketDescs
The number of packet descriptions pointed to by the inPacketDescs parameter. Required
only for variable-bit-rate (VBR) audio formats. Pass 0 if no packet descriptions are
required.
@param inPacketDescs
A pointer to an array of audio stream packet descriptions. Required only for VBR audio
formats. Pass NULL if no packet descriptions are required.
@param inTrimFramesAtStart
The number of priming frames to skip at the start of the buffer.
@param inTrimFramesAtEnd
The number of frames to skip at the end of the buffer.
@param inNumParamValues
The number of parameter values pointed to by the inParamValues parameter.
@param inParamValues
An array of parameter values. (In macOS v10.5, there is only one parameter,
kAudioQueueParam_Volume.) These values are set before buffer playback and cannot be
changed while the buffer is playing. How accurately changes in parameters can be
scheduled depends on the size of the buffer. If there are no parameters to set
(inNumParamValues = 0), pass NULL.
@param inStartTime
A pointer to a structure containing the desired start time for playing the buffer. If
you specify the time using the mSampleTime field of the AudioTimeStamp structure, the
sample time is relative to the time the queue started. If you pass NULL for the start
time, the buffer starts immediately after the previously queued buffer, or as soon as
possible if no buffers are queued ahead of it. Buffers are played in the order they are
queued. If multiple buffers are queued, their times must be in ascending order or NULL;
otherwise, an error occurs. The start time indicates when the actual audio data in the
buffer is to be played (that is, the trim frames are not counted).
Note: When specifying a start time for a buffer, if the buffer is not the first enqueued
since AudioQueueStop or AudioQueueReset, it is normally necessary to call AudioQueueFlush
before AudioQueueEnqueueBufferWithParameters.
@param outActualStartTime
On return, points to an AudioTimeStamp structure indicating when the buffer will
actually play.
@result An OSStatus result code.
*/
extern OSStatus
AudioQueueEnqueueBufferWithParameters(
AudioQueueRef inAQ,
AudioQueueBufferRef inBuffer,
UInt32 inNumPacketDescs,
const AudioStreamPacketDescription * __nullable inPacketDescs,
UInt32 inTrimFramesAtStart,
UInt32 inTrimFramesAtEnd,
UInt32 inNumParamValues,
const AudioQueueParameterEvent * __nullable inParamValues,
const AudioTimeStamp * __nullable inStartTime,
AudioTimeStamp * __nullable outActualStartTime) API_AVAILABLE(macos(10.5), ios(2.0), watchos(2.0), tvos(9.0));
#pragma mark -
#pragma mark Queue Control
//=============================================================================
// Queue Control
//=============================================================================
/*!
@function AudioQueueStart
@abstract Begins playing or recording audio.
If the audio hardware is not already running, this function starts it.
@param inAQ
The audio queue to start.
@param inStartTime
A pointer to the time at which the audio queue should start. If you specify the time
using the mSampleTime field of the AudioTimeStamp structure, the sample time is
referenced to the sample frame timeline of the associated audio device. May be NULL.
@result An OSStatus result code.
*/
extern OSStatus
AudioQueueStart( AudioQueueRef inAQ,
const AudioTimeStamp * __nullable inStartTime) API_AVAILABLE(macos(10.5), ios(2.0), watchos(2.0), tvos(9.0));
/*!
@function AudioQueuePrime
@abstract Begins decoding buffers in preparation for playback.
This function begins decoding buffers in preparation for playback. It returns when at
least the number of audio sample frames are decoded and ready to play or when all
enqueued buffers have been completely decoded. To ensure that a buffer has been decoded
and is completely ready for playback, before playback:
1. Call AudioQueueEnqueueBuffer.
2. Call AudioQueuePrime, which waits if you pass 0 to have a default number of
frames decoded.
3. Call AudioQueueStart.
Calls to AudioQueuePrime following AudioQueueStart/AudioQueuePrime, and before
AudioQueueReset/AudioQueueStop, will have no useful effect. In this situation,
outNumberOfFramesPrepared will not have a useful return value.
@param inAQ
The audio queue to be primed.
@param inNumberOfFramesToPrepare
The number of frames to decode before returning. Pass 0 to decode all enqueued buffers.
@param outNumberOfFramesPrepared
If not NULL, on return, a pointer to the number of frames actually decoded and prepared
for playback.
@result An OSStatus result code.
*/
extern OSStatus
AudioQueuePrime( AudioQueueRef inAQ,
UInt32 inNumberOfFramesToPrepare,
UInt32 * __nullable outNumberOfFramesPrepared) API_AVAILABLE(macos(10.5), ios(2.0), watchos(2.0), tvos(9.0));
/*!
@function AudioQueueStop
@abstract Stops playing or recording audio.
This function resets the audio queue and stops the audio hardware associated with the
queue if it is not in use by other audio services. Synchronous stops occur immediately,
regardless of previously buffered audio data. Asynchronous stops occur after all queued
buffers have been played or recorded.
@param inAQ
The audio queue to stop.
@param inImmediate
If you pass true, the stop request occurs immediately (that is, synchronously), and the
function returns when the audio queue has stopped. Buffer callbacks are invoked during
the stopping. If you pass false, the function returns immediately, but the queue does
not stop until all its queued buffers are played or filled (that is, the stop occurs
asynchronously). Buffer callbacks are invoked as necessary until the queue actually
stops. Also, a playback audio queue callback calls this function when there is no more
audio to play.
Note that when stopping immediately, all pending buffer callbacks are normally invoked
during the process of stopping. But if the calling thread is responding to a buffer
callback, then it is possible for additional buffer callbacks to occur after
AudioQueueStop returns.
@result An OSStatus result code.
*/
extern OSStatus
AudioQueueStop( AudioQueueRef inAQ,
Boolean inImmediate) API_AVAILABLE(macos(10.5), ios(2.0), watchos(2.0), tvos(9.0));
/*!
@function AudioQueuePause
@abstract Pauses audio playback or recording.
Pausing the queue does not affect buffers or reset the audio queue. To resume playback
or recording using the audio queue, call AudioQueueStart.
@param inAQ
The queue to be paused.
@result An OSStatus result code.
*/
extern OSStatus
AudioQueuePause( AudioQueueRef inAQ) API_AVAILABLE(macos(10.5), ios(2.0), watchos(2.0), tvos(9.0));
/*!
@function AudioQueueFlush
@abstract Resets the audio queue's decoder state.
After all queued buffers have been played, the function cleans up all decoder state
information. You must call this function following a sequence of buffers of encoded
audio; otherwise, some of the audio might not play in the next set of queued buffers.
The only time it is not necessary to call AudioQueueFlush is following AudioQueueStop
with inImmediate=false. (This action internally calls AudioQueueFlush.)
Also, you might wish to call this function before calling AudioQueueStop depending on
whether you want to stop immediately regardless of what has played or whether you want
to ensure that all buffered data and all data that is in the middle of processing gets
recorded or played before stopping.
@param inAQ
The audio queue to be flushed.
@result An OSStatus result code.
*/
extern OSStatus
AudioQueueFlush( AudioQueueRef inAQ) API_AVAILABLE(macos(10.5), ios(2.0), watchos(2.0), tvos(9.0));
/*!
@function AudioQueueReset
@abstract Resets an audio queue.
This function immediately resets an audio queue, flushes any queued buffer, removes all
buffers from previously scheduled use, and resets any decoder and digital signal
processing (DSP) state information. It also invokes callbacks for any flushed buffers.
If you queue any buffers after calling this function, processing does not occur until
the decoder and DSP state information is reset. Hence, a discontinuity (that is, a
"glitch") might occur.
Note that when resetting, all pending buffer callbacks are normally invoked
during the process of resetting. But if the calling thread is responding to a buffer
callback, then it is possible for additional buffer callbacks to occur after
AudioQueueReset returns.
@param inAQ
The audio queue to reset.
@result An OSStatus result code.
*/
extern OSStatus
AudioQueueReset( AudioQueueRef inAQ) API_AVAILABLE(macos(10.5), ios(2.0), watchos(2.0), tvos(9.0));
#pragma mark -
#pragma mark Parameter Management
//=============================================================================
// Parameter Management
//=============================================================================
/*!
@function AudioQueueGetParameter
@abstract Obtains an audio queue parameter value.
You can access the current parameter values for an audio queue at any time with this
function.
@param inAQ
The audio queue whose parameter value you want to obtain.
@param inParamID
The ID of the parameter you want to obtain. In macOS v10.5, audio queues have one
parameter available: kAudioQueueParam_Volume, which controls the queue's playback
volume.
@param outValue
On return, points to the current value of the specified parameter.
@result
An OSStatus result code.
*/
extern OSStatus
AudioQueueGetParameter( AudioQueueRef inAQ,
AudioQueueParameterID inParamID,
AudioQueueParameterValue * outValue) API_AVAILABLE(macos(10.5), ios(2.0), watchos(2.0), tvos(9.0));
/*!
@function AudioQueueSetParameter
@abstract Sets an audio queue parameter value.
@param inAQ
The audio queue whose parameter value you want to set.
@param inParamID
The ID of the parameter you want to set.
@param inValue
The parameter value to set.
@result
An OSStatus result code.
*/
extern OSStatus
AudioQueueSetParameter( AudioQueueRef inAQ,
AudioQueueParameterID inParamID,
AudioQueueParameterValue inValue) API_AVAILABLE(macos(10.5), ios(2.0), watchos(2.0), tvos(9.0));
#pragma mark -
#pragma mark Property Management
//=============================================================================
// Property Management
//=============================================================================
/*!
@function AudioQueueGetProperty
@abstract Obtains an audio queue property value.
@param inAQ
The audio queue whose property value you want to obtain.
@param inID
The ID of the property you want to obtain. See "Audio Queue Property IDs."
@param outData
On return, points to the desired property value.
@param ioDataSize
A pointer to the size of the property data. On input, points to the maximum bytes of
space the caller expects to receive. On return, points to the actual data size.
@result
An OSStatus result code.
*/
extern OSStatus
AudioQueueGetProperty( AudioQueueRef inAQ,
AudioQueuePropertyID inID,
void * outData,
UInt32 * ioDataSize) API_AVAILABLE(macos(10.5), ios(2.0), watchos(2.0), tvos(9.0));
/*!
@function AudioQueueSetProperty
@abstract Sets an audio queue property value.
@param inAQ
The audio queue whose property value you want to set.
@param inID
The ID of the property you want to set. See "Audio Queue Property IDs" for the various
audio queue properties.
@param inData
A pointer to the property value to set.
@param inDataSize
The size of the property data.
@result
An OSStatus result code.
*/
extern OSStatus
AudioQueueSetProperty( AudioQueueRef inAQ,
AudioQueuePropertyID inID,
const void * inData,
UInt32 inDataSize) API_AVAILABLE(macos(10.5), ios(2.0), watchos(2.0), tvos(9.0));
/*!
@function AudioQueueGetPropertySize
@abstract Obtains the size of an audio queue property.
@param inAQ
The audio queue containing the property value whose size you want to obtain.
@param inID
The ID of the property value whose size you want to obtain. See "Audio Queue Property
IDs" for possible values.
@param outDataSize
On return, points to the size of the specified property value.
@result
An OSStatus result code.
*/
extern OSStatus
AudioQueueGetPropertySize( AudioQueueRef inAQ,
AudioQueuePropertyID inID,
UInt32 * outDataSize) API_AVAILABLE(macos(10.5), ios(2.0), watchos(2.0), tvos(9.0));
/*!
@function AudioQueueAddPropertyListener
@abstract Adds a listener callback for a property.
This callback is used to act upon a change in an audio queue property such as
kAudioQueueProperty_IsRunning. For instance, if your application has a user interface
with a Play/Stop button, and kAudioQueueProperty_IsRunning changes, you need to update
your button.
@param inAQ
The audio queue that owns the property you want to assign the listener callback to.
@param inID
The ID of the property to which you want to assign a listener callback. See "Audio Queue Property IDs".
@param inProc
The listener callback to be called when the property value changes.
@param inUserData
A value to be passed to the listener callback when it is called.
@result
An OSStatus result code.
*/
extern OSStatus
AudioQueueAddPropertyListener( AudioQueueRef inAQ,
AudioQueuePropertyID inID,
AudioQueuePropertyListenerProc inProc,
void * __nullable inUserData) API_AVAILABLE(macos(10.5), ios(2.0), watchos(2.0), tvos(9.0));
/*!
@function AudioQueueRemovePropertyListener
@abstract Removes a listener callback for a property.
@param inAQ
The audio queue that owns the property from which you want to remove a listener.
@param inID
The ID of the property from which you want to remove a listener.
@param inProc
The listener being removed.
@param inUserData
The same inUserData value that was previously passed to AudioQueueAddPropertyListener.
@result
An OSStatus result code.
*/
extern OSStatus
AudioQueueRemovePropertyListener( AudioQueueRef inAQ,
AudioQueuePropertyID inID,
AudioQueuePropertyListenerProc inProc,
void * __nullable inUserData) API_AVAILABLE(macos(10.5), ios(2.0), watchos(2.0), tvos(9.0));
#pragma mark -
#pragma mark Handling Timing
//=============================================================================
// Handling Timing
//=============================================================================
/*!
@function AudioQueueCreateTimeline
@abstract Creates a timeline object.
You need to instantiate a timeline object if you want to know about any timeline
discontinuities. See AudioQueueGetCurrentTime for more details.
@param inAQ
The audio queue to associate with the new timeline object.
@param outTimeline
On return, points to the newly created timeline object.
@result
An OSStatus result code.
*/
extern OSStatus
AudioQueueCreateTimeline( AudioQueueRef inAQ,
AudioQueueTimelineRef __nullable * __nonnull outTimeline) API_AVAILABLE(macos(10.5), ios(2.0), watchos(2.0), tvos(9.0));
/*!
@function AudioQueueDisposeTimeline
@abstract Disposes of a timeline object.
Disposing of an audio queue automatically disposes of any associated timeline objects.
Call this function only if you want to dispose of a timeline object and not the audio
queue associated with it.
@param inAQ
The audio queue associated with the timeline object you want to dispose of.
@param inTimeline
The timeline object to dispose of.
@result
An OSStatus result code.
*/
extern OSStatus
AudioQueueDisposeTimeline( AudioQueueRef inAQ,
AudioQueueTimelineRef inTimeline) API_AVAILABLE(macos(10.5), ios(2.0), watchos(2.0), tvos(9.0));
/*!
@function AudioQueueGetCurrentTime
@abstract Obtains the current audio queue time.
You must specify a timeline object if you want to be notified about any timeline
discontinuities in the outTimelineDiscontinuity parameter. If you don't care about
discontinuities, pass NULL in the inTimeLine and outTimelineDiscontinuity parameters.
@param inAQ
The audio queue whose current time you want to obtain.
@param inTimeline
The audio queue timeline object to which any timeline discontinuities are reported. May
be NULL.
@param outTimeStamp
On return, points to an audio timestamp structure containing the current audio queue
time. The mSampleTime field is in terms of the audio queue's sample rate, and relative
to the time at which the queue has started or will start.
@param outTimelineDiscontinuity
Can be NULL. On return, only set to true or false if the inTimeLine parameter is not
NULL. Set to true if a discontinuity has occurred in the sample timeline of the audio
queue. For instance, the device's sample rate changed and a gap occurred in playback or
recording, or the audio queue was unable to prepare and playback in time because it was
late.
@result
An OSStatus result code.
*/
extern OSStatus
AudioQueueGetCurrentTime( AudioQueueRef inAQ,
AudioQueueTimelineRef __nullable inTimeline,
AudioTimeStamp * __nullable outTimeStamp,
Boolean * __nullable outTimelineDiscontinuity) API_AVAILABLE(macos(10.5), ios(2.0), watchos(2.0), tvos(9.0));
/*!
@function AudioQueueDeviceGetCurrentTime
@abstract Obtains the current time of the audio device associated with an audio queue.
If the audio device associated with the audio queue is not running, the only valid field
in the audio timestamp structure is mHostTime. This result differentiates the action of
this function from that of the AudioDeviceGetCurrentTime function, (declared in
AudioHardware.h) which returns an error if the audio device is not running.
@param inAQ
The audio queue whose audio device is to be queried.
@param outTimeStamp
A pointer to a structure that, on return, contains the current time of the audio device
associated with the audio queue.
@result
An OSStatus result code.
*/
extern OSStatus
AudioQueueDeviceGetCurrentTime( AudioQueueRef inAQ,
AudioTimeStamp * outTimeStamp) API_AVAILABLE(macos(10.5), ios(2.0), watchos(2.0), tvos(9.0));
/*!
@function AudioQueueDeviceTranslateTime
@abstract Converts the time in the time base of the associated audio device from one
representation to another.
This function converts from one time representation to another (for example, from sample
time to host time or vice versa):
- Sample time is the absolute sample frame time. Sample numbers are the count of the samples
on the audio device.
- Host time is the time base of the host machine such as the time of the bus clock on the CPU.
The mSampleTime field in the AudioTimestamp structure (described in Core Audio Data
Types Reference) is always in device time, not in audio queue time. Audio queue time is
relative to the audio queue's start time. The associated audio device has to be running
for the AudioQueueDeviceTranslateTime function to provide a result.
@param inAQ
The queue whose audio device is to perform the requested time translation.
@param inTime
A pointer to a structure containing the time to be translated.
@param outTime
A pointer to the the translated time.
@result
An OSStatus result code.
*/
extern OSStatus
AudioQueueDeviceTranslateTime( AudioQueueRef inAQ,
const AudioTimeStamp * inTime,
AudioTimeStamp * outTime) API_AVAILABLE(macos(10.5), ios(2.0), watchos(2.0), tvos(9.0));
/*!
@function AudioQueueDeviceGetNearestStartTime
@abstract Obtains an audio device's start time that is closest to a requested start time.
@param inAQ
The audio queue whose device's nearest start time you want to obtain.
@param ioRequestedStartTime
On entry, points to the requested start time. On return, points to the actual start time.
@param inFlags
Reserved for future use. Pass 0.
@result
An OSStatus result code.
*/
extern OSStatus
AudioQueueDeviceGetNearestStartTime(AudioQueueRef inAQ,
AudioTimeStamp * ioRequestedStartTime,
UInt32 inFlags) API_AVAILABLE(macos(10.5), ios(2.0), watchos(2.0), tvos(9.0));
#pragma mark -
#pragma mark Offline Rendering
//=============================================================================
// Offline Rendering
//=============================================================================
/*!
@function AudioQueueSetOfflineRenderFormat
@abstract Specify an audio format to which the queue will perform subsequent offline rendering,
or disable offline rendering.
An output queue's audio playback can be redirected for capture to an audio file,
to support an export function, for example. AudioQueueSetOfflineRenderFormat switches
a queue between normal and offline rendering modes.
@param inAQ
The output queue whose offline rendering mode is to be changed.
@param inFormat
The desired format for offline rendering. Pass NULL to disable offline rendering and return the
queue to normal output to an audio device. This format must be linear PCM and (if not mono)
interleaved.
@param inLayout
The desired channel layout for offline rendering; also NULL when disabling offline rendering.
@result
An OSStatus result code.
*/
extern OSStatus
AudioQueueSetOfflineRenderFormat( AudioQueueRef inAQ,
const AudioStreamBasicDescription * __nullable inFormat,
const AudioChannelLayout * __nullable inLayout)
API_AVAILABLE(macos(10.5), ios(2.0), watchos(2.0), tvos(9.0));
/*!
@function AudioQueueOfflineRender
@abstract Obtain a buffer of audio output from a queue in offline rendering mode.
@param inAQ
The output queue from which to obtain output.
@param inTimestamp
The point in time corresponding to the beginning of the output buffer. Only mSampleTime
is used. mFlags must include kAudioTimeStampSampleTimeValid.
@param ioBuffer
The buffer into which the queue will render.
@param inNumberFrames
The number of frames of audio to render. Note that fewer frames than requested may be returned.
This can happen if insufficient data was enqueued.
@result
An OSStatus result code.
*/
extern OSStatus
AudioQueueOfflineRender( AudioQueueRef inAQ,
const AudioTimeStamp * inTimestamp,
AudioQueueBufferRef ioBuffer,
UInt32 inNumberFrames) API_AVAILABLE(macos(10.5), ios(2.0), watchos(2.0), tvos(9.0));
#pragma mark -
#pragma mark Processing Taps
//=============================================================================
// Processing Taps
//=============================================================================
/*!
@function AudioQueueProcessingTapNew
@abstract Create a new processing tap
This function creates a processing tap on a given audio queue. A
processing tap can only be established (or removed) on an audio queue that is
stopped (paused is not sufficient). The processing tap will then be used to
process either decoded data in the case of an output queue, or input data
(before it is encoded) in the case of an input queue.
The processing is performed on audio either before or after any effects or other
processing (varispeed, etc) is applied by the audio queue, depending on inFlags.
@param inAQ
The audio queue from which to create the processing tap
@param inCallback
A callback which the queue will call to process the audio
@param inClientData
Client data provided to the callback
@param inFlags
Flags that are used to control aspects of the processing tap.
Valid flags are:
- kAudioQueueProcessingTap_PreEffects: processing is done before any
further effects are applied by the audio queue to the audio
- kAudioQueueProcessingTap_PostEffects: processing is done after all
processing is done, including that of other taps.
- kAudioQueueProcessingTap_Siphon
@param outMaxFrames
The maximum number of sample frames that can be requested of a processing
tap at any one time. Typically this will be approximately 50 msec of audio
(2048 samples @ 44.1kHz)
@param outProcessingFormat
The format in which the client will receive the audio data to be processed.
This will always be the same sample rate as the client format and usually
the same number of channels as the client format of the audio queue. (NOTE:
the number of channels may be different in some cases if the client format
has some channel count restrictions, for instance the client provides 5.1
AAC, but the decoder can only produce stereo). The channel order, if the
same as the client format, will be the same as the client channel order. If
the channel count is changed, it will be to either 1 (mono) or 2 (stereo, in
which case the first channel is left, the second right).
If the data is not in a convenient format for the client to process in, then
the client should convert the data to and from that format. This is the most
efficient mechanism to use (as the audio queue can chose a format that is
most efficient from its playback (or recording) requirement.
@param outAQTap
The processing tap object.
@result An OSStatus result code.
*/
extern OSStatus
AudioQueueProcessingTapNew( AudioQueueRef inAQ,
AudioQueueProcessingTapCallback inCallback,
void * __nullable inClientData,
AudioQueueProcessingTapFlags inFlags,
UInt32 * outMaxFrames,
AudioStreamBasicDescription * outProcessingFormat,
AudioQueueProcessingTapRef __nullable * __nonnull outAQTap)
API_AVAILABLE(macos(10.7), ios(6.0), watchos(2.0), tvos(9.0));
/*!
@function AudioQueueProcessingTapDispose
@abstract Dispose a processing tap object
As with AudioQueueProcessingTapNew(), this call can only be made on an
audio queue that is stopped (paused is not sufficient)
@param inAQTap
The processing tap to dispose.
@result An OSStatus result code.
*/
extern OSStatus
AudioQueueProcessingTapDispose( AudioQueueProcessingTapRef inAQTap)
API_AVAILABLE(macos(10.7), ios(6.0), watchos(2.0), tvos(9.0));
/*!
@function AudioQueueProcessingTapGetSourceAudio
@abstract Used by a processing tap to retrieve source audio.
This function may only be called from the processing tap's callback.
@param inAQTap
the processing tap
@param inNumberFrames
the number of frames the processing tap requires for its processing
@param ioTimeStamp
On an input audio queue, the timestamp is returned from this function.
On an output audio queue, the caller must provide a continuous timestamp.
@param outFlags
flags to describe state about the input requested, e.g.
discontinuity/complete
@param outNumberFrames
the number of source frames that have been provided by the parent audio
queue. This can be less than the number of requested frames specified in
inNumberFrames
@param ioData
the audio buffer list which will contain the source data. The audio queue owns
the buffer pointers if NULL pointers were provided (recommended). In this case
the source buffers are only valid for the duration of the processing tap
callback. If the buffer pointers are non-NULL, then they must be big enough to
hold inNumberFrames, and the audio queue will copy its source data into those
buffers.
@result An OSStatus result code.
*/
extern OSStatus
AudioQueueProcessingTapGetSourceAudio(
AudioQueueProcessingTapRef inAQTap,
UInt32 inNumberFrames,
AudioTimeStamp * ioTimeStamp,
AudioQueueProcessingTapFlags * outFlags,
UInt32 * outNumberFrames,
AudioBufferList * ioData)
API_AVAILABLE(macos(10.7), ios(6.0), watchos(2.0), tvos(9.0));
/*!
@function AudioQueueProcessingTapGetQueueTime
@abstract Used by a processing tap to retrieve the queue's current time.
This function may only be called from the processing tap's callback, and only
for audio output queues. It must be called after calling
AudioQueueProcessingTapGetSourceAudio().
@param inAQTap
the processing tap
@param outQueueSampleTime
the current sample time of the audio queue. This will appear to be stationary
if the queue is paused.
@param outQueueFrameCount
the number of sample frames of queue time corresponding to the current chunk of
audio being processed by the tap. This will differ from the frame count passed
to the tap if the queue's playback rate is currently other than 1.0, due to the
use of time compression/expansion. The frame count can also be 0 if the queue is
paused.
@result An OSStatus result code.
*/
extern OSStatus
AudioQueueProcessingTapGetQueueTime( AudioQueueProcessingTapRef inAQTap,
Float64 * outQueueSampleTime,
UInt32 * outQueueFrameCount)
API_AVAILABLE(macos(10.8), ios(6.0), watchos(2.0), tvos(9.0));
#ifdef __cplusplus
}
#endif
CF_ASSUME_NONNULL_END
#endif // AudioToolbox_AudioQueue_h
|
0 | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/AudioToolbox.framework | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/AudioToolbox.framework/Headers/AUAudioUnit.h | #if (defined(__USE_PUBLIC_HEADERS__) && __USE_PUBLIC_HEADERS__) || (defined(USE_AUDIOTOOLBOX_PUBLIC_HEADERS) && USE_AUDIOTOOLBOX_PUBLIC_HEADERS) || !__has_include(<AudioToolboxCore/AUAudioUnit.h>)
/*!
@file AUAudioUnit.h
@framework AudioToolbox.framework
@copyright (c) 2015 Apple, Inc. All rights reserved.
@brief Objective-C interfaces for hosting and implementing Audio Units.
*/
#ifndef AudioToolbox_AUAudioUnit_h
#define AudioToolbox_AUAudioUnit_h
#ifdef __OBJC2__
#import <AudioToolbox/AUParameters.h>
#import <Foundation/NSExtensionRequestHandling.h>
#import <CoreMIDI/MIDIServices.h>
#if !TARGET_OS_IPHONE
typedef UInt32 AUAudioObjectID; // AudioObjectID
#endif
NS_ASSUME_NONNULL_BEGIN
// forward declarations
@class AVAudioFormat;
@class AUAudioUnitBusArray;
@class AUAudioUnitBus;
@class AUAudioUnitPreset;
@class MIDICIProfile;
@class MIDICIProfileState;
typedef uint8_t MIDIChannelNumber;
@protocol AUAudioUnitFactory;
// =================================================================================================
/*! @typedef AUAudioUnitStatus
@brief A result code returned from an audio unit's render function.
*/
typedef OSStatus AUAudioUnitStatus;
/*! @typedef AUEventSampleTime
@brief Expresses time as a sample count.
@discussion
Sample times are normally positive, but hosts can propagate HAL sample times through audio
units, and HAL sample times can be small negative numbers.
*/
typedef int64_t AUEventSampleTime;
/*! @var AUEventSampleTimeImmediate
@brief A special value of AUEventSampleTime indicating "immediately."
@discussion
Callers of AUScheduleParameterBlock, AUMIDIEventListBlock, and AUScheduleMIDIEventBlock can pass
AUEventSampleTimeImmediate to indicate that the event should be rendered as soon as
possible, in the next cycle. A caller may also add a small (less than 4096) sample frame
offset to this constant. The base AUAudioUnit implementation translates this constant to a
true AUEventSampleTime; subclasses will not see it.
*/
enum : AUEventSampleTime {
AUEventSampleTimeImmediate = (AUEventSampleTime)0xffffffff00000000LL
};
/*! @typedef AUAudioFrameCount
@brief A number of audio sample frames.
@discussion
This is `uint32_t` for impedence-matching with the pervasive use of `UInt32` in AudioToolbox
and C AudioUnit API's, as well as `AVAudioFrameCount`.
*/
typedef uint32_t AUAudioFrameCount;
/*! @typedef AUAudioChannelCount
@brief A number of audio channels.
@discussion
This is `uint32_t` for impedence-matching with the pervasive use of `UInt32` in AudioToolbox
and C AudioUnit API's, as well as `AVAudioChannelCount`.
*/
typedef uint32_t AUAudioChannelCount;
// =================================================================================================
/*! @enum AUAudioUnitBusType
@brief Describes whether a bus array is for input or output.
*/
typedef NS_ENUM(NSInteger, AUAudioUnitBusType) {
AUAudioUnitBusTypeInput = 1,
AUAudioUnitBusTypeOutput = 2
};
// =================================================================================================
/*! @typedef AURenderPullInputBlock
@brief Block to supply audio input to AURenderBlock.
@param actionFlags
Pointer to action flags.
@param timestamp
The HAL time at which the input data will be rendered. If there is a sample rate conversion
or time compression/expansion downstream, the sample time will not be valid.
@param frameCount
The number of sample frames of input requested.
@param inputBusNumber
The index of the input bus being pulled.
@param inputData
The input audio data.
The caller must supply valid buffers in inputData's mBuffers' mData and mDataByteSize.
mDataByteSize must be consistent with frameCount. This block may provide input in those
specified buffers, or it may replace the mData pointers with pointers to memory which it
owns and guarantees will remain valid until the next render cycle.
@return
An AUAudioUnitStatus result code. If an error is returned, the input data should be assumed
to be invalid.
*/
typedef AUAudioUnitStatus (^AURenderPullInputBlock)(AudioUnitRenderActionFlags *actionFlags, const AudioTimeStamp *timestamp, AUAudioFrameCount frameCount, NSInteger inputBusNumber, AudioBufferList *inputData);
/*! @typedef AURenderBlock
@brief Block to render the audio unit.
@discussion
All realtime operations are implemented using blocks to avoid ObjC method dispatching and
the possibility of blocking.
@param actionFlags
Pointer to action flags.
@param timestamp
The HAL time at which the output data will be rendered. If there is a sample rate conversion
or time compression/expansion downstream, the sample time will not have a defined
correlation with the AudioDevice sample time.
@param frameCount
The number of sample frames to render.
@param outputBusNumber
The index of the output bus to render.
@param outputData
The output bus's render buffers and flags.
The buffer pointers (outputData->mBuffers[x].mData) may be null on entry, in which case the
block will render into memory it owns and modify the mData pointers to point to that memory.
The block is responsible for preserving the validity of that memory until it is next called
to render, or deallocateRenderResources is called.
If, on entry, the mData pointers are non-null, the block will render into those buffers.
@param pullInputBlock
A block which the AU will call in order to pull for input data. May be nil for instrument
and generator audio units (which do not have input busses).
@return
An `AUAudioUnitStatus` result code. If an error is returned, the output data should be assumed
to be invalid.
*/
typedef AUAudioUnitStatus (^AURenderBlock)(AudioUnitRenderActionFlags *actionFlags, const AudioTimeStamp *timestamp, AUAudioFrameCount frameCount, NSInteger outputBusNumber, AudioBufferList *outputData, AURenderPullInputBlock __nullable pullInputBlock);
/*! @typedef AURenderObserver
@brief Block called when an audio unit renders.
@discussion
This block is called by the base class's AURenderBlock before and after each render cycle.
The observer can distinguish between before and after using the PreRender and PostRender
flags.
The parameters are identical to those of AURenderBlock.
*/
typedef void (^AURenderObserver)(AudioUnitRenderActionFlags actionFlags, const AudioTimeStamp *timestamp, AUAudioFrameCount frameCount, NSInteger outputBusNumber);
/*! @typedef AUScheduleParameterBlock
@brief Block to schedule parameter changes.
@discussion
Not all parameters are rampable; check the parameter's flags.
@param eventSampleTime
The sample time (timestamp->mSampleTime) at which the parameter is to begin changing. When
scheduling parameters during the render cycle (e.g. via a render observer) this time can be
AUEventSampleTimeImmediate plus an optional buffer offset, in which case the event is
scheduled at that position in the current render cycle.
@param rampDurationSampleFrames
The number of sample frames over which the parameter's value is to ramp, or 0 if the
parameter change should take effect immediately.
@param parameterAddress
The parameter's address.
@param value
The parameter's new value if the ramp duration is 0; otherwise, the value at the end
of the scheduled ramp.
*/
typedef void (^AUScheduleParameterBlock)(AUEventSampleTime eventSampleTime, AUAudioFrameCount rampDurationSampleFrames, AUParameterAddress parameterAddress, AUValue value);
/*! @typedef AUScheduleMIDIEventBlock
@brief Block to schedule MIDI events.
@param eventSampleTime
The sample time (timestamp->mSampleTime) at which the MIDI event is to occur. When
scheduling events during the render cycle (e.g. via a render observer) this time can be
AUEventSampleTimeImmediate plus an optional buffer offset, in which case the event is
scheduled at that position in the current render cycle.
@param cable
The virtual cable number.
@param length
The number of bytes of MIDI data in the provided event(s).
@param midiBytes
One or more valid MIDI 1.0 events, except sysex which must always be sent as the only event
in the chunk. Also, running status is not allowed.
*/
typedef void (^AUScheduleMIDIEventBlock)(AUEventSampleTime eventSampleTime, uint8_t cable, NSInteger length, const uint8_t *midiBytes);
/*! @typedef AUMIDIOutputEventBlock
@brief Block to provide MIDI output events to the host.
@param eventSampleTime
The timestamp associated with the MIDI data in this chunk.
@param cable
The virtual cable number associated with this MIDI data.
@param length
The number of bytes of MIDI data in the provided event(s).
@param midiBytes
One or more valid MIDI 1.0 events, except sysex which must always be sent as the only event
in the chunk.
*/
typedef OSStatus (^AUMIDIOutputEventBlock)(AUEventSampleTime eventSampleTime, uint8_t cable, NSInteger length, const uint8_t *midiBytes);
/*! @typedef AUHostMusicalContextBlock
@brief Block by which hosts provide musical tempo, time signature, and beat position.
@param currentTempo
The current tempo in beats per minute.
@param timeSignatureNumerator
The numerator of the current time signature.
@param timeSignatureDenominator
The denominator of the current time signature.
@param currentBeatPosition
The precise beat position of the beginning of the current buffer being rendered.
@param sampleOffsetToNextBeat
The number of samples between the beginning of the buffer being rendered and the next beat
(can be 0).
@param currentMeasureDownbeatPosition
The beat position corresponding to the beginning of the current measure.
@return
YES for success.
@discussion
If the host app provides this block to an AUAudioUnit (as its musicalContextBlock), then
the block may be called at the beginning of each render cycle to obtain information about
the current render cycle's musical context.
Any of the provided parameters may be null to indicate that the audio unit is not interested
in that particular piece of information.
*/
typedef BOOL (^AUHostMusicalContextBlock)(double * __nullable currentTempo, double * __nullable timeSignatureNumerator, NSInteger * __nullable timeSignatureDenominator, double * __nullable currentBeatPosition, NSInteger * __nullable sampleOffsetToNextBeat, double * __nullable currentMeasureDownbeatPosition);
/*! @typedef AUMIDICIProfileChangedBlock
@brief Block by which hosts are informed of an audio unit having enabled or disabled a
MIDI-CI profile.
@param cable
The virtual MIDI cable on which the event occured.
@param channel
The MIDI channel on which the profile was enabled or disabled.
@param profile
The MIDI-CI profile.
@param enabled
YES if the profile was enabled, NO if the profile was disabled.
*/
typedef void (^AUMIDICIProfileChangedBlock)(uint8_t cable, MIDIChannelNumber channel, MIDICIProfile *profile, BOOL enabled) API_AVAILABLE(macos(10.14), ios(12.0)) __WATCHOS_PROHIBITED __TVOS_PROHIBITED;
/*! @enum AUHostTransportStateFlags
@brief Flags describing the host's transport state.
@constant AUHostTransportStateChanged
True if, since the callback was last called, there was a change to the state of, or
discontinuities in, the host's transport. Can indicate such state changes as
start/stop, or seeking to another position in the timeline.
@constant AUHostTransportStateMoving
True if the transport is moving.
@constant AUHostTransportStateRecording
True if the host is recording, or prepared to record. Can be true with or without the
transport moving.
@constant AUHostTransportStateCycling
True if the host is cycling or looping.
*/
typedef NS_OPTIONS(NSUInteger, AUHostTransportStateFlags) {
AUHostTransportStateChanged = 1,
AUHostTransportStateMoving = 2,
AUHostTransportStateRecording = 4,
AUHostTransportStateCycling = 8
};
/*! @typedef AUHostTransportStateBlock
@brief Block by which hosts provide information about their transport state.
@param transportStateFlags
The current state of the transport.
@param currentSamplePosition
The current position in the host's timeline, in samples at the audio unit's output sample
rate.
@param cycleStartBeatPosition
If cycling, the starting beat position of the cycle.
@param cycleEndBeatPosition
If cycling, the ending beat position of the cycle.
@discussion
If the host app provides this block to an AUAudioUnit (as its transportStateBlock), then
the block may be called at the beginning of each render cycle to obtain information about
the current transport state.
Any of the provided parameters may be null to indicate that the audio unit is not interested
in that particular piece of information.
*/
typedef BOOL (^AUHostTransportStateBlock)(AUHostTransportStateFlags * __nullable transportStateFlags, double * __nullable currentSamplePosition, double * __nullable cycleStartBeatPosition, double * __nullable cycleEndBeatPosition);
// =================================================================================================
/*! @class AUAudioUnit
@brief An audio unit instance.
@discussion
AUAudioUnit is a host interface to an audio unit. Hosts can instantiate either version 2 or
version 3 units with this class, and to some extent control whether an audio unit is
instantiated in-process or in a separate extension process.
Implementors of version 3 audio units can and should subclass AUAudioUnit. To port an
existing version 2 audio unit easily, AUAudioUnitV2Bridge can be subclassed.
These are the ways in which audio unit components can be registered:
- (v2) Packaged into a component bundle containing an `AudioComponents` Info.plist entry,
referring to an `AudioComponentFactoryFunction`. See AudioComponent.h.
- (v2) AudioComponentRegister(). Associates a component description with an
AudioComponentFactoryFunction. See AudioComponent.h.
- (v3) Packaged into an app extension containing an AudioComponents Info.plist entry.
The principal class must conform to the AUAudioUnitFactory protocol, which will typically
instantiate an AUAudioUnit subclass.
- (v3) `+[AUAudioUnit registerSubclass:asComponentDescription:name:version:]`. Associates
a component description with an AUAudioUnit subclass.
A host need not be aware of the concrete subclass of AUAudioUnit that is being instantiated.
`initWithComponentDescription:options:error:` ensures that the proper subclass is used.
When using AUAudioUnit with a v2 audio unit, or the C AudioComponent and AudioUnit API's
with a v3 audio unit, all major pieces of functionality are bridged between the
two API's. This header describes, for each v3 method or property, the v2 equivalent.
*/
API_AVAILABLE(macos(10.11), ios(9.0), watchos(2.0), tvos(9.0))
@interface AUAudioUnit : NSObject
- (instancetype)init NS_UNAVAILABLE;
/*! @method initWithComponentDescription:options:error:
@brief Designated initializer.
@param componentDescription
A single AUAudioUnit subclass may implement multiple audio units, for example, an effect
that can also function as a generator, or a cluster of related effects. The component
description specifies the component which was instantiated.
@param options
Options for loading the unit in-process or out-of-process.
@param outError
Returned in the event of failure.
*/
- (nullable instancetype)initWithComponentDescription:(AudioComponentDescription)componentDescription options:(AudioComponentInstantiationOptions)options error:(NSError **)outError NS_DESIGNATED_INITIALIZER;
/*! @method initWithComponentDescription:error:
@brief Convenience initializer (omits options).
*/
- (nullable instancetype)initWithComponentDescription:(AudioComponentDescription)componentDescription error:(NSError **)outError;
/*! @method instantiateWithComponentDescription:options:completionHandler:
@brief Asynchronously create an AUAudioUnit instance.
@param componentDescription
The AudioComponentDescription of the audio unit to instantiate.
@param options
See the discussion of AudioComponentInstantiationOptions in AudioToolbox/AudioComponent.h.
@param completionHandler
Called in a thread/dispatch queue context internal to the implementation. The client should
retain the supplied AUAudioUnit.
@discussion
Certain types of AUAudioUnits must be instantiated asynchronously -- see
the discussion of kAudioComponentFlag_RequiresAsyncInstantiation in
AudioToolbox/AudioComponent.h.
Note: Do not block the main thread while waiting for the completion handler to be called;
this can deadlock.
*/
+ (void)instantiateWithComponentDescription:(AudioComponentDescription)componentDescription options:(AudioComponentInstantiationOptions)options completionHandler:(void (^)(AUAudioUnit * __nullable audioUnit, NSError * __nullable error))completionHandler;
/*! @property componentDescription
@brief The AudioComponentDescription with which the audio unit was created.
*/
@property (NS_NONATOMIC_IOSONLY, readonly) AudioComponentDescription componentDescription;
/*! @property component
@brief The AudioComponent which was found based on componentDescription when the
audio unit was created.
*/
@property (NS_NONATOMIC_IOSONLY, readonly) AudioComponent component;
/*! @property componentName
@brief The unit's component's name.
@discussion
By convention, an audio unit's component name is its manufacturer's name, plus ": ",
plus the audio unit's name. The audioUnitName and manufacturerName properties are derived
from the component name.
*/
@property (NS_NONATOMIC_IOSONLY, readonly, copy, nullable) NSString *componentName;
/*! @property audioUnitName
@brief The audio unit's name.
*/
@property (NS_NONATOMIC_IOSONLY, readonly, copy, nullable) NSString *audioUnitName;
/*! @property manufacturerName
@brief The manufacturer's name.
*/
@property (NS_NONATOMIC_IOSONLY, readonly, copy, nullable) NSString *manufacturerName;
/*! @property audioUnitShortName
@brief A short name for the audio unit.
@discussion
Audio unit host applications can display this name in situations where the audioUnitName
might be too long. The recommended length is up to 16 characters. Host applications may
truncate it.
*/
@property (NS_NONATOMIC_IOSONLY, readonly, copy, nullable) NSString *audioUnitShortName API_AVAILABLE(macos(10.13), ios(11.0), watchos(4.0), tvos(11.0));
/*! @property componentVersion
@brief The unit's component's version.
*/
@property (NS_NONATOMIC_IOSONLY, readonly) uint32_t componentVersion;
/*! @method allocateRenderResourcesAndReturnError:
@brief Allocate resources required to render.
@discussion
Hosts must call this before beginning to render. Subclassers should call the superclass
implementation.
Bridged to the v2 API AudioUnitInitialize().
*/
- (BOOL)allocateRenderResourcesAndReturnError:(NSError **)outError;
/*! @method deallocateRenderResources
@brief Deallocate resources allocated by allocateRenderResourcesAndReturnError:
@discussion
Hosts should call this after finishing rendering. Subclassers should call the superclass
implementation.
Bridged to the v2 API AudioUnitUninitialize().
*/
- (void)deallocateRenderResources;
/*! @property renderResourcesAllocated
@brief returns YES if the unit has render resources allocated.
*/
@property (NS_NONATOMIC_IOSONLY, readonly) BOOL renderResourcesAllocated;
/*! @method reset
@brief Reset transitory rendering state to its initial state.
@discussion
Hosts should call this at the point of a discontinuity in the input stream being provided to
an audio unit, for example, when seeking forward or backward within a track. In response,
implementations should clear delay lines, filters, etc. Subclassers should call the
superclass implementation.
Bridged to the v2 API AudioUnitReset(), in the global scope.
*/
- (void)reset;
/*! @property inputBusses
@brief An audio unit's audio input connection points.
@discussion
Subclassers must override this property's getter. The implementation should return the same
object every time it is asked for it, since clients can install KVO observers on it.
*/
@property (NS_NONATOMIC_IOSONLY, readonly) AUAudioUnitBusArray *inputBusses;
/*! @property outputBusses
@brief An audio unit's audio output connection points.
@discussion
Subclassers must override this property's getter. The implementation should return the same
object every time it is asked for it, since clients can install KVO observers on it.
*/
@property (NS_NONATOMIC_IOSONLY, readonly) AUAudioUnitBusArray *outputBusses;
/*! @property renderBlock
@brief Block which hosts use to ask the unit to render.
@discussion
Before invoking an audio unit's rendering functionality, a host should fetch this block and
cache the result. The block can then be called from a realtime context without the
possibility of blocking and causing an overload at the Core Audio HAL level.
This block will call a subclass' internalRenderBlock, providing all realtime events
scheduled for the current render time interval, bracketed by calls to any render observers.
Subclassers should override internalRenderBlock, not this property.
Bridged to the v2 API AudioUnitRender().
*/
@property (NS_NONATOMIC_IOSONLY, readonly) AURenderBlock renderBlock;
/*! @property scheduleParameterBlock
@brief Block which hosts use to schedule parameters.
@discussion
As with renderBlock, a host should fetch and cache this block before calling
allocateRenderResources, if it intends to schedule parameters.
The block is safe to call from any thread context, including realtime audio render
threads.
Subclassers should not override this; it is implemented in the base class and will schedule
the events to be provided to the internalRenderBlock.
Bridged to the v2 API AudioUnitScheduleParameters().
*/
@property (NS_NONATOMIC_IOSONLY, readonly) AUScheduleParameterBlock scheduleParameterBlock;
/*! @method tokenByAddingRenderObserver:
@brief Add a block to be called on each render cycle.
@discussion
The supplied block is called at the beginning and ending of each render cycle. It should
not make any blocking calls.
This method is implemented in the base class AUAudioUnit, and should not be overridden.
Bridged to the v2 API AudioUnitAddRenderNotify().
@param observer
The block to call.
@return
A token to be used when removing the observer.
*/
- (NSInteger)tokenByAddingRenderObserver:(AURenderObserver)observer;
/*! @method removeRenderObserver:
@brief Remove an observer block added via tokenByAddingRenderObserver:
@param token
The token previously returned by tokenByAddingRenderObserver:
Bridged to the v2 API AudioUnitRemoveRenderNotify().
*/
- (void)removeRenderObserver:(NSInteger)token;
/*! @property maximumFramesToRender
@brief The maximum number of frames which the audio unit can render at once.
@discussion
This must be set by the host before render resources are allocated. It cannot be changed
while render resources are allocated.
Bridged to the v2 property kAudioUnitProperty_MaximumFramesPerSlice.
*/
@property (NS_NONATOMIC_IOSONLY) AUAudioFrameCount maximumFramesToRender;
/*! @property parameterTree
@brief An audio unit's parameters, organized in a hierarchy.
@return
A parameter tree object, or nil if the unit has no parameters.
@discussion
Audio unit hosts can fetch this property to discover a unit's parameters. KVO notifications
are issued on this member to notify the host of changes to the set of available parameters.
AUAudioUnit has an additional pseudo-property, "allParameterValues", on which KVO
notifications are issued in response to certain events where potentially all parameter
values are invalidated. This includes changes to currentPreset, fullState, and
fullStateForDocument.
Hosts should not attempt to set this property.
Subclassers should implement the parameterTree getter to expose parameters to hosts. They
should cache as much as possible and send KVO notifications on "parameterTree" when altering
the structure of the tree or the static information (ranges, etc) of parameters.
This is similar to the v2 properties kAudioUnitProperty_ParameterList and
kAudioUnitProperty_ParameterInfo.
Note that it is not safe to modify this property in a real-time context.
*/
@property (NS_NONATOMIC_IOSONLY, nullable, retain) AUParameterTree *parameterTree;
/*! @method parametersForOverviewWithCount:
@brief Returns the audio unit's `count` most important parameters.
@discussion
This property allows a host to query an audio unit for some small number of parameters which
are its "most important", to be displayed in a compact generic view.
An audio unit subclass should return an array of NSNumbers representing the addresses
of the `count` most important parameters.
The base class returns an empty array regardless of count.
Partially bridged to kAudioUnitProperty_ParametersForOverview (v2 hosts can use that
property to access this v3 method of an audio unit).
*/
- (NSArray<NSNumber *> *)parametersForOverviewWithCount:(NSInteger)count;
@property (NS_NONATOMIC_IOSONLY, readonly) BOOL allParameterValues; /// special pseudo-property for KVO
/*! @property musicDeviceOrEffect
@brief Specifies whether an audio unit responds to MIDI events.
@discussion
This is implemented in the base class and returns YES if the component type is music
device or music effect.
*/
@property (NS_NONATOMIC_IOSONLY, readonly, getter=isMusicDeviceOrEffect) BOOL musicDeviceOrEffect;
/*! @property virtualMIDICableCount
@brief The number of virtual MIDI cables implemented by a music device or effect.
@discussion
A music device or MIDI effect can support up to 256 virtual MIDI cables of input; this
property expresses the number of cables supported by the audio unit.
*/
@property (NS_NONATOMIC_IOSONLY, readonly) NSInteger virtualMIDICableCount;
/*! @property scheduleMIDIEventBlock
@brief Block used to schedule MIDI events.
@discussion
As with renderBlock, a host should fetch and cache this block before calling
allocateRenderResources if it intends to schedule MIDI events.
This is implemented in the base class. It is nil when musicDeviceOrEffect is NO.
Subclasses should not override. When hosts schedule events via this block, they are
sent to the Audio Unit via the list of AURenderEvents delivered to
internalRenderBlock.
All events sent via this block will be delivered to the internalRenderBlock in the MIDI
protocol returned by the AudioUnitMIDIProtocol property. For example, if AudioUnitMIDIProtocol
returns kMIDIProtocol_2_0, incoming events will be translated to MIDI 2.0 if necessary.
If AudioUnitMIDIProtocol is not set, events will be delivered as legacy MIDI.
This bridged to the v2 API MusicDeviceMIDIEvent.
*/
@property (NS_NONATOMIC_IOSONLY, readonly, nullable) AUScheduleMIDIEventBlock scheduleMIDIEventBlock;
/*! @property scheduleMIDIEventListBlock
@brief Block used to schedule MIDIEventLists.
@discussion
As with renderBlock, a host should fetch and cache this block before calling
allocateRenderResources, if it intends to schedule MIDI events.
When scheduling events during the render cycle (e.g. via a render observer) eventSampleTime can be
AUEventSampleTimeImmediate plus an optional buffer offset, in which case the event is
scheduled at the provided offset position within the current render cycle.
This is implemented in the base class. It is nil when musicDeviceOrEffect is NO.
Subclassers should not override. When hosts schedule events via this block, they are
delivered to the Audio Unit via the list of AURenderEvents delivered to
internalRenderBlock.
All events sent via this block will be delivered to the internalRenderBlock in the MIDI protocol returned by
the AudioUnitMIDIProtocol property. For example, if this block is called with MIDI-1.0 events but
AudioUnitMIDIProtocol returns kMIDIProtocol_2_0, incoming events will be translated to MIDI 2.0.
If AudioUnitMIDIProtocol is not set, events will be delivered as legacy MIDI.
Note: This block should be preferred over scheduleMIDIEventBlock going forward.
This bridged to the v2 API MusicDeviceMIDIEventList.
*/
@property (NS_NONATOMIC_IOSONLY, readonly, nullable) AUMIDIEventListBlock scheduleMIDIEventListBlock API_AVAILABLE(macos(12.0), ios(15.0), tvos(15.0)) API_UNAVAILABLE(watchos);
/*! @property MIDIOutputNames
@brief Count, and names of, a plug-in's MIDI outputs.
@discussion
A plug-in may override this method to inform hosts about its MIDI outputs. The size of the
array is the number of outputs the Audio Unit supports. Each item in the array is the name
of the MIDI output at that index.
This is bridged to the v2 API property kAudioUnitProperty_MIDIOutputCallbackInfo.
*/
@property (NS_NONATOMIC_IOSONLY, readonly, copy) NSArray<NSString *> *MIDIOutputNames API_AVAILABLE(macos(10.13), ios(11.0), watchos(4.0), tvos(11.0));
/*! @property providesUserInterface
@brief Specifies whether an audio unit provides UI (normally in the form of a view controller).
@discussion
Implemented in the framework and should not be overridden by implementators. The
framework detects whether any subclass has implemented
`requestViewControllerWithCompletionHandler:` or is implemented by an AU extension whose
extension point identifier is `com.apple.AudioUnit-UI`. See also
`requestViewControllerWithCompletionHandler:` in <CoreAudioKit/AUViewController.h>
*/
@property (NS_NONATOMIC_IOSONLY, readonly) BOOL providesUserInterface API_AVAILABLE(macos(10.13), ios(11.0), watchos(4.0), tvos(11.0));
// ------------------------
// These properties and methods are generally optional.
/*! @property MIDIOutputEventBlock
@brief Block used by the host to access the MIDI output generated by an Audio Unit.
@discussion
The host can set this block and the plug-in can call it in its renderBlock to provide to the
host the MIDI data associated with the current render cycle.
All events sent via this block will be delivered to the host in the MIDI protocol returned by
the hostMIDIProtocol property. For example, if hostMIDIProtocol is set to
kMIDIProtocol_2_0, incoming events will be translated to MIDI 2.0. If hostMIDIProtocol
is not set, events will be delivered as legacy MIDI.
Note: AUMIDIEventListBlock should be preferred over this block going forward.
This is bridged to the v2 API property kAudioUnitProperty_MIDIOutputCallback.
*/
@property (NS_NONATOMIC_IOSONLY, copy, nullable) AUMIDIOutputEventBlock MIDIOutputEventBlock API_AVAILABLE(macos(10.13), ios(11.0), watchos(4.0), tvos(11.0));
/*! @property MIDIOutputEventListBlock
@brief Block used by the host to access the MIDIEventList output generated by an Audio Unit.
@discussion
The host can set this block and the plug-in can call it in its renderBlock to provide to the
host the MIDIEventList data associated with the current render cycle.
All events sent via this block will be delivered to the host in the MIDI protocol returned by
the hostMIDIProtocol property. For example, if hostMIDIProtocol is set to
kMIDIProtocol_2_0, incoming events will be translated to MIDI 2.0. If hostMIDIProtocol
is not set, events will be delivered as legacy MIDI.
Note: This block should be preferred over MIDIOutputEventBlock going forward.
Host should setup in the following order:
- Set hostMIDIProtocol
- Set MIDIOutputEventBlock
- Call allocateRenderResourcesAndReturnError
This is bridged to the v2 API property kAudioUnitProperty_MIDIOutputEventListCallback.
*/
@property (NS_NONATOMIC_IOSONLY, copy, nullable) AUMIDIEventListBlock MIDIOutputEventListBlock API_AVAILABLE(macos(12.0), ios(15.0), tvos(15.0)) API_UNAVAILABLE(watchos);
/*! @property AudioUnitMIDIProtocol
@brief The MIDI protocol used by the Audio Unit for receiving MIDIEventList data.
@discussion
All translatable messages will be converted (if necessary) to this protocol prior to delivery
to the Audio Unit.
This is bridged to the v2 API property kAudioUnitProperty_AudioUnitMIDIProtocol.
*/
@property (NS_NONATOMIC_IOSONLY, readonly) MIDIProtocolID AudioUnitMIDIProtocol API_AVAILABLE(macos(12.0), ios(15.0), tvos(15.0)) API_UNAVAILABLE(watchos);
/*! @property hostMIDIProtocol
@brief The MIDI protocol to be used by the host for receiving MIDIEventList data.
@discussion
Hosts should set this property to the protocol they wish to receive MIDIEventList data
from the Audio Unit. This should be set prior to initialization, all translatable messages
will be converted (if necessary) to this property's protocol prior to delivery to the host.
This is bridged to the v2 API property kAudioUnitProperty_HostMIDIProtocol.
*/
@property (NS_NONATOMIC_IOSONLY) MIDIProtocolID hostMIDIProtocol API_AVAILABLE(macos(12.0), ios(15.0), tvos(15.0)) API_UNAVAILABLE(watchos);
/*! @property fullState
@brief A persistable snapshot of the Audio Unit's properties and parameters, suitable for
saving as a user preset.
@discussion
Hosts may use this property to save and restore the state of an Audio Unit being used in a
user preset or document. The Audio Unit should not persist transitory properties such as
stream formats, but should save and restore all parameters and custom properties.
The base class implementation of this property saves the values of all parameters
currently in the parameter tree. A subclass which dynamically produces multiple variants
of the parameter tree needs to be aware that the serialization method does a depth-first
preorder traversal of the tree.
Bridged to the v2 property kAudioUnitProperty_ClassInfo.
*/
@property (NS_NONATOMIC_IOSONLY, copy, nullable) NSDictionary<NSString *, id> *fullState;
/*! @property fullStateForDocument
@brief A persistable snapshot of the audio unit's properties and parameters, suitable for
saving in a user's document.
@discussion
This property is distinct from fullState in that some state is suitable for saving in user
presets, while other state is not. For example, a synthesizer's master tuning setting could
be considered global state, inappropriate for storing in reusable presets, but desirable
for storing in a document for a specific live performance.
Hosts saving documents should use this property. If the audio unit does not implement it,
the base class simply sets/gets fullState.
Bridged to the v2 property kAudioUnitProperty_ClassInfoFromDocument.
*/
@property (NS_NONATOMIC_IOSONLY, copy, nullable) NSDictionary<NSString *, id> *fullStateForDocument;
/*! @property factoryPresets
@brief A collection of presets provided by the audio unit's developer.
@discussion
A preset provides users of an audio unit with an easily-selectable, fine-tuned set of
parameters provided by the developer. This property returns all of the available factory presets.
Bridged to the v2 property kAudioUnitProperty_FactoryPresets.
*/
@property (NS_NONATOMIC_IOSONLY, readonly, copy, nullable) NSArray<AUAudioUnitPreset *> *factoryPresets;
/*! @property userPresets
@brief A collection of presets saved by the user
@discussion
In addition to factory presets, provided by the audio unit vendor, users have the ability to
save the values of the parameters of an audio unit into a user preset. These users presets
can be accessed using this property.
The default implementation of this method will load the user presets from an internal
location that might not be directly accessible to the audio unit host application or to the
audio unit. Instead of accessing this path directly, the audio unit should rely on the
superclass implementation of this method to retrieve the presets.
Audio Units are free to override this method to load their user presets via different means
(e.g. from their iCloud container).
*/
@property (NS_NONATOMIC_IOSONLY, readonly, copy) NSArray<AUAudioUnitPreset *> *userPresets API_AVAILABLE(macos(10.15), ios(13.0), watchos(6.0), tvos(13.0));
/*! @method saveUserPreset:error
@brief Persistently save the current state of the audio unit into a userPreset
@discussion
The new preset will be added to userPresets and will become selectable by assigning it
to the currentPreset property.
If a preset with the provided name already exists then it will be overwritten.
For user presets, the preset number is required to be negative.
If a positive number is passed, the sign will be changed to negative.
If zero is passed, the number will be set to -1.
These changes will be reflected on the userPreset argument.
The default implementation of this method will save the user preset to an internal
location.
Audio Units are free to override this method to operate on a different location (e.g. their
iCloud container).
@param userPreset
The preset under which the current state will be saved.
@param outError
In the event of a failure, the method will return NO and outError will be set to an
NSError, describing the problem.
Some possible errors:
- domain: NSOSStatusErrorDomain code: kAudioUnitErr_NoConnection
- domain: NSOSStatusErrorDomain code: kAudioUnitErr_InvalidFilePath
- domain: NSOSStatusErrorDomain code: kAudioUnitErr_MissingKey
@return
YES for success. NO in the event of a failure, in which case the error is returned in
outError.
*/
- (BOOL)saveUserPreset:(AUAudioUnitPreset *)userPreset error:(NSError **)outError API_AVAILABLE(macos(10.15), ios(13.0), watchos(6.0), tvos(13.0));
/*! @method deleteUserPreset:error
@brief Remove a user preset.
@discussion
The user preset will be removed from userPresets and will be permanently deleted.
The default implementation of this method will delete the user preset from an internal
location.
Audio Units are free to override this method to operate on a different location (e.g. their
iCloud container).
@param userPreset
The preset to be deleted.
@param outError
In the event of a failure, the method will return NO and outError will be set to an
NSError, describing the problem.
Some possible errors:
- domain: NSOSStatusErrorDomain code: kAudioUnitErr_NoConnection
- domain: NSPOSIXErrorDomain code: ENOENT
- domain: NSOSStatusErrorDomain code: kAudioUnitErr_InvalidFilePath
@return
YES for success. NO in the event of a failure, in which case the error is returned in
outError.
*/
- (BOOL)deleteUserPreset:(AUAudioUnitPreset *)userPreset error:(NSError **)outError API_AVAILABLE(macos(10.15), ios(13.0), watchos(6.0), tvos(13.0));
/*! @method presetStateFor:error
@brief Retrieve the state stored in a user preset
@discussion
This method allows access to the contents of a preset without having to set that preset as
current. The returned dictionary is assignable to the audio unit's fullState and/or
fullStateForDocument properties.
Audio units can override this method in order to vend user presets from a different location
(e.g. their iCloud container).
In order to restore the state from a user preset, the audio unit should override the setter
for the currentPreset property and check the preset number to determine the type of preset.
If the preset number is >= 0 then the preset is a factory preset.
If the preset number is < 0 then it is a user preset.
This method can then be called to retrieve the state stored in a user preset and the audio
unit can assign this to fullState or fullStateForDocument.
@param userPreset
The preset to be selected.
@param outError
In the event of a failure, the method will return nil and outError will be set to an
NSError, describing the problem.
Some possible errors:
- domain: NSOSStatusErrorDomain code: kAudioUnitErr_NoConnection
- domain: NSPOSIXErrorDomain code: ENOENT
- domain: NSCocoaErrorDomain code: NSCoderReadCorruptError
@return
Returns nil if there was an error, otherwise returns a dictionary containing the full state
of the audio unit saved in the preset.
For details on the possible keys present in the full state dictionary, please see the
documentation for kAudioUnitProperty_ClassInfo.
The minimal set of keys and their type is: @kAUPresetTypeKey : NSNumber,
@kAUPresetSubtypeKey : NSNumber,
@kAUPresetManufacturerKey : NSNumber,
@kAUPresetVersionKey : NSNumber,
@kAUPresetNameKey : NSString,
@kAUPresetNumberKey: NSNumber,
@kAUPresetDataKey : NSData
*/
- (nullable NSDictionary<NSString *, id> *)presetStateFor:(AUAudioUnitPreset *)userPreset error:(NSError **)outError API_AVAILABLE(macos(10.15), ios(13.0), watchos(6.0), tvos(13.0));
/*! @property supportsUserPresets
@brief Specifies whether an audio unit supports loading and saving user presets
@discussion
The audio unit should set this property to YES if a user preset can be assigned to
currentPreset.
Audio unit host applications should query this property to determine whether the audio unit
supports user presets.
Assigning a user preset to the currentPreset property of an audio unit that does not support
restoring state from user presets may result in incorrect behavior.
*/
@property (NS_NONATOMIC_IOSONLY, readonly) BOOL supportsUserPresets API_AVAILABLE(macos(10.15), ios(13.0), watchos(6.0), tvos(13.0));
/*! @property isLoadedInProcess
@brief Set to YES when an AUAudioUnit is loaded in-process
@discussion
If the AUAudioUnit is instantiated with kAudioComponentInstantiation_LoadInProcess, but the
audio unit is not packaged properly to support loading in-process, the system will silently
fall back to loading the audio unit out-of-process.
This property can be used to determine whether the instantiation succeeded as intended and
the audio unit is running in-process.
The presence of an extension process is not sufficient indication that the audio unit failed
to load in-process, since the framework might launch the audio unit extension process to
fulfill auxiliary functionality. If the audio unit is loaded in-process then rendering is
done in the host process. Other operations that are not essential to rendering audio, might
be done in the audio unit's extension process.
*/
@property (NS_NONATOMIC_IOSONLY, readonly) BOOL isLoadedInProcess API_AVAILABLE(macos(10.15)) API_UNAVAILABLE(ios, watchos, tvos);
/*! @property currentPreset
@brief The audio unit's last-selected preset.
@discussion
Hosts can let the user select a preset by setting this property. Note that when getting
this property, it does not reflect whether parameters may have been modified since the
preset was selected.
Bridged to the v2 property kAudioUnitProperty_PresentPreset.
*/
@property (NS_NONATOMIC_IOSONLY, retain, nullable) AUAudioUnitPreset *currentPreset;
/*! @property latency
@brief The audio unit's processing latency, in seconds.
@discussion
This property reflects the delay between when an impulse in the unit's audio unit stream
arrives in the input vs. output streams. This should reflect the delay due
to signal processing (e.g. filters, FFT's, etc.), not delay or reverberation which is
being applied as an effect.
Note that a latency that varies with parameter settings, including bypass, is generally not
useful to hosts. A host is usually only prepared to add delays before starting to render and
those delays need to be fixed. A variable delay would introduce artifacts even if the host
could track it. If an algorithm has a variable latency it should be adjusted upwards to some
fixed latency within the audio unit. If for some reason this is not possible, then latency
could be regarded as an unavoidable consequence of the algorithm and left unreported (i.e.
with a value of 0).
Bridged to the v2 property kAudioUnitProperty_Latency.
*/
@property (NS_NONATOMIC_IOSONLY, readonly) NSTimeInterval latency;
/*! @property tailTime
@brief The audio unit's tail time, in seconds.
@discussion
This property reflects the time interval between when the input stream ends or otherwise
transitions to silence, and when the output stream becomes silent. Unlike latency, this
should reflect the duration of a delay or reverb effect.
Bridged to the v2 property kAudioUnitProperty_TailTime.
*/
@property (NS_NONATOMIC_IOSONLY, readonly) NSTimeInterval tailTime;
/*! @property renderQuality
@brief Provides a trade-off between rendering quality and CPU load.
@discussion
The range of valid values is 0-127.
Bridged to the v2 property kAudioUnitProperty_RenderQuality.
*/
@property (NS_NONATOMIC_IOSONLY) NSInteger renderQuality;
/*! @property shouldBypassEffect
@brief Directs an effect to route input directly to output, without any processing.
@discussion
Bridged to the v2 property kAudioUnitProperty_BypassEffect.
*/
@property (NS_NONATOMIC_IOSONLY) BOOL shouldBypassEffect;
/*! @property canProcessInPlace
@brief Expresses whether an audio unit can process in place.
@discussion
In-place processing is the ability for an audio unit to transform an input signal to an
output signal in-place in the input buffer, without requiring a separate output buffer.
A host can express its desire to process in place by using null mData pointers in the output
buffer list. The audio unit may process in-place in the input buffers. See the discussion of
renderBlock.
Partially bridged to the v2 property kAudioUnitProperty_InPlaceProcessing; in v3 it is not
settable.
Defaults to NO. Subclassers can override to return YES.
*/
@property (NS_NONATOMIC_IOSONLY, readonly) BOOL canProcessInPlace;
/*! @property renderingOffline
@brief Communicates to an audio unit that it is rendering offline.
@discussion
A host should set this property when using an audio unit in a context where there are no
realtime deadlines, before asking the unit to allocate render resources. An audio unit may
respond by using a more expensive signal processing algorithm, or allowing itself to block
at render time if data being generated on secondary work threads is not ready in time.
(Normally, in a realtime thread, this data would have to be dropped).
Bridged to the v2 property kAudioUnitProperty_OfflineRender.
*/
@property (NS_NONATOMIC_IOSONLY, getter=isRenderingOffline) BOOL renderingOffline;
/*! @property channelCapabilities
@brief Expresses valid combinations of input and output channel counts.
@discussion
Elements are NSNumber containing integers; [0]=input count, [1]=output count, [2]=2nd input
count, [3]=2nd output count, etc.
An input, output count of (2, 2) signifies that the audio unit can process 2 input channels
to 2 output channels.
Negative numbers (-1, -2) indicate *any* number of channels. (-1, -1) means any number
of channels on input and output as long as they are the same. (-1, -2) means any number of
channels on input or output, without the requirement that the counts are the same.
A negative number less than -2 is used to indicate a total number of channels across every
bus in that scope, regardless of how many channels are set on any particular bus. For
example, (-16, 2) indicates that a unit can accept up to 16 channels of input across its
input busses, but will only produce 2 channels of output.
Zero on either side (though typically input) means "not applicable", because there are no
elements on that side.
Bridged to the v2 property kAudioUnitProperty_SupportedNumChannels.
*/
@property (NS_NONATOMIC_IOSONLY, readonly, copy, nullable) NSArray<NSNumber *> *channelCapabilities;
/*! @property musicalContextBlock
@brief A callback for the AU to call the host for musical context information.
@discussion
Note that an audio unit implementation accessing this property should cache it in
realtime-safe storage before beginning to render.
Bridged to the HostCallback_GetBeatAndTempo and HostCallback_GetMusicalTimeLocation
callback members in kAudioUnitProperty_HostCallbacks.
*/
@property (NS_NONATOMIC_IOSONLY, copy, nullable) AUHostMusicalContextBlock musicalContextBlock;
/*! @property transportStateBlock
@brief A callback for the AU to call the host for transport state information.
@discussion
Note that an audio unit implementation accessing this property should cache it in
realtime-safe storage before beginning to render.
Bridged to the HostCallback_GetTransportState and HostCallback_GetTransportState2
callback members in kAudioUnitProperty_HostCallbacks.
*/
@property (NS_NONATOMIC_IOSONLY, copy, nullable) AUHostTransportStateBlock transportStateBlock;
/*! @property contextName
@brief Information about the host context in which the audio unit is connected, for display
in the audio unit's view.
@discussion
For example, a host could set "track 3" as the context, so that the audio unit's view could
then display to the user "My audio unit on track 3".
Bridged to the v2 property kAudioUnitProperty_ContextName.
*/
@property (NS_NONATOMIC_IOSONLY, copy, nullable) NSString *contextName;
/*! @property supportsMPE
@brief Specifies whether an audio unit supports Multi-dimensional Polyphonic Expression.
@discussion
Bridged to the v2 property kAudioUnitProperty_SupportsMPE.
*/
@property (NS_NONATOMIC_IOSONLY, readonly) BOOL supportsMPE API_AVAILABLE(macos(10.12), ios(10.0), watchos(3.0), tvos(10.0));
/*! @property channelMap
@brief Specify a mapping of input channels to output channels.
@discussion
Converter and input/output audio units may support re-ordering or splitting of input
channels to output channels. The number of channels in the channel map is the number of
channels of the destination (output format). The channel map entries contain a channel
number of the source channel that should be mapped to that destination channel. If -1 is
specified, then that destination channel will not contain any channel from the source (so it
will be silent).
If the property value is nil, then the audio unit does not support this property.
Bridged to the v2 property kAudioOutputUnitProperty_ChannelMap.
*/
@property (NS_NONATOMIC_IOSONLY, copy, nullable) NSArray<NSNumber *> *channelMap API_AVAILABLE(macos(10.12), ios(10.0), watchos(3.0), tvos(10.0));
/*! @method profileStateForCable:channel:
@brief Given a MIDI cable and channel number, return the supported MIDI-CI Profiles.
@param cable
The virtual MIDI cable for which the profiles are requested.
@param channel
The MIDI channel for which the profiles are requested.
@return
A MIDICIProfileState object containing all the supported MIDI-CI profiles for this channel
on this cable.
*/
- (MIDICIProfileState *)profileStateForCable:(uint8_t)cable channel:(MIDIChannelNumber)channel API_AVAILABLE(macos(10.14), ios(12.0)) __WATCHOS_PROHIBITED __TVOS_PROHIBITED;
/*! @method enableProfile:cable:onChannel:error:
@brief Enable a MIDI-CI Profile on the specified cable/channel.
@param profile
The MIDI-CI profile to be enabled.
@param cable
The virtual MIDI cable.
@param channel
The MIDI channel.
@param outError
Returned in the event of failure.
@return
YES for success. NO in the event of a failure, in which case the error is returned
in outError.
*/
- (BOOL)enableProfile:(MIDICIProfile *)profile
cable:(uint8_t)cable
onChannel:(MIDIChannelNumber)channel
error:(NSError **)outError API_AVAILABLE(macos(10.14), ios(12.0)) __WATCHOS_PROHIBITED __TVOS_PROHIBITED;
/*! @method disableProfile:cable:onChannel:error:
@brief Disable a MIDI-CI Profile on the specified cable/channel.
@param profile
The MIDI-CI profile to be disabled.
@param cable
The virtual MIDI cable.
@param channel
The MIDI channel.
@param outError
Returned in the event of failure.
@return
YES for success. NO in the event of a failure, in which case the error is returned
in outError.
*/
- (BOOL)disableProfile:(MIDICIProfile *)profile
cable:(uint8_t)cable
onChannel:(MIDIChannelNumber)channel
error:(NSError **)outError API_AVAILABLE(macos(10.14), ios(12.0)) __WATCHOS_PROHIBITED __TVOS_PROHIBITED;
/*! @property profileChangedBlock
@brief A block called when a device notifies that a MIDI-CI profile has been enabled or
disabled.
@discussion
Since enabling / disabling MIDI-CI profiles is an asynchronous operation, the host can set
this block and the audio unit is expected to call it every time the state of a MIDI-CI
profile has changed.
*/
@property (nonatomic, nullable) AUMIDICIProfileChangedBlock profileChangedBlock API_AVAILABLE(macos(10.14), ios(12.0)) __WATCHOS_PROHIBITED __TVOS_PROHIBITED;
@end
// =================================================================================================
/*! @typedef AUInputHandler
@brief Block to notify the client of an I/O unit that input is available.
@param actionFlags
Pointer to action flags.
@param timestamp
The HAL time at which the input data was captured. If there is a sample rate conversion
or time compression/expansion downstream, the sample time will not be valid.
@param frameCount
The number of sample frames of input available.
@param inputBusNumber
The index of the input bus from which input is available.
@discussion The input data is obtained by calling the render block of the audio unit.
The AUAudioUnit is not provided since it is not safe to message an Objective C
object in a real time context.
*/
typedef void (^AUInputHandler)(AudioUnitRenderActionFlags *actionFlags, const AudioTimeStamp *timestamp, AUAudioFrameCount frameCount, NSInteger inputBusNumber);
/*! @brief Additional methods for audio units which can do input/output.
@discussion These methods will fail if the audio unit is not an input/output audio unit.
*/
@interface AUAudioUnit (AUAudioInputOutputUnit)
/*! @property canPerformInput
@brief Whether the I/O device can perform input.
*/
@property (nonatomic, readonly) BOOL canPerformInput;
/*! @property canPerformOutput
@brief Whether the I/O device can perform output.
*/
@property (nonatomic, readonly) BOOL canPerformOutput;
/*! @property inputEnabled
@brief Flag enabling audio input from the unit.
@discussion Input is disabled by default. This must be set to YES if input audio is desired.
Setting to YES will have no effect if canPerformInput is false.
*/
@property (nonatomic, getter=isInputEnabled) BOOL inputEnabled;
/*! @property outputEnabled
@brief Flag enabling audio output from the unit.
@discussion Output is enabled by default.
Setting to YES will have no effect if canPerformOutput is false.
*/
@property (nonatomic, getter=isOutputEnabled) BOOL outputEnabled;
/*! @property outputProvider
@brief The block that the output unit will call to get audio to send to the output.
@discussion This block must be set if output is enabled.
*/
@property (nonatomic, copy, nullable) AURenderPullInputBlock outputProvider;
/*! @property inputHandler
@brief The block that the output unit will call to notify when input is available.
@discussion See discussion for AUInputHandler.
*/
@property (nonatomic, copy, nullable) AUInputHandler inputHandler;
#if !TARGET_OS_IPHONE
/*! @property device
@brief Get the I/O hardware device.
*/
@property (nonatomic, readonly) AUAudioObjectID deviceID;
/*! @method setDeviceID:error:
@brief Set the I/O hardware device.
@param deviceID
The device to select.
@param outError
Returned in the event of failure.
*/
- (BOOL)setDeviceID:(AUAudioObjectID)deviceID error:(NSError **)outError;
/*! @property deviceInputLatency
@brief The audio device's input latency, in seconds.
@discussion
Bridged to the HAL property kAudioDevicePropertyLatency, which is implemented
by v2 input/output units.
*/
@property (nonatomic, readonly) NSTimeInterval deviceInputLatency API_AVAILABLE(macos(10.13));
/*! @property deviceOutputLatency
@brief The audio device's output latency, in seconds.
@discussion
Bridged to the HAL property kAudioDevicePropertyLatency, which is implemented
by v2 input/output units.
*/
@property (nonatomic, readonly) NSTimeInterval deviceOutputLatency API_AVAILABLE(macos(10.13));
#endif // TARGET_OS_IPHONE
/*! @property running
@brief The audio device's running state.
*/
@property (nonatomic, readonly, getter=isRunning) BOOL running API_AVAILABLE(macos(10.13), ios(11.0), watchos(4.0), tvos(11.0));
/*! @method startHardwareAndReturnError:
@brief Starts the audio hardware.
@param outError
Returned in the event of failure.
*/
- (BOOL)startHardwareAndReturnError:(NSError **)outError;
/*! @method stopHardware
@brief Stops the audio hardware.
*/
- (void)stopHardware;
/*! @property osWorkgroup
@brief The os_workgroup_t to which the input/output audio unit belongs.
@discussion
For further background, see <AudioToolbox/AudioWorkInterval.h>.
Bridged to the v2 property kAudioOutputUnitProperty_OSWorkgroup.
*/
@property (NS_NONATOMIC_IOSONLY, readonly) os_workgroup_t osWorkgroup
API_AVAILABLE(macos(11.0), ios(14.0), watchos(7.0), tvos(14.0))
__SWIFT_UNAVAILABLE_MSG("Swift is not supported for use with audio realtime threads");
@end
// =================================================================================================
/*! @class AUAudioUnitBusArray
@brief Container for an audio unit's input or output busses.
@discussion
Hosts can observe a bus property across all busses by using KVO on this object, without
having to observe it on each individual bus. (One could add listeners to individual busses,
but that means one has to observe bus count changes and add/remove listeners in response.
Also, NSArray's addObserver:toObjectsAtIndexes:forKeyPath:options:context: is problematic;
it does not let the individual objects override the observation request, and so a bus which
is proxying a bus in an extension process does not get the message.)
Some audio units (e.g. mixers) support variable numbers of busses, via subclassing. When the
bus count changes, a KVO notification is sent on "inputBusses" or "outputBusses," as
appropriate.
Subclassers should see also the AUAudioUnitBusImplementation category.
The bus array is bridged to the v2 property kAudioUnitProperty_ElementCount.
*/
API_AVAILABLE(macos(10.11), ios(9.0), watchos(2.0), tvos(9.0))
@interface AUAudioUnitBusArray : NSObject <NSFastEnumeration>
- (instancetype)init NS_UNAVAILABLE;
/*! @method initWithAudioUnit:busType:busses:
@brief Initializes by making a copy of the supplied bus array.
*/
- (instancetype)initWithAudioUnit:(AUAudioUnit *)owner busType:(AUAudioUnitBusType)busType busses:(NSArray <AUAudioUnitBus *> *)busArray NS_DESIGNATED_INITIALIZER;
/*! @method initWithAudioUnit:busType:
@brief Initializes an empty bus array.
*/
- (instancetype)initWithAudioUnit:(AUAudioUnit *)owner busType:(AUAudioUnitBusType)busType;
/*! @property count
*/
@property (NS_NONATOMIC_IOSONLY, readonly) NSUInteger count;
/*! @method objectAtIndexedSubscript:
*/
- (AUAudioUnitBus *)objectAtIndexedSubscript:(NSUInteger)index;
/*! @property countChangeable
@brief Whether the array can have a variable number of busses.
@discussion
The base implementation returns false.
*/
@property (NS_NONATOMIC_IOSONLY, readonly, getter=isCountChangeable) BOOL countChangeable;
/*! @property setBusCount:error:
@brief Change the number of busses in the array.
*/
- (BOOL)setBusCount:(NSUInteger)count error:(NSError **)outError;
/*! @method addObserverToAllBusses:forKeyPath:options:context:
@brief Add a KVO observer for a property on all busses in the array.
*/
- (void)addObserverToAllBusses:(NSObject *)observer forKeyPath:(NSString *)keyPath options:(NSKeyValueObservingOptions)options context:(void * __nullable)context;
/*! @method removeObserverFromAllBusses:forKeyPath:context:
@brief Remove a KVO observer for a property on all busses in the array.
*/
- (void)removeObserverFromAllBusses:(NSObject *)observer forKeyPath:(NSString *)keyPath context:(void * __nullable)context;
/// The audio unit that owns the bus.
@property (NS_NONATOMIC_IOSONLY, readonly, assign) AUAudioUnit *ownerAudioUnit;
/// Which bus array this is (input or output).
@property (NS_NONATOMIC_IOSONLY, readonly) AUAudioUnitBusType busType;
@end
// =================================================================================================
/*! @class AUAudioUnitBus
@brief An input or output connection point on an audio unit.
*/
API_AVAILABLE(macos(10.11), ios(9.0), watchos(2.0), tvos(9.0))
@interface AUAudioUnitBus : NSObject
/*! @property format
@brief The audio format and channel layout of audio being transferred on the bus.
@discussion
Bridged to the v2 property kAudioUnitProperty_StreamFormat.
*/
@property (NS_NONATOMIC_IOSONLY, readonly) AVAudioFormat *format;
/*! @property setFormat:error:
@brief Sets the bus's audio format.
@discussion
Audio units can generally be expected to support AVAudioFormat's standard format
(deinterleaved 32-bit float), at any sample rate. Channel counts can be more complex;
see AUAudioUnit.channelCapabilities.
*/
- (BOOL)setFormat:(AVAudioFormat *)format error:(NSError **)outError;
/*! @property shouldAllocateBuffer
@brief Controls the audio unit's allocation strategy for a bus.
@discussion
Hosts can set this flag to communicate whether an audio unit should allocate its own buffer.
By default this flag is set to true.
On the output side, shouldAllocateBuffer=false means the AU can assume that it will be
called with non-null output buffers. If shouldAllocateBuffer=true (the default), the AU must
be prepared to be called with null pointers and replace them with pointers to its internally
allocated buffer.
On the input side, shouldAllocateBuffer=false means the AU can pull for input using a buffer
list with null buffer pointers, and assume that the pull input block will provide pointers.
If shouldAllocateBuffer=true (the default), the AU must pull with non-null pointers while
still being prepared for the source to replace them with pointers of its own.
Bridged to the v2 property kAudioUnitProperty_ShouldAllocateBuffer.
*/
@property (NS_NONATOMIC_IOSONLY) BOOL shouldAllocateBuffer API_AVAILABLE(macos(10.13), ios(11.0), watchos(4.0), tvos(11.0));
/*! @property enabled
@brief Whether the bus is active.
@discussion
Hosts must enable input busses before using them. The reason for this is to allow a unit
such as a mixer to be prepared to render a large number of inputs, but avoid the work
of preparing to pull inputs which are not in use.
Bridged to the v2 properties kAudioUnitProperty_MakeConnection and
kAudioUnitProperty_SetRenderCallback.
*/
@property (NS_NONATOMIC_IOSONLY, getter=isEnabled) BOOL enabled;
/*! @property name
@brief A name for the bus. Can be set by host.
*/
@property (NS_NONATOMIC_IOSONLY, copy, nullable) NSString *name;
/*! @property index
@brief The index of this bus in the containing array.
*/
@property (NS_NONATOMIC_IOSONLY, readonly) NSUInteger index;
/*! @property busType
@brief The AUAudioUnitBusType.
*/
@property (NS_NONATOMIC_IOSONLY, readonly) AUAudioUnitBusType busType;
/*! @property ownerAudioUnit
@brief The audio unit that owns the bus.
*/
@property (NS_NONATOMIC_IOSONLY, readonly, assign) AUAudioUnit *ownerAudioUnit;
/*! @property supportedChannelLayoutTags
@discussion
This is an array of NSNumbers representing AudioChannelLayoutTag.
*/
@property (NS_NONATOMIC_IOSONLY, readonly, copy, nullable) NSArray<NSNumber *> *supportedChannelLayoutTags;
/*! @property contextPresentationLatency
@brief Information about latency in the audio unit's processing context.
@discussion
This should not be confused with the audio unit's latency property, where the audio unit
describes to the host any processing latency it introduces between its input and its output.
A host may set this property to describe to the audio unit the presentation latency of its
input and/or output audio data. Latency is described in seconds. A value of zero means
either no latency or an unknown latency.
A host should set this property on each active bus, since, for example, the audio routing
path to each of multiple output busses may differ.
For input busses:
Describes how long ago the audio arriving on this bus was acquired. For instance, when
reading from a file to the first audio unit in a chain, the input presentation latency
is zero. For audio input from a device, this initial input latency is the presentation
latency of the device itself, i.e. the device's safety offset and latency.
A second chained audio unit's input presentation latency will be the input presentation
latency of the first unit, plus the processing latency of the first unit.
For output busses:
Describes how long it will be before the output audio of an audio unit is presented. For
instance, when writing to a file, the output presentation latency of the last audio unit
in a chain is zero. When the audio from that audio unit is to be played to a device,
then that initial presentation latency will be the presentation latency of the device
itself, which is the I/O buffer size, plus the device's safety offset and latency
A previous chained audio unit's output presentation latency is the last unit's
presentation latency plus its processing latency.
So, for a given audio unit anywhere within a mixing graph, the input and output presentation
latencies describe to that unit how long from the moment of generation it has taken for its
input to arrive, and how long it will take for its output to be presented.
Bridged to the v2 property kAudioUnitProperty_PresentationLatency.
*/
@property (NS_NONATOMIC_IOSONLY) NSTimeInterval contextPresentationLatency;
@end
// =================================================================================================
/*! @class AUAudioUnitPreset
@brief A collection of parameter settings provided by the audio unit implementor, producing a
useful sound or starting point.
*/
API_AVAILABLE(macos(10.11), ios(9.0), watchos(2.0), tvos(9.0))
@interface AUAudioUnitPreset : NSObject <NSSecureCoding>
/*! @property number
@brief The preset's unique numeric identifier.
*/
@property (NS_NONATOMIC_IOSONLY) NSInteger number;
/*! @property name
@brief The preset's name.
*/
@property (NS_NONATOMIC_IOSONLY, copy) NSString *name;
@end
NS_ASSUME_NONNULL_END
#endif // __OBJC2__
#endif // AudioToolbox_AUAudioUnit_h
#else
#include <AudioToolboxCore/AUAudioUnit.h>
#endif
|
0 | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/AudioToolbox.framework | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/AudioToolbox.framework/Headers/AudioUnitProperties.h | #if (defined(__USE_PUBLIC_HEADERS__) && __USE_PUBLIC_HEADERS__) || (defined(USE_AUDIOTOOLBOX_PUBLIC_HEADERS) && USE_AUDIOTOOLBOX_PUBLIC_HEADERS) || !__has_include(<AudioToolboxCore/AudioUnitProperties.h>)
/*!
@file AudioUnitProperties.h
@framework AudioToolbox.framework
@copyright (c) 2000-2018 Apple, Inc. All rights reserved.
@abstract Property ID's and accompanying structs used by Apple audio units.
@discussion
Properties form the basis of much of the audio unit API. You use them with
these AudioUnit.framework API functions declared in AUComponent.h:
AudioUnitGetPropertyInfo
AudioUnitGetProperty
AudioUnitSetProperty
This file first lists generic audio unit properties (those that are potentially applicable to
any audio unit), followed by properties specific to Apple audio units.
Apple reserves property IDs from 0 -> 63999. Developers are free to use property IDs above this
range.
All property values are passed by reference. When a property's value type is listed below,
that value type is always passed by reference. For example, CFStringRef is passed as
&myCFString.
Properties are described below using a general form:
Scope: The audio unit scope that the property applies to. For example, Global,
Input, Output, etc. For an explanation of audio unit scopes, see the
Audio Unit Programming Guide in the ADC Reference Library.
Value Type: The data type used to hold the value associated with the property. For
example, CFStringRef or UInt32
Access: How a host application can access the property in a hosted audio unit:
read only, write only, or read/write.
Description: A description of the property's role.
The descriptions in this file apply to typical or recommended usage. Audio unit developers can
vary the way each property is used. For example, a property may be described as applying to both
input and output scopes, but a given audio unit may implement the property on the input scope
only. As another example, a property may be described here as having read/write access, but an
audio unit may implement the property as read only.
The properties are divided into two primary sections:
(1) Core/Embedded Implementation
- these properties are available on all platforms where audio units are available
(2) OS X
- these properties are available on only available on OS X
*/
#ifndef AudioToolbox_AudioUnitProperties_h
#define AudioToolbox_AudioUnitProperties_h
#include <AudioToolbox/AUComponent.h>
#include <os/workgroup.h>
CF_ASSUME_NONNULL_BEGIN
//=====================================================================================================================
#pragma mark Overview
#pragma mark -
#pragma mark Core Implementation
#pragma mark -
/*!
@enum Audio Unit scope types
@abstract The scope IDs for audio units define basic roles and contexts for an audio
unit's state.
@discussion Each scope is a discrete context. Apple reserves scope IDs from 0 through 1024.
@constant kAudioUnitScope_Global
The context for audio unit characteristics that apply to the audio unit as a
whole.
@constant kAudioUnitScope_Input
The context for audio data coming into an audio unit.
@constant kAudioUnitScope_Output
The context for audio data leaving an audio unit.
@constant kAudioUnitScope_Group
A context specific to the control scope of parameters (for instance, MIDI
Channels is an example of this scope)
@constant kAudioUnitScope_Part
A distinct rendering context. For instance a single timbre in a
multi-timbral instrument, a single loop in a multi looping capable looper
unit, etc.
@constant kAudioUnitScope_Note
A scope that can be used to apply changes to an individual note. The
elementID used with this scope is the unique note ID returned from a started
note (see MusicDeviceStartNote)
@constant kAudioUnitScope_Layer
A context which functions as a layer within a part and allows grouped
control of LayerItem-scope parameters. An example is the percussive attack
layer for an electric organ instrument.
@constant kAudioUnitScope_LayerItem
A scope which represents an individual element within a particular Layer
scope. The individual sample zones, envelope generators, and filters within
a synth are examples of this.
*/
CF_ENUM(AudioUnitScope) {
kAudioUnitScope_Global = 0,
kAudioUnitScope_Input = 1,
kAudioUnitScope_Output = 2,
kAudioUnitScope_Group = 3,
kAudioUnitScope_Part = 4,
kAudioUnitScope_Note = 5,
kAudioUnitScope_Layer = 6,
kAudioUnitScope_LayerItem = 7
};
//=====================================================================================================================
#pragma mark Audio Unit Properties
/*!
@enum Generic Property IDs
@abstract Properties that can apply to any audio unit.
@constant kAudioUnitProperty_ClassInfo
Scope: Global (or Part for a part scope preset)
Value Type: CFDictionaryRef
Access: Read / Write
The complete state of an audio unit if on global scope. An audio unit that supports part scope, may also support presets on the part scope
that apply to individual parts.
After a host sets this property it needs to notify the parameter listeners that the values of the parameters of an AU may have changed (so
views, etc, can update their state). Something like the following code should be used:
<code>
#include <AudioToolbox/AudioUnitUtilities.h>
AudioUnitParameter changedUnit;
changedUnit.mAudioUnit = theChangedAU;
changedUnit.mParameterID = kAUParameterListener_AnyParameter;
AUParameterListenerNotify (NULL, NULL, &changedUnit);
</code>
@constant kAudioUnitProperty_MakeConnection
Scope: Input
Value Type: AudioUnitConnection
Access: Write
@constant kAudioUnitProperty_SampleRate
Scope: Input / Output
Value Type: Float64
Access: Read / Write
@constant kAudioUnitProperty_ParameterList
Scope: Any
Value Type: AudioUnitParameterID
Access: Read
The list of parameter IDs on the specified scope
@constant kAudioUnitProperty_ParameterInfo
Scope: Any
Element: AudioUnitParameterID of the parameter being queried
Value Type: AudioUnitParameterInfo
Access: Read
The info struct describes the general characteristics of an individual parameterID
@constant kAudioUnitProperty_FastDispatch
Scope: Global
Value Type: void* (function pointer)
Access: Read
The caller provides the selector for a given audio unit API, and retrieves a function pointer for that selector. For instance,
this enables the caller to retrieve the function pointer for the AudioUnitRender call, so that call can be made directly
through to the audio unit to avoid the overhead of the ComponentMgr's dispatch.
@constant kAudioUnitProperty_CPULoad
Scope: Global
Value Type: Float64
Access: Read
Can be used to retrieve the duty cycle (as a value from 0 to 1) of the render time that an audio unit is spending in its render call.
@constant kAudioUnitProperty_StreamFormat
Scope: Input / Output
Value Type: AudioStreamBasicDescription
Access: Read / Write
An AudioStreamBasicDescription is used to specify the basic format for an audio data path. For instance, 2 channels, 44.1KHz, Float32 linear pcm.
The value can be both set and retrieve from an I/O element (bus)
@constant kAudioUnitProperty_ElementCount
Scope: Any (though Global scope will always have an element count of 1)
Value Type: UInt32
Access: Read / Write
Most audio units will only implement the read version of this call, thus they would have a fixed bus topology (number of input and output elements/buses).
Some audio units possess the capability to add or remove elements, so in that case this property will be writable.
@constant kAudioUnitProperty_Latency
Scope: Global
Value Type: Float64
Access: Read
The processing latency (the time it takes an audio unit to represent an input in its audio output) specified in seconds
@constant kAudioUnitProperty_SupportedNumChannels
Scope: Global
Value Type: AUChannelInfo array
Access: Read
The size of this property will represent the number of AUChannelInfo structs that an audio unit provides. Each entry describes a particular number of
channels on any input, matched to a particular number of channels on any output. Thus an entry {2, 2} says the audio unit will support a channel configuration
of 2 channels on an input and 2 channels on an output.
Negative numbers (-1, -2) are used to indicate *any* number of channels. So {-1, -1} means any number of channels on input and output as long as they are the same.
{-1, -2} means any number of channels on input or output buses
A negative number less than -2 is used to indicate a total number of channels across every bus on that scope, regardless of how many channels are set on any
particular bus.
Zero on any side (typically only input) means that the audio unit doesn't have any input elements, and is expressing the capability of configuring its output channels.
@constant kAudioUnitProperty_MaximumFramesPerSlice
Scope: Global
Value Type: UInt32
Access: Read / Write
This property is used to describe to an audio unit the maximum number of samples it will be asked to produce on any single given call to audio unit render.
If an audio unit can require more or less input data than its output request, then it should limit any given request for input to this number of frames (that is,
it should "break up" its input pulls).
@constant kAudioUnitProperty_SetExternalBuffer
Scope: Global
Value Type: AudioUnitExternalBuffer
Access: Write
This is used to provide to an audio unit a buffer that it can use with its input render callback's audio buffer list
@constant kAudioUnitProperty_ParameterValueStrings
Scope: Any
Element: AudioUnitParameterID of the parameter being queried
Value Type: CFArrayRef
Access: Read
Some audio unit parameters that are of an index type, can also provide names for each value of the parameter. This property returns an array containing CFStrings, where
each element in the array is the name that should be used for that parameter value. The size of the array should be the same as the range between the parameters min and max values.
The array's strings can then be used to build a menu for that parameter.
@constant kAudioUnitProperty_GetUIComponentList
Scope: Any
Value Type: AudioComponentDescription array
Access: Read
Presents an array of AudioComponentDescription that are of type 'auvw' (AudioUnitCarbonView). These are the carbon based custom views for that audio unit.
@constant kAudioUnitProperty_AudioChannelLayout
Scope: Input/Output
Value Type: struct AudioChannelLayout
Access: read/write
Description:
Describes for a given scope/element the order of channels within a given stream.
The number of channels it describes must match the number of channels set for that
scope/element. Each input and output bus in an audio unit can have one instance of
this property.
Some audio units require this property. For example, the 3DMixer unit must
implement this property on its output bus. If a host application attempts to
clear the value of this property on a bus that requires a valid value, the
audio unit will return a kAudioUnitErr_InvalidPropertyValue error.
Input and output buses can be in one of three states in regard to Audio
channel layout:
1. implemented and set
2. implemented but not set
3. unimplemented
Requesting the value of this property when it is implemented but not set
results in a kAudioUnitErr_PropertyNotInUse error.
Use the kAudioUnitProperty_AudioChannelLayout property whenever channel
layout is relevant. By comparison, the kAudioUnitProperty_StreamFormat
property cannot specify channel layout or purpose.
See also: kAudioUnitProperty_SupportedChannelLayoutTags,
kAudioUnitProperty_StreamFormat.
@constant kAudioUnitProperty_TailTime
Scope: Global
Value Type: Float64
Access: Read
The time in seconds that will remain after the last valid input of any audio unit has been processed before the output is silent. For example, this could be the total
decay time of a reverb or a delay. In general this will be a conservative estimate.
@constant kAudioUnitProperty_BypassEffect
Scope: Global
Value Type: UInt32
Access: Read / Write
A boolean value that can be used to bypass the processing in an effect unit, so that the input is passed unchanged through to the output
@constant kAudioUnitProperty_LastRenderError
Scope: Global
Value Type: OSStatus
Access: Read
This property is set if there is an error in AudioUnitRender. The AU will then fire a property changed notification to any listeners on this property and
those listeners can then use this property ID to retrieve that error.
@constant kAudioUnitProperty_SetRenderCallback
Scope: Input
Value Type: AURenderCallbackStruct
Access: Write
This is used to provide the audio unit with input on the specified element (input bus) with audio data from the provided callback. The callback is delivered a buffer list
which it must fill in with audio data. If no data is available, it should set the audio data to 0 (silence). In the normal case, f an error is returned, the audio is not processed
and the audio unit will return an error from AudioUnitRender.
@constant kAudioUnitProperty_FactoryPresets
Scope: Global
Value Type: CFArray of AUPreset structures
Access: Read
An array of preset structures that provide a name and number for each preset. A factory preset is then chosen using the PresentPreset property.
@constant kAudioUnitProperty_ContextName
Scope: Global
Value Type: CFString
Access: Read / Write
The host can set this as information to the audio unit to describe something about the context within which the audio unit is instantiated. For instance, "track 3" could
be set as the context, so that the audio unit's view could then display "My audio unit on track 3" as information to the user of the particular context for any audio unit.
@constant kAudioUnitProperty_RenderQuality
Scope: Global
Value Type: UInt32
Access: Read / Write
A value (0 - 127) that can be used to control the quality (complexity) of the rendering operation. A typical usage is to set render quality to maximum for best quality, but
if CPU usage is a concern a lesser quality can be set to trade off render quality.
@constant kAudioUnitProperty_HostCallbacks
Scope: Global
Value Type: HostCallbackInfo
Access: Write
The audio unit should only call the host callbacks while it is in its render function. The audio unit must provide the client info when calling the callbacks as provided
by the host. They are provided as a means for an audio unit to gain information from the host about parameters that may affect its rendering operation.
For example, what is the current beat of the host, is the transport running, and so forth.
Any of the parameters of the callback function, when called by the audio unit, can be NULL. This indicates that the unit doesn't want to know that particular information.
The exception is that the unit must always specify the HostUserData which was be supplied to the unit when the property was set.
If the host is unable to provide the requested information then it can return the kAudioUnitErr_CannotDoInCurrentContext error code
@constant kAudioUnitProperty_InPlaceProcessing
Scope: Global
Value Type: UInt32
Access: Read / Write
A property that can be used to determine if the audio unit can process input data on the same data as is provided to it, and if so this can be turned off if the host
has a particular buffer management strategy and such an operation would defeat that.
@constant kAudioUnitProperty_ElementName
Scope: any
Value Type: CFStringRef
Access: read/write
Description:
The name of the specified element. The Host owns a reference to this property value
(as with all other CF properties), and should release the string retrieved or used when setting.
@constant kAudioUnitProperty_CocoaUI
Scope: Global
Value Type: struct AudioUnitCocoaViewInfo
Access: read
Publishes the audio unit's custom Cocoa NSViews. The Host can determine how big this structure is by
querying the size of the property (i.e., How many alternate UI classes there are for the unit)
Typically, most audio units will provide 1 UI class per unit
@constant kAudioUnitProperty_SupportedChannelLayoutTags
Scope: Input/Output
Value Type: AudioChannelLayoutTags[ variable number of elements ]
Access: read only
Used with GetProperty to ascertain what an audio unit understands about
laying out of channel orders. This will normally return one or more of the specified layout tags.
When a specific set of layouts are returned, the client then uses the
kAudioUnitProperty_AudioChannelLayout property (with one of those layout tags specified) to set
the unit to use that layout. In this case the client (and the audio unit when reporting its
AudioChannelLayout) is only expected to have set an AudioChannelLayout which only sets the
layout tag as the valid field.
Custom Channel Maps:
Some audio units may return the tag:
kAudioChannelLayoutTag_UseChannelDescriptions
In this case, the host then can look at supported number of channels on that scope
(using the kAudioUnitProperty_SupportedNumChannels), and supply an AudioChannelLayout with the
kAudioUnitProperty_AudioChannelLayout property to specify the layout, number of channels
and location of each of those channels. This custom channel map MUST have a channel valence
that is supported by the Audio Unit.
The UseChannelBitmap field is NOT used within the context of the AudioUnit.
@constant kAudioUnitProperty_ParameterIDName
Scope: any
Value Type: AudioUnitParameterIDName
Access: read
An audio unit returns the full parameter name in the GetParameterInfo struct/property.
In some display situations however, there may only be room for a few characters, and
truncating this full name may give a less than optimal name for the user. Thus,
this property can be used to ask the audio unit whether it can supply a truncated name, with
the host suggesting a length (number of characters). If the unit returns a longer
name than the host requests, that name may be truncated to the requested characters in display.
The unit could return a shorter name than requested as well. The unit returns a CFString
that should be released by the host. When using this property, the host asks for
the name in the same scope and element as the unit publishes the parameter.
@constant kAudioUnitProperty_ParameterClumpName
Scope: any
Value Type: AudioUnitParameterIDName
Access: read
This works in a similar manner to the ParameterIDName property, except that the inID
value is one of the clumpID's that are returned with the audio unit's ParameterInfo
structure.
@constant kAudioUnitProperty_PresentPreset
Scope: Global/Part
Value Type: AUPreset
Access: read/write
This property replaces the deprecated CurrentPreset property, due to the ambiguity of
ownership of the CFString of the preset name in the older CurrentPreset property.
With PresentPreset the client of the audio unit owns the CFString when it retrieves the
preset with PresentPreset and is expected to release this (as with ALL properties
that retrieve a CF object from an audio unit).
@constant kAudioUnitProperty_OfflineRender
Scope: Global
Value Type: UInt32
Access: Read / Write
This is used by the host to indicate when an audio unit (that normally operates within a general real-time calling model) is
rendering in an offline context. A typical usage of this is to set this to true when the rendering operation an audio unit is being used within is
going to write out the results to a file. The value defaults to false, as the common usage of audio units is for real-time processing
@constant kAudioUnitProperty_ParameterStringFromValue
Scope: any
Value Type: AudioUnitParameterStringFromValue
Access: read
This property is used with parameters that are marked with the
kAudioUnitParameterFlag_HasName parameter info flag. This indicates that some
(or all) of the values represented by the parameter can and should be
represented by a special display string.
This is NOT to be confused with kAudioUnitProperty_ParameterValueStrings. That property
is used with parameters that are indexed and is typically used for instance to build
a menu item of choices for one of several parameter values.
kAudioUnitProperty_ParameterStringFromValue can have a continuous range, and merely states
to the host that if it is displaying those parameter's values, they should request
a name any time any value of the parameter is set when displaying that parameter.
For instance (a trivial example), a unit may present a gain parameter in a dB scale,
and wish to display its minimum value as "negative infinity". In this case, the audio unit
will not return names for any parameter value greater than its minimum value - so the host
will then just display the parameter value as is. For values less than or equal to the
minimum value, the audio unit will return a string for "negative infinity" which the host can
use to display appropriately.
A less trivial example might be a parameter that presents its values as seconds. However,
in some situations this value should be better displayed in a SMPTE style of display:
HH:MM:SS:FF
In this case, the audio unit would return a name for any value of the parameter.
The GetProperty call is used in the same scope and element as the inParamID
that is declared in the struct passed in to this property.
If the *inValue member is NULL, then the audio unit should take the current value
of the specified parameter. If the *inValue member is NOT NULL, then the audio unit should
return the name used for the specified value.
On exit, the outName may point to a CFStringRef (which if so must be released by the caller).
If the parameter has no special name that should be applied to that parameter value,
then outName will be NULL, and the host should display the parameter value as
appropriate.
@constant kAudioUnitProperty_ParameterValueFromString
Scope: any
Value Type: AudioUnitParameterValueFromString
Access: read
This property returns the value of a parameter from its string representation. See kAudioUnitProperty_ParameterStringFromValue.
@constant kAudioUnitProperty_IconLocation
Scope: Global
Value Type: CFURLRef
Access: Read
A URL that will specify the location of an icon file that can be used when presenting UI for this audio unit.
@constant kAudioUnitProperty_PresentationLatency
Scope: Input/Output
Value Type: Float64
Access: write
This property is set by a host to describe to the audio unit the presentation latency of both
any of its input and/or output audio data.
It describes this latency in seconds. A value of zero means either no latency
or an unknown latency.
This is a write only property because the host is telling the audio unit the latency of both the
data it provides it for input and the latency from getting the data from the unit until it is
presented.
The property is should be set on each active input and output bus (Scope/Element pair).
For example, an audio unit with multiple outputs will have the output data it produces processed
by different audio units, etc before it is mixed and presented. Thus, in this case, each output
element could have a different presentation latency.
This should not be confused with the Latency property, where the audio unit describes to the host
any processing latency it introduces between its input and its output.
For input:
Describes how long ago the audio given to an audio unit was acquired. For instance, when
reading from a file to the first audio unit, then its input presentation latency will be zero.
When processing audio input from a device, then this initial input latency will be the
presentation latency of the device itself, the device's safety offset and latency.
The next audio unit's (connected to that first unit) input presentation latency will be the
input presentation latency of the first unit, plus the processing latency (as expressed by
kAudioUnitProperty_Latency) of the first unit.
For output:
Describes how long before the output audio of an audio unit is to be presented. For instance,
when writing to a file, then the last audio unit's output presentation latency will be zero.
When the audio from that audio unit is to be played to an AudioDevice, then that initial
presentation latency will be the latency of the device itself - which is the I/O buffer size,
and the device's safety offset and latency
The previous audio unit's (connected to this last unit) output presentation latency will be that
initial presentation latency plus the processing latency (as expressed by
kAudioUnitProperty_Latency) of the last unit.
So, for a given audio unit anywhere within a mixing graph, the input and output presentation
latencies describe to that unit how long from the moment of generation it will take for its
input to arrive, and how long it will take for its output to be presented.
You can use this property, for example, to provide metering for an audio unit that
is generating output to be presented to the user at a future time.
@constant kAudioUnitProperty_DependentParameters
Scope: any
Value Type: array of AUDependentParameter
Access: read
This property is used for parameters with the kAudioUnitParameterFlag_IsGlobalMeta
or kAudioUnitParameterFlag_IsElementMeta flags set. Hosts applications (and the
AudioUnitParameterListener mechanism) can interrogate this property to determine which parameters
are dependent on a
meta-parameter.
For parameters marked with kAudioUnitParameterFlag_IsGlobalMeta, any non-global
dependent parameters are assumed to be dependent in every element of their scope.
For parameters marked with kAudioUnitParameterFlag_IsElementMeta, then its dependent
parameters must all be the same scope, and are assumed to apply only within a single element,
not to other instances of the same parameter in other elements.
@constant kAudioUnitProperty_AUHostIdentifier
Scope: Global
Value Type: AUHostVersionIdentifier
Access: write
Determine which application (and which version) an audio unit is being hosted by.
This is made more complex through the intervention of audio units such as Kore, that are hosting
other audio units (in this case of course, the real host of the audio unit is the hosting unit,
not the host application, so the previous mechanism of getting the main bundle ID is no longer
correct).
There are also inconsistencies in the way that bundle identifiers are applied (with apps changing
these from version to version), and we'd prefer to see a more consistent identifier used with
this property. This is in spirit similar to the string returned by CFBundle API, except that we
require this host string be consistent and reliable through different revisions of the host.
The audio unit is responsible for retaining the hostName string if it needs to use it past the
duration of the actual call. The host should set this property as early as possible within the
lifetime of the unit in a session.
This API used to take a NumVersion struct. It is redefined to take an AUHostVersionIdentifier struct
which is binary compatible with the existing usage, but not source compatible.
@constant kAudioUnitProperty_MIDIOutputCallbackInfo
Scope: Global
Value Type: CFArrayRef
Access: read
Used to determine how many MIDI output streams the audio unit can generate (and the name for
each of these outputs). Each MIDI output is a complete MIDI or MIDIEventList data stream, such as embodied
by a MIDIEndpointRef in CoreMIDI.
The host can retrieve an array of CFStringRefs published by the audio unit, where :
- the size of the array is the number of MIDI Outputs the Audio Unit supports
- each item in the array is the name for that output at that index
The host owns this array and its elements and should release them when it is finished.
Once the host has determined that the Audio Unit supports this feature, it can then provide a
callback, through which the audio unit can send the MIDI data.
See the documentation for the kAudioUnitProperty_MIDIOutputCallback property.
@constant kAudioUnitProperty_MIDIOutputCallback
Scope: Global
Value Type: AUMIDIOutputCallbackStruct
Access: write
The host sets this property on the audio unit with the callback (and its user data) set
appropriately.
Operational Parameters:
In the render call, just as is the expected usage of the AUHostCallbacks, the audio unit can
call the provided callback to provide MIDI data to the host that it will associate with the
current AudioUnitRender call in process.
The audio unit in the callback provides:
- the user data provided by the host when the callback was established
- the AudioTimeStamp that was provided to the audio unit for this particular call of
AudioUnitRender
- the output number to associate this MIDI data with
- a MIDI Packet List containing MIDI data. The time stamp values contained within the
MIDIPackets in this list are **sample offsets*** from the AudioTimeStamp provided.
This allows MIDI data to be time-stamped with a sample offset that is directly associated
with the audio data it is generating in the current call to the AudioUnitRender function
There is no implied or expected association between the number (or position) of an audio unit's
audio or MIDI outputs.
@constant kAudioUnitProperty_InputSamplesInOutput
Scope: Global
Value Type: struct AUInputSamplesInOutputCallbackStruct
Access: read/write
An audio unit calls this callback at the end of its render call. The audio unit supplies the
following information:
outputTime - The timestamp passed in to the audio unit's render call. This timestamp
represents the time of the first output sample.
inputSample - The sample number of the first input sample that is present in the output
audio.
numInputSamples - The number of input samples that were used and are present in the output
audio.
This property allows a host application to determine which input samples correspond to a sample
in the output buffer. It is useful only for audio units that do time-stretching, such as the
AUVarispeed and AUTimePitch units, where the relationship between input and output samples is
non-trivial. For these units, the range of input samples that correspond to an output buffer
typically differs from the range of input samples that were pulled for that render call.
This difference arises because of internal buffering, processing latency, and other factors.
@constant kAudioUnitProperty_ClassInfoFromDocument
Scope: Global
Value Type: CFDictionary
Access: read/write
If the audio unit implements this property then it is going to do different actions establishing
its state from a document rather than from a user preset. Thus, a host app should use this property
first (instead of kAudioUnitProperty_ClassInfo) when restoring the state of an audio unit when
opening a document. If the audio unit returns an error (or doesn't implement this property) then
the host should use the same preset with the kAudioUnitProperty_ClassInfo.
@constant kAudioUnitProperty_ShouldAllocateBuffer
Scope: input/output elements (settable per element)
Value Type: UInt32
Access: read/write
By default this value is true. This affects the allocations of the buffers for I/O (the mData field
of the AudioBufferList used with AudioUnitRender, callbacks and connections)
If true, the element will create a buffer for rendering into.
If false, the element will not create a buffer for rendering.
For example, if the audio unit is only ever going to have a connection as its input and never a callback, then
it should not need to create a buffer (the API contract expects an audio unit to provide a buffer for
callbacks, but no buffer for connections).
If the audio unit is always going to be pulled for audio with the client providing audio data buffers to
the AudioUnitRender call, then it will never need to create an audio buffer on the output side.
So, this property can be used to control the default allocation strategy of an audio unit. If the audio unit
needs a buffer, but one hasn't been allocated, then an error will be thrown from that call to AudioUnitRender.
This property cannot be set on Initialised audio units as it may end up reallocating memory.
@constant kAudioUnitProperty_FrequencyResponse
Scope: input/output elements (settable per element)
Value Type: AudioUnitFrequencyResponseBin
Access: read
The property provides a way for a user interface view to get points for drawing a graph of the frequency
response of the AU.
An array of AudioUnitFrequencyResponseBin are passed in to kAudioUnitProperty_FrequencyResponse
with the mFrequency field filled in. The array is returned with the mMagnitude fields filled in.
If fewer than kNumberOfResponseFrequencies are needed, then the first unused bin should be marked with
a negative frequency.
@constant kAudioUnitProperty_ParameterHistoryInfo
Scope: Global
Value Type: AudioUnitParameterHistoryInfo
Access: read
For parameters which have kAudioUnitParameterFlag_PlotHistory set, getting this property fills out the
AudioUnitParameterHistoryInfo struct containing the recommended update rate and history duration.
@constant kAudioUnitProperty_NickName
Scope: Global
Value Type: CFStringRef
Access: read/write
Provides a way for a host to set a custom name on an AU.
An example of when this is useful is when a host is managing a processing chain that contains multiple AU
instances of the same subtype (and type and manufacturer). The host uses this property to assign a
unique name to each AU instance indicating what that particular instance's function is in the processing
chain and can later query the property to distinguish between AU instances with the same type/subtype/manu
tuple. It is the host's responsibility to keep the names unique if uniqueness is required.
When getting this property, ownership follows Core Foundation's 'Copy Rule'. This property may return NULL
which indicates that no name has been set on the AU.
@constant kAudioUnitProperty_RequestViewController
Scope: Global
Value Type: block: void (^)(AUViewControllerBase *)
Access: write
If the audio unit is implemented using the version 3 API, it may provide a
view controller, returned via this property. As with any other CoreFoundation
or Foundation object returned by AudioUnitGetProperty, the caller must
release the returned reference (i.e. the Copy rule is used).
@constant kAudioUnitProperty_ParametersForOverview
Scope: Global
Value Type: variably-sized array of struct AudioUnitParameter
Access: read
A host may query an audio unit for a list of its N most important
parameters, via this property. The size of the array passed to
AudioUnitGetProperty controls the number of AudioUnitParameter values
returned.
@constant kAudioUnitProperty_SupportsMPE
Scope: Global
Value Type: UInt32
Access: read
Indicates whether an audio unit supports Multi-dimensional Polyphonic Expression.
@constant kAudioUnitProperty_RenderContextObserver
Scope: Global
Value Type: AURenderContextObserver
Access: read-only
Audio Units which create auxiliary realtime rendering threads should
implement this property to return a block which will be called by the OS
when the render context changes. Audio Unit hosts must not attempt to
interact with the AudioUnit through this block; it is for the exclusive use
of the OS.
@constant kAudioUnitProperty_LastRenderSampleTime
Scope: Global
Value Type: Float64
Access: read-only
The absolute sample frame time of the most recent render timestamp.
@constant kAudioUnitProperty_LoadedOutOfProcess
Scope: Global
Value Type: UInt32
Access: read-only
Indicates whether an Audio Unit is loaded out-of-process, which might happen
at the request of the host or when loading in-process is not possible.
@constant kAudioUnitProperty_MIDIOutputEventListCallback
Scope: Global
Value Type: AUMIDIEventListBlock
Access: write
The host sets this property on the Audio Unit with the callback set appropriately.
Operational Parameters:
In the render call, just as is the expected usage of the AUHostCallbacks, the audio unit can
call the provided callback to provide MIDIEventList data to the host that it will associate with the
current AudioUnitRender.
The Audio Unit in the callback provides:
- the AUEventSampleTime that was provided to the audio unit for this particular call of
AudioUnitRender
- the output number to associate this MIDI data with
- a MIDIEventList containing MIDI data. The time stamp values contained within the
MIDIEventPacket in this list are **sample offsets*** from the AudioTimeStamp provided.
This allows MIDI data to be time-stamped with a sample offset that is directly associated
with the audio data it is generating in the current call to the AudioUnitRender function
Host should setup in the following order:
- Set host desired MIDIProtocolID
- Set kAudioUnitProperty_MIDIOutputEventListCallback
- Initialize the Audio Unit
Note: kAudioUnitProperty_HostMIDIProtocol can not be changed while the Audio Unit is initialized.
There is no implied or expected association between the number (or position) of an audio unit's
audio or MIDI outputs.
Compare to property kAudioUnitProperty_MIDIOutputCallback.
@constant kAudioUnitProperty_AudioUnitMIDIProtocol
Scope: Global
Value Type: SInt32
Access: read
A signed 32-bit integer representing the audio unit's MIDI protocol. This should be one of the
values in the MIDIProtocolID enum (see <CoreMIDI/MIDIServices.h>)..
The framework will convert all incoming MIDI data to the protocol set in this property, the host can query
this property to detect the audio unit's current MIDI protocol.
Note: This property should not be changed after the audio has been initialized.
@constant kAudioUnitProperty_HostMIDIProtocol
Scope: Global
Value Type: SInt32
Access: write
A signed 32-bit integer representing the hosts MIDI protocol. This should be set to one of the values
in the MIDIProtocolID enum (see <CoreMIDI/MIDIServices.h>).
Hosts should set this property to the protocol that MIDI data is desired to be delivered in. The framework will
convert all MIDI data sent to the host to the protocol value set in this property, an audio unit can query
this property to detect the hosts MIDI protocol.
Note: This property should not be changed after the audio unit has been initialized.
*/
CF_ENUM(AudioUnitPropertyID)
{
// range (0 -> 999)
kAudioUnitProperty_ClassInfo = 0,
kAudioUnitProperty_MakeConnection = 1,
kAudioUnitProperty_SampleRate = 2,
kAudioUnitProperty_ParameterList = 3,
kAudioUnitProperty_ParameterInfo = 4,
kAudioUnitProperty_CPULoad = 6,
kAudioUnitProperty_StreamFormat = 8,
kAudioUnitProperty_ElementCount = 11,
kAudioUnitProperty_Latency = 12,
kAudioUnitProperty_SupportedNumChannels = 13,
kAudioUnitProperty_MaximumFramesPerSlice = 14,
kAudioUnitProperty_ParameterValueStrings = 16,
kAudioUnitProperty_AudioChannelLayout = 19,
kAudioUnitProperty_TailTime = 20,
kAudioUnitProperty_BypassEffect = 21,
kAudioUnitProperty_LastRenderError = 22,
kAudioUnitProperty_SetRenderCallback = 23,
kAudioUnitProperty_FactoryPresets = 24,
kAudioUnitProperty_RenderQuality = 26,
kAudioUnitProperty_HostCallbacks = 27,
kAudioUnitProperty_InPlaceProcessing = 29,
kAudioUnitProperty_ElementName = 30,
kAudioUnitProperty_SupportedChannelLayoutTags = 32,
kAudioUnitProperty_PresentPreset = 36,
kAudioUnitProperty_DependentParameters = 45,
kAudioUnitProperty_InputSamplesInOutput = 49,
kAudioUnitProperty_ShouldAllocateBuffer = 51,
kAudioUnitProperty_FrequencyResponse = 52,
kAudioUnitProperty_ParameterHistoryInfo = 53,
kAudioUnitProperty_NickName = 54,
kAudioUnitProperty_OfflineRender = 37,
kAudioUnitProperty_ParameterIDName = 34,
kAudioUnitProperty_ParameterStringFromValue = 33,
kAudioUnitProperty_ParameterClumpName = 35,
kAudioUnitProperty_ParameterValueFromString = 38,
kAudioUnitProperty_ContextName = 25,
kAudioUnitProperty_PresentationLatency = 40,
kAudioUnitProperty_ClassInfoFromDocument = 50,
kAudioUnitProperty_RequestViewController = 56,
kAudioUnitProperty_ParametersForOverview = 57,
kAudioUnitProperty_SupportsMPE = 58,
kAudioUnitProperty_RenderContextObserver
__SWIFT_UNAVAILABLE_MSG("Swift is not supported for use with audio realtime threads")
= 60,
kAudioUnitProperty_LastRenderSampleTime = 61,
kAudioUnitProperty_LoadedOutOfProcess = 62,
#if !TARGET_OS_IPHONE
kAudioUnitProperty_FastDispatch = 5,
kAudioUnitProperty_SetExternalBuffer = 15,
kAudioUnitProperty_GetUIComponentList = 18,
kAudioUnitProperty_CocoaUI = 31,
kAudioUnitProperty_IconLocation = 39,
kAudioUnitProperty_AUHostIdentifier = 46,
#endif
kAudioUnitProperty_MIDIOutputCallbackInfo = 47,
kAudioUnitProperty_MIDIOutputCallback = 48,
kAudioUnitProperty_MIDIOutputEventListCallback = 63,
kAudioUnitProperty_AudioUnitMIDIProtocol = 64,
kAudioUnitProperty_HostMIDIProtocol = 65
};
#if AU_SUPPORT_INTERAPP_AUDIO
/*
@enum Inter-App Audio Property IDs
@abstract Properties used in inter-app audio.
@constant kAudioUnitProperty_RemoteControlEventListener
@discussion Scope: Global
Value Type: AudioUnitRemoteControlEventListener
Access: read/write
Provides a way for a host to receive AudioUnitRemoteControlEvents from a remote "node"
audio unit. The supplied listener block is called when the audio unit sends a remote
control event.
@constant kAudioUnitProperty_IsInterAppConnected
@discussion Scope: Global
Value Type: UInt32 (0-1)
Access: read-only
Both host and node apps can query and listen to this property to determine when
the audio unit has been connected to another app.
@constant kAudioUnitProperty_PeerURL
@discussion Scope: Global
Value Type: CFURLRef
Access: read-only
Both host and node apps can query this property to obtain a URL which, when
opened, will activate the other app.
N.B. This URL is only valid while the host has an open connection to the node.
*/
CF_ENUM(AudioUnitPropertyID)
{
kAudioUnitProperty_RemoteControlEventListener = 100,
kAudioUnitProperty_IsInterAppConnected = 101,
kAudioUnitProperty_PeerURL = 102
};
#endif // AU_SUPPORT_INTERAPP_AUDIO
/*!
@abstract Keys contains in an audio unit preset (ClassInfo) dictionary
@discussion These strings are used as keys in the AUPreset-"classInfo" dictionary
The actual keys are CFStrings to use these keys you define the key as:
static const CFStringRef kMyVersionString = CFSTR(kAUPresetVersionKey);
*/
#define kAUPresetVersionKey "version"
#define kAUPresetTypeKey "type"
#define kAUPresetSubtypeKey "subtype"
#define kAUPresetManufacturerKey "manufacturer"
#define kAUPresetDataKey "data"
#define kAUPresetNameKey "name"
#define kAUPresetNumberKey "preset-number"
#define kAUPresetRenderQualityKey "render-quality"
#define kAUPresetCPULoadKey "cpu-load"
#define kAUPresetElementNameKey "element-name"
#define kAUPresetExternalFileRefs "file-references"
#if !TARGET_OS_IPHONE
// these are keys to use when a preset contains data from other plugin formats
// vstdata is used to signify VST state from a vst "bank"
#define kAUPresetVSTDataKey "vstdata"
// vstpreset is used to signify VST state from a vst "preset"
#define kAUPresetVSTPresetKey "vstpreset"
#define kAUPresetMASDataKey "masdata"
#endif
/*!
@define kAUPresetPartKey
@discussion This key if present, distinguishes a global preset that is set
on the global scope with a part-based preset that is set on the part scope.
The value of this key is audio unit defined
*/
#define kAUPresetPartKey "part"
/*!
@struct AudioUnitConnection
@abstract This structure contains the information needed to make a connection between a source
and destination audio unit.
@discussion The structure is set on the destination audio unit's input element
@var sourceAudioUnit
The audio unit that is the source for the connection
@var sourceOutputNumber
The source audio unit's output element to be used in the connection
@var destInputNumber
The destination audio unit's input element to be used in the connection
*/
struct AudioUnitConnection {
AudioUnit __nullable sourceAudioUnit;
UInt32 sourceOutputNumber;
UInt32 destInputNumber;
};
typedef struct AudioUnitConnection AudioUnitConnection;
/*!
@struct AUChannelInfo
@abstract Define an audio unit's channel handling capabilities
*/
struct AUChannelInfo {
SInt16 inChannels;
SInt16 outChannels;
};
typedef struct AUChannelInfo AUChannelInfo;
/*!
@struct AudioUnitExternalBuffer
@abstract Allow a host to tell an audio unit to use the provided memory for its input callback
*/
struct AudioUnitExternalBuffer {
Byte * buffer;
UInt32 size;
};
typedef struct AudioUnitExternalBuffer AudioUnitExternalBuffer;
/*!
@struct AURenderCallbackStruct
@abstract Used by a host when registering a callback with the audio unit to provide input
*/
struct AURenderCallbackStruct {
AURenderCallback __nullable inputProc;
void * __nullable inputProcRefCon;
};
typedef struct AURenderCallbackStruct AURenderCallbackStruct;
/*!
@struct AUPreset
@abstract Used to publish and set factory presets on an audio unit
@var presetNumber
If < 0, then preset is a user preset
If >= 0, then this field is used to select the factory preset
@var presetName
If a factory preset, the name of the specified factory preset
*/
struct AUPreset {
SInt32 presetNumber;
CFStringRef __nullable presetName;
};
typedef struct AUPreset AUPreset;
/*!
@enum RenderQuality
@abstract Used to get/set a render quality setting on an audio unit
@discussion Typically, this property is used to trade-off between CPU usage, latency
and the quality of the audio unit's processing/output.
*/
enum {
kRenderQuality_Max = 127,
kRenderQuality_High = 96,
kRenderQuality_Medium = 64,
kRenderQuality_Low = 32,
kRenderQuality_Min = 0
};
/*!
@enum kNumberOfResponseFrequencies
@abstract The maximum number of frequency response bins for kAudioUnitProperty_FrequencyResponse.
@discussion An array of AudioUnitFrequencyResponseBin are passed in to kAudioUnitProperty_FrequencyResponse
with the mFrequency field filled in. The array is returned with the mMagnitude fields filled in.
If fewer than kNumberOfResponseFrequencies are needed, then the first unused bin should be marked with
a negative frequency.
*/
enum {
kNumberOfResponseFrequencies = 1024
};
/*!
@struct AudioUnitFrequencyResponseBin
@abstract Structure used to get the magnitude of the frequency response at a particular frequency via kAudioUnitProperty_FrequencyResponse.
@discussion An array of AudioUnitFrequencyResponseBin are passed in to kAudioUnitProperty_FrequencyResponse
with the mFrequency field filled in. The array is returned with the mMagnitude fields filled in.
If fewer than kNumberOfResponseFrequencies are needed, then the first unused bin should be marked with
a negative frequency.
*/
struct AudioUnitFrequencyResponseBin {
Float64 mFrequency;
Float64 mMagnitude;
};
typedef struct AudioUnitFrequencyResponseBin AudioUnitFrequencyResponseBin;
/*!
@typedef HostCallback_GetBeatAndTempo
@abstract Retrieve information about the current beat and/or tempo
@discussion
If the host app has set this callback, then the audio unit can use this to get the current
beat and tempo as they relate to the first sample in the render buffer. The audio unit can
call this callback only from within the audio unit render call (otherwise the host is unable
to provide information accurately to the audio unit as the information obtained is relate to
the current AudioUnitRender call). If the host cannot provide the requested information, it
will return kAudioUnitErr_CannotDoInCurrentContext.
The AudioUnit can provide NULL for any of the requested parameters (except for
inHostUserData) if it is not interested in that particular piece of information
@param inHostUserData Must be provided by the audio unit when it makes this call. It is the client data provided by the host when it set the HostCallbacks property
@param outCurrentBeat The current beat, where 0 is the first beat. Tempo is defined as the number of whole-number (integer) beat values (as indicated by the outCurrentBeat field) per minute.
@param outCurrentTempo The current tempo
*/
typedef OSStatus (*HostCallback_GetBeatAndTempo)(void * __nullable inHostUserData,
Float64 * __nullable outCurrentBeat,
Float64 * __nullable outCurrentTempo);
/*!
@typedef HostCallback_GetMusicalTimeLocation
@abstract Retrieve information about the musical time state of the host
@discussion
If the host app has set this callback, then the audio unit can use this to obtain
information about the state of musical time in the host. The audio unit can call this
callback only from within the audio unit render call (otherwise the host is unable to
provide information accurately to the audio unit as the information obtained is relate to
the current AudioUnitRender call). If the host cannot provide the requested information, it
will return kAudioUnitErr_CannotDoInCurrentContext.
The AudioUnit can provide NULL for any of the requested parameters (except for
inHostUserData) if it is not interested in that particular piece of information
@param inHostUserData Must be provided by the audio unit when it makes this call. It is the client data provided by the host when it set the HostCallbacks property
@param outDeltaSampleOffsetToNextBeat The number of samples until the next whole beat from the start sample of the current rendering buffer
@param outTimeSig_Numerator The Numerator of the current time signature
@param outTimeSig_Denominator The Denominator of the current time signature (4 is a quarter note, etc)
@param outCurrentMeasureDownBeat The beat that corresponds to the downbeat (first beat) of the current measure that is being rendered
*/
typedef OSStatus (*HostCallback_GetMusicalTimeLocation)(void * __nullable inHostUserData,
UInt32 * __nullable outDeltaSampleOffsetToNextBeat,
Float32 * __nullable outTimeSig_Numerator,
UInt32 * __nullable outTimeSig_Denominator,
Float64 * __nullable outCurrentMeasureDownBeat);
/*!
@typedef HostCallback_GetTransportState
@abstract Retrieve information about the time line's (or transport) state of the host.
@discussion
If the host app has set this callback, then the audio unit can use this to obtain
information about the transport state of the host's time line. The audio unit can call this
callback only from within the audio unit render call (otherwise the host is unable to
provide information accurately to the audio unit as the information obtained is relate to
the current AudioUnitRender call. If the host cannot provide the requested information, it
will return kAudioUnitErr_CannotDoInCurrentContext.
The AudioUnit can provide NULL for any of the requested parameters (except for
inHostUserData) if it is not interested in that particular piece of information
@param inHostUserData Must be provided by the audio unit when it makes this call. It is the client data provided by the host when it set the HostCallbacks property
@param outIsPlaying Returns true if the host's transport is currently playing, false if stopped
@param outTransportStateChanged Returns true if there was a change to the state of, or discontinuities in, the host's transport (generally since the callback was last called). Can indicate such state changes as start/top, time moves (jump from one time line to another).
@param outCurrentSampleInTimeLine Returns the current sample count in the time line of the host's transport time.
@param outIsCycling Returns true if the host's transport is currently cycling or looping
@param outCycleStartBeat If cycling is true, the start beat of the cycle or loop point in the host's transport
@param outCycleEndBeat If cycling is true, the end beat of the cycle or loop point in the host's transport
*/
typedef OSStatus (*HostCallback_GetTransportState)(void * __nullable inHostUserData,
Boolean * __nullable outIsPlaying,
Boolean * __nullable outTransportStateChanged,
Float64 * __nullable outCurrentSampleInTimeLine,
Boolean * __nullable outIsCycling,
Float64 * __nullable outCycleStartBeat,
Float64 * __nullable outCycleEndBeat);
/*!
@typedef HostCallback_GetTransportState2
@abstract Retrieve information about the time line's (or transport) state of the host.
@discussion
If the host app has set this callback, then the audio unit can use this to obtain
information about the transport state of the host's time line. The audio unit can call this
callback only from within the audio unit render call (otherwise the host is unable to
provide information accurately to the audio unit as the information obtained is relate to
the current AudioUnitRender call. If the host cannot provide the requested information, it
will return kAudioUnitErr_CannotDoInCurrentContext.
The AudioUnit can provide NULL for any of the requested parameters (except for
inHostUserData) if it is not interested in that particular piece of information
@param inHostUserData Must be provided by the audio unit when it makes this call. It is the client data provided by the host when it set the HostCallbacks property
@param outIsPlaying Returns true if the host's transport is currently playing, false if stopped
@param outIsRecording Returns true if the host is currently record-enabled, otherwise false.
@param outTransportStateChanged Returns true if there was a change to the state of, or discontinuities in, the host's transport (generally since the callback was last called). Can indicate such state changes as start/top, time moves (jump from one time line to another).
@param outCurrentSampleInTimeLine Returns the current sample count in the time line of the host's transport time.
@param outIsCycling Returns true if the host's transport is currently cycling or looping
@param outCycleStartBeat If cycling is true, the start beat of the cycle or loop point in the host's transport
@param outCycleEndBeat If cycling is true, the end beat of the cycle or loop point in the host's transport
*/
typedef OSStatus (*HostCallback_GetTransportState2)(void * __nullable inHostUserData,
Boolean * __nullable outIsPlaying,
Boolean * __nullable outIsRecording,
Boolean * __nullable outTransportStateChanged,
Float64 * __nullable outCurrentSampleInTimeLine,
Boolean * __nullable outIsCycling,
Float64 * __nullable outCycleStartBeat,
Float64 * __nullable outCycleEndBeat);
/*!
@struct HostCallbackInfo
@abstract Contains the various callbacks for an audio unit to call
@discussion
Any callback can be NULL.
*/
struct HostCallbackInfo {
void * __nullable hostUserData;
HostCallback_GetBeatAndTempo __nullable beatAndTempoProc;
HostCallback_GetMusicalTimeLocation __nullable musicalTimeLocationProc;
HostCallback_GetTransportState __nullable transportStateProc;
HostCallback_GetTransportState2 __nullable transportStateProc2;
};
typedef struct HostCallbackInfo HostCallbackInfo;
/*!
@struct AUDependentParameter
@abstract Used to represent a dependent parameter that can change as a result of its parent meta-parameter
changing
*/
struct AUDependentParameter {
AudioUnitScope mScope;
AudioUnitParameterID mParameterID;
};
typedef struct AUDependentParameter AUDependentParameter;
#if !TARGET_OS_IPHONE
/*!
@struct AudioUnitCocoaViewInfo
@abstract The location and class name of one or more view factory objects an Audio Unit publishes
@var mCocoaAUViewBundleLocation
Contains the location of the bundle which the host app can then use to locate the bundle
@var mCocoaAUViewClass
Contains the names of the classes that implements the required protocol (AUCocoaUIBase). This class is a view factory that creates the NSView object that is the AudioUnit view.
*/
struct AudioUnitCocoaViewInfo {
CFURLRef mCocoaAUViewBundleLocation;
CFStringRef __nonnull mCocoaAUViewClass[1];
};
typedef struct AudioUnitCocoaViewInfo AudioUnitCocoaViewInfo;
/*!
@struct AUHostVersionIdentifier
@abstract Used to describe the name and version of the audio unit's host
*/
struct AUHostVersionIdentifier {
CFStringRef hostName;
UInt32 hostVersion;
};
typedef struct AUHostVersionIdentifier AUHostVersionIdentifier;
#endif //!TARGET_OS_IPHONE
/*!
@struct MIDIPacketList
@abstract Forward declaration of MIDIPacketList found in <CoreMIDI/MIDIServices.h>
*/
struct MIDIPacketList;
/*
@typedef AUMIDIOutputCallback
@abstract A callback used by an audio unit to provide MIDI data to a host application
*/
typedef OSStatus
(*AUMIDIOutputCallback)(void * __nullable userData,
const AudioTimeStamp * timeStamp,
UInt32 midiOutNum,
const struct MIDIPacketList * pktlist);
/*!
@struct AUMIDIOutputCallbackStruct
@abstract Set by host application to provide the callback and user data for an audio
unit that provides MIDI output
*/
struct AUMIDIOutputCallbackStruct {
AUMIDIOutputCallback midiOutputCallback;
void * __nullable userData;
};
typedef struct AUMIDIOutputCallbackStruct AUMIDIOutputCallbackStruct;
/*!
@struct AUInputSamplesInOutputCallbackStruct
@abstract Used by a host when registering a callback with an audio unit, to provide
input-to-output samples mapping
*/
struct AUInputSamplesInOutputCallbackStruct {
AUInputSamplesInOutputCallback inputToOutputCallback;
void * __nullable userData;
};
typedef struct AUInputSamplesInOutputCallbackStruct AUInputSamplesInOutputCallbackStruct;
/*!
@struct AudioUnitParameterHistoryInfo
@abstract This structure contains the suggested update rate and history duration for parameters which have the kAudioUnitParameterFlag_PlotHistory flag set.
The structure is filled out by getting kAudioUnitProperty_ParameterHistoryInfo.
@var updatesPerSecond
This is the number of times per second that it is suggested that the host get the value of this parameter.
@var historyDurationInSeconds
This is the duration in seconds of history that should be plotted.
*/
struct AudioUnitParameterHistoryInfo {
Float32 updatesPerSecond;
Float32 historyDurationInSeconds;
};
typedef struct AudioUnitParameterHistoryInfo AudioUnitParameterHistoryInfo;
/*!
@struct AudioUnitRenderContext
@abstract Informs an AudioUnit of the thread context in which it is about to be rendered.
See AURenderContextObserver.
*/
struct AudioUnitRenderContext {
os_workgroup_t __nullable workgroup;
uint32_t reserved[6]; // must be zero
} __SWIFT_UNAVAILABLE_MSG("Swift is not supported for use with audio realtime threads");
typedef struct AudioUnitRenderContext AudioUnitRenderContext
__SWIFT_UNAVAILABLE_MSG("Swift is not supported for use with audio realtime threads");
/*!
@typedef AURenderContextObserver
@brief Block which is called to inform an audio unit of the next render cycle's thread
context.
If an Audio Unit auxiliary rendering thread has realtime priority, and it operates in parallel
with the thread calling AudioUnitRender (v2) or AUAudioUnit.internalRenderBlock (v3), then the
plug-in should implement kAudioUnitProperty_RenderContextObserver (v2) or
AUAudioUnit.renderContextObserver (v3), to return a block with this signature.
The system will fetch and cache this block (if implemented) when the Audio Unit is opened. It
will call the block from the render thread, immediately before any render request which is in a
context (workgroup) differing from the previous one.
In this block, the plug-in should prepare any realtime auxiliary rendering threads operating in
parallel with the render request to leave the workgroup they previously joined, if any, and join
the new workgroup, if non-null. The new workgroup may be null in the case of a non-realtime
render context, or a realtime thread which is not part of any workgroup. See
os_workgroup_join() and os_workgroup_leave()
For further background, see <AudioToolbox/AudioWorkInterval.h>.
*/
typedef void (^AURenderContextObserver)(const AudioUnitRenderContext *context)
__SWIFT_UNAVAILABLE_MSG("Swift is not supported for use with audio realtime threads");
/*!
@struct MIDIEventList
@abstract Forward declaration of MIDIEventList found in <CoreMIDI/MIDIServices.h>
*/
typedef struct MIDIEventList MIDIEventList;
/*! @typedef AUEventSampleTime
@brief Expresses time as a sample count.
@discussion
Sample times are normally positive, but hosts can propagate HAL sample times through audio
units, and HAL sample times can be small negative numbers.
*/
typedef int64_t AUEventSampleTime;
/*!
@typedef AUMIDIEventListBlock
@abstract A block used by an audio unit to send or receive MIDIEventList data.
@param eventSampleTime
The time in samples at which the MIDI events are to occur.
@param cable
The virtual cable number associated with this MIDI data.
@param eventList
One full MIDI, partial MIDI SysEx, or a full SysEx UMP message.
*/
typedef OSStatus (^ AUMIDIEventListBlock)(AUEventSampleTime eventSampleTime,
uint8_t cable,
const struct MIDIEventList * eventList);
//=====================================================================================================================
#pragma mark - Parameter Definitions
// assume kAudioUnitParameterUnit_Generic if not found in this enum
/*!
@enum AudioUnitParameterUnit
@constant kAudioUnitParameterUnit_Generic
untyped value generally between 0.0 and 1.0
@constant kAudioUnitParameterUnit_Indexed
takes an integer value (good for menu selections)
@constant kAudioUnitParameterUnit_Boolean
0.0 means FALSE, non-zero means TRUE
@constant kAudioUnitParameterUnit_Percent
usually from 0 -> 100, sometimes -50 -> +50
@constant kAudioUnitParameterUnit_Seconds
absolute or relative time
@constant kAudioUnitParameterUnit_SampleFrames
one sample frame equals (1.0/sampleRate) seconds
@constant kAudioUnitParameterUnit_Phase
-180 to 180 degrees
@constant kAudioUnitParameterUnit_Rate
rate multiplier, for playback speed, etc. (e.g. 2.0 == twice as fast)
@constant kAudioUnitParameterUnit_Hertz
absolute frequency/pitch in cycles/second
@constant kAudioUnitParameterUnit_Cents
unit of relative pitch
@constant kAudioUnitParameterUnit_RelativeSemiTones
useful for coarse detuning
@constant kAudioUnitParameterUnit_MIDINoteNumber
absolute pitch as defined in the MIDI spec (exact freq may depend on tuning table)
@constant kAudioUnitParameterUnit_MIDIController
a generic MIDI controller value from 0 -> 127
@constant kAudioUnitParameterUnit_Decibels
logarithmic relative gain
@constant kAudioUnitParameterUnit_LinearGain
linear relative gain
@constant kAudioUnitParameterUnit_Degrees
-180 to 180 degrees, similar to phase but more general (good for 3D coord system)
@constant kAudioUnitParameterUnit_EqualPowerCrossfade
0 -> 100, crossfade mix two sources according to sqrt(x) and sqrt(1.0 - x)
@constant kAudioUnitParameterUnit_MixerFaderCurve1
0.0 -> 1.0, pow(x, 3.0) -> linear gain to simulate a reasonable mixer channel fader response
@constant kAudioUnitParameterUnit_Pan
standard left to right mixer pan
@constant kAudioUnitParameterUnit_Meters
distance measured in meters
@constant kAudioUnitParameterUnit_AbsoluteCents
absolute frequency measurement :
if f is freq in hertz then absoluteCents = 1200 * log2(f / 440) + 6900
@constant kAudioUnitParameterUnit_Octaves
octaves in relative pitch where a value of 1 is equal to 1200 cents
@constant kAudioUnitParameterUnit_BPM
beats per minute, ie tempo
@constant kAudioUnitParameterUnit_Beats
time relative to tempo, i.e., 1.0 at 120 BPM would equal 1/2 a second
@constant kAudioUnitParameterUnit_Milliseconds
parameter is expressed in milliseconds
@constant kAudioUnitParameterUnit_Ratio
for compression, expansion ratio, etc.
@constant kAudioUnitParameterUnit_CustomUnit
this is the parameter unit type for parameters that present a custom unit name
@constant kAudioUnitParameterUnit_MIDI2Controller
a generic MIDI 2.0 controller value with 32-bit range
*/
typedef CF_ENUM(UInt32, AudioUnitParameterUnit)
{
kAudioUnitParameterUnit_Generic = 0,
kAudioUnitParameterUnit_Indexed = 1,
kAudioUnitParameterUnit_Boolean = 2,
kAudioUnitParameterUnit_Percent = 3,
kAudioUnitParameterUnit_Seconds = 4,
kAudioUnitParameterUnit_SampleFrames = 5,
kAudioUnitParameterUnit_Phase = 6,
kAudioUnitParameterUnit_Rate = 7,
kAudioUnitParameterUnit_Hertz = 8,
kAudioUnitParameterUnit_Cents = 9,
kAudioUnitParameterUnit_RelativeSemiTones = 10,
kAudioUnitParameterUnit_MIDINoteNumber = 11,
kAudioUnitParameterUnit_MIDIController = 12,
kAudioUnitParameterUnit_Decibels = 13,
kAudioUnitParameterUnit_LinearGain = 14,
kAudioUnitParameterUnit_Degrees = 15,
kAudioUnitParameterUnit_EqualPowerCrossfade = 16,
kAudioUnitParameterUnit_MixerFaderCurve1 = 17,
kAudioUnitParameterUnit_Pan = 18,
kAudioUnitParameterUnit_Meters = 19,
kAudioUnitParameterUnit_AbsoluteCents = 20,
kAudioUnitParameterUnit_Octaves = 21,
kAudioUnitParameterUnit_BPM = 22,
kAudioUnitParameterUnit_Beats = 23,
kAudioUnitParameterUnit_Milliseconds = 24,
kAudioUnitParameterUnit_Ratio = 25,
kAudioUnitParameterUnit_CustomUnit = 26,
kAudioUnitParameterUnit_MIDI2Controller = 27
};
/*!
@enum AudioUnitParameterOptions
@discussion Bit positions 18, 17, and 16 are set aside for display scales. Bit 19 is reserved.
@constant kAudioUnitParameterFlag_CFNameRelease
@constant kAudioUnitParameterFlag_PlotHistory
@constant kAudioUnitParameterFlag_MeterReadOnly
@constant kAudioUnitParameterFlag_DisplayMask
@constant kAudioUnitParameterFlag_DisplaySquareRoot
@constant kAudioUnitParameterFlag_DisplaySquared
@constant kAudioUnitParameterFlag_DisplayCubed
@constant kAudioUnitParameterFlag_DisplayCubeRoot
@constant kAudioUnitParameterFlag_DisplayExponential
@constant kAudioUnitParameterFlag_HasClump
@constant kAudioUnitParameterFlag_ValuesHaveStrings
@constant kAudioUnitParameterFlag_DisplayLogarithmic
@constant kAudioUnitParameterFlag_IsHighResolution
This flag provides a hint to a host that this parameter should be controlled through the
highest resolution if the host has limitations on the control resolution of parameter
values. Generally this means that controlling this parameter with a single MIDI Control
message (i.e. 128 values) is too course a grain for that parameter, and a finer control
resolution should be used if possible. If this flag is not set, then a host can assume that
a 7-bit control quantization is acceptable. Ideally, parameters should be controlled in the
fullest resolution that they are published with.
@constant kAudioUnitParameterFlag_NonRealTime
Changing the parameter in real-time will cause a glitch or otherwise undesirable effect.
@constant kAudioUnitParameterFlag_CanRamp
If set, the parameter can be ramped.
@constant kAudioUnitParameterFlag_ExpertMode
If set, the parameter is obscure (hint to UI to only display in expert mode).
@constant kAudioUnitParameterFlag_HasCFNameString
In the original ParameterInfo a C string only was specified. With MacOS 10.2 and later, the
last four bytes of this string are reserved for a CFStringRef, which gives the ability to
used Unicode encoding, necessary for providing a name in languages using non-ASCII
characters. If this flag bit is set, the CFStringRef is valid.
@constant kAudioUnitParameterFlag_IsGlobalMeta
If set, changing this parameter may change any number of others in the AudioUnit.
@constant kAudioUnitParameterFlag_IsElementMeta
If set, changing this parameter may change others in the same element as the current
parameter.
@constant kAudioUnitParameterFlag_IsReadable
@constant kAudioUnitParameterFlag_IsWritable
*/
typedef CF_OPTIONS(UInt32, AudioUnitParameterOptions)
{
kAudioUnitParameterFlag_CFNameRelease = (1UL << 4),
kAudioUnitParameterFlag_OmitFromPresets = (1UL << 13),
kAudioUnitParameterFlag_PlotHistory = (1UL << 14),
kAudioUnitParameterFlag_MeterReadOnly = (1UL << 15),
// bit positions 18,17,16 are set aside for display scales. bit 19 is reserved.
kAudioUnitParameterFlag_DisplayMask = (7UL << 16) | (1UL << 22),
kAudioUnitParameterFlag_DisplaySquareRoot = (1UL << 16),
kAudioUnitParameterFlag_DisplaySquared = (2UL << 16),
kAudioUnitParameterFlag_DisplayCubed = (3UL << 16),
kAudioUnitParameterFlag_DisplayCubeRoot = (4UL << 16),
kAudioUnitParameterFlag_DisplayExponential = (5UL << 16),
kAudioUnitParameterFlag_HasClump = (1UL << 20),
kAudioUnitParameterFlag_ValuesHaveStrings = (1UL << 21),
kAudioUnitParameterFlag_DisplayLogarithmic = (1UL << 22),
kAudioUnitParameterFlag_IsHighResolution = (1UL << 23),
kAudioUnitParameterFlag_NonRealTime = (1UL << 24),
kAudioUnitParameterFlag_CanRamp = (1UL << 25),
kAudioUnitParameterFlag_ExpertMode = (1UL << 26),
kAudioUnitParameterFlag_HasCFNameString = (1UL << 27),
kAudioUnitParameterFlag_IsGlobalMeta = (1UL << 28),
kAudioUnitParameterFlag_IsElementMeta = (1UL << 29),
kAudioUnitParameterFlag_IsReadable = (1UL << 30),
kAudioUnitParameterFlag_IsWritable = (1UL << 31)
};
/*!
@struct AudioUnitParameterInfo
@var name
UNUSED - set to zero - UTF8 encoded C string (originally).
@var unitName
Only valid if the unit field equals kAudioUnitParameterUnit_CustomUnit, in
which case, unitName must contain a valid CFStringRef. As with cfNameString,
if (flags & kAudioUnitParameterFlag_CFNameRelease) is non-zero, the
AudioUnit must return a +1 reference to this string, and the host must
release it.
@var clumpID
Only valid if kAudioUnitParameterFlag_HasClump is set.
@var cfNameString
Only valid if kAudioUnitParameterFlag_HasCFNameString is set.
@var unit
If the "unit" field contains a value not in the enum above, then assume
kAudioUnitParameterUnit_Generic
@var minValue
The parameter's minimum value.
@var maxValue
The parameter's maximum value.
@var defaultValue
The parameter's default value.
@var flags
Due to some vagaries about the ways in which Parameter's CFNames have been
described, it was necessary to add a flag:
kAudioUnitParameterFlag_CFNameRelease. In normal usage a parameter name is
essentially a static object, but sometimes an audio unit will generate
parameter names dynamically.. As these are expected to be CFStrings, in that
case the host should release those names when it is finished with them, but
there was no way to communicate this distinction in behavior. Thus, if an
audio unit will (or could) generate a name dynamically, it should set this
flag in the parameter's info. The host should check for this flag, and if
present, release the parameter name when it is finished with it.
*/
struct AudioUnitParameterInfo {
char name[52];
CFStringRef __nullable unitName;
UInt32 clumpID;
CFStringRef __nullable cfNameString;
AudioUnitParameterUnit unit;
AudioUnitParameterValue minValue;
AudioUnitParameterValue maxValue;
AudioUnitParameterValue defaultValue;
AudioUnitParameterOptions flags;
};
typedef struct AudioUnitParameterInfo AudioUnitParameterInfo;
/*!
@enum Audio Unit Clump ID
@discussion Audio unit developers should not use a clump ID of 0. This value is reserved for system use.
*/
enum {
kAudioUnitClumpID_System = 0
};
#ifdef CF_INLINE
CF_INLINE AudioUnitParameterOptions GetAudioUnitParameterDisplayType(AudioUnitParameterOptions flags)
{
return flags & kAudioUnitParameterFlag_DisplayMask;
}
CF_INLINE AudioUnitParameterOptions SetAudioUnitParameterDisplayType(AudioUnitParameterOptions flags, AudioUnitParameterOptions displayType)
{
return (flags & ~kAudioUnitParameterFlag_DisplayMask) | displayType;
}
#else
/*! @define GetAudioUnitParameterDisplayType */
#define GetAudioUnitParameterDisplayType(flags) \
((flags) & kAudioUnitParameterFlag_DisplayMask)
/*! @define SetAudioUnitParameterDisplayType */
#define SetAudioUnitParameterDisplayType(flags, displayType) \
(((flags) & ~kAudioUnitParameterFlag_DisplayMask) | (displayType))
#endif // CF_INLINE
/*! @define AudioUnitDisplayTypeIsLogarithmic */
#define AudioUnitDisplayTypeIsLogarithmic(flags) \
(GetAudioUnitParameterDisplayType(flags) == kAudioUnitParameterFlag_DisplayLogarithmic)
/*! @define AudioUnitDisplayTypeIsSquareRoot */
#define AudioUnitDisplayTypeIsSquareRoot(flags) \
(GetAudioUnitParameterDisplayType(flags) == kAudioUnitParameterFlag_DisplaySquareRoot)
/*! @define AudioUnitDisplayTypeIsSquared */
#define AudioUnitDisplayTypeIsSquared(flags) \
(GetAudioUnitParameterDisplayType(flags) == kAudioUnitParameterFlag_DisplaySquared)
/*! @define AudioUnitDisplayTypeIsCubed */
#define AudioUnitDisplayTypeIsCubed(flags) \
(GetAudioUnitParameterDisplayType(flags) == kAudioUnitParameterFlag_DisplayCubed)
/*! @define AudioUnitDisplayTypeIsCubeRoot */
#define AudioUnitDisplayTypeIsCubeRoot(flags) \
(GetAudioUnitParameterDisplayType(flags) == kAudioUnitParameterFlag_DisplayCubeRoot)
/*! @define AudioUnitDisplayTypeIsExponential */
#define AudioUnitDisplayTypeIsExponential(flags) \
(GetAudioUnitParameterDisplayType(flags) == kAudioUnitParameterFlag_DisplayExponential)
/*
The following properties are used with display names
*/
/*!
@enum Audio Unit Parameter Full Name
@discussion Used with the AudioUnitParameterIDName.inDesiredLength field to indicate the full name
of the requested parameter.
*/
enum {
kAudioUnitParameterName_Full = -1
};
/*!
@struct AudioUnitParameterNameInfo
@abstract Used to provide shorter names for a specified parameter
*/
struct AudioUnitParameterNameInfo {
AudioUnitParameterID inID;
SInt32 inDesiredLength;
CFStringRef __nullable outName;
};
typedef struct AudioUnitParameterNameInfo AudioUnitParameterNameInfo;
typedef struct AudioUnitParameterNameInfo AudioUnitParameterIDName;
/*!
@struct AudioUnitParameterStringFromValue
@abstract Provide a string representation of a parameter's value
*/
struct AudioUnitParameterStringFromValue {
AudioUnitParameterID inParamID;
const AudioUnitParameterValue * inValue;
CFStringRef __nullable outString;
};
typedef struct AudioUnitParameterStringFromValue AudioUnitParameterStringFromValue;
/*!
@struct AudioUnitParameterValueFromString
@abstract Provide the parameter's value for a given string representation of it
*/
struct AudioUnitParameterValueFromString {
AudioUnitParameterID inParamID;
CFStringRef inString;
AudioUnitParameterValue outValue;
};
typedef struct AudioUnitParameterValueFromString AudioUnitParameterValueFromString;
#if AU_SUPPORT_INTERAPP_AUDIO
/*!
@enum AudioUnitRemoteControlEvent
@abstract In inter-app audio, messages to control the host's transport state.
*/
typedef CF_ENUM(UInt32, AudioUnitRemoteControlEvent) {
kAudioUnitRemoteControlEvent_TogglePlayPause = 1,
kAudioUnitRemoteControlEvent_ToggleRecord = 2,
kAudioUnitRemoteControlEvent_Rewind = 3
};
/*! @typedef AudioUnitRemoteControlEventListener
@abstract Block called to receive a remote control event.
*/
typedef void (^AudioUnitRemoteControlEventListener)(AudioUnitRemoteControlEvent event);
#endif // AU_SUPPORT_INTERAPP_AUDIO
//=====================================================================================================================
#pragma mark - Configuration Info Keys
// These strings are used as keys to the dictionary of configuration info returned by
// AudioComponentGetConfigurationInfo(). Information about them is presented inline with the
// declaration.
/*!
@define kAudioUnitConfigurationInfo_HasCustomView
@discussion This is a boolean value that indicates whether or not the AU has a custom view
*/
#define kAudioUnitConfigurationInfo_HasCustomView "HasCustomView"
/*!
@define kAudioUnitConfigurationInfo_ChannelConfigurations
@discussion This is an array of pairs of values where each item in the array is an array of two
numbers and is the equivalent of an AUChannelInfo. If the AudioUnit is an effect and
it doesn't implement kAudioUnitProperty_SupportedNumChannels, the array will contain
only the single entry, { -1, -1}. If the AudioUnit is an instrument or a generator
and doesn't implement kAudioUnitProperty_SupportedNumChannels, the array will be
empty and means that the AU's initial state is all that is supported.
*/
#define kAudioUnitConfigurationInfo_ChannelConfigurations "ChannelConfigurations"
/*!
@define kAudioUnitConfigurationInfo_InitialInputs
@discussion An array of numbers whose size is equal to the number of input buses posessed by the
AU. Each number in the array represents the number of channels for the corresponding
bus.
*/
#define kAudioUnitConfigurationInfo_InitialInputs "InitialInputs"
/*!
@define kAudioUnitConfigurationInfo_InitialOutputs
@discussion An array of numbers whose size is equal to the number of output buses posessed by
the AU. Each number in the array represents the number of channels for the
corresponding bus.
*/
#define kAudioUnitConfigurationInfo_InitialOutputs "InitialOutputs"
/*!
@define kAudioUnitConfigurationInfo_IconURL
@discussion A CFURLRef value that indicates the location of an icon of the audio unit.
*/
#define kAudioUnitConfigurationInfo_IconURL "IconURL"
/*!
@define kAudioUnitConfigurationInfo_BusCountWritable
@discussion An array of booleans whose size is three representing Global, Input and Output scope
in the order it is defined in CoreAudioTypes.h. Each value represents whether the bus
count is writable for the specified scope.
*/
#define kAudioUnitConfigurationInfo_BusCountWritable "BusCountWritable"
/*!
@define kAudioUnitConfigurationInfo_SupportedChannelLayoutTags
@discussion A dictionary that contains two arrays one for input scope and output scope. Each array
of numbers whose size is equal to number of supported channel layout tags supported for the scope
by the AU. Each number in the array represents the channel layout tag.
*/
#define kAudioUnitConfigurationInfo_SupportedChannelLayoutTags "SupportedChannelLayoutTags"
#pragma mark -
#pragma mark OS X Availability
#if !TARGET_OS_IPHONE
//=====================================================================================================================
#pragma mark - Music Effects and Instruments
/*!
@enum Music Effect and Instrument Unit (MusicDevice) Properties
@abstract The collection of Music Effects and Instrument Unit Property IDs
@discussion
These properties are used to:
Describe a current set of mappings between MIDI messages and Parameter value setting
Create a mapping between a parameter and a MIDI message through either:
- explicitly adding (or removing) the mapping
- telling the audio unit to hot-map the next MIDI message to a specified Parameter
The same MIDI Message can map to one or more parameters
These properties normally apply only to the two types of audio units that implement
the MIDI API, instrument units ('aumu') and music effects ('aumf').
These properties are used in the Global scope. The scope and element members of the structure describe
the scope and element of the parameter. In all usages, mScope, mElement and mParameterID must be
correctly specified.
* The AUParameterMIDIMapping Structure
Command mStatus mData1
Note Off 0x8n Note Num
Note On 0x9n Note Num
Key Pressure 0xAn Note Num
Control Change 0xBn ControllerID
Patch Change 0xCn Patch Num
Channel Pressure DxDn 0 (Unused)
Pitch Bend 0xEn 0 (Unused)
(where n is 0-0xF to correspond to MIDI channels 1-16)
Details:
In general MIDI Commands can be mapped to either a specific channel as specified in the mStatus bit.
If the kAUParameterMIDIMapping_AnyChannelFlag bit is set mStatus is a MIDI channel message, then the
MIDI channel number in the status byte is ignored; the mapping is from the specified MIDI message on ANY channel.
For note commands (note on, note off, key pressure), the MIDI message can trigger either with just a specific
note number, or any note number if the kAUParameterMIDIMapping_AnyNoteFlag bit is set. In these instances, the
note number is used as the trigger value (for instance, a note message could be used to set the
cut off frequency of a filter).
When the parameter mapping list changes through addition/replace, removal, the implementation should
fire a notification on the kAudioUnitProperty_AllParameterMIDIMappings property. The host can then
retrieve the full set of mappings for the audio unit.
When a hot mapping is made, the notification should just be delivered for the HotMap property. The host can
retrieve the last current hot mapping made through getting the value of that property.
@constant kAudioUnitProperty_AllParameterMIDIMappings
@discussion Scope: any
Value Type: array of AUParameterMIDIMapping
Access: read/write
This property allows setting and retrieving the current mapping state between
(some/many/all of) an audio unit's parameters and MIDI messages. When set, it should replace
any previous mapped settings the audio unit had.
If this property is implemented by a non-MIDI capable audio unit (such as an 'aufx' type),
then the property is read only and should recommend a suggested set of mappings for the host
to perform. In this case, it is the host's responsibility to map MIDI message to the audio
unit parameters.
This property's size varies depending on the number of mappings currently in effect. A host
application should always get the size of this property before retrieving it. The audio
unit should return an error if the host doesn't provide enough space to return all of the
current mappings.
@constant kAudioUnitProperty_AddParameterMIDIMapping
@discussion Scope: any
Value Type: array of AUParameterMIDIMapping
Access: write
Use this property to add parameter-to-MIDI mappings to an audio unit's existing set of
mappings. There can be only one mapping per parameter. When you set a mapping for a parameter,
it replaces the previous mapping.
@constant kAudioUnitProperty_RemoveParameterMIDIMapping
@discussion Scope: any
Value Type: array of AUParameterMIDIMapping
Access: write
Use this property to remove mappings from an audio unit. If a mapping is specified that
does not currently exist in an audio unit, then the audio unit should ignore the request.
The Scope/Element/ParameterID is used to find the mapping to remove.
@constant kAudioUnitProperty_HotMapParameterMIDIMapping
@discussion Scope: any
Value Type: AUParameterMIDIMapping
Access: read/write
This property can be used in two ways, determined by the value supplied by the host
application.
(1) If a mapping structure is provided, then that structure provides all the information
that the audio unit should use to map the parameter, except for the MIDI message. The audio
unit should then listen for the next MIDI message and associate that MIDI message with the
supplied parameter mapping. When this MIDI message is received and the mapping made, the
audio unit should also issue a notification on this property to indicate to the host that
the mapping has been made. The host can then retrieve the mapping that was made by getting the
value of this property.
To avoid possible confusion, it is recommended that once the host has retrieved this mapping
(if it is presenting a user interface to describe the mappings, for example), that the host
should then clear the mapping state, as described in (2).
The only time this property will return a valid value is when an audio unit has implemented the
requested mapping. If the audio unit's mapping state has been cleared (or if it has not been
asked to make a mapping), then the audio unit should return a kAudioUnitErr_InvalidPropertyValue
error when the host tries to read this property's value.
(2) If the value passed in this property is NULL, and if the audio unit had a parameter that
it was in the process of mapping, the audio unit should disregard the parameter mapping request
and discard the partially mapped structure. If the value is NULL and the audio unit is not in
the process of mapping, the audio unit can just ignore the request.
At all times, the _AllMappings property will completely describe the current known state of an
audio unit's mappings of MIDI messages to parameters.
*/
CF_ENUM(AudioUnitPropertyID) {
kAudioUnitProperty_AllParameterMIDIMappings = 41,
kAudioUnitProperty_AddParameterMIDIMapping = 42,
kAudioUnitProperty_RemoveParameterMIDIMapping = 43,
kAudioUnitProperty_HotMapParameterMIDIMapping = 44
};
/*!
@enum ParameterMIDIMappings
@abstract General defined values to customize the behavior of parameter-to-MIDI mappings
@constant kAUParameterMIDIMapping_AnyChannelFlag
@discussion If this flag is set and the value of the mStatus field is a MIDI channel message, then
the MIDI channel number in the status byte is ignored; the mapping is from the specified
MIDI message on any channel.
@constant kAUParameterMIDIMapping_AnyNoteFlag
@discussion If this flag is set and the value of the mStatus field is a Note On, Note Off, or
Polyphonic Pressure message, the message's note number is ignored. The mapping is from
any note number.
@constant kAUParameterMIDIMapping_SubRange
@discussion Set this flag if the MIDI control should map only to a sub-range of the parameter's value.
Then specify that range in the mSubRangeMin and mSubRangeMax member fields.
@constant kAUParameterMIDIMapping_Toggle
@discussion Intended for Boolean typed parameters. When this property is set, it means that the
parameter's value should be toggled when the mapped MIDI message is received. For example,
if the parameter's value is currently TRUE, when the mapped MIDI message is received
the value changes to FALSE.
@constant kAUParameterMIDIMapping_Bipolar
@discussion This property is useful when mapping a parameter to a MIDI Controller. When set, it
indicates that the parameter can assume only two values: on or off. For this reason, a
parameter associated with this property is typically Boolean. For example, if this
property is set for a parameter mapped to a sustain pedal MIDI controller, controller
values from 0 to 64 result in the parameter switched to its "off" state; controller
values from 65 to 127 result in the parameter switched to its "on" state.
This property works in connection with the kAUParameterMIDIMapping_Bipolar_On property.
The value of the kAUParameterMIDIMapping_Bipolar_On property
@constant kAUParameterMIDIMapping_Bipolar_On
@discussion Determines whether the "on" state of a parameter is mapped to the "on" or "off" state
of the associated MIDI controller. Only valid if the kAUParameterMIDIMapping_Bipolar
property is set.
*/
typedef CF_OPTIONS(UInt32, AUParameterMIDIMappingFlags) {
kAUParameterMIDIMapping_AnyChannelFlag = (1L << 0),
kAUParameterMIDIMapping_AnyNoteFlag = (1L << 1),
kAUParameterMIDIMapping_SubRange = (1L << 2),
kAUParameterMIDIMapping_Toggle = (1L << 3),
kAUParameterMIDIMapping_Bipolar = (1L << 4),
kAUParameterMIDIMapping_Bipolar_On = (1L << 5)
};
/*!
@struct AUParameterMIDIMapping
@abstract Represents a mapping between a MIDI message and an audio unit's parameter.
@discussion The reserved fields in this structure are for future use. In the current implementation,
they help align the structure to 64 bit size. Do not use the names of these fields in a
host application. They are subject to change.
*/
struct AUParameterMIDIMapping {
AudioUnitScope mScope;
AudioUnitElement mElement;
AudioUnitParameterID mParameterID;
AUParameterMIDIMappingFlags mFlags;
AudioUnitParameterValue mSubRangeMin;
AudioUnitParameterValue mSubRangeMax;
UInt8 mStatus;
UInt8 mData1;
UInt8 reserved1; // MUST be set to zero
UInt8 reserved2; // MUST be set to zero
UInt32 reserved3; // MUST be set to zero
};
typedef struct AUParameterMIDIMapping AUParameterMIDIMapping;
//=====================================================================================================================
#pragma mark - Music Device
/*!
@enum Instrument Unit (MusicDevice) Properties
@abstract The collection of Instrument Unit Property IDs
@constant kMusicDeviceProperty_MIDIXMLNames
@discussion Scope:
Value Type:
Access:
@constant kMusicDeviceProperty_PartGroup
@discussion Scope: Part
Value Type: AudioUnitElement
Access: read/write
This property's value specifies the group ID (the Group scope's element)
that the part is (or should be) assigned to. The property is used in the Part scope,
where the element ID is the part that is being queried (or assigned).
This property may be implemented in an audio unit as read only, as writeable only if the
audio unit is uninitialized, or as read/write. Apple recommends that it should be
writable at any time.
The effect of assigning a new group to a part is undefined. Typically, however, it can be
expected that all existing notes would be turned off before the re-assignment is made by
the audio unit.
@constant kMusicDeviceProperty_DualSchedulingMode
@discussion Scope: Global
Value Type: UInt32
Access: write
Some instrument units need to distinguish realtime note and control events (such as from
incoming MIDI) from sequenced or pre-scheduled events. To support this, a host application
may set this property to 1. If the instrument unit returns a value of noErr, it supports
an alternate interpretation of the inOffsetSampleFrame parameter for the following
functions:
MusicDeviceMIDIEvent
MusicDeviceStartNote
MusicDeviceStopNote
AudioUnitSetParameter
Once the host sets this property to 1 and the instrument unit returns noErr, the
inOffsetSampleFrame field becomes a bitfield:
kMusicDeviceSampleFrameMask_SampleOffset = 0xFFFFFF // AND with this to obtain sample offset
kMusicDeviceSampleFrameMask_IsScheduled = 0x01000000
The IsScheduled bit should be set on events which are being scheduled ahead of time from
a prerecorded track. The IsScheduled bit should be clear on events which are being sent
to the instrument unit in response to realtime events, such as incoming MIDI or control
changes in a view.
@constant kMusicDeviceProperty_SupportsStartStopNote
@discussion Scope: Global
Value Type: UInt32
Access: read
The MusicDeviceStartNote and MusicDeviceStopNote APIs have been available since macOS 10.0.
However, many third-party audio units do not implement these calls. This property can
be used to determine if an audio unit does provide a compliant implementation. A compliant
audio unit will both implement the property and return !0 as the value for the property.
Apple's DLSMusicDevice unit has implemented MusicDeviceStartNote and MusicDeviceStopNote
since macOS 10.0. The kMusicDeviceProperty_SupportsStartStopNote property was introduced
with macOS 10.5, so the DLSMusicDevice unit will not return an appropriate value for
this property on a pre-10.5 system.
*/
CF_ENUM(AudioUnitPropertyID) {
// range (1000 -> 1999)
kMusicDeviceProperty_MIDIXMLNames = 1006,
kMusicDeviceProperty_PartGroup = 1010,
kMusicDeviceProperty_DualSchedulingMode = 1013,
kMusicDeviceProperty_SupportsStartStopNote = 1014
};
/*!
@enum DualSchedulingMode
*/
enum {
kMusicDeviceSampleFrameMask_SampleOffset = 0xFFFFFF, // AND with this to obtain the sample offset
kMusicDeviceSampleFrameMask_IsScheduled = 0x01000000
};
//=====================================================================================================================
#pragma mark - Offline Unit
/*!
@enum Offline Unit Properties
@abstract The collection of properties for offline units
@constant kAudioUnitOfflineProperty_InputSize
@discussion Scope: Global
Value Type: UInt64
Access: read/write
Once this property is set, an audio unit will assume that its input samples
have been reset to a new region. Setting this property will also cause the
audio unit's internal DSP state to be reset. That is, the audio unit calls
the AudioUnitReset function on itself.
This property tells the offline unit how many samples to process. Once it
knows this number it will then request from 0 to (nSamples-1) in its input
callback. The host of the audio unit is then required to provide the samples
specified in the sample count field of that Input's callback.
@constant kAudioUnitOfflineProperty_OutputSize
@discussion Scope: Global
Value Type: UInt64
Access: read
The host can use this property to estimate how many output samples an audio
unit will produce for the specified input samples. The property value
is invalid if InputSize is not set.
The host cannot assume that the value returned is exact.
It is a guide only, so is suitable for use in a progress bar, for instance.
Termination of processing is solely determined by the setting of the
kAudioUnitStatus_OfflineRenderComplete property in the
ioRenderActionFlags from the AudioUnitRender function.
@constant kAudioUnitOfflineProperty_StartOffset
@discussion Scope: Global
Value Type: UInt64
Access: read/write
The host sets this property to tell an audio unit that the start offset of
the data it is processing has been changed. This should be set along with
the InputSize property, so that the unit knows its input data has been set
or changed.
@constant kAudioUnitOfflineProperty_PreflightRequirements
@discussion Scope: Global
Value Type: UInt32
Access: read
Returns one of the kOfflinePreflight_ results (see the Offline Preflight
enumeration).
@constant kAudioUnitOfflineProperty_PreflightName
@discussion Scope: Global
Value Type: CFStringRef
Access: read
For an audio unit that allows or requires preflighting, this property lets
the unit give its host application a name to describe the preflight
operations.
*/
CF_ENUM(AudioUnitPropertyID) {
// range (3020->3040)
kAudioUnitOfflineProperty_InputSize = 3020,
kAudioUnitOfflineProperty_OutputSize = 3021,
kAudioUnitOfflineProperty_StartOffset = 3022,
kAudioUnitOfflineProperty_PreflightRequirements = 3023,
kAudioUnitOfflineProperty_PreflightName = 3024
};
/*!
@enum Offline Preflight Flags
@abstract Used to indicate an Offline Unit's preflight requirements
@constant kOfflinePreflight_NotRequired
@discussion Offline unit does not require preflight
@constant kOfflinePreflight_Optional
@discussion Offline unit will generally behave better if it is preflighted, but it is not
required to be preflighted.
@constant kOfflinePreflight_Required
@discussion Offline unit requires preflighting or it cannot do its work
*/
enum {
kOfflinePreflight_NotRequired = 0,
kOfflinePreflight_Optional = 1,
kOfflinePreflight_Required = 2
};
//=====================================================================================================================
#pragma mark - Panner Unit
/*!
@enum Panner Unit Properties
@abstract The collection of properties for panner units
@constant kAudioUnitProperty_DistanceAttenuationData
@discussion This property is deprecated.
Scope: Global
Value Type: AUDistanceAttenuationData
Access: Read
*/
CF_ENUM(AudioUnitPropertyID) {
// range (3060->3999)
kAudioUnitProperty_DistanceAttenuationData = 3600
} API_DEPRECATED("no longer supported", macos(10.5, 10.11)) API_UNAVAILABLE(ios, watchos, tvos);
typedef struct AUDistanceAttenuationData {
UInt32 inNumberOfPairs;
struct {
Float32 inDistance; // 0-1000
Float32 outGain; // 0-1
} pairs[1]; // this is a variable length array of inNumberOfPairs elements
} AUDistanceAttenuationData API_DEPRECATED("no longer supported", macos(10.5, 10.11)) API_UNAVAILABLE(ios, watchos, tvos);
//=====================================================================================================================
#pragma mark - Translation Service
/*!
@enum Translation Properties
@abstract The collection of properties for migrating data from other audio plug-ins to the
Audio Unit architecture
@discussion While this is a general service, there are two formats that are explicitly defined:
MAS and VST. An audio unit may have MAS settings given to it in one of two ways:
(1) The settings may have a single setting. This may be set multiple times with
different settings each time. In this case, numberOfSettings will be 1.
(2) The settings may be set in one hit, providing all SettingData at once.
In this case, numberOfSettings may be more than 1, and will be the number of
settings the host has from the MAS plugin.
AU-VST - the CFDataRef data contains VST chunk data with no additional information.
In addition, this can be used to migrate settings from an older audio unit; this allows manufacturers
to deprecate older audio units and replace them with new ones. The data for the older audio unit is
the audio unit preset CFDictionary that that unit generated.
@constant kAudioUnitMigrateProperty_FromPlugin
@discussion Scope:
Value Type:
Access:
@constant kAudioUnitMigrateProperty_OldAutomation
@discussion Scope:
Value Type:
Access:
*/
CF_ENUM(AudioUnitPropertyID) {
// range (4000->4020)
kAudioUnitMigrateProperty_FromPlugin = 4000,
kAudioUnitMigrateProperty_OldAutomation = 4001
};
/*!
@enum Other Plug-in Formats
*/
CF_ENUM(UInt32) {
kOtherPluginFormat_Undefined = 0, //reserving this value for future use
kOtherPluginFormat_kMAS = 1,
kOtherPluginFormat_kVST = 2,
kOtherPluginFormat_AU = 3
};
/*!
@struct AudioUnitOtherPluginDesc
@var format
One of the OtherPluginFormat values
@var plugin
struct AudioClassDescription {
OSType mType;
OSType mSubType;
OSType mManufacturer;
};
is defined in <CoreAudioTypes/CoreAudioTypes.h>
mType specifies a generic, plug-in format defined descriptor
mSubType is usually left to the manufacturer to use at their discretion
mManufacturer is a registered code to identify all plugins from the same manufacturer
*/
struct AudioUnitOtherPluginDesc {
UInt32 format;
AudioClassDescription plugin;
};
typedef struct AudioUnitOtherPluginDesc AudioUnitOtherPluginDesc;
/*!
@struct AudioUnitParameterValueTranslation
@abstract Used to translate another plug-in's parameter values to audio unit parameter
values
*/
struct AudioUnitParameterValueTranslation {
AudioUnitOtherPluginDesc otherDesc;
UInt32 otherParamID;
Float32 otherValue;
AudioUnitParameterID auParamID;
AudioUnitParameterValue auValue;
};
typedef struct AudioUnitParameterValueTranslation AudioUnitParameterValueTranslation;
/*!
@struct AudioUnitPresetMAS_SettingData
@discussion AU-MAS specific structs for the data contained in the "masdata" key of an audio
unit preset dictionary
*/
struct AudioUnitPresetMAS_SettingData {
UInt32 isStockSetting; // zero or 1 i.e., "long bool"
UInt32 settingID;
UInt32 dataLen; //length of following data
UInt8 data[1];
};
typedef struct AudioUnitPresetMAS_SettingData AudioUnitPresetMAS_SettingData;
/*!
@struct AudioUnitPresetMAS_Settings
@discussion See MAS documentation
*/
struct AudioUnitPresetMAS_Settings {
UInt32 manufacturerID;
UInt32 effectID;
UInt32 variantID;
UInt32 settingsVersion;
UInt32 numberOfSettings;
AudioUnitPresetMAS_SettingData settings[1];
};
typedef struct AudioUnitPresetMAS_Settings AudioUnitPresetMAS_Settings;
#endif // !TARGET_OS_IPHONE
//=====================================================================================================================
#pragma mark -
#pragma mark Apple Specific Properties
//=====================================================================================================================
#pragma mark - AUConverter
/*!
@enum Apple AUConverter Property IDs
@abstract The collection of property IDs for Apple AUConverter
@constant kAudioUnitProperty_SampleRateConverterComplexity
@discussion Scope: Global
Value Type: UInt32
Access: read/write
*/
CF_ENUM(AudioUnitPropertyID) {
kAudioUnitProperty_SampleRateConverterComplexity = 3014
};
/*!
@enum Audio Unit Sample Rate Converter Complexity
@discussion The lowest quality of the Mastering algorithm is higher than the highest quality of the Normal algorithm.
@constant kAudioUnitSampleRateConverterComplexity_Normal
@discussion Normal quality sample rate conversion.
@constant kAudioUnitSampleRateConverterComplexity_Mastering
@discussion Mastering quality sample rate conversion. More expensive.
*/
CF_ENUM(UInt32) {
kAudioUnitSampleRateConverterComplexity_Linear = 'line', // linear interpolation
kAudioUnitSampleRateConverterComplexity_Normal = 'norm', // the default
kAudioUnitSampleRateConverterComplexity_Mastering = 'bats' // higher quality, more expensive
};
//=====================================================================================================================
#pragma mark - Input/output (AUHAL / device) units
/*!
@enum Apple Output Property IDs
@abstract The collection of property IDs for Apple input/output units.
@constant kAudioOutputUnitProperty_CurrentDevice
@discussion Scope: Global
Value Type: AudioObjectID
Access: read/write
The audio device being used (or to be used) by and output device unit
@constant kAudioOutputUnitProperty_IsRunning
@discussion Scope: Global
Value Type: UInt32
Access: read-only
@constant kAudioOutputUnitProperty_ChannelMap
@discussion Scope: Input/Output
Value Type: Array of SInt32
Access: Read / Write
This will also work with AUConverter. This property is used to map input channels from an input (source) to a destination.
The number of channels represented in the channel map is the number of channels of the destination. The channel map entries
contain a channel number of the source that should be mapped to that destination channel. If -1 is specified, then that
destination channel will not contain any channel from the source (so it will be silent)
@constant kAudioOutputUnitProperty_EnableIO
@discussion Scope: { scope output, element 0 = output } { scope input, element 1 = input }
Value Type: UInt32
Access: read/write
Output units default to output-only operation. Host applications may disable
output or enable input operation using this property, if the output unit
supports it. 0=disabled, 1=enabled using I/O proc.
@constant kAudioOutputUnitProperty_StartTime
@discussion Scope: Global
Value Type: AudioOutputUnitStartAtTimeParams
Access: write only
When this property is set on an output unit, it will cause the next Start request
(but no subsequent Starts) to use AudioDeviceStartAtTime, using the specified
timestamp, passing false for inRequestedStartTimeIsInput.
@constant kAudioOutputUnitProperty_SetInputCallback
@discussion Scope: Global
Value Type: AURenderCallbackStruct
Access: read/write
When an output unit has been enabled for input operation, this callback can be
used to provide a single callback to the host application from the input
I/O proc, in order to notify the host that input is available and may be
obtained by calling the AudioUnitRender function.
Note that the inputProc will always receive a NULL AudioBufferList in ioData.
You must call AudioUnitRender in order to obtain the audio.
@constant kAudioOutputUnitProperty_HasIO
@discussion Scope: { scope output, element 0 = output } { scope input, element 1 = input }
Value Type: UInt32
Access:
See kAudioOutputUnitProperty_EnableIO
Property value is 1 if there are any valid hardware streams on the specified element.
@constant kAudioOutputUnitProperty_StartTimestampsAtZero
@discussion Scope: Global
Value Type: UInt32
Access: read/write
Apple output units typically begin their stream of timestamps presented to their
inputs at sample time 0. Some applications may wish to receive the HAL's timestamps
directly instead. When this property is set to false, the output unit's sample times
will be direct reflections of the HAL's -- except when a sample rate conversion
makes this impossible.
This property also applies to AUConverter. Its value defaults to 1 for AUHAL;
1 for other AUs.
@constant kAudioOutputUnitProperty_OSWorkgroup
Scope: Global
Value Type: os_workgroup_t
Access: read-only
Only applicable to input/output units.
For background, see <AudioToolbox/AudioWorkInterval.h>.
Note that as an os_object subclass, workgroup objects are reference-counted,
and that AudioUnitGetProperty returns a +1 reference, which the client
is responsible for releasing when it is finished with it.
*/
CF_ENUM(AudioUnitPropertyID) {
// range (2000 -> 2999)
kAudioOutputUnitProperty_CurrentDevice = 2000,
kAudioOutputUnitProperty_IsRunning = 2001,
kAudioOutputUnitProperty_ChannelMap = 2002, // this will also work with AUConverter
kAudioOutputUnitProperty_EnableIO = 2003,
kAudioOutputUnitProperty_StartTime = 2004,
kAudioOutputUnitProperty_SetInputCallback = 2005,
kAudioOutputUnitProperty_HasIO = 2006,
kAudioOutputUnitProperty_StartTimestampsAtZero = 2007, // this will also work with AUConverter
kAudioOutputUnitProperty_OSWorkgroup
__SWIFT_UNAVAILABLE_MSG("Swift is not supported for use with audio realtime threads")
= 2015,
};
#if AU_SUPPORT_INTERAPP_AUDIO
/*!
@enum Apple Inter-App Output Property IDs
@abstract The collection of property IDs for Apple output units with inter-app audio on iOS.
@constant kAudioOutputUnitProperty_MIDICallbacks
@discussion Scope: Global
Value Type: AudioOutputUnitMIDICallbacks
Access: read/write
When an output unit is published as a remote instrument or music effect, this
property must be set on the unit in order to receive MIDI events from the
host. The specified callbacks will be called at render time, immediately
prior to the request to render a buffer.
@constant kAudioOutputUnitProperty_HostReceivesRemoteControlEvents
@discussion Scope: Global
Value Type: UInt32
Access: read-only
Indicates whether the connected host app (if any) receives remote control events.
@constant kAudioOutputUnitProperty_RemoteControlToHost
@discussion Scope: Global
Value Type: AudioUnitRemoteControlEvent
Access: write-only
A node app can set this property on its output unit in order to send a remote
control event to the host app.
@constant kAudioOutputUnitProperty_HostTransportState
@discussion Scope: Global
Value Type: UInt32 (dummy, always 0)
Access: listener only
Indicates that the host's record or play transport state has changed and that any
UI reflecting it should be updated. The actual state must be fetched from the
HostCallbacks.
@constant kAudioOutputUnitProperty_NodeComponentDescription
@discussion Scope: Global
Value Type: AudioComponentDescription
Access: read-only
If a single output unit is published with multiple component descriptions, the
node app needs to know which component description the host used to connect.
This property returns that component description.
*/
CF_ENUM(AudioUnitPropertyID) {
kAudioOutputUnitProperty_MIDICallbacks = 2010,
kAudioOutputUnitProperty_HostReceivesRemoteControlEvents
= 2011,
kAudioOutputUnitProperty_RemoteControlToHost = 2012,
kAudioOutputUnitProperty_HostTransportState = 2013,
kAudioOutputUnitProperty_NodeComponentDescription = 2014
};
/*!
@struct AudioOutputUnitMIDICallbacks
@abstract For inter-app audio, callbacks for receiving MIDI messages.
@discussion
The supplied callback functions are called from the realtime rendering thread, before each
render cycle, to provide any incoming MIDI messages.
*/
struct AudioOutputUnitMIDICallbacks {
void * __nullable userData;
// see MusicDeviceMIDIEvent, MusicDeviceSysEx
void (*MIDIEventProc)(void * __nullable userData, UInt32 inStatus, UInt32 inData1, UInt32 inData2, UInt32 inOffsetSampleFrame);
void (*MIDISysExProc)(void * __nullable userData, const UInt8 *inData, UInt32 inLength);
};
typedef struct AudioOutputUnitMIDICallbacks AudioOutputUnitMIDICallbacks;
#endif // AU_SUPPORT_INTERAPP_AUDIO
/*!
@struct AudioOutputUnitStartAtTimeParams
*/
struct AudioOutputUnitStartAtTimeParams {
// see AudioDeviceStartAtTime
AudioTimeStamp mTimestamp;
UInt32 mFlags;
};
typedef struct AudioOutputUnitStartAtTimeParams AudioOutputUnitStartAtTimeParams;
//=====================================================================================================================
#pragma mark - AUVoiceProcessing unit
/*!
@enum Apple Voice Processing Property IDs for OS X and iOS
@abstract The collection of property IDs for Apple voice processing units.
@constant kAUVoiceIOProperty_BypassVoiceProcessing
@discussion Scope: Global
Value Type: UInt32
Access: read/write
Bypass all processing done by the voice processing unit. When set to 0
(default), the processing is activated otherwise it is disabled. Voice Isolation
and Wide Spectrum take priority over Bypass.
@constant kAUVoiceIOProperty_VoiceProcessingEnableAGC
@discussion Scope: Global
Value Type: UInt32
Access: read/write
Enable automatic gain control on the processed microphone/uplink
signal. On by default.
@constant kAUVoiceIOProperty_MuteOutput
@discussion Scope: Global
Value Type: UInt32
Access: read/write
Mutes the output of the voice processing unit.
0 (default) = muting off. 1 = mute output.
*/
CF_ENUM(AudioUnitPropertyID) {
kAUVoiceIOProperty_BypassVoiceProcessing = 2100,
kAUVoiceIOProperty_VoiceProcessingEnableAGC = 2101,
kAUVoiceIOProperty_MuteOutput = 2104
};
/*!
@enum Speech activity event described by AUVoiceIO
*/
typedef CF_ENUM(UInt32, AUVoiceIOSpeechActivityEvent)
{
kAUVoiceIOSpeechActivityHasStarted = 0,
kAUVoiceIOSpeechActivityHasEnded = 1
};
/*!
@typedef AUVoiceIOMutedSpeechActivityEventListener
@abstract Block called to receive speech activity event while the client is muted.
*/
typedef void (^AUVoiceIOMutedSpeechActivityEventListener)(AUVoiceIOSpeechActivityEvent event);
/*!
@constant kAUVoiceIOProperty_MutedSpeechActivityEventListener
@discussion Scope: Global
Value Type: AUVoiceIOMutedSpeechActivityEventListener
Access: write only
Register a listener to be notified when speech activity event occurs while the client is muted.
Continuous presence of or lack of speech activity during mute will not cause redundant notification.
In order to use this API, it's expected to implement the mute via the kAUVoiceIOProperty_MuteOutput.
*/
CF_ENUM(AudioUnitPropertyID) {
kAUVoiceIOProperty_MutedSpeechActivityEventListener = 2106
} API_AVAILABLE(ios(15.0)) API_UNAVAILABLE(macos, watchos, tvos);
#pragma mark - AUVoiceProcessing unit deprecated properties
#if TARGET_OS_IPHONE
/*!
@enum Deprecated Apple Voice Processing Property ID (iOS only)
@constant kAUVoiceIOProperty_DuckNonVoiceAudio
@discussion Scope: Global
Value Type: UInt32
Access: read/write
DEPRECATED. Enable ducking of the non voice audio signal. Since
music signals are typically louder than voice, ducking the music signal
can increase the intelligibility of voice chats. Note that the amount of
ducking is dependent on the audio route. Set to 0 to turn off or 1 to
turn on. On by default. Deprecation note: What is being deprecated is the
ability to turn off this feature via this property. In the future, ducking
will always be on.
*/
CF_ENUM(AudioUnitPropertyID) {
kAUVoiceIOProperty_DuckNonVoiceAudio = 2102
} API_DEPRECATED("not longer supported", ios(3.0, 7.0)) API_UNAVAILABLE(macos) __WATCHOS_PROHIBITED __TVOS_PROHIBITED;
#endif
/*!
@enum Apple Voice Processing Property IDs that are being deprecated
@constant kAUVoiceIOProperty_VoiceProcessingQuality
@discussion Scope: Global
Value Type: UInt32
Access: read/write
DEPRECATED. Sets the quality of the voice processing unit. Quality values
are comprised between 0 (lowest) and 127 (highest).
*/
CF_ENUM(AudioUnitPropertyID) {
kAUVoiceIOProperty_VoiceProcessingQuality = 2103
} __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_7, __MAC_10_9, __IPHONE_3_0, __IPHONE_7_0);
//=====================================================================================================================
#pragma mark - AUNBandEQ unit
/*!
@enum Apple N-Band EQ Audio Unit Property IDs
@abstract The collection of property IDs for the Apple N-Band EQ Audio Unit.
@constant kAUNBandEQProperty_NumberOfBands
@discussion Scope: Global
Value Type: UInt32
Access: read/write
Specifies the number of equalizer bands. If more than kAUNBandEQProperty_MaxNumberOfBands
are specified, an error is returned.
Can only be set if the unit is uninitialized.
@constant kAUNBandEQProperty_MaxNumberOfBands
@discussion Scope: Global
Value Type: UInt32
Access: read-only
Returns the maximum number of equalizer bands.
@constant kAUNBandEQProperty_BiquadCoefficients
@discussion Scope: Global
Value Type: array of Float64
Access: read-only
Returns an array of Float64 values, 5 per band.
*/
CF_ENUM(AudioUnitPropertyID) {
kAUNBandEQProperty_NumberOfBands = 2200,
kAUNBandEQProperty_MaxNumberOfBands = 2201,
kAUNBandEQProperty_BiquadCoefficients = 2203
};
#if !TARGET_OS_IPHONE
/*!
@enum Apple Voice Processing AudioUnit Error IDs
@abstract These are the various error IDs returned by Voice Processing audio unit.
@constant kAUVoiceIOErr_UnexpectedNumberOfInputChannels
This error indicates that an unexpected number of input channels was encountered during initialization of voice processing audio unit
*/
CF_ENUM(OSStatus) {
kAUVoiceIOErr_UnexpectedNumberOfInputChannels = -66784,
};
#endif
//=====================================================================================================================
#pragma mark - Mixers
/*!
@enum Apple Mixer Property IDs
@abstract The collection of property IDs for Apple mixers
@constant kAudioUnitProperty_MeteringMode
@discussion Scope: { scope / element }
Value Type: UInt32
Access: read/write
Enable or disable metering on a particular scope/element
@constant kAudioUnitProperty_MatrixLevels
@discussion This property can be used for both the AUMatrixMixer and AUMultiChannelMixer.
AUMatrixMixer
Scope: Global
Value Type: Float32 array
Access: read/write
This property is used to retrieve the entire state of a matrix mixer. The size required is
the number of (input channels + 1) * (output channels + 1) - see _MatrixDimensions
So a matrix mixer that has 2 input channels and 2 output channels, will need a 3 x 3 array of Float32
Global volume is stored at volumes[2][2]
Input volumes are stored in the last column (volumes[0][2] for the first input channel, volumes[1][2] for the second)
Output volumes are stored in the last row (volumes [2][0] and [2][1])
Cross point volumes are stored at their expected locations ([0][1], etc)
AUMultiChannelMixer
Scope: Input
Value Type: Float32 array
Access: read/write
Gets/sets the matrix levels for one input element. This allows arbitrary mixing configurations
from all input channels to all output channels.
The size required is the number of (input channels) * (output channels).
The matrix stores only the crosspoint gains, there are no overall input or output channel gains.
@constant kAudioUnitProperty_MatrixDimensions
@discussion Scope: Global
Value Type: 2 x UInt32
Access: Read only
Returns the total number of channels for input and output of a given matrix mixer
@constant kAudioUnitProperty_MeterClipping
@discussion Scope: Global
Value Type: AudioUnitMeterClipping
Access: Read
A mixer returns an AudioUnitMeterClipping structure.
@constant kAudioUnitProperty_InputAnchorTimeStamp
@discussion Scope: Input
Value Type: AudioTimeStamp
Access: Read / Write
There are situations, for example moving an input between mixers, where the
input's sample time timeline needs to be made continuous. This facilitates
the operation: after disconnecting the input, fetch its anchor time stamp,
then before reconnecting it, set the same anchor time stamp. The input's
sequence of sample times will be maintained.
This property cannot be accessed while the input is rendering.
*/
CF_ENUM(AudioUnitPropertyID) {
// General mixers
kAudioUnitProperty_MeteringMode = 3007,
// Matrix Mixer
kAudioUnitProperty_MatrixLevels = 3006,
kAudioUnitProperty_MatrixDimensions = 3009,
kAudioUnitProperty_MeterClipping = 3011,
// Multichannel Mixer
kAudioUnitProperty_InputAnchorTimeStamp = 3016
};
/*!
@struct AudioUnitMeterClipping
@var peakValueSinceLastCall;
The maximum value seen on the channel since the last time the property was retrieved.
@var sawInfinity;
TRUE if there was an infinite value on this channel.
@var sawNotANumber
TRUE if there was a floating point Not-A-Number value on this channel.
*/
struct AudioUnitMeterClipping {
Float32 peakValueSinceLastCall;
Boolean sawInfinity;
Boolean sawNotANumber;
};
typedef struct AudioUnitMeterClipping AudioUnitMeterClipping;
//=====================================================================================================================
#pragma mark - _SpatialMixer
/*!
@enum Apple Mixer Property IDs
@abstract The collection of property IDs for AUSpatialMixer
@constant kAudioUnitProperty_ReverbRoomType
Scope: Global
Value Type: UInt32
Access: Read / Write
@constant kAudioUnitProperty_UsesInternalReverb
Scope: Global
Value Type: UInt32
Access: Read / Write
@constant kAudioUnitProperty_SpatializationAlgorithm
Scope: Input
Value Type: UInt32
Access: Read / Write
Used to set the spatialisation algorithm used by an input of AUSpatialMixer. See kSpatializationAlgorithm_
@constant kAudioUnitProperty_SpatialMixerRenderingFlags
Scope: Input
Value Type: UInt32
Access: Read / Write
Used to enable various rendering operations on a given input for the 3DMixer. See k3DMixerRenderingFlags_
@constant kAudioUnitProperty_SpatialMixerSourceMode
Scope: Input
Value Type: UInt32
Access: Read / Write
Sets how individual channels of an input bus are rendered. See kSpatialMixerSourceMode_
@constant kAudioUnitProperty_SpatialMixerDistanceParams
Scope: Input
Value Type: MixerDistanceParams
Access: Read / Write
@constant kAudioUnitProperty_SpatialMixerAttenuationCurve
Scope: Input
Value Type: UInt32
Access: Read / Write
@constant kAudioUnitProperty_SpatialMixerOutputType
Scope: Global
Value Type: UInt32
Access: Read / Write
Sets the type of output hardware used with kSpatializationAlgorithm_UseOutputType.
See kSpatialMixerOutputType_
@constant kAudioUnitProperty_SpatialMixerPointSourceInHeadMode
Scope: Input
Value Type: UInt32
Access: Read / Write
Sets in-head rendering mode when using kSpatializationAlgorithm_UseOutputType and
kSpatialMixerSourceMode_PointSource. See kSpatialMixerPointSourceInHeadMode_
*/
CF_ENUM(AudioUnitPropertyID) {
kAudioUnitProperty_ReverbRoomType = 10,
kAudioUnitProperty_UsesInternalReverb = 1005,
kAudioUnitProperty_SpatializationAlgorithm = 3000,
kAudioUnitProperty_SpatialMixerRenderingFlags = 3003,
kAudioUnitProperty_SpatialMixerSourceMode = 3005,
kAudioUnitProperty_SpatialMixerDistanceParams = 3010,
kAudioUnitProperty_SpatialMixerAttenuationCurve = 3013,
kAudioUnitProperty_SpatialMixerOutputType = 3100,
kAudioUnitProperty_SpatialMixerPointSourceInHeadMode = 3103
};
/*!
@enum Spatialization Algorithms
@discussion Use kSpatializationAlgorithm_UseOutputType with appropriate kAudioUnitProperty_SpatialMixerOutputType
for highest-quality spatial rendering across different hardware.
*/
typedef CF_ENUM(UInt32, AUSpatializationAlgorithm) {
kSpatializationAlgorithm_EqualPowerPanning = 0,
kSpatializationAlgorithm_SphericalHead = 1,
kSpatializationAlgorithm_HRTF = 2,
kSpatializationAlgorithm_SoundField = 3,
kSpatializationAlgorithm_VectorBasedPanning = 4,
kSpatializationAlgorithm_StereoPassThrough = 5,
kSpatializationAlgorithm_HRTFHQ = 6,
kSpatializationAlgorithm_UseOutputType = 7
};
/*!
@enum Property values for kAudioUnitProperty_SpatialMixerSourceMode
@constant kSpatialMixerSourceMode_SpatializeIfMono
@discussion Mono input is spatialized using kAudioUnitProperty_SpatializationAlgorithm.
Any input with more than one channel is passed through without spatialization. This is
the default mode and corresponds to legacy behavior. The rendering is equivalent to
kSpatialMixerSourceMode_PointSource for mono input and
kSpatialMixerSourceMode_Bypass for input with more than one channel.
@constant kSpatialMixerSourceMode_Bypass
@discussion No spatial rendering. If input and output AudioChannelLayouts are equivalent, all
input channels are copied to corresponding output channels. If the input and
output AudioChannelLayouts differ, mixing is done according to the
kAudioFormatProperty_MatrixMixMap property of the layouts. No occlusion, obstruction,
or reverb is applied in this mode.
@constant kSpatialMixerSourceMode_PointSource
@discussion All channels of the input signal are rendered as a single source except if rendering
in-head with kSpatialMixerPointSourceInHeadMode_Bypass.
@constant kSpatialMixerSourceMode_AmbienceBed
@discussion The input channels are spatialized around the listener as far-field sources.
The relative directions of the individual channels are specified by the
AudioChannelLayout of the bus. The rotation of the whole bed in the global space is
controlled by azimuth and elevation parameters.
*/
typedef CF_ENUM(UInt32, AUSpatialMixerSourceMode) {
kSpatialMixerSourceMode_SpatializeIfMono = 0,
kSpatialMixerSourceMode_Bypass = 1,
kSpatialMixerSourceMode_PointSource = 2,
kSpatialMixerSourceMode_AmbienceBed = 3
};
/*!
@enum Reverb Room Types
@discussion Used to specify room type (as identified by a factory preset number) on Apple audio
units that use internal reverb.
*/
typedef CF_ENUM(UInt32, AUReverbRoomType) {
kReverbRoomType_SmallRoom = 0,
kReverbRoomType_MediumRoom = 1,
kReverbRoomType_LargeRoom = 2,
kReverbRoomType_MediumHall = 3,
kReverbRoomType_LargeHall = 4,
kReverbRoomType_Plate = 5,
kReverbRoomType_MediumChamber = 6,
kReverbRoomType_LargeChamber = 7,
kReverbRoomType_Cathedral = 8,
kReverbRoomType_LargeRoom2 = 9,
kReverbRoomType_MediumHall2 = 10,
kReverbRoomType_MediumHall3 = 11,
kReverbRoomType_LargeHall2 = 12
};
/*!
@enum AUSpatialMixer Attenuation Curves
*/
typedef CF_ENUM(UInt32, AUSpatialMixerAttenuationCurve) {
kSpatialMixerAttenuationCurve_Power = 0,
kSpatialMixerAttenuationCurve_Exponential = 1,
kSpatialMixerAttenuationCurve_Inverse = 2,
kSpatialMixerAttenuationCurve_Linear = 3
};
/*!
@struct MixerDistanceParams
*/
struct MixerDistanceParams {
Float32 mReferenceDistance;
Float32 mMaxDistance;
Float32 mMaxAttenuation; // in decibels
};
typedef struct MixerDistanceParams MixerDistanceParams;
/*!
@enum AUSpatial Mixer Rendering Flags
*/
typedef CF_OPTIONS(UInt32, AUSpatialMixerRenderingFlags) {
kSpatialMixerRenderingFlags_InterAuralDelay = (1L << 0),
kSpatialMixerRenderingFlags_DistanceAttenuation = (1L << 2),
};
/*!
@enum Property values for kAudioUnitProperty_SpatialMixerOutputType
@constant kSpatialMixerOutputType_Headphones
@discussion Render for headphones.
@constant kSpatialMixerOutputType_BuiltInSpeakers
@discussion Render for built-in speakers. The spatialization is optimized for current hardware and
will not be suitable for playback on other hardware. On iOS devices, the rendering may
be specific to device orientation. Non-realtime rendering may not provide intended results
if the orientation changes between rendering the audio and playing it back.
@constant kSpatialMixerOutputType_ExternalSpeakers
@discussion Render for external speakers based on the mixer's output channel layout.
*/
typedef CF_ENUM(UInt32, AUSpatialMixerOutputType) {
kSpatialMixerOutputType_Headphones = 1,
kSpatialMixerOutputType_BuiltInSpeakers = 2,
kSpatialMixerOutputType_ExternalSpeakers = 3
};
/*!
@enum Property values for kAudioUnitProperty_SpatialMixerPointSourceInHeadMode
@abstract This setting only affects spatialization when using kSpatializationAlgorithm_UseOutputType
with kSpatialMixerSourceMode_PointSource.
@constant kSpatialMixerPointSourceInHeadMode_Mono
@discussion A point source remains a single mono source inside the listener's head regardless
of the channels it consists of.
@constant kSpatialMixerPointSourceInHeadMode_Bypass
@discussion A point source splits into bypass inside the listener's head. This enables transitions
between traditional, non-spatialized rendering and spatialized sources outside the
listener's head.
*/
typedef CF_ENUM(UInt32, AUSpatialMixerPointSourceInHeadMode) {
kSpatialMixerPointSourceInHeadMode_Mono = 0,
kSpatialMixerPointSourceInHeadMode_Bypass = 1
};
//=====================================================================================================================
#pragma mark - _3DMixer (Deprecated)
/*!
// AUMixer3D is deprecated. Use AUSpatialMixer instead.
@enum Apple Mixer Property IDs
@abstract The collection of property IDs for Apple mixers
@constant kAudioUnitProperty_MeteringMode
@discussion Scope: { scope / element }
Value Type: UInt32
Access: read/write
Enable or disable metering on a particular scope/element
@constant kAudioUnitProperty_DopplerShift
@discussion Scope: Input
Value Type: UInt32
Access: Write
Use a boolean true/false value to enable doppler shift for any specified input
@constant kAudioUnitProperty_3DMixerRenderingFlags
@discussion Scope: Input
Value Type: UInt32
Access: Read / Write
Used to enable various rendering operations on a given input for the 3DMixer. See k3DMixerRenderingFlags_
@constant kAudioUnitProperty_3DMixerDistanceAtten
@discussion Scope:
Value Type:
Access:
@constant kAudioUnitProperty_3DMixerDistanceParams
@discussion Scope:
Value Type:
Access:
@constant kAudioUnitProperty_ReverbPreset
@discussion Scope:
Value Type:
Access:
@constant kAudioUnitProperty_3DMixerAttenuationCurve
@discussion Scope:
Value Type:
Access:
*/
CF_ENUM(AudioUnitPropertyID) {
kAudioUnitProperty_3DMixerDistanceParams = 3010,
kAudioUnitProperty_3DMixerAttenuationCurve = 3013,
kAudioUnitProperty_DopplerShift = 3002,
kAudioUnitProperty_3DMixerRenderingFlags = 3003,
kAudioUnitProperty_3DMixerDistanceAtten = 3004,
kAudioUnitProperty_ReverbPreset = 3012
} __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_7, __MAC_10_11, __IPHONE_3_0, __IPHONE_9_0);
/*!
@enum 3D Mixer Rendering Flags
*/
typedef CF_OPTIONS(UInt32, AU3DMixerRenderingFlags) {
k3DMixerRenderingFlags_InterAuralDelay = (1L << 0),
k3DMixerRenderingFlags_DopplerShift = (1L << 1),
k3DMixerRenderingFlags_DistanceAttenuation = (1L << 2),
k3DMixerRenderingFlags_DistanceFilter = (1L << 3),
k3DMixerRenderingFlags_DistanceDiffusion = (1L << 4),
k3DMixerRenderingFlags_LinearDistanceAttenuation = (1L << 5),
k3DMixerRenderingFlags_ConstantReverbBlend = (1L << 6)
};
/*!
@enum 3D Mixer Attenuation Curves
*/
typedef CF_ENUM(UInt32, AU3DMixerAttenuationCurve) {
k3DMixerAttenuationCurve_Power = 0,
k3DMixerAttenuationCurve_Exponential = 1,
k3DMixerAttenuationCurve_Inverse = 2,
k3DMixerAttenuationCurve_Linear = 3
};
//=====================================================================================================================
#pragma mark - AUScheduledSoundPlayer
/*!
@enum Apple AUScheduledSoundPlayer Property IDs
@abstract The collection of property IDs for the Apple AUScheduledSoundPlayer audio unit.
@discussion The AUScheduledSoundPlayer audio unit lets a client schedule audio buffers for
future playback, with sample-accurate timing.
Elements and Formats
This unit has one output element and no input elements. The output's format
should be a canonical audio unit stream format (native Float32, deinterleaved).
Scheduling
To schedule slices of audio for future playback, set the
kAudioUnitProperty_ScheduleAudioSlice property, with a ScheduledAudioSlice
structure as the property value. The slice's mTimeStamp.mSampleTime field
determines when the slice will be played. This sample number is relative to
the unit's start time, which you must set using the
kAudioUnitProperty_ScheduleStartTimeStamp property before playback will
begin.
You must retain, unmodified, the ScheduledAudioSlice structure, including
its mBufferList and the buffers to which it points, until the slice has been
completely played, or until you stop playback by uninitializing or resetting
the unit. The format of the slice's buffer list must match the unit's output
stream format.
As of OS X 10.10 and iOS 8.0, you can use an invalid time stamp (no flags set
in mFlags) to indicate that the slice should be played immediately following the
previous slice (or immediately, if there are no slices playing).
(The fields other than mSampleTime and mFlags in the mTimestamp structure are
currently ignored.)
Completion
To receive a callback when the slice has been played, store a pointer to a
callback function in the mCompletionProc field. This function will be called
(from the audio unit's rendering thread) when the slice has been completely
played -- or when the slice is determined to be unplayable due to an error.
As an alternative, you may also poll the slice's
(mFlags & kScheduledAudioSliceFlag_Complete).
Upon completion, you can test (mFlags & kScheduledAudioSliceFlag_BeganToRenderLate)
to determine whether some portion of the slice was not played due to its having
been scheduled too late relative to the current playback time.
Start Time
The audio unit will not play any slices following initialization or reset, until
its start time has been set. The start time establishes the beginning of a
timeline: the timestamps of all slices in the schedule are relative to the
start time.
Set a start time by setting the kAudioUnitProperty_ScheduleStartTimeStamp
property with an AudioTimeStamp structure. If the timestamp contains a valid
sample time (timestamp.mFlags & kAudioTimeStampSampleTimeValid), then playback
begins when the timestamp passed to the AudioUnitRender function reaches the
specified sample time. If the specified sample time is -1, playback begins on
the next render cycle.
If the start timestamp does not contain a valid sample time, but does contain a
valid host time (timestamp.mFlags & kAudioTimeStampHostTimeValid), then the
specified host time is translated to the sample time at which playback will
begin. A host time of 0 means "start on the next render cycle."
The kAudioUnitProperty_ScheduleStartTimeStamp property may be queried to obtain
the time at which playback began. If the start time has not yet been reached,
the timestamp returned will be whatever the host application last set.
Current play time
The kAudioUnitProperty_CurrentPlayTime property may be queried to determine the
audio unit's current time offset from its start time. This is useful, for
example, to monitor playback progress.
Unscheduling events
To clear an audio unit's play schedule, call the AudioUnitReset function. The
completion proc (if any) for each slice in the schedule will called. Playback
will not resume until a new start time has been set. This also happens when
the audio unit is uninitialized.
@constant kAudioUnitProperty_ScheduleAudioSlice
@discussion Scope:
Value Type: ScheduledAudioSlice
Access:
@constant kAudioUnitProperty_ScheduleStartTimeStamp
@discussion Scope:
Value Type: AudioTimeStamp
Access:
Sample time or host time valid. Sample time takes precedence,
-1 means "now". Host time of 0 means "now."
@constant kAudioUnitProperty_CurrentPlayTime
@discussion Scope:
Value Type: AudioTimeStamp
Access:
AudioTimeStamp, relative to start time, sample time of -1 if not yet started.
*/
CF_ENUM(AudioUnitPropertyID) {
kAudioUnitProperty_ScheduleAudioSlice = 3300,
kAudioUnitProperty_ScheduleStartTimeStamp = 3301,
kAudioUnitProperty_CurrentPlayTime = 3302
};
/*!
@enum ScheduledAudioSlice
@abstract bits in ScheduledAudioSlice.mFlags
@constant kScheduledAudioSliceFlag_Complete
Set if the unit is done with this slice
@constant kScheduledAudioSliceFlag_BeganToRender
Set if any portion of the buffer has been played
@constant kScheduledAudioSliceFlag_BeganToRenderLate
Set if any portion of the buffer was not played because it was scheduled late
@constant kScheduledAudioSliceFlag_Loop
specifies that the buffer should loop indefinitely
@constant kScheduledAudioSliceFlag_Interrupt
specifies that the buffer should interrupt any previously scheduled buffer
(by default, buffers following a playing buffer are not played until the
playing buffer has completed).
@constant kScheduledAudioSliceFlag_InterruptAtLoop
specifies that the buffer should interrupt any previously scheduled buffer,
but only at a loop point in that buffer.
*/
typedef CF_OPTIONS(UInt32, AUScheduledAudioSliceFlags) {
kScheduledAudioSliceFlag_Complete = 0x01,
kScheduledAudioSliceFlag_BeganToRender = 0x02,
kScheduledAudioSliceFlag_BeganToRenderLate = 0x04,
kScheduledAudioSliceFlag_Loop = 0x08, // new for OS X 10.10 and iOS 8.0
kScheduledAudioSliceFlag_Interrupt = 0x10, // new for OS X 10.10 and iOS 8.0
kScheduledAudioSliceFlag_InterruptAtLoop = 0x20 // new for OS X 10.10 and iOS 8.0
};
typedef struct ScheduledAudioSlice ScheduledAudioSlice; // forward dec, see definition below
/*!
@typedef ScheduledAudioSliceCompletionProc
*/
typedef void (*ScheduledAudioSliceCompletionProc)(void * __nullable userData, ScheduledAudioSlice *bufferList);
/*
@struct ScheduledAudioSlice
@var mTimeStamp
@var mCompletionProc
May be null
@var mCompletionProcUserData
@var mFlags
@var mReserved
Must be 0
@var mReserved2
For internal use
@var mNumberFrames
Must be consistent with byte count of mBufferList
@var mBufferList
Must contain deinterleaved Float32
*/
struct ScheduledAudioSlice {
AudioTimeStamp mTimeStamp;
ScheduledAudioSliceCompletionProc __nullable mCompletionProc;
void * mCompletionProcUserData;
AUScheduledAudioSliceFlags mFlags;
UInt32 mReserved; // must be 0
void * __nullable mReserved2; // for internal use
UInt32 mNumberFrames; // must be consistent with byte count of mBufferList
AudioBufferList * mBufferList; // must contain deinterleaved Float32
};
//=====================================================================================================================
#pragma mark - AUAudioFilePlayer
/*!
@enum Apple AUAudioFilePlayer Property IDs
@abstract The collection of property IDs for Apple AUAudioFilePlayer
@discussion This audio unit lets you schedule regions of audio files for future playback,
with sample-accurate timing.
The unit is a subclass of AUScheduledSoundPlayer and inherits all of its
behavior. In particular, this unit implements the kAudioUnitProperty_ScheduleStartTimeStamp
and kAudioUnitProperty_CurrentPlayTime properties. Instead of scheduling
slices (buffers) of audio to be played (via kAudioUnitProperty_ScheduleAudioSlice),
however, you schedule regions of audio files to be played. The unit reads and
converts audio file data into its own internal buffers. It performs disk I/O
on a high-priority thread shared among all instances of this unit within a
process. Upon completion of a disk read, the unit internally schedules
buffers for playback.
Elements and Formats
This unit has one output element and no input elements. The output's format
should be a canonical audio unit stream format (native Float32,
deinterleaved). This format should have at least as many channels are in the
audio file(s) to be played (otherwise channels will be dropped). During
playback, all audio file data is converted to the unit's output format.
Audio Files
Before starting playback, you must first open all audio files to be played
using the AudioFile API's (see AudioToolbox/AudioFile.h), and pass their
AudioFileIDs to the unit by setting the kAudioUnitProperty_ScheduledFileIDs
property. This property must not be set during playback. The audio files must
be kept open for the duration of playback.
Scheduling Regions
To schedule the playback of a region of an audio file, set the
kAudioUnitProperty_ScheduledFileRegion property. This is a
ScheduledAudioFileRegion structure. mTimeStamp.mSampleTime must be valid and
is interpreted relative to the unit's start time -- the start time semantics
(using kAudioUnitProperty_ScheduleStartTimeStamp) are identical to those of
AUScheduledSoundPlayer. Unlike the ScheduledAudioSlice structures, the unit
makes copies of ScheduledAudioFileRegions, so you may create them on the
stack or otherwise reuse/dispose of them immediately after scheduling them.
Priming
You should set kAudioUnitProperty_ScheduledFilePrime after scheduling
initial file regions to be played and before starting playback. This SetProperty call
will begin reading the audio files and not return until the number of frames
specified by the property value have been read.
Completion Callbacks
A region's completion callback (mCompletionProc) is called when it has been
completely scheduled for reading from disk. This callback is issued on the disk
read thread. If the region is not read from disk in time to play at its
scheduled time, mCompletionProc is called a second time with an error code,
also from the read thread. Note that the region passed to the callback will not
be the same memory object as was passed by the client (since the unit copies the region).
Start Time and Current Time
These properties work identically as in AUScheduledSoundPlayer.
Unscheduling regions
To clear the unit's play schedule, call the AudioUnitReset function. The completion proc
(if any) for each file region in the schedule will be called. Playback will
not resume until a new start time has been set. This also happens when the
unit is uninitialized.
Customization
The size and number of the player's disk read buffers default to "sensible"
values, but may be configured with the properties:
kAudioUnitProperty_ScheduledFileBufferSizeFrames
kAudioUnitProperty_ScheduledFileNumberBuffers
Bugs
kAudioUnitProperty_ScheduledFileBufferSizeFrames
kAudioUnitProperty_ScheduledFileNumberBuffers
are currently unimplemented
An option to make the unit not perform conversion from the audio file sample
rate to the unit's output rate may be desirable.
@constant kAudioUnitProperty_ScheduledFileIDs
@discussion Scope:
Value Type: Array of AudioFileIDs
Access:
Must set this property on scheduled file player for all files to be played
@constant kAudioUnitProperty_ScheduledFileRegion
@discussion Scope:
Value Type: ScheduledAudioFileRegion
Access:
@constant kAudioUnitProperty_ScheduledFilePrime
@discussion Scope:
Value Type: UInt32
Access:
The number of frames to read from disk before returning, or 0 to specify use
of a default value
@constant kAudioUnitProperty_ScheduledFileBufferSizeFrames
@discussion Scope:
Value Type: UInt32
Access:
@constant kAudioUnitProperty_ScheduledFileNumberBuffers
@discussion Scope:
Value Type: UInt32
Access:
*/
CF_ENUM(AudioUnitPropertyID) {
kAudioUnitProperty_ScheduledFileIDs = 3310,
kAudioUnitProperty_ScheduledFileRegion = 3311,
kAudioUnitProperty_ScheduledFilePrime = 3312,
kAudioUnitProperty_ScheduledFileBufferSizeFrames = 3313,
kAudioUnitProperty_ScheduledFileNumberBuffers = 3314
};
typedef struct ScheduledAudioFileRegion ScheduledAudioFileRegion; //forward declaration, see definition below
/*!
@typedef ScheduledAudioFileRegionCompletionProc
*/
typedef void (*ScheduledAudioFileRegionCompletionProc)(void * __nullable userData,
ScheduledAudioFileRegion *fileRegion, OSStatus result);
/*!
@struct ScheduledAudioFileRegion
@var mTimeStamp
@var mCompletionProc
may be NULL
@var mCompletionProcUserData
@var mAudioFile
must be a valid and open AudioFileID
defined in AudioToolbox/AudioFile.h: typedef struct OpaqueAudioFileID *AudioFileID;
@var mLoopCount
0 = don't loop
@var mStartFrame
offset into file
@var mFramesToPlay
number of frames to play
*/
struct ScheduledAudioFileRegion {
AudioTimeStamp mTimeStamp;
ScheduledAudioFileRegionCompletionProc __nullable mCompletionProc;
void * __nullable mCompletionProcUserData;
struct OpaqueAudioFileID * mAudioFile;
UInt32 mLoopCount;
SInt64 mStartFrame;
UInt32 mFramesToPlay;
};
#if !TARGET_OS_IPHONE
//=====================================================================================================================
#pragma mark - OS X-specific Music Device Properties used by DLSMusicDevice
/*!
@enum Property IDs
@abstract OS X-only audio unit property IDs used by the DLSMusicDevice
@constant kMusicDeviceProperty_SoundBankData
@discussion Scope:
Value Type:
Access:
@constant kMusicDeviceProperty_StreamFromDisk
@discussion Scope:
Value Type:
Access:
@constant kMusicDeviceProperty_SoundBankFSRef
@discussion Scope:
Value Type:
Access:
*/
CF_ENUM(AudioUnitPropertyID) {
kMusicDeviceProperty_UsesInternalReverb = kAudioUnitProperty_UsesInternalReverb,
kMusicDeviceProperty_SoundBankData = 1008,
kMusicDeviceProperty_StreamFromDisk = 1011,
kMusicDeviceProperty_SoundBankFSRef = 1012
};
#endif // TARGET_OS_IPHONE
//=====================================================================================================================
#pragma mark - Music Device Properties used by DLSMusicDevice
/*!
@enum Generic Property IDs
@abstract Audio unit property IDs used by DLSMusicDevice (OSX)
@constant kMusicDeviceProperty_InstrumentName
@discussion Scope: Global
Value Type: CFURLRef
Access: Read
@constant kMusicDeviceProperty_InstrumentNumber
@discussion Scope: Global
Value Type: UInt32
Access: Read
*/
CF_ENUM(AudioUnitPropertyID) {
kMusicDeviceProperty_InstrumentName = 1001,
kMusicDeviceProperty_InstrumentNumber = 1004
};
//=====================================================================================================================
#pragma mark - Music Device Properties used by DLSMusicDevice and AUMIDISynth
/*!
@enum Generic Property IDs
@abstract Audio unit property IDs used by AUMIDISynth (iOS) and DLSMusicDevice (OSX)
@constant kMusicDeviceProperty_InstrumentCount
@discussion Scope: Global
Value Type: UInt32
Access: Read
For a mono-timbral music instrument, this property should return 0 (it should be implemented).
For a multi-timbral music instrument, this property can return the number of independent patches that
are available to be chosen as an active patch for the instrument. For instance, for Apple's DLS Music Device
and AUMIDISynth, this value returns the number of patches that are found in a given DLS or SoundFont file when loaded.
@constant kMusicDeviceProperty_BankName
@discussion Scope: Global
Value Type: CFStringRef
Access: Read
@constant kMusicDeviceProperty_SoundBankURL
@discussion Scope: Global
Value Type: CFURLRef
Access: Read (Read/Write for AUMIDISynth)
For DLSMusicDevice, this is a read-only property to return the URL for the currently-loaded bank file.
For AUMIDISynth it is also writeable, and is used to specify the URL for the sound bank to load and use
for playback.
*/
CF_ENUM(AudioUnitPropertyID) {
kMusicDeviceProperty_InstrumentCount = 1000,
kMusicDeviceProperty_BankName = 1007,
kMusicDeviceProperty_SoundBankURL = 1100
};
//=====================================================================================================================
#pragma mark - AUMIDISynth
/*!
@enum Apple AUMIDISynth Property IDs
@abstract The collection of property IDs for the Apple Midi Synth audio unit.
@discussion The AUMIDISynth audio unit lets a client create fully GM-compatible Midi Synth.
@constant kAUMIDISynthProperty_EnablePreload
@discussion Scope: Global
Value Type: UInt32
Access: Write
Setting this property to 1 puts the MIDISynth in a mode where it will attempt to load
instruments from the bank or file when it receives a program change message. This
is used internally by the MusicSequence. It should only be used prior to MIDI playback,
and must be set back to 0 before attempting to start playback.
*/
CF_ENUM(AudioUnitPropertyID) {
kAUMIDISynthProperty_EnablePreload = 4119
};
//=====================================================================================================================
#pragma mark - AUSampler
/*!
@enum Apple AUSampler Property IDs
@abstract The collection of property IDs for the Apple Sampler audio unit.
@discussion The AUSampler audio unit lets a client create an editable, interactive
sampler synthesizer instrument.
@constant kAUSamplerProperty_LoadInstrument
@discussion Scope: Global
Value Type: AUSamplerInstrumentData
Access: Write
Load an instrument from an external DLS or Soundfont2 bank file, or from other file formats.
@constant kAUSamplerProperty_LoadAudioFiles
@discussion Scope: Global
Value Type: CFArrayRef
Access: Write
Create a new preset from a list of audio file paths. The CFArray should contain a set
of CFURLRefs, one per file. The previous preset will be completely cleared.
*/
CF_ENUM(AudioUnitPropertyID) {
// range (4100->4999)
kAUSamplerProperty_LoadInstrument = 4102,
kAUSamplerProperty_LoadAudioFiles = 4101
};
/*
@struct AUSamplerInstrumentData
@abstract Used for loading an instrument from either an external bank file (i.e. DLS or SoundFont), an Apple
.aupreset, a Logic or GarageBand EXS24 sampler instrument, or creating a new default instrument from
a single audio file. The path to the bank or instrument file is specified in the fileURL field.
The instrumentType field distinguishes between the instrument types. The remaining fields of this
struct are used only for the kInstrumentType_DLSPreset and kInstrumentType_SF2Preset types to
identify the particular bank and preset IDs for the instrument you wish to load from the bank.
They represent values for MIDI controllers 0 and 32 and the MIDI present change message that would be
sent to a GM2-compatible synth for program changes. Use the provided constants
(kAUSampler_DefaultMelodicBankMSB, kAUSampler_DefaultPercussionBankMSB) to designate melodic or
percussion banks per the GM2 specification (GM-compatible DLS or Soundfont banks). For custom
non-GM-compatible DLS and Soundfont banks, use the actual MSB/LSB values associated with the desired preset.
@var fileURL
The URL of the path to the bank or instrument file. Caller is responsible for releasing the
provided CFURLRef.
@var instrumentType
The type of instrument being loaded or created. For example, use kInstrumentType_DLSPreset to load an
instrument from a DLS bank file.
@var bankMSB
For the preset instruments, the most significant byte value for a particular bank variation within that
file. Range is 0 to 127. Use kAUSampler_DefaultMelodicBankMSB by default.
@var bankLSB
For the preset instruments, the least significant byte value for a particular bank variation within that
file. Range is 0 to 127. Use kAUSampler_DefaultBankLSB by default.
@var presetID
For the preset instruments, the numeric ID of a particular preset within that bank to load.
Range is 0 to 127.
*/
struct AUSamplerInstrumentData {
CFURLRef fileURL;
UInt8 instrumentType;
UInt8 bankMSB;
UInt8 bankLSB;
UInt8 presetID;
};
typedef struct AUSamplerInstrumentData AUSamplerInstrumentData;
/*
@enum InstrumentTypes
@abstract Values to specify the type of instrument being loaded.
@constant kInstrumentType_DLSPreset
@discussion A preset from a DLS bank file. Bank MSB, LSB and preset ID must be specified.
@constant kInstrumentType_SF2Preset
@discussion A preset from a SoundFont2 bank file. Bank MSB, LSB and preset ID must be specified.
@constant kInstrumentType_AUPreset
@discussion A native Apple .aupreset file created using the AUSampler's custom view.
@constant kInstrumentType_Audiofile
@discussion An audio file which will be used to create a default instrument with that file as its sole sample.
@constant kInstrumentType_EXS24
@discussion A Logic or GarageBand sampler instrument.
*/
enum
{
kInstrumentType_DLSPreset = 1,
kInstrumentType_SF2Preset = kInstrumentType_DLSPreset,
kInstrumentType_AUPreset = 2,
kInstrumentType_Audiofile = 3,
kInstrumentType_EXS24 = 4
};
enum
{
kAUSampler_DefaultPercussionBankMSB = 0x78,
kAUSampler_DefaultMelodicBankMSB = 0x79,
kAUSampler_DefaultBankLSB = 0x00
};
//=====================================================================================================================
#pragma mark - AUDeferredRenderer
/*!
@enum AUDeferredRenderer
@discussion This audio unit has one input element and one output element. They must both have
the same format, which must be canonical (Float32 deinterleaved) and must have
the same number of channels.
The AUDeferredRenderer unit creates a high-priority producer thread, on which
calls by this AU for input are performed at a constant buffer size. This buffer size may be
set with the kAudioUnitProperty_DeferredRendererPullSize property. The deferred
renderer may be asked to render at different buffer sizes by a downstream unit or
host application, but it always pulls upstream at its constant buffer size.
The upstream pull size MUST be greater than or equal to the downstream pull
size.
The upstream producer thread runs in advance of calls to its Render
function, with respect to the timestamps being passed to Render and
PullInput. The difference between these timestamps is the unit's "latency",
which is always at least one upstream pull buffer. The client may specify
additional latency with the property
kAudioUnitProperty_DeferredRendererExtraLatency, which is a number of sample
frames.
It is possible, at Render time, for the producer thread to have not yet
finished rendering the necessary data. This generates an error. In order to
give the producer a small amount of extra time to finish rendering, the
client may set the unit's property
kAudioUnitProperty_DeferredRendererWaitFrames. If this property is non-zero,
then when Render finds that insufficient data has been produced, it will
sleep for the amount of realtime corresponding to the number of wait frames.
It will then check again to see if the required amount of data has been
produced, and fail if it hasn't.
@constant kAudioUnitProperty_DeferredRendererPullSize
@discussion Scope:
Value Type: UInt32
Access:
@constant kAudioUnitProperty_DeferredRendererExtraLatency
@discussion Scope:
Value Type: UInt32
Access:
@constant kAudioUnitProperty_DeferredRendererWaitFrames
@discussion Scope:
Value Type: UInt32
Access:
*/
CF_ENUM(AudioUnitPropertyID) {
kAudioUnitProperty_DeferredRendererPullSize = 3320,
kAudioUnitProperty_DeferredRendererExtraLatency = 3321,
kAudioUnitProperty_DeferredRendererWaitFrames = 3322
};
#if !TARGET_OS_IPHONE
//=====================================================================================================================
#pragma mark - AUNetReceive
/*!
@enum AUNetReceive
@constant kAUNetReceiveProperty_Hostname
@discussion Scope: Global
Value Type: CFStringRef
Access:
The hostname from which you wish to receive audio.
For GetProperty, the returned CFStringRef is a copy and therefore must be released by the caller.
The UI view for AUNetReceive does the resolution of Bonjour service names to hostnames.
Clients who are using this AU programmatically using Bonjour will have to do this resolution themselves.
It is not done by the AU.
@constant kAUNetReceiveProperty_Password
@discussion Scope: Global
Value Type: CFStringRef
Access: Read / Write
The password to send to the sender. Leave unset or set to the empty string for no password.
For GetProperty, the returned CFStringRef is a copy and therefore must be released by the caller.
*/
CF_ENUM(AudioUnitPropertyID) {
kAUNetReceiveProperty_Hostname = 3511,
kAUNetReceiveProperty_Password = 3512
};
//=====================================================================================================================
#pragma mark - AUNetSend
/*!
@enum AUNetSend
@constant kAUNetSendProperty_PortNum
@discussion Scope: Global
Value Type: UInt32
Access: Read / Write
The network port number on which to send.
@constant kAUNetSendProperty_TransmissionFormat
@discussion Scope: Global
Value Type: AudioStreamBasicDescription
Access: Read / Write
Get or set an arbitrary format that will be used to transmit the audio.
For compressed formats, it is recommended to use kAUNetSendProperty_TransmissionFormatIndex instead of this property,
since there is no way to specify a bit rate with this property.
@constant kAUNetSendProperty_TransmissionFormatIndex
@discussion Scope: Global
Value Type: UInt32
Access: Read / Write
Get or set the index of the preset format that will be used to transmit the audio.
The format indices can be found in the NetSendPresetFormat enum.
@constant kAUNetSendProperty_ServiceName
@discussion Scope: Global
Value Type: CFStringRef
Access: Read / Write
The name you want to publish for this network service.
For GetProperty, the returned CFStringRef is a copy and therefore must be released by the caller.
@constant kAUNetSendProperty_Disconnect
@discussion Scope: Global
Value Type: UInt32
Access: Read / Write
In order to disconnect, call this with a non-zero value.
In order to connect, call this with a zero value.
For GetProperty, the returned value the last value set by the caller.
To get the current connection status, get the value of the parameter kAUNetReceiveParam_Status.
@constant kAUNetSendProperty_Password
@discussion Scope: Global
Value Type: CFStringRef
Access: Read / Write
The password that must be used by the receiver. Leave unset or set to the empty string for no password.
For GetProperty, the returned CFStringRef is a copy and therefore must be released by the caller.
*/
CF_ENUM(AudioUnitPropertyID) {
kAUNetSendProperty_PortNum = 3513,
kAUNetSendProperty_TransmissionFormat = 3514,
kAUNetSendProperty_TransmissionFormatIndex = 3515,
kAUNetSendProperty_ServiceName = 3516,
kAUNetSendProperty_Disconnect = 3517,
kAUNetSendProperty_Password = 3518
};
/*!
@enum NetSendPresetFormat
@constant kAUNetSendPresetFormat_PCMFloat32
@discussion 1411 kilobits per second per channel @ 44100KHz (kilo == 1000 not 1024)
@constant kAUNetSendPresetFormat_PCMInt24
@discussion 1058 kilobits per second per channel @ 44100KHz
@constant kAUNetSendPresetFormat_PCMInt16
@discussion 706 kilobits per second per channel @ 44100KHz
@constant kAUNetSendPresetFormat_Lossless24
@discussion 650 kilobits per second per channel @ 44100KHz
@constant kAUNetSendPresetFormat_Lossless16
@discussion 350 kilobits per second per channel @ 44100KHz
@constant kAUNetSendPresetFormat_ULaw
@discussion 353 kilobits per second per channel @ 44100KHz
@constant kAUNetSendPresetFormat_IMA4
@discussion 176 kilobits per second per channel @ 44100KHz
@constant kAUNetSendPresetFormat_AAC_128kbpspc
@discussion 128 kilobits per second per channel
@constant kAUNetSendPresetFormat_AAC_96kbpspc
@discussion 96 kilobits per second per channel
@constant kAUNetSendPresetFormat_AAC_80kbpspc
@discussion 80 kilobits per second per channel
@constant kAUNetSendPresetFormat_AAC_64kbpspc
@discussion 64 kilobits per second per channel
@constant kAUNetSendPresetFormat_AAC_48kbpspc
@discussion 48 kilobits per second per channel
@constant kAUNetSendPresetFormat_AAC_40kbpspc
@discussion 40 kilobits per second per channel
@constant kAUNetSendPresetFormat_AAC_32kbpspc
@discussion 32 kilobits per second per channel
@constant kAUNetSendNumPresetFormats = 14
*/
CF_ENUM(AudioUnitPropertyID) {
kAUNetSendPresetFormat_PCMFloat32 = 0,
kAUNetSendPresetFormat_PCMInt24 = 1,
kAUNetSendPresetFormat_PCMInt16 = 2,
kAUNetSendPresetFormat_Lossless24 = 3,
kAUNetSendPresetFormat_Lossless16 = 4,
kAUNetSendPresetFormat_ULaw = 5,
kAUNetSendPresetFormat_IMA4 = 6,
kAUNetSendPresetFormat_AAC_128kbpspc = 7,
kAUNetSendPresetFormat_AAC_96kbpspc = 8,
kAUNetSendPresetFormat_AAC_80kbpspc = 9,
kAUNetSendPresetFormat_AAC_64kbpspc = 10,
kAUNetSendPresetFormat_AAC_48kbpspc = 11,
kAUNetSendPresetFormat_AAC_40kbpspc = 12,
kAUNetSendPresetFormat_AAC_32kbpspc = 13,
kAUNetSendPresetFormat_AAC_LD_64kbpspc = 14,
kAUNetSendPresetFormat_AAC_LD_48kbpspc = 15,
kAUNetSendPresetFormat_AAC_LD_40kbpspc = 16,
kAUNetSendPresetFormat_AAC_LD_32kbpspc = 17,
kAUNetSendNumPresetFormats = 18
};
#endif // _TARGET_OS_IPHONE for Apple Specific audio units
//=====================================================================================================================
#pragma mark -
#pragma mark Deprecated Properties
#if !TARGET_OS_IPHONE
// NumVersion is no longer used (originally from MacTypes.h)
#if TARGET_RT_BIG_ENDIAN
typedef struct AUNumVersion {
/* Numeric version part of 'vers' resource */
UInt8 majorRev; /*1st part of version number in BCD*/
UInt8 minorAndBugRev; /*2nd & 3rd part of version number share a byte*/
UInt8 stage; /*stage code: dev, alpha, beta, final*/
UInt8 nonRelRev; /*revision level of non-released version*/
} AUNumVersion;
#else
typedef struct AUNumVersion {
/* Numeric version part of 'vers' resource accessible in little endian format */
UInt8 nonRelRev; /*revision level of non-released version*/
UInt8 stage; /*stage code: dev, alpha, beta, final*/
UInt8 minorAndBugRev; /*2nd & 3rd part of version number share a byte*/
UInt8 majorRev; /*1st part of version number in BCD*/
} AUNumVersion;
#endif /* TARGET_RT_BIG_ENDIAN */
/*!
@struct AUHostIdentifier
@abstract Used to describe the name and version of the audio unit's host
*/
struct AUHostIdentifier {
CFStringRef hostName;
AUNumVersion hostVersion;
};
typedef struct AUHostIdentifier AUHostIdentifier;
//=====================================================================================================================
// GENERIC
enum {
kAudioUnitParameterFlag_Global = (1L << 0), // parameter scope is global
kAudioUnitParameterFlag_Input = (1L << 1), // parameter scope is input
kAudioUnitParameterFlag_Output = (1L << 2), // parameter scope is output
kAudioUnitParameterFlag_Group = (1L << 3) // parameter scope is group
};
enum {
kAudioUnitParameterFlag_HasName = kAudioUnitParameterFlag_ValuesHaveStrings
};
CF_ENUM(AudioUnitPropertyID) {
//kAudioUnitProperty_SetInputCallback = 7 -> deprecated
kAudioUnitProperty_SRCAlgorithm = 9, // see kAudioUnitProperty_SampleRateConverterComplexity
kAudioUnitProperty_MIDIControlMapping = 17, // see ParameterMIDIMapping Properties
kAudioUnitProperty_CurrentPreset = 28, // see PresentPreset
kAudioUnitProperty_ParameterValueName = kAudioUnitProperty_ParameterStringFromValue,
kAudioUnitProperty_BusCount = kAudioUnitProperty_ElementCount,
kAudioOfflineUnitProperty_InputSize = kAudioUnitOfflineProperty_InputSize,
kAudioOfflineUnitProperty_OutputSize = kAudioUnitOfflineProperty_OutputSize
};
CF_ENUM(UInt32) {
kAudioUnitSRCAlgorithm_Polyphase = 'poly', // same as kAudioUnitSampleRateConverterComplexity_Normal
kAudioUnitSRCAlgorithm_MediumQuality = 'csrc' // same as kAudioUnitSampleRateConverterComplexity_Normal
};
// Deprecated in macOS v10.2. See AUParameterMIDIMapping.
typedef struct AudioUnitMIDIControlMapping
{
UInt16 midiNRPN;
UInt8 midiControl;
UInt8 scope;
AudioUnitElement element;
AudioUnitParameterID parameter;
} AudioUnitMIDIControlMapping;
// Deprecated. See AudioUnitParameterStringFromValue for equivalent structure, but with clearer field names
typedef struct AudioUnitParameterValueName {
AudioUnitParameterID inParamID;
const Float32 * __nonnull inValue; // may be NULL if should translate current parameter value
CFStringRef outName; // see comments for kAudioUnitProperty_ParameterStringFromValue
} AudioUnitParameterValueName;
//=====================================================================================================================
// Deprecated. These properties are Apple specific.
CF_ENUM(AudioUnitPropertyID) {
kMusicDeviceProperty_GroupOutputBus = 1002,
kMusicDeviceProperty_SoundBankFSSpec = 1003,
kAudioUnitProperty_PannerMode = 3008
};
CF_ENUM(AudioUnitPropertyID) {
kAudioUnitProperty_SpeakerConfiguration = 3001
};
// Deprecated in favor of the newer AudioChannelLayout
// structure and its supporting property.
enum {
kSpeakerConfiguration_HeadPhones = 0,
kSpeakerConfiguration_Stereo = 1,
kSpeakerConfiguration_Quad = 2,
kSpeakerConfiguration_5_0 = 3,
kSpeakerConfiguration_5_1 = kSpeakerConfiguration_5_0
};
#endif // !TARGET_OS_IPHONE
// Deprecated in favor of the newer AUSamplerInstrumentData
// structure and its supporting property.
typedef struct AUSamplerBankPresetData {
CFURLRef bankURL;
UInt8 bankMSB;
UInt8 bankLSB;
UInt8 presetID;
UInt8 reserved;
} AUSamplerBankPresetData;
CF_ENUM(AudioUnitPropertyID) {
kAUSamplerProperty_LoadPresetFromBank = 4100,
kAUSamplerProperty_BankAndPreset = kAUSamplerProperty_LoadPresetFromBank
};
CF_ASSUME_NONNULL_END
#endif // AudioToolbox_AudioUnitProperties_h
#else
#include <AudioToolboxCore/AudioUnitProperties.h>
#endif
|
0 | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/AudioToolbox.framework | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/AudioToolbox.framework/Headers/AudioSession.h | /*==================================================================================================
File: AudioToolbox/AudioSession.h
Contains: API for audio session services.
Copyright: (c) 2006 - 2013 by Apple, Inc., all rights reserved.
Bugs?: For bug reports, consult the following page on
the World Wide Web:
http://developer.apple.com/bugreporter/
==================================================================================================*/
#if !defined(__AudioSession_h__)
#define __AudioSession_h__
//==================================================================================================
/*!
@header AudioSession
This header describes the API for audio session services.
Note: As of iOS 7, this entire API has been deprecated in favor of AVAudioSession, part of the AVFoundation framework.
*/
//==================================================================================================
#pragma mark Includes
#include <TargetConditionals.h>
#include <Availability.h>
#if !defined(__COREAUDIO_USE_FLAT_INCLUDES__)
#if !TARGET_OS_IPHONE
#include <CoreAudio/AudioHardware.h>
#endif
#include <CoreFoundation/CoreFoundation.h>
#else
#include <AudioHardware.h>
#include <CFRunLoop.h>
#include <CFString.h>
#include <CFURL.h>
#endif
//==================================================================================================
#if defined(__cplusplus)
extern "C"
{
#endif
//==================================================================================================
#pragma mark -
#pragma mark AudioSession Error Constants
/*!
@enum AudioSession error codes
@abstract Error codes returned from the AudioSession portion of the API.
@constant kAudioSessionNoError
No error has occurred
@constant kAudioSessionNotInitialized
This error is returned when the AudioSessionInitialize function
was not called prior to calling any other AudioSession function.
@constant kAudioSessionAlreadyInitialized
This error is returned when you call AudioSessionInitialize more than once.
@constant kAudioSessionInitializationError
This error indicates an AudioSession initialization error.
@constant kAudioSessionUnsupportedPropertyError
The property is not supported. This error code can also be used to
indicate that a bad property value was passed in a SetProperty call,
an attempt was made to set a read-only property, an attempt was made to
read a write-only property, an attempt was made to read a property that
is only available by way of a property listener, or an attempt was made
to set a listener on a property for which listeners are not supported.
@constant kAudioSessionBadPropertySizeError
The size of the property data was not correct.
@constant kAudioSessionNotActiveError
The operation failed because the AudioSession is not active.
Calling AudioSessionSetActive(true) first will fix this error in most cases.
@constant kAudioSessionNoCategorySet
The requested operation failed because it requires that the session have had an
audio category explicitly set, and none was set.
@constant kAudioSessionIncompatibleCategory
The requested operation failed because the AudioSession has an incompatible
category (e.g. attempting to play or record when the category is AudioProcessing) or
the session is not active.
@constant kAudioSessionUnspecifiedError
An audio session unspecified error has occurred.
*/
enum
{
kAudioSessionNoError = 0,
kAudioSessionNotInitialized = '!ini',
kAudioSessionAlreadyInitialized = 'init',
kAudioSessionInitializationError = 'ini?',
kAudioSessionUnsupportedPropertyError = 'pty?',
kAudioSessionBadPropertySizeError = '!siz',
kAudioSessionNotActiveError = '!act',
kAudioServicesNoHardwareError = 'nohw',
kAudioSessionNoCategorySet = '?cat',
kAudioSessionIncompatibleCategory = '!cat',
kAudioSessionUnspecifiedError = 'what'
};
//==================================================================================================
#pragma mark -
#pragma mark AudioSession Types
/*!
@typedef AudioSessionPropertyID
@abstract Type used for specifying an AudioSession property.
*/
typedef UInt32 AudioSessionPropertyID;
//==================================================================================================
#pragma mark -
#pragma mark AudioSession Interruption States
/*!
@enum AudioSession interruptions states
@abstract These are used with the AudioSessionInterruptionListener to indicate
if an interruption begins or ends.
@constant kAudioSessionBeginInterruption
Indicates that this AudioSession has just been interrupted.
@constant kAudioSessionEndInterruption
Indicates the end of an interruption.
*/
enum {
kAudioSessionBeginInterruption = 1,
kAudioSessionEndInterruption = 0
};
//==================================================================================================
#pragma mark -
#pragma mark AudioSession Audio Categories
/*!
@enum AudioSession audio categories states
@abstract These are used with as values for the kAudioSessionProperty_AudioCategory property
to indicate the audio category of the AudioSession.
@constant kAudioSessionCategory_AmbientSound
Use this category for background sounds such as rain, car engine noise, etc.
Mixes with other music.
@constant kAudioSessionCategory_SoloAmbientSound
Use this category for background sounds. Other music will stop playing.
@constant kAudioSessionCategory_MediaPlayback
Use this category for music tracks.
@constant kAudioSessionCategory_RecordAudio
Use this category when recording audio.
@constant kAudioSessionCategory_PlayAndRecord
Use this category when recording and playing back audio.
@constant kAudioSessionCategory_AudioProcessing
Use this category when using a hardware codec or signal processor while
not playing or recording audio.
*/
enum {
kAudioSessionCategory_AmbientSound = 'ambi',
kAudioSessionCategory_SoloAmbientSound = 'solo',
kAudioSessionCategory_MediaPlayback = 'medi',
kAudioSessionCategory_RecordAudio = 'reca',
kAudioSessionCategory_PlayAndRecord = 'plar',
kAudioSessionCategory_AudioProcessing = 'proc'
};
#pragma mark AudioSession Audio Category Routing Overrides
/*!
@enum AudioSession audio category routing overrides
@abstract These are used with as values for the kAudioSessionProperty_OverrideAudioRoute property.
@constant kAudioSessionOverrideAudioRoute_None
No override. Return audio routing to the default state for the current audio category.
@constant kAudioSessionOverrideAudioRoute_Speaker
Route audio output to speaker. Use this override with the kAudioSessionCategory_PlayAndRecord
category, which by default routes the output to the receiver.
*/
enum {
kAudioSessionOverrideAudioRoute_None = 0,
kAudioSessionOverrideAudioRoute_Speaker = 'spkr'
};
//==================================================================================================
#pragma mark AudioSession reason codes for route change
/*!
@enum AudioSession reason codes for route change
@abstract These are codes used when the kAudioSessionProperty_AudioRoute property changes
@constant kAudioSessionRouteChangeReason_Unknown
The reason is unknown.
@constant kAudioSessionRouteChangeReason_NewDeviceAvailable
A new device became available (e.g. headphones have been plugged in).
@constant kAudioSessionRouteChangeReason_OldDeviceUnavailable
The old device became unavailable (e.g. headphones have been unplugged).
@constant kAudioSessionRouteChangeReason_CategoryChange
The audio category has changed (e.g. kAudioSessionCategory_MediaPlayback
has been changed to kAudioSessionCategory_PlayAndRecord).
@constant kAudioSessionRouteChangeReason_Override
The route has been overridden (e.g. category is kAudioSessionCategory_PlayAndRecord
and the output has been changed from the receiver, which is the default, to the speaker).
@constant kAudioSessionRouteChangeReason_WakeFromSleep
The device woke from sleep.
@constant kAudioSessionRouteChangeReason_NoSuitableRouteForCategory
Returned when there is no route for the current category (for instance RecordCategory
but no input device)
@constant kAudioSessionRouteChangeReason_RouteConfigurationChange
Indicates that the set of input and/our output ports has not changed, but some aspect of their
configuration has changed. For example, a port's selected data source has changed.
*/
enum {
kAudioSessionRouteChangeReason_Unknown = 0,
kAudioSessionRouteChangeReason_NewDeviceAvailable = 1,
kAudioSessionRouteChangeReason_OldDeviceUnavailable = 2,
kAudioSessionRouteChangeReason_CategoryChange = 3,
kAudioSessionRouteChangeReason_Override = 4,
kAudioSessionRouteChangeReason_WakeFromSleep = 6,
kAudioSessionRouteChangeReason_NoSuitableRouteForCategory = 7,
kAudioSessionRouteChangeReason_RouteConfigurationChange = 8
};
// see documentation for kAudioSessionProperty_AudioRouteChange
// Note: the string refers to "OutputDevice" for historical reasons. Audio routes may contain zero or more inputs and
// zero or more outputs.
#define kAudioSession_AudioRouteChangeKey_Reason "OutputDeviceDidChange_Reason"
// CFString version of kAudioSession_AudioRouteChangeKey_Reason. This is more convenient to use than the raw string version.
// Available in iOS 5.0 or greater
extern const CFStringRef kAudioSession_RouteChangeKey_Reason API_DEPRECATED("no longer supported", ios(5.0, 7.0), macCatalyst(14.0, 14.0)) API_UNAVAILABLE(macos) __WATCHOS_PROHIBITED __TVOS_PROHIBITED;
// CFDictionary keys for kAudioSessionProperty_AudioRouteChange
// Available in iOS 5.0 or greater
extern const CFStringRef kAudioSession_AudioRouteChangeKey_PreviousRouteDescription API_DEPRECATED("no longer supported", ios(5.0, 7.0), macCatalyst(14.0, 14.0)) API_UNAVAILABLE(macos) __WATCHOS_PROHIBITED __TVOS_PROHIBITED;
extern const CFStringRef kAudioSession_AudioRouteChangeKey_CurrentRouteDescription API_DEPRECATED("no longer supported", ios(5.0, 7.0), macCatalyst(14.0, 14.0)) API_UNAVAILABLE(macos) __WATCHOS_PROHIBITED __TVOS_PROHIBITED;
// CFDictionary keys for kAudioSessionProperty_AudioRouteDescription
// Available in iOS 5.0 or greater
extern const CFStringRef kAudioSession_AudioRouteKey_Inputs API_DEPRECATED("no longer supported", ios(5.0, 7.0), macCatalyst(14.0, 14.0)) API_UNAVAILABLE(macos) __WATCHOS_PROHIBITED __TVOS_PROHIBITED;
extern const CFStringRef kAudioSession_AudioRouteKey_Outputs API_DEPRECATED("no longer supported", ios(5.0, 7.0), macCatalyst(14.0, 14.0)) API_UNAVAILABLE(macos) __WATCHOS_PROHIBITED __TVOS_PROHIBITED;
// key(s) for the CFDictionary associated with each entry of the CFArrays returned by kAudioSession_AudioRouteKey_Inputs
// and kAudioSession_AudioRouteKey_Outputs.
// Available in iOS 5.0 or greater
extern const CFStringRef kAudioSession_AudioRouteKey_Type API_DEPRECATED("no longer supported", ios(5.0, 7.0), macCatalyst(14.0, 14.0)) API_UNAVAILABLE(macos) __WATCHOS_PROHIBITED __TVOS_PROHIBITED;
/*!
@enum AudioSession route input types
@abstract These are the strings used with the kAudioSession_AudioRouteKey_Type key for the CFDictionary associated
with kAudioSession_AudioRouteKey_Inputs.
Available in iOS 5.0 or greater
@constant kAudioSessionInputRoute_LineIn
A line in input
@constant kAudioSessionInputRoute_BuiltInMic
A built-in microphone input. (Note that some devices like early iPods do not have this input)
@constant kAudioSessionInputRoute_HeadsetMic
A microphone that is part of a headset (combined microphone and headphones)
@constant kAudioSessionInputRoute_BluetoothHFP
A microphone that is part of a Bluetooth Hands-Free Profile device
@constant kAudioSessionInputRoute_USBAudio
A Universal Serial Bus input
*/
extern const CFStringRef kAudioSessionInputRoute_LineIn API_DEPRECATED("no longer supported", ios(5.0, 7.0), macCatalyst(14.0, 14.0)) API_UNAVAILABLE(macos) __WATCHOS_PROHIBITED __TVOS_PROHIBITED;
extern const CFStringRef kAudioSessionInputRoute_BuiltInMic API_DEPRECATED("no longer supported", ios(5.0, 7.0), macCatalyst(14.0, 14.0)) API_UNAVAILABLE(macos) __WATCHOS_PROHIBITED __TVOS_PROHIBITED;
extern const CFStringRef kAudioSessionInputRoute_HeadsetMic API_DEPRECATED("no longer supported", ios(5.0, 7.0), macCatalyst(14.0, 14.0)) API_UNAVAILABLE(macos) __WATCHOS_PROHIBITED __TVOS_PROHIBITED;
extern const CFStringRef kAudioSessionInputRoute_BluetoothHFP API_DEPRECATED("no longer supported", ios(5.0, 7.0), macCatalyst(14.0, 14.0)) API_UNAVAILABLE(macos) __WATCHOS_PROHIBITED __TVOS_PROHIBITED;
extern const CFStringRef kAudioSessionInputRoute_USBAudio API_DEPRECATED("no longer supported", ios(5.0, 7.0), macCatalyst(14.0, 14.0)) API_UNAVAILABLE(macos) __WATCHOS_PROHIBITED __TVOS_PROHIBITED;
/*!
@enum AudioSession route output types
@abstract These are strings used with the kAudioSession_AudioRouteKey_Type key for the CFDictionary associated
with kAudioSession_AudioRouteKey_Outputs.
Available in iOS 5.0 or greater
@constant kAudioSessionOutputRoute_LineOut
A line out output
@constant kAudioSessionOutputRoute_Headphones
Speakers in a headset (mic and headphones) or simple headphones
@constant kAudioSessionOutputRoute_BluetoothHFP
Speakers that are part of a Bluetooth Hands-Free Profile device
@constant kAudioSessionOutputRoute_BluetoothA2DP
Speakers in a Bluetooth A2DP device
@constant kAudioSessionOutputRoute_BuiltInReceiver
The speaker you hold to your ear when on a phone call
@constant kAudioSessionOutputRoute_BuiltInSpeaker
The built-in speaker
@constant kAudioSessionOutputRoute_USBAudio
Speaker(s) in a Universal Serial Bus device
@constant kAudioSessionOutputRoute_HDMI
Output via High-Definition Multimedia Interface
@constant kAudioSessionOutputRoute_AirPlay
Output on a remote Air Play device
*/
extern const CFStringRef kAudioSessionOutputRoute_LineOut API_DEPRECATED("no longer supported", ios(5.0, 7.0), macCatalyst(14.0, 14.0)) API_UNAVAILABLE(macos) __WATCHOS_PROHIBITED __TVOS_PROHIBITED;
extern const CFStringRef kAudioSessionOutputRoute_Headphones API_DEPRECATED("no longer supported", ios(5.0, 7.0), macCatalyst(14.0, 14.0)) API_UNAVAILABLE(macos) __WATCHOS_PROHIBITED __TVOS_PROHIBITED;
extern const CFStringRef kAudioSessionOutputRoute_BluetoothHFP API_DEPRECATED("no longer supported", ios(5.0, 7.0), macCatalyst(14.0, 14.0)) API_UNAVAILABLE(macos) __WATCHOS_PROHIBITED __TVOS_PROHIBITED;
extern const CFStringRef kAudioSessionOutputRoute_BluetoothA2DP API_DEPRECATED("no longer supported", ios(5.0, 7.0), macCatalyst(14.0, 14.0)) API_UNAVAILABLE(macos) __WATCHOS_PROHIBITED __TVOS_PROHIBITED;
extern const CFStringRef kAudioSessionOutputRoute_BuiltInReceiver API_DEPRECATED("no longer supported", ios(5.0, 7.0), macCatalyst(14.0, 14.0)) API_UNAVAILABLE(macos) __WATCHOS_PROHIBITED __TVOS_PROHIBITED;
extern const CFStringRef kAudioSessionOutputRoute_BuiltInSpeaker API_DEPRECATED("no longer supported", ios(5.0, 7.0), macCatalyst(14.0, 14.0)) API_UNAVAILABLE(macos) __WATCHOS_PROHIBITED __TVOS_PROHIBITED;
extern const CFStringRef kAudioSessionOutputRoute_USBAudio API_DEPRECATED("no longer supported", ios(5.0, 7.0), macCatalyst(14.0, 14.0)) API_UNAVAILABLE(macos) __WATCHOS_PROHIBITED __TVOS_PROHIBITED;
extern const CFStringRef kAudioSessionOutputRoute_HDMI API_DEPRECATED("no longer supported", ios(5.0, 7.0), macCatalyst(14.0, 14.0)) API_UNAVAILABLE(macos) __WATCHOS_PROHIBITED __TVOS_PROHIBITED;
extern const CFStringRef kAudioSessionOutputRoute_AirPlay API_DEPRECATED("no longer supported", ios(5.0, 7.0), macCatalyst(14.0, 14.0)) API_UNAVAILABLE(macos) __WATCHOS_PROHIBITED __TVOS_PROHIBITED;
// CFDictionary keys for kAudioSessionProperty_InputSources
extern const CFStringRef kAudioSession_InputSourceKey_ID API_DEPRECATED("no longer supported", ios(5.0, 7.0), macCatalyst(14.0, 14.0)) API_UNAVAILABLE(macos) __WATCHOS_PROHIBITED __TVOS_PROHIBITED;
extern const CFStringRef kAudioSession_InputSourceKey_Description API_DEPRECATED("no longer supported", ios(5.0, 7.0), macCatalyst(14.0, 14.0)) API_UNAVAILABLE(macos) __WATCHOS_PROHIBITED __TVOS_PROHIBITED;
// CFDictionary keys for kAudioSessionProperty_OutputDestinations
extern const CFStringRef kAudioSession_OutputDestinationKey_ID API_DEPRECATED("no longer supported", ios(5.0, 7.0), macCatalyst(14.0, 14.0)) API_UNAVAILABLE(macos) __WATCHOS_PROHIBITED __TVOS_PROHIBITED;
extern const CFStringRef kAudioSession_OutputDestinationKey_Description API_DEPRECATED("no longer supported", ios(5.0, 7.0), macCatalyst(14.0, 14.0)) API_UNAVAILABLE(macos) __WATCHOS_PROHIBITED __TVOS_PROHIBITED;
//==================================================================================================
#pragma mark AudioSession interruption types for end interruption events
/*!
@enum AudioSession Interruption types
@abstract When an app's AudioSessionInterruptionListener is called at the end of an interruption event,
the app may query to see if it should resume audio or not. The interruption type can be
obtained through the kAudioSessionProperty_InterruptionType, available in iOS 4.0 and
greater.
@constant kAudioSessionInterruptionType_ShouldResume
Indicates that the interruption was one where it is appropriate to resume playback
at the conclusion of the interruption. (e.g.: a phone call was rejected)
@constant kAudioSessionInterruptionType_ShouldNotResume
Indicates that the interruption was one where it is not appropriate to resume playback
at the conclusion of the interruption. (e.g.: interruption due to iPod playback)
*/
enum { // typedef UInt32 AudioSessionInterruptionType
kAudioSessionInterruptionType_ShouldResume = 'irsm',
kAudioSessionInterruptionType_ShouldNotResume = '!rsm'
};
typedef UInt32 AudioSessionInterruptionType;
//==================================================================================================
#pragma mark AudioSession mode values
/*!
@enum AudioSession Modes
@abstract Modes modify the audio category in order to introduce behavior that is tailored to the specific
use of audio within an application. Available in iOS 5.0 and greater.
@constant kAudioSessionMode_Default
The default mode.
@constant kAudioSessionMode_VoiceChat
Only valid with kAudioSessionCategory_PlayAndRecord. Appropriate for Voice Over IP
(VOIP) applications. Reduces the number of allowable audio routes to be only those
that are appropriate for VOIP applications and may engage appropriate system-supplied
signal processing. Has the side effect of setting
kAudioSessionProperty_OverrideCategoryEnableBluetoothInput to true.
@constant kAudioSessionMode_VideoRecording
Only valid with kAudioSessionCategory_PlayAndRecord or kAudioSessionCategory_RecordAudio.
Modifies the audio routing options and may engage appropriate system-supplied signal processing.
@constant kAudioSessionMode_Measurement
Appropriate for applications that wish to minimize the effect of system-supplied signal
processing for input and/or output audio signals.
@constant kAudioSessionMode_GameChat
Set by Game Kit on behalf of an application that uses a GKVoiceChat object; valid
only with the kAudioSessionCategory_PlayAndRecord category.
Do not set this mode directly. If you need similar behavior and are not using
a GKVoiceChat object, use the kAudioSessionMode_VoiceChat mode.
*/
enum {
kAudioSessionMode_Default = 'dflt',
kAudioSessionMode_VoiceChat = 'vcct',
kAudioSessionMode_VideoRecording = 'vrcd',
kAudioSessionMode_Measurement = 'msmt',
kAudioSessionMode_GameChat = 'gmct'
};
//==================================================================================================
#pragma mark AudioSession Properties
/*!
@enum AudioSession property codes
@abstract These are the property codes used with the AudioSession API.
@constant kAudioSessionProperty_PreferredHardwareSampleRate
A Float64 indicating the preferred hardware sample rate for the AudioSession.
The actual sample rate may be different
@constant kAudioSessionProperty_PreferredHardwareIOBufferDuration
A Float32 indicating the preferred hardware IO buffer duration in seconds.
The actual IO buffer duration may be different
@constant kAudioSessionProperty_AudioCategory
A UInt32 value indicating the audio category for the AudioSession (see constants above).
@constant kAudioSessionProperty_AudioRouteChange
The value for this property is ONLY provided with the property changed callback. You
cannot get the value of this property (or set it).
The property changed callback provides a CFDictionaryRef with keyed values:
Key = kAudioSession_AudioRouteChangeKey_Reason; value is a CFNumberRef with one of the
reasons listed above.
Key = kAudioSession_AudioRouteChangeKey_PreviousRouteDescription; value is a CFDictionaryRef containing
information about the previous route. This dictionary is of exactly the same format as the
dictionary associated with kAudioSessionProperty_AudioRouteDescription. Available in iOS 5.0 or
greater.
Key = kAudioSession_AudioRouteChangeKey_CurrentRouteDescription; value is a CFDictionaryRef containing
information about the new route. This dictionary is of exactly the same format as the
dictionary associated with kAudioSessionProperty_AudioRouteDescription. Available in iOS 5.0 or
greater.
@constant kAudioSessionProperty_CurrentHardwareSampleRate
A Float64 indicating the current hardware sample rate
@constant kAudioSessionProperty_CurrentHardwareInputNumberChannels
A UInt32 indicating the current number of hardware input channels
@constant kAudioSessionProperty_CurrentHardwareOutputNumberChannels
A UInt32 indicating the current number of hardware output channels
@constant kAudioSessionProperty_CurrentHardwareOutputVolume
A Float32 indicating the current output volume
@constant kAudioSessionProperty_CurrentHardwareInputLatency
A Float32 indicating the current hardware input latency in seconds.
@constant kAudioSessionProperty_CurrentHardwareOutputLatency
A Float32 indicating the current hardware output latency in seconds.
@constant kAudioSessionProperty_CurrentHardwareIOBufferDuration
A Float32 indicating the current hardware IO buffer duration in seconds.
@constant kAudioSessionProperty_OtherAudioIsPlaying
A UInt32 with a value other than zero when someone else, typically the iPod application,
is playing audio
@constant kAudioSessionProperty_OverrideAudioRoute
A UInt32 with one of two values: kAudioSessionOverrideAudioRoute_None or
kAudioSessionOverrideAudioRoute_Speaker
@constant kAudioSessionProperty_AudioInputAvailable
A UInt32 with a value other than zero when audio input is available.
Use this property, rather than the device model, to determine if audio input is available.
A listener will notify you when audio input becomes available. For instance, when a headset
is attached to the second generation iPod Touch, audio input becomes available via the wired
microphone.
@constant kAudioSessionProperty_ServerDied
Available with iOS 3.0 or greater
The value for this property is ONLY provided with the property changed callback. You cannot get the
value of this property (or set it). The property changed callback notifies you that
the audio server has died.
@constant kAudioSessionProperty_OtherMixableAudioShouldDuck
Available with iOS 3.0 or greater
If the current session category of an application allows mixing (iPod playback in the background
for example), then that other audio will be ducked when the current application makes any sound.
An example of this is the Nike app that does this as it provides periodic updates to its user (it
ducks any iPod music currently being played while it provides its status).
This defaults to off (0). Note that the other audio will be ducked for as long as the current
session is active.
You will need to deactivate your audio session when you want full volume playback of the other audio.
If your category is the Playback category and you have this set to its default (non-mixable), setting
this value to on, will also make your category mixable with others
(kAudioSessionProperty_OverrideCategoryMixWithOthers will be set to true)
@constant kAudioSessionProperty_OverrideCategoryMixWithOthers
Available with iOS 3.0 or greater
This allows an application to change the default behavior of some audio session categories with regards to
whether other applications can play while your session is active. The two typical cases are:
(1) PlayAndRecord category
this will default to false, but can be set to true. This would allow iPod to play in the background
while an app had both audio input and output enabled
(2) MediaPlayback category
this will default to false, but can be set to true. This would allow iPod to play in the background,
but an app will still be able to play regardless of the setting of the ringer switch
(3) Other categories
this defaults to false and cannot be changed (that is, the mix with others setting of these categories
cannot be overridden
An application must be prepared for setting this property to fail as behaviour may change in future releases.
If an application changes their category, they should reassert the override (it is not sticky across
category changes)
@constant kAudioSessionProperty_OverrideCategoryDefaultToSpeaker
Available with iOS 3.1 or greater
This allows an application to change the default behaviour of some audio session categories with regards to
the audio route. The current category behavior is:
(1) PlayAndRecord category
this will default to false, but can be set to true. this will route to Speaker (instead of Receiver)
when no other audio route is connected.
(2) Other categories
this defaults to false and cannot be changed (that is, the default to speaker setting of these
categories cannot be overridden
An application must be prepared for setting this property to fail as behaviour may change in future releases.
If an application changes their category, they should reassert the override (it is not sticky across category changes)
@constant kAudioSessionProperty_OverrideCategoryEnableBluetoothInput
Available with iOS 3.1 or greater
This allows an application to change the default behaviour of some audio session categories with regards to showing
bluetooth devices as available routes. The current category behavior is:
(1) PlayAndRecord category
this will default to false, but can be set to true. This will allow a paired bluetooth device to show up as
an available route for input, while playing through the category-appropriate output
(2) Record category
this will default to false, but can be set to true. This will allow a paired bluetooth device to show up
as an available route for input
(3) Other categories
this defaults to false and cannot be changed (that is, enabling bluetooth for input in these categories is
not allowed)
An application must be prepared for setting this property to fail as behaviour may change in future releases.
If an application changes their category, they should reassert the override (it is not sticky across category changes)
@constant kAudioSessionProperty_InterruptionType
Available with iOS 4.0 or greater
This is a read-only property that gives the type of the end interruption event. Media playback apps (i.e.,
those apps that have a "play" button), may use this property as a guideline for when to resume playing after an
interruption ends. Apps without a "play" button, (e.g., games) should always resume audio playback when the
interruption ends. This property is only valid within the scope of the client app's AudioSessionInterruptionListener
callback and only valid for the AudioSessionEndInterruption event. Attempting to read the property at any other
time is invalid.
@constant kAudioSessionProperty_Mode
Available with iOS 5.0 or greater
A UInt32 value that specifies the mode to be combined with the Audio Category. See AudioSession mode
values defined above.
@constant kAudioSessionProperty_InputSources
Available with iOS 5.0 or greater
For use with certain accessories, such as some USB audio devices, that support input source selection.
If the attached accessory supports source selection, provides a description of the available sources.
Not to be confused with kAudioSessionProperty_AudioRouteDescription, which provides a description
of the current audio route.
A CFArray of CFDictionaries with the keys listed below. If no input sources are
available, a valid CFArray with 0 entries will be returned by a get operation.
Key = kAudioSession_InputSourceKey_ID; value is a CFNumberRef representing a system-defined identifier
for the input source. This is the identifier to be used when setting the input source.
Key = kAudioSession_InputSourceKey_Description; value is a CFStringRef description of the input source
suitable for displaying in a user interface. Examples: "Internal Mic", "External Mic",
"Ext 48V Mic", "Instrument", "External Line Connector"
@constant kAudioSessionProperty_OutputDestinations
Available with iOS 5.0 or greater
For use with certain accessories, such as some USB audio devices, that support output destination selection.
If the attached accessory supports destination selection, provides a description of the available destinations.
Not to be confused with kAudioSessionProperty_AudioRouteDescription, which provides a description
of the current audio route.
A CFArray of CFDictionaries with the keys listed below. If no output destinations are
available, a valid CFArray with 0 entries will be returned by a get operation.
Key = kAudioSession_OutputDestinationKey_ID; value is a CFNumberRef representing a system-defined identifier
for the output destination. This is the identifier to be used when setting the destination.
Key = kAudioSession_OutputDestinationKey_Description; value is a CFStringRef description of the output
destination suitable for displaying in a user interface.
@constant kAudioSessionProperty_InputSource
Available with iOS 5.0 or greater
For use with certain accessories, such as some USB audio devices, that support input source selection.
A CFNumberRef value that specifies the input source to be selected. The value must be one of the
IDs provided by the kAudioSession_InputSourceKey_ID as part of the data associated with
kAudioSessionProperty_InputSources.
@constant kAudioSessionProperty_OutputDestination
Available with iOS 5.0 or greater
For use with certain accessories, such as some USB audio devices, that support output destination selection.
A CFNumberRef value that specifies the output destination to be selected. The value must be one
of the IDs provided by the kAudioSession_OutputDestinationKey_ID as part of the data associated with
kAudioSessionProperty_OutputDestinations.
@constant kAudioSessionProperty_InputGainAvailable
Available with iOS 5.0 or greater
A UInt32 with a value other than zero when audio input gain is available. Some inputs may not
provide the ability to set the input gain, so check this value before attempting to set input gain.
@constant kAudioSessionProperty_InputGainScalar
Available with iOS 5.0 or greater
A Float32 value defined over the range [0.0, 1.0], with 0.0 corresponding to the lowest analog
gain setting and 1.0 corresponding to the highest analog gain setting. Attempting to set values
outside of the defined range will result in the value being "clamped" to a valid input. This is
a global input gain setting that applies to the current input source for the entire system.
When no applications are using the input gain control, the system will restore the default input
gain setting for the input source. Note that some audio accessories, such as USB devices, may
not have a default value. This property is only valid if kAudioSessionProperty_InputGainAvailable
is true. Note that route change events represent substantive changes to the audio system. Input
gain settings are not guaranteed to persist across route changes. Application code should be aware
that route change events can (and likely will) cause a change to input gain settings, and so should
be prepared to reassess the state of input gain after the new route is established.
@constant kAudioSessionProperty_AudioRouteDescription
Available with iOS 5.0 or greater
A CFDictionaryRef with information about the current audio route; keyed values:
Key = kAudioSession_AudioRouteKey_Inputs; value is a CFArray of CFDictionaries with information about the
inputs utilitized in the current audio route.
Key = kAudioSession_AudioRouteKey_Outputs; value is a CFArray of CFDictionaries with information about the
outputs utilitized in the current audio route.
Both kAudioSession_AudioRouteKey_Inputs and kAudioSession_AudioRouteKey_Outputs return a CFArray of
CFDictionaries with Key = kAudioSession_AudioRouteKey_Type; value is a CFString corresponding
to the input or output types documented above.
*/
enum { // typedef UInt32 AudioSessionPropertyID
kAudioSessionProperty_PreferredHardwareSampleRate = 'hwsr', // Float64 (get/set)
kAudioSessionProperty_PreferredHardwareIOBufferDuration = 'iobd', // Float32 (get/set)
kAudioSessionProperty_AudioCategory = 'acat', // UInt32 (get/set)
kAudioSessionProperty_AudioRouteChange = 'roch', // CFDictionaryRef (property listener)
kAudioSessionProperty_CurrentHardwareSampleRate = 'chsr', // Float64 (get only)
kAudioSessionProperty_CurrentHardwareInputNumberChannels = 'chic', // UInt32 (get only/property listener)
kAudioSessionProperty_CurrentHardwareOutputNumberChannels = 'choc', // UInt32 (get only/property listener)
kAudioSessionProperty_CurrentHardwareOutputVolume = 'chov', // Float32 (get only/property listener)
kAudioSessionProperty_CurrentHardwareInputLatency = 'cilt', // Float32 (get only)
kAudioSessionProperty_CurrentHardwareOutputLatency = 'colt', // Float32 (get only)
kAudioSessionProperty_CurrentHardwareIOBufferDuration = 'chbd', // Float32 (get only)
kAudioSessionProperty_OtherAudioIsPlaying = 'othr', // UInt32 (get only)
kAudioSessionProperty_OverrideAudioRoute = 'ovrd', // UInt32 (set only)
kAudioSessionProperty_AudioInputAvailable = 'aiav', // UInt32 (get only/property listener)
kAudioSessionProperty_ServerDied = 'died', // UInt32 (property listener)
kAudioSessionProperty_OtherMixableAudioShouldDuck = 'duck', // UInt32 (get/set)
kAudioSessionProperty_OverrideCategoryMixWithOthers = 'cmix', // UInt32 (get, some set)
kAudioSessionProperty_OverrideCategoryDefaultToSpeaker = 'cspk', // UInt32 (get, some set)
kAudioSessionProperty_OverrideCategoryEnableBluetoothInput = 'cblu', // UInt32 (get, some set)
kAudioSessionProperty_InterruptionType = 'type', // UInt32 (get only)
kAudioSessionProperty_Mode = 'mode', // UInt32 (get/set)
kAudioSessionProperty_InputSources = 'srcs', // CFArrayRef (get only/property listener)
kAudioSessionProperty_OutputDestinations = 'dsts', // CFArrayRef (get only/property listener)
kAudioSessionProperty_InputSource = 'isrc', // CFNumberRef (get/set)
kAudioSessionProperty_OutputDestination = 'odst', // CFNumberRef (get/set)
kAudioSessionProperty_InputGainAvailable = 'igav', // UInt32 (get only/property listener)
kAudioSessionProperty_InputGainScalar = 'igsc', // Float32 (get/set/property listener)
kAudioSessionProperty_AudioRouteDescription = 'crar' // CFDictionaryRef (get only)
};
//==================================================================================================
#pragma mark -
#pragma mark Callbacks
/*!
@typedef AudioSessionInterruptionListener
@abstract A function to be called when an interruption begins or ends.
@discussion AudioSessionInterruptionListener has to be provided by client applications in the
AudioSessionInitialize function. It will be called when an interruption begins or ends.
@param inClientData
The client user data to use when calling the listener.
@param inInterruptionState
Indicates if the interruption begins (kAudioSessionBeginInterruption)
or ends (kAudioSessionEndInterruption)
*/
typedef void (*AudioSessionInterruptionListener)(
void * inClientData,
UInt32 inInterruptionState);
/*!
@typedef AudioSessionPropertyListener
@abstract A function to be executed when a property changes.
@discussion AudioSessionPropertyListener may be provided by client application to be
called when a property changes.
@param inClientData
The client user data to use when calling the listener.
@param inID
The AudioSession property that changed
@param inDataSize
The size of the payload
@param inData
The payload of the property that changed (see data type for each property)
*/
typedef void (*AudioSessionPropertyListener)(
void * inClientData,
AudioSessionPropertyID inID,
UInt32 inDataSize,
const void * inData);
//==================================================================================================
#pragma mark -
#pragma mark AudioSession Functions
/*!
@functiongroup AudioSession
*/
/*!
@function AudioSessionInitialize
@abstract Initialize the AudioSession.
@discussion This function has to be called once before calling any other
AudioSession functions.
@param inRunLoop
A CFRunLoopRef indicating the desired run loop the interruption routine should
be run on. Pass NULL to use the main run loop.
@param inRunLoopMode
A CFStringRef indicating the run loop mode for the runloop where the
completion routine will be executed. Pass NULL to use kCFRunLoopDefaultMode.
@param inInterruptionListener
An AudioSessionInterruptionListener to be called when the AudioSession
is interrupted.
@param inClientData
The client user data to use when calling the interruption listener.
*/
extern OSStatus
AudioSessionInitialize( CFRunLoopRef inRunLoop,
CFStringRef inRunLoopMode,
AudioSessionInterruptionListener inInterruptionListener,
void *inClientData)
API_DEPRECATED("no longer supported", ios(2.0, 7.0), macCatalyst(14.0, 14.0)) API_UNAVAILABLE(macos) __WATCHOS_PROHIBITED __TVOS_PROHIBITED;
/*!
@function AudioSessionSetActive
@abstract Activate or deactivate the AudioSession.
@discussion Call this function with active set to true to activate this AudioSession (interrupt
the currently active AudioSession).
Call this function with active set to false to deactivate this AudioSession (allow
another interrupted AudioSession to resume).
When active is true this call may fail if the currently active AudioSession has a higher priority.
@param active
A Boolean indicating if you want to make this AudioSession active or inactive.
*/
extern OSStatus
AudioSessionSetActive( Boolean active)
API_DEPRECATED("no longer supported", ios(2.0, 7.0), macCatalyst(14.0, 14.0)) API_UNAVAILABLE(macos) __WATCHOS_PROHIBITED __TVOS_PROHIBITED;
//==================================================================================================
#pragma mark AudioSessionActivationFlags for AudioSessionSetActiveWithFlags
/*!
@enum Flags for AudioSessionSetActiveWithFlags
@abstract These are valid bitmap flags that may be combined and passed to AudioSessionSetActiveWithFlags
to refine this routine's behavior.
@constant kAudioSessionSetActiveFlag_NotifyOthersOnDeactivation
Notify an interrupted app that the interruption has ended and it may resume playback. Only
valid on session deactivation.
*/
enum {
kAudioSessionSetActiveFlag_NotifyOthersOnDeactivation = (1 << 0) // 0x01
};
/*!
@function AudioSessionSetActiveWithFlags
@abstract Same functionality as AudioSessionSetActive, with an additional flags parameter for
refining behavior.
@discussion Call this function with active set to true to activate this AudioSession (interrupt
the currently active AudioSession).
Call this function with active set to false to deactivate this AudioSession (allow
another interrupted AudioSession to resume).
Pass in one or more flags to refine the behavior during activation or deactivation.
When active is true this call may fail if the currently active AudioSession has a
higher priority.
@param active
A Boolean indicating if you want to make this AudioSession active or inactive.
@param inFlags
A bitmap containing one or more flags from the AudioSessionActivationFlags enum.
*/
extern OSStatus
AudioSessionSetActiveWithFlags( Boolean active,
UInt32 inFlags)
API_DEPRECATED("no longer supported", ios(4.0, 7.0), macCatalyst(14.0, 14.0)) API_UNAVAILABLE(macos) __WATCHOS_PROHIBITED __TVOS_PROHIBITED;
/*!
@function AudioSessionGetProperty
@abstract Get the value of a property.
@discussion This function can be called to get the value for a property of the AudioSession.
Valid properties are listed in an enum above.
@param inID
The AudioSessionPropertyID for which we want to get the value.
@param ioDataSize
The size of the data payload.
On entry it should contain the size of the memory pointed to by outData.
On exit it will contain the actual size of the data.
@param outData
The data for the property will be copied here.
@return kAudioSessionNoError if the operation was successful. If the property is a
write-only property or only available by way of property listeners,
kAudioSessionUnsupportedPropertyError will be returned. Other error codes
listed under AudioSession Error Constants also apply to this function.
*/
extern OSStatus
AudioSessionGetProperty( AudioSessionPropertyID inID,
UInt32 *ioDataSize,
void *outData)
API_DEPRECATED("no longer supported", ios(2.0, 7.0), macCatalyst(14.0, 14.0)) API_UNAVAILABLE(macos) __WATCHOS_PROHIBITED __TVOS_PROHIBITED;
/*!
@function AudioSessionSetProperty
@abstract Set the value of a property.
@discussion This function can be called to set the value for a property of the AudioSession.
Valid properties are listed in an enum above.
@param inID
The AudioSessionPropertyID for which we want to set the value.
@param inDataSize
The size of the data payload.
@param inData
The data for the property we want to set.
@return kAudioSessionNoError if the operation was successful. If the property is a
read-only property or an invalid property value is passed in,
kAudioSessionUnsupportedPropertyError will be returned. Other error codes
listed under AudioSession Error Constants also apply to
this function.
*/
extern OSStatus
AudioSessionSetProperty( AudioSessionPropertyID inID,
UInt32 inDataSize,
const void *inData)
API_DEPRECATED("no longer supported", ios(2.0, 7.0), macCatalyst(14.0, 14.0)) API_UNAVAILABLE(macos) __WATCHOS_PROHIBITED __TVOS_PROHIBITED;
/*!
@function AudioSessionGetPropertySize
@abstract Get the size of the payload for a property.
@discussion This function can be called to get the size for the payload of a property.
Valid properties are listed in an enum above.
@param inID
The AudioSessionPropertyID for which we want to get the size of the payload.
@param outDataSize
The size of the data payload will be copied here.
*/
extern OSStatus
AudioSessionGetPropertySize( AudioSessionPropertyID inID,
UInt32 *outDataSize)
API_DEPRECATED("no longer supported", ios(2.0, 7.0), macCatalyst(14.0, 14.0)) API_UNAVAILABLE(macos) __WATCHOS_PROHIBITED __TVOS_PROHIBITED;
/*!
@function AudioSessionAddPropertyListener
@abstract Add a property listener.
@discussion This function can be used to add a listener to be called when a property changes.
If a listener and user data already exist for this property, they will be replaced.
Valid properties are listed above.
@param inID
The AudioSessionPropertyID for which we want to set a listener.
@param inProc
The listener to be called when the property changes.
@param inClientData
The client user data to use when calling the listener.
@return kAudioSessionNoError if the operation was successful. If the property does
not support listeners, kAudioSessionUnsupportedPropertyError will be returned.
Other error codes listed under AudioSession Error Constants also apply to
this function.
*/
extern OSStatus
AudioSessionAddPropertyListener( AudioSessionPropertyID inID,
AudioSessionPropertyListener inProc,
void *inClientData)
API_DEPRECATED("no longer supported", ios(2.0, 7.0), macCatalyst(14.0, 14.0)) API_UNAVAILABLE(macos) __WATCHOS_PROHIBITED __TVOS_PROHIBITED;
/*!
@function AudioSessionRemovePropertyListener
@abstract see AudioSessionRemovePropertyListenerWithUserData
@discussion see AudioSessionRemovePropertyListenerWithUserData
*/
extern OSStatus
AudioSessionRemovePropertyListener( AudioSessionPropertyID inID)
API_DEPRECATED("no longer supported", ios(2.0, 2.0), macCatalyst(14.0, 14.0)) API_UNAVAILABLE(macos) __WATCHOS_PROHIBITED __TVOS_PROHIBITED;
/*!
@function AudioSessionRemovePropertyListener
@abstract Remove a property listener.
@discussion This function can be called to remove the listener for a property. The caller
provides the same proc and user data that was used to add the listener. This ensures
that there can be more than one listener established for a given property ID,
and each listener can be removed as requested.
Valid properties are listed above.
@param inID
The AudioSessionPropertyID for which we want to remove the listener.
@param inProc
The proc that was used to add the listener that needs to be removed.
@param inClientData
The client data that was used to add the listener that needs to be removed.
@return kAudioSessionNoError if the operation was successful. If the property does
not support listeners, kAudioSessionUnsupportedPropertyError will be returned.
Other error codes listed under AudioSession Error Constants also apply to
this function.
*/
extern OSStatus
AudioSessionRemovePropertyListenerWithUserData( AudioSessionPropertyID inID,
AudioSessionPropertyListener inProc,
void *inClientData)
API_DEPRECATED("no longer supported", ios(2.1, 7.0), macCatalyst(14.0, 14.0)) API_UNAVAILABLE(macos) __WATCHOS_PROHIBITED __TVOS_PROHIBITED;
#pragma mark -
#pragma mark Deprecated
/*!
@enum AudioSession audio categories states
@abstract These two session categories are deprecated in iOS 3.0 or later
@constant kAudioSessionCategory_UserInterfaceSoundEffects
use kAudioSessionCategory_AmbientSound
@constant kAudioSessionCategory_LiveAudio
use kAudioSessionCategory_MediaPlayback
*/
enum {
kAudioSessionCategory_UserInterfaceSoundEffects = 'uifx',
kAudioSessionCategory_LiveAudio = 'live'
};
/*!
@enum AudioSession audio categories states
@abstract Deprecated AudioSession properties
@constant kAudioSessionProperty_AudioRoute
Deprecated in iOS 5.0; Use kAudioSessionProperty_AudioRouteDescription
*/
enum {
kAudioSessionProperty_AudioRoute = 'rout', // CFStringRef (get only)
};
// deprecated dictionary keys
// Deprecated in iOS 5.0; Use kAudioSession_AudioRouteChangeKey_PreviousRouteDescription instead
#define kAudioSession_AudioRouteChangeKey_OldRoute "OutputDeviceDidChange_OldRoute"
//==================================================================================================
#ifdef __cplusplus
}
#endif
#endif /* __AudioSession_h__ */
|
0 | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/AudioToolbox.framework | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/AudioToolbox.framework/Headers/AUAudioUnitImplementation.h | #if (defined(__USE_PUBLIC_HEADERS__) && __USE_PUBLIC_HEADERS__) || (defined(USE_AUDIOTOOLBOX_PUBLIC_HEADERS) && USE_AUDIOTOOLBOX_PUBLIC_HEADERS) || !__has_include(<AudioToolboxCore/AUAudioUnitImplementation.h>)
/*!
@file AUAudioUnitImplementation.h
@framework AudioToolbox.framework
@copyright (c) 2015 Apple, Inc. All rights reserved.
@brief Additional AUAudioUnit interfaces specific to subclass implementations.
*/
/*!
@page AUExtensionPackaging Audio Unit Extension Packaging
@discussion
Audio Unit app extensions are available beginning with macOS 10.11 and iOS 9.0.
For background on app extensions, see "App Extension Programming Guide."
There are two types of audio unit extensions: UI, and non-UI. The principal class of an
extension with UI must be a subclass of AUViewController. This class is declared
in CoreAudioKit/AUViewController.h. The principal class of a non-UI extension can derive from
NSObject.
The principal class of both UI and non-UI extensions must conform to the AUAudioUnitFactory
protocol.
The Info.plist of the .appex bundle describes the type of extension and the principal class.
It also contains an AudioComponents array (see AudioComponent.h), and an optional
AudioComponentBundle entry, for example:
```
<key>NSExtension</key>
<dict>
<key>NSExtensionAttributes</key>
<dict>
<key>NSExtensionActivationRule</key>
<string>TRUEPREDICATE</string>
<key>NSExtensionServiceRoleType</key>
<string>NSExtensionServiceRoleTypeEditor</string>
<key>AudioComponents</key>
<array>
<dict>
<key>factoryFunction</key>
<string>____</string>
<key>manufacturer</key>
<string>____</string>
<key>name</key>
<string>____</string>
<key>sandboxSafe</key>
<true/>
<key>subtype</key>
<string>____</string>
<key>tags</key>
<array>
<string>____</string>
</array>
<key>type</key>
<string>____</string>
<key>version</key>
<integer>____</integer>
</dict>
</array>
<key>AudioComponentBundle</key>
<string>____</string>
</dict>
<key>NSExtensionPointIdentifier</key>
<string>____</string>
<key>NSExtensionPrincipalClass</key>
<string>____</string>
</dict>
```
NSExtensionPointIdentifier
: `com.apple.AudioUnit` or `com.apple.AudioUnit-UI`.
NSExtensionPrincipalClass
: The name of the principal class.
AudioComponentBundle
: Optional. A version 3 audio unit can be loaded into a separate extension process and
this is the default behavior. To be able to load in-process on macOS (see
kAudioComponentInstantiation_LoadInProcess) the audio unit has to be packaged
separately. The AudioComponentBundle entry supports loading in-process by designating
the identifier of a bundle in the .appex or its enclosing app container in which the
factory function and/or principal class are implemented.
AudioComponents
: Registration info for each audio component type/subtype/manufacturer
implemented in the extension. factoryFunction is only necessary
if the AU is implemented using AUAudioUnitV2Bridge.
See AudioComponent.h.
Note that as of macOS version 10.12, the system has special support for installing both version 2
(bundle-based) and version 3 (extension) implementations of the same audio unit. When two components
are registered with the same type/subtype/manufacturer and version, normally the first one found
is used. But if one is an audio unit extension and the other is not, then the audio unit extension's
registration "wins", though if an app attempts to open it synchronously, with
AudioComponentInstanceNew, then the system will fall back to the version 2 implementation.
*/
#ifndef AudioToolbox_AUAudioUnitImplementation_h
#define AudioToolbox_AUAudioUnitImplementation_h
#ifdef __OBJC2__
#import <AudioToolbox/AUAudioUnit.h>
NS_ASSUME_NONNULL_BEGIN
// forward declaration
union AURenderEvent;
// =================================================================================================
// Realtime events - parameters and MIDI
/// Describes the type of a render event.
typedef NS_ENUM(uint8_t, AURenderEventType) {
AURenderEventParameter = 1,
AURenderEventParameterRamp = 2,
AURenderEventMIDI = 8,
AURenderEventMIDISysEx = 9,
AURenderEventMIDIEventList = 10
};
#pragma pack(4)
/// Common header for an AURenderEvent.
typedef struct AURenderEventHeader {
union AURenderEvent *__nullable next; //!< The next event in a linked list of events.
AUEventSampleTime eventSampleTime; //!< The sample time at which the event is scheduled to occur.
AURenderEventType eventType; //!< The type of the event.
uint8_t reserved; //!< Must be 0.
} AURenderEventHeader;
/// Describes a scheduled parameter change.
typedef struct AUParameterEvent {
union AURenderEvent *__nullable next; //!< The next event in a linked list of events.
AUEventSampleTime eventSampleTime; //!< The sample time at which the event is scheduled to occur.
AURenderEventType eventType; //!< AURenderEventParameter or AURenderEventParameterRamp.
uint8_t reserved[3]; //!< Must be 0.
AUAudioFrameCount rampDurationSampleFrames;
//!< If greater than 0, the event is a parameter ramp;
/// should be 0 for a non-ramped event.
AUParameterAddress parameterAddress; //!< The parameter to change.
AUValue value; //!< If ramped, the parameter value at the
/// end of the ramp; for a non-ramped event,
/// the new value.
} AUParameterEvent;
/// Describes a single scheduled MIDI event.
typedef struct AUMIDIEvent {
union AURenderEvent *__nullable next; //!< The next event in a linked list of events.
AUEventSampleTime eventSampleTime; //!< The sample time at which the event is scheduled to occur.
AURenderEventType eventType; //!< AURenderEventMIDI or AURenderEventMIDISysEx.
uint8_t reserved; //!< Must be 0.
uint16_t length; //!< The number of valid MIDI bytes in the data field.
/// 1, 2 or 3 for most MIDI events, but can be longer
/// for system-exclusive (sys-ex) events.
uint8_t cable; //!< The virtual cable number.
uint8_t data[3]; //!< The bytes of the MIDI event. Running status will not be used.
} AUMIDIEvent;
/// Describes a single scheduled MIDIEventList.
typedef struct AUMIDIEventList {
union AURenderEvent *__nullable next; //!< The next event in a linked list of events.
AUEventSampleTime eventSampleTime; //!< The sample time at which the event is scheduled to occur.
AURenderEventType eventType; //!< AURenderEventMIDI or AURenderEventMIDISysEx.
uint8_t reserved; //!< Must be 0.
uint8_t cable; //!< The virtual cable number.
MIDIEventList eventList; //!< A structure containing UMP packets.
} AUMIDIEventList;
/*! @brief A union of the various specific render event types.
@discussion
Determine which variant to use via head.eventType. AURenderEventParameter and
AURenderEventParameterRamp use the parameter variant. AURenderEventMIDI and
AURenderEventMIDISysEx use the MIDI variant.
*/
typedef union AURenderEvent {
AURenderEventHeader head;
AUParameterEvent parameter;
AUMIDIEvent MIDI;
AUMIDIEventList MIDIEventsList;
} AURenderEvent;
#pragma pack()
/*! @brief Block to render the audio unit.
@discussion
Implemented in subclasses; should not be used by clients.
The other parameters are identical to those of AURenderBlock.
@param realtimeEventListHead
A time-ordered linked list of the AURenderEvents to be rendered during this render cycle.
Note that a ramp event will only appear in the render cycle during which it starts; the
audio unit is responsible for maintaining continued ramping state for any further render
cycles.
*/
typedef AUAudioUnitStatus (^AUInternalRenderBlock)(
AudioUnitRenderActionFlags * actionFlags,
const AudioTimeStamp * timestamp,
AUAudioFrameCount frameCount,
NSInteger outputBusNumber,
AudioBufferList * outputData,
const AURenderEvent *__nullable realtimeEventListHead,
AURenderPullInputBlock __nullable __unsafe_unretained pullInputBlock);
// =================================================================================================
/// Aspects of AUAudioUnit of interest only to subclassers.
@interface AUAudioUnit (AUAudioUnitImplementation)
/*! @brief Register an audio unit component implemented as an AUAudioUnit subclass.
@discussion
This method dynamically registers the supplied AUAudioUnit subclass with the Audio Component
system, in the context of the current process (only). After registering the subclass, it can
be instantiated via AudioComponentInstanceNew,
-[AUAudioUnit initWithComponentDescription:options:error:], and via any other API's which
instantiate audio units via their component descriptions (e.g. <AudioToolbox/AUGraph.h>, or
<AVFoundation/AVAudioUnitEffect.h>).
*/
+ (void)registerSubclass:(Class)cls asComponentDescription:(AudioComponentDescription)componentDescription name:(NSString *)name version:(UInt32)version;
/// Block which subclassers must provide (via a getter) to implement rendering.
@property (nonatomic, readonly) AUInternalRenderBlock internalRenderBlock;
/*! @property renderContextObserver
@brief Block called by the OS when the rendering context changes.
Audio Units which create auxiliary realtime rendering threads should implement this property to
return a block which will be called by the OS when the render context changes. Audio Unit hosts
must not attempt to interact with the AudioUnit through this block; it is for the exclusive use
of the OS. See <AudioToolbox/AudioWorkInterval.h> for more information.
*/
@property (nonatomic, readonly) AURenderContextObserver renderContextObserver
API_AVAILABLE(macos(11.0), ios(14.0), watchos(7.0), tvos(14.0))
__SWIFT_UNAVAILABLE_MSG("Swift is not supported for use with audio realtime threads");
/*! @property MIDIOutputBufferSizeHint
@brief Hint to control the size of the allocated buffer for outgoing MIDI events.
@discussion
This property allows the plug-in to provide a hint to the framework regarding the size of
its outgoing MIDI data buffer.
If the plug-in produces more MIDI output data than the default size of the allocated buffer,
then the plug-in can provide this property to increase the size of this buffer.
The value represents the number of 3-byte Legacy MIDI messages that fit into the buffer or
a single MIDIEventList containing 1 MIDIEventPacket of 2 words when using MIDI 2.0 (MIDIEventList based API's).
This property is set to the default value by the framework.
In case of kAudioUnitErr_MIDIOutputBufferFull errors caused by producing too much MIDI
output in one render call, set this property to increase the buffer.
This only provides a recommendation to the framework.
*/
@property (NS_NONATOMIC_IOSONLY) NSInteger MIDIOutputBufferSizeHint API_AVAILABLE(macos(10.13), ios(11.0), watchos(4.0), tvos(11.0));
/*! @method shouldChangeToFormat:forBus:
@param format
An AVAudioFormat which is proposed as the new format.
@param bus
The AUAudioUnitBus on which the format will be changed.
@discussion
This is called when setting the format on an AUAudioUnitBus.
The bus has already checked that the format meets the channel constraints of the bus.
The AU can override this method to check before allowing a new format to be set on the bus.
If this method returns NO, then the new format will not be set on the bus.
The default implementation returns NO if the unit has renderResourcesAllocated, otherwise it results YES.
*/
- (BOOL)shouldChangeToFormat:(AVAudioFormat *)format forBus:(AUAudioUnitBus *)bus;
/*! @method setRenderResourcesAllocated:
@param flag
In the base class implementation of allocateRenderResourcesAndReturnError:, the property renderResourcesAllocated is set to YES.
If allocateRenderResourcesAndReturnError: should fail in a subclass, subclassers must use this method to set renderResourcesAllocated to NO.
*/
- (void)setRenderResourcesAllocated:(BOOL)flag;
@end
// =================================================================================================
/// Aspects of AUAudioUnitBus of interest only to the implementation of v3 AUs.
@interface AUAudioUnitBus (AUAudioUnitImplementation)
/*! @method initWithFormat:error:
@brief initialize with a default format.
@param format The initial format for the bus.
@param outError An error if the format is unsupported for the bus.
*/
- (nullable instancetype)initWithFormat:(AVAudioFormat *)format error:(NSError **)outError;
/*! @property supportedChannelCounts
@brief An array of numbers giving the supported numbers of channels for this bus.
@discussion
If supportedChannelCounts is nil, then any number less than or equal to maximumChannelCount
is supported. If setting supportedChannelCounts makes the current format unsupported, then
format will be set to nil. The default value is nil.
*/
@property (nonatomic, retain, nullable) NSArray<NSNumber *> *supportedChannelCounts;
/*! @property maximumChannelCount
@brief The maximum numbers of channels supported for this bus.
@discussion
If supportedChannelCounts is set, then this value is derived from supportedChannelCounts. If
setting maximumChannelCount makes the current format unsupported, then format will be set to
nil. The default value is UINT_MAX.
*/
@property (nonatomic) AUAudioChannelCount maximumChannelCount;
@end
// =================================================================================================
/// Aspects of AUAudioUnitBusArray of interest only to subclassers.
@interface AUAudioUnitBusArray (AUAudioUnitBusImplementation)
/// Sets the bus array to be a copy of the supplied array. The base class issues KVO notifications.
- (void)replaceBusses:(NSArray <AUAudioUnitBus *> *)busArray;
@end
// =================================================================================================
/*! Factory methods for building parameters, parameter groups, and parameter trees.
@note In non-ARC code, "create" methods return unretained objects (unlike "create"
C functions); the caller should generally retain them.
*/
@interface AUParameterTree (Factory)
/// Create an AUParameter.
/// See AUParameter's properties for descriptions of the arguments.
+ (AUParameter *)createParameterWithIdentifier:(NSString *)identifier name:(NSString *)name address:(AUParameterAddress)address min:(AUValue)min max:(AUValue)max unit:(AudioUnitParameterUnit)unit unitName:(NSString * __nullable)unitName flags:(AudioUnitParameterOptions)flags valueStrings:(NSArray<NSString *> *__nullable)valueStrings dependentParameters:(NSArray<NSNumber *> *__nullable)dependentParameters;
/*! @brief Create an AUParameterGroup.
@param identifier An identifier for the group (non-localized, persistent).
@param name The group's human-readable name (localized).
@param children The group's child nodes.
*/
+ (AUParameterGroup *)createGroupWithIdentifier:(NSString *)identifier name:(NSString *)name children:(NSArray<AUParameterNode *> *)children;
/*! @brief Create a template group which may be used as a prototype for further group instances.
@discussion
Template groups provide a way to construct multiple instances of identical parameter
groups, sharing certain immutable state between the instances.
Template groups may not appear in trees except at the root.
*/
+ (AUParameterGroup *)createGroupTemplate:(NSArray<AUParameterNode *> *)children;
/*! @brief Initialize a group as a copied instance of a template group.
@param templateGroup A group to be used as a template and largely copied.
@param identifier An identifier for the new group (non-localized, persistent).
@param name The new group's human-readable name (localized).
@param addressOffset The new group's parameters' addresses will be offset from those in
the template by this value.
*/
+ (AUParameterGroup *)createGroupFromTemplate:(AUParameterGroup *)templateGroup identifier:(NSString *)identifier name:(NSString *)name addressOffset:(AUParameterAddress)addressOffset;
/*! @brief Create an AUParameterTree.
@param children The tree's top-level child nodes.
*/
+ (AUParameterTree *)createTreeWithChildren:(NSArray<AUParameterNode *> *)children;
@end
// =================================================================================================
/// A block called to notify the AUAudioUnit implementation of changes to AUParameter values.
typedef void (^AUImplementorValueObserver)(AUParameter *param, AUValue value);
/// A block called to fetch an AUParameter's current value from the AUAudioUnit implementation.
typedef AUValue (^AUImplementorValueProvider)(AUParameter *param);
/// A block called to convert an AUParameter's value to a string.
typedef NSString *__nonnull (^AUImplementorStringFromValueCallback)(AUParameter *param, const AUValue *__nullable value);
/// A block called to convert a string to an AUParameter's value.
typedef AUValue (^AUImplementorValueFromStringCallback)(AUParameter *param, NSString *string);
/// A block called to return a group or parameter's localized display name, abbreviated to the requested length.
typedef NSString *__nonnull (^AUImplementorDisplayNameWithLengthCallback)(AUParameterNode *node, NSInteger desiredLength);
/// Aspects of AUParameterNode of interest only to AUAudioUnit subclassers.
@interface AUParameterNode (AUParameterNodeImplementation)
/*! @brief Called when a parameter changes value.
@discussion
This block, used only in an audio unit implementation, receives all externally-generated
changes to parameter values. It should store the new value in its audio signal processing
state (assuming that that state is separate from the AUParameter object).
*/
@property (NS_NONATOMIC_IOSONLY, copy) AUImplementorValueObserver implementorValueObserver;
/*! @brief Called when a value of a parameter in the tree is known to have a stale value
needing to be refreshed.
@discussion
The audio unit should return the current value for this parameter; the AUParameterNode will
store the value.
*/
@property (NS_NONATOMIC_IOSONLY, copy) AUImplementorValueProvider implementorValueProvider;
/// Called to provide string representations of parameter values.
/// If value is nil, the callback uses the current value of the parameter.
@property (NS_NONATOMIC_IOSONLY, copy) AUImplementorStringFromValueCallback implementorStringFromValueCallback;
/// Called to convert string to numeric representations of parameter values.
@property (NS_NONATOMIC_IOSONLY, copy) AUImplementorValueFromStringCallback implementorValueFromStringCallback;
/// Called to obtain an abbreviated version of a parameter or group name.
@property (NS_NONATOMIC_IOSONLY, copy) AUImplementorDisplayNameWithLengthCallback implementorDisplayNameWithLengthCallback;
@end
// =================================================================================================
/*! @brief Wraps a v2 audio unit in an AUAudioUnit subclass.
@discussion
Implementors of version 3 audio units may derive their implementations from
AUAudioUnitV2Bridge. It expects the component description with which it is initialized to
refer to a registered component with a v2 implementation using an
AudioComponentFactoryFunction. The bridge will instantiate the v2 audio unit via the factory
function and communicate it with it using the v2 AudioUnit API's (AudioUnitSetProperty,
etc.)
Hosts should not access this class; it will be instantiated when needed when creating an
AUAudioUnit.
*/
API_AVAILABLE(macos(10.11), ios(9.0), watchos(2.0), tvos(9.0))
@interface AUAudioUnitV2Bridge : AUAudioUnit
@end
// =================================================================================================
/*! @brief Protocol to which principal classes of v3 audio units (extensions) must conform.
@discussion
The principal class of a non-UI v3 audio unit extension will generally derive from NSObject
and implement this protocol.
The principal class of a UI v3 audio unit extension must derive from AUViewController and
implement this protocol.
*/
@protocol AUAudioUnitFactory <NSExtensionRequestHandling>
/*! @brief Create an instance of an extension's AUAudioUnit.
@discussion
This method should create and return an instance of its audio unit.
This method will be called only once per instance of the factory.
Note that in non-ARC code, "create" methods return unretained objects (unlike "create"
C functions); the implementor should return an object with reference count 1 but
autoreleased.
*/
- (nullable AUAudioUnit *)createAudioUnitWithComponentDescription:(AudioComponentDescription)desc error:(NSError **)error;
@end
NS_ASSUME_NONNULL_END
#endif // __OBJC2__
#endif // AudioToolbox_AUAudioUnitImplementation_h
#else
#include <AudioToolboxCore/AUAudioUnitImplementation.h>
#endif
|
0 | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/AudioToolbox.framework | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/AudioToolbox.framework/Headers/AudioWorkInterval.h | #if (defined(__USE_PUBLIC_HEADERS__) && __USE_PUBLIC_HEADERS__) || (defined(USE_AUDIOTOOLBOX_PUBLIC_HEADERS) && USE_AUDIOTOOLBOX_PUBLIC_HEADERS) || !__has_include(<AudioToolboxCore/AudioWorkInterval.h>)
/*!
@file AudioWorkInterval.h
@framework AudioToolbox.framework
@copyright (c) 2020 by Apple Inc., all rights reserved.
@abstract API to create workgroups.
Workgroups express that a collection of realtime threads are working in tandem to produce audio
for a common deadline. Such threads span multiple processes including the audio server and
client applications. The system uses workgroups to observe the CPU usage of audio realtime
threads and dynamically balance the competing considerations of power consumption vs. rendering
capacity.
Workgroups have "work intervals", or "workgroup intervals", which express the duty cycle of the
main thread in the workgroup. We sometimes use these terms interchangeably with "workgroup".
Core Audio devices own a workgroup whose lifetime is the same as that of the device. This
`os_workgroup_t` can be obtained via `kAudioDevicePropertyIOThreadOSWorkgroup`.
For Audio I/O units which are associated with an audio device, that device-owned workgroup is
readable as an Audio Unit property. With the C API (AudioUnitGetProperty()), use
`kAudioOutputUnitProperty_OSWorkgroup`. With the ObjC API (AUAudioUnit), use the osWorkgroup
property. If an I/O unit's device assignment changes, as a side effect, its workgroup will also
change.
An audio app or plug-in may create auxiliary rendering threads. When such a thread has realtime
priority, it should be associated with a workgroup, as follows:
1. If an auxiliary realtime thread operates with the same cadence as the Core Audio
realtime I/O thread, that is, it is triggered by code known to be running on the device's
I/O thread and has a deadline within the current I/O cycle, that auxiliary thread should be
joined to the device thread's workgroup, using the join/leave APIs in
<os/workgroup_object.h>.
2. If an Audio Unit's auxiliary realtime thread operates with the same cadence as the
requests to render the plug-in, that is, it is triggered by the rendering thread and is
expected to finish rendering before that render request completes, the plug-in should
implement a render context observer, and join its auxiliary thread(s) to any workgroup
passed to that observer. See the Audio Unit properties
`kAudioUnitProperty_RenderContextObserver` (v2) and `AUAudioUnit.renderContextObserver` (v3).
3. If an app or plug-in creates realtime threads that operate asynchronously, i.e. at a
cadence independent of any audio hardware or Audio Unit rendering cycle, then that app or
plug-in should create its own workgroup interval, using AudioWorkIntervalCreate(). All
threads processing to this work interval's deadline should join its workgroup, using
the join/leave APIs in <os/workgroup_object.h>. The "master" thread, the one coordinating
the activities of all of the threads in the workgroup (if there are multiple), should
signify the beginning and ending of each work cycle using `os_workgroup_interval_start()` and
`os_workgroup_interval_finish()`.
The properties and API described here are available beginning in macOS 10.16 and iOS 14.0.
Note that they are unavailable from Swift, because these API's pertain exclusively to realtime
threads, while the Swift runtime is unsafe for use on realtime threads.
See also: <os/workgroup_object.h>, <os/workgroup_interval.h>.
*/
#ifndef AudioToolbox_AudioWorkInterval_h
#define AudioToolbox_AudioWorkInterval_h
#include <CoreFoundation/CFBase.h>
#include <os/workgroup.h>
#ifdef __cplusplus
extern "C" {
#endif
CF_ASSUME_NONNULL_BEGIN
/*!
@fn AudioWorkIntervalCreate
@brief Create an OS workgroup interval for use with audio realtime threads.
@param name
A name for the created work interval.
@param clock
The clockid in which interval timestamps are specified, e.g. `OS_CLOCK_MACH_ABSOLUTE_TIME`
from <os/clock.h>.
@param attr
This field is currently not used and should be NULL.
@return
A new os_workgroup_interval_t. The client should call `os_workgroup_interval_start()`
and `os_workgroup_interval_finish()` to notify the system of the beginning and ending
of each work duty cycle. The caller is responsible for releasing this object when finished
with it (if not using automatic reference counting).
*/
OS_WORKGROUP_RETURNS_RETAINED
os_workgroup_interval_t AudioWorkIntervalCreate(
const char* name, os_clockid_t clock, os_workgroup_attr_t _Nullable attr)
API_AVAILABLE(macos(11.0), ios(14.0), watchos(7.0), tvos(14.0))
__SWIFT_UNAVAILABLE_MSG("Swift is not supported for use with audio realtime threads");
CF_ASSUME_NONNULL_END
#ifdef __cplusplus
}
#endif
#endif /* AudioToolbox_AudioWorkInterval_h */
#else
#include <AudioToolboxCore/AudioWorkInterval.h>
#endif
|
0 | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/AudioToolbox.framework | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/AudioToolbox.framework/Headers/AUCocoaUIView.h | #if (defined(__USE_PUBLIC_HEADERS__) && __USE_PUBLIC_HEADERS__) || (defined(USE_AUDIOTOOLBOX_PUBLIC_HEADERS) && USE_AUDIOTOOLBOX_PUBLIC_HEADERS) || !__has_include(<AudioToolboxCore/AUCocoaUIView.h>)
/*!
@file AUCocoaUIView.h
@framework AudioToolbox.framework
@copyright (c) 2003-2015 Apple, Inc. All rights reserved.
@abstract Protocol for Cocoa-based audio unit views.
@discussion
Audio unit hosts can call these methods to retrieve views for audio units.
*/
#ifndef AudioToolbox_AUCocoaUIView_h
#define AudioToolbox_AUCocoaUIView_h
#include <TargetConditionals.h>
#if defined(__OBJC__) && TARGET_OS_OSX
#import <Foundation/Foundation.h>
#import <AudioToolbox/AUComponent.h>
NS_ASSUME_NONNULL_BEGIN
@class NSView;
@protocol AUCocoaUIBase
/*!
@method interfaceVersion
@abstract Return the version of the interface you are implementing.
@result An unsigned value.
@discussion For MacOS X 10.3 or later, you should return the current version which is 0.
NOTE: Developers are strongly encouraged to override -(NSString *)description to return the name
of the cocoa view. This name is displayed by host applications and should be returned as a copy
instead of a static string.
For example, you could define the description method like this:
- (NSString *) description {
return [NSString withString: @"Filter View"];
}
*/
- (unsigned)interfaceVersion;
/*!
@method uiViewForAudioUnit:withSize:
@abstract Return the NSView responsible for displaying the interface for the provided AudioUnit.
@param inAudioUnit
The Audio Unit the view is associated with.
@param inPreferredSize
The preferred size of the view to be returned.
@result An NSView.
@discussion
This method is a factory function: each call to it must return a unique view.
Each view must be returned with a retain count of 1 and autoreleased.
It is the client's responsibility to retain the returned view and to release the view when it's no longer needed.
*/
- (NSView * __nullable)uiViewForAudioUnit:(AudioUnit)inAudioUnit withSize:(NSSize)inPreferredSize;
@end
NS_ASSUME_NONNULL_END
#endif // defined(__OBJC__) && TARGET_OS_OSX
#endif // AudioToolbox_AUCocoaUIView_h
#else
#include <AudioToolboxCore/AUCocoaUIView.h>
#endif
|
0 | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/AudioToolbox.framework | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/AudioToolbox.framework/Modules/module.modulemap | framework module AudioToolbox [extern_c] [system] {
umbrella header "AudioToolbox.h"
export *
module * { export * }
explicit module DefaultAudioOutput { header "DefaultAudioOutput.h" export * }
explicit module AUCocoaUIView { header "AUCocoaUIView.h" export * }
explicit module AudioUnitCarbonView { header "AudioUnitCarbonView.h" export * }
}
|
0 | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/CoreGraphics.framework/CoreGraphics.tbd | --- !tapi-tbd
tbd-version: 4
targets: [ x86_64-macos, x86_64-maccatalyst, x86_64h-macos, x86_64h-maccatalyst,
arm64-macos, arm64-maccatalyst, arm64e-macos, arm64e-maccatalyst ]
uuids:
- target: x86_64-macos
value: 8F5EF64C-EC50-32A8-810D-6E42FEC1A3DE
- target: x86_64-maccatalyst
value: 8F5EF64C-EC50-32A8-810D-6E42FEC1A3DE
- target: x86_64h-macos
value: 51057B3B-F4C8-3BA6-B2E7-4D74DA43D8C0
- target: x86_64h-maccatalyst
value: 51057B3B-F4C8-3BA6-B2E7-4D74DA43D8C0
- target: arm64-macos
value: 00000000-0000-0000-0000-000000000000
- target: arm64-maccatalyst
value: 00000000-0000-0000-0000-000000000000
- target: arm64e-macos
value: 6D13C1FB-4A2E-3FEE-97FD-44FD7A8FA5DF
- target: arm64e-maccatalyst
value: 6D13C1FB-4A2E-3FEE-97FD-44FD7A8FA5DF
install-name: '/System/Library/Frameworks/CoreGraphics.framework/Versions/A/CoreGraphics'
current-version: 1557.1.1
compatibility-version: 64
exports:
- targets: [ x86_64-macos, arm64e-macos, x86_64h-macos, x86_64-maccatalyst,
x86_64h-maccatalyst, arm64e-maccatalyst, arm64-macos, arm64-maccatalyst ]
symbols: [ '$ld$install_name$os10.4$/System/Library/Frameworks/ApplicationServices.framework/Versions/A/ApplicationServices',
'$ld$install_name$os10.5$/System/Library/Frameworks/ApplicationServices.framework/Versions/A/ApplicationServices',
'$ld$install_name$os10.6$/System/Library/Frameworks/ApplicationServices.framework/Versions/A/ApplicationServices',
'$ld$install_name$os10.7$/System/Library/Frameworks/ApplicationServices.framework/Versions/A/ApplicationServices',
_CGAccessSessionCreate, _CGAccessSessionGetBytePointer, _CGAccessSessionGetBytes,
_CGAccessSessionGetChunks, _CGAccessSessionRelease, _CGAccessSessionRewind,
_CGAccessSessionSkipForward, _CGAcquireDisplayFadeReservation,
_CGAffineTransformConcat, _CGAffineTransformEqualToTransform,
_CGAffineTransformIdentity, _CGAffineTransformInvert, _CGAffineTransformIsIdentity,
_CGAffineTransformIsRectilinear, _CGAffineTransformIsSingular,
_CGAffineTransformMake, _CGAffineTransformMakeRotation, _CGAffineTransformMakeScale,
_CGAffineTransformMakeTranslation, _CGAffineTransformMakeWithRect,
_CGAffineTransformRotate, _CGAffineTransformScale, _CGAffineTransformTranslate,
_CGApplicationPropertyGetBoolean, _CGApplyGainMapHeadRoom,
_CGAssociateMouseAndMouseCursorPosition, _CGBeginDisplayConfiguration,
_CGBitmapAllocateData, _CGBitmapContextCopyData, _CGBitmapContextCreate,
_CGBitmapContextCreateForFlatteningImage, _CGBitmapContextCreateImage,
_CGBitmapContextCreateWithAlpha, _CGBitmapContextCreateWithCallbacks,
_CGBitmapContextCreateWithData, _CGBitmapContextCreateWithDictionary,
_CGBitmapContextCreateWithPlanarAlpha, _CGBitmapContextDelegateCreateWithDictionary,
_CGBitmapContextGetAlphaBytesPerRow, _CGBitmapContextGetAlphaData,
_CGBitmapContextGetAlphaInfo, _CGBitmapContextGetBitmapInfo,
_CGBitmapContextGetBitsPerComponent, _CGBitmapContextGetBitsPerPixel,
_CGBitmapContextGetBytesPerRow, _CGBitmapContextGetColorSpace,
_CGBitmapContextGetData, _CGBitmapContextGetHeight, _CGBitmapContextGetWidth,
_CGBitmapContextSetData, _CGBitmapContextWriteImageToFile,
_CGBitmapFreeData, _CGBitmapGetAlignedBytesPerRow, _CGBitmapGetFastestAlignment,
_CGBlt_copyBytes, _CGBlt_depth, _CGBlt_fillBytes, _CGBlt_initialize,
_CGBlt_release_pattern, _CGBufIsConstantValue, _CGBufferLockBytePtr,
_CGBufferProviderCreate, _CGBufferProviderCreateWithCFData,
_CGBufferProviderGetSize, _CGBufferProviderGetTypeID, _CGBufferUnlockBytePtr,
_CGCFArrayAppendCGFloat, _CGCFArrayAppendInteger, _CGCFArrayAppendRect,
_CGCFArrayApplyBlock, _CGCFArrayCreate, _CGCFArrayCreatePDFRect,
_CGCFArrayGetLastValue, _CGCFArrayGetRectAtIndex, _CGCFDictionaryApplyBlock,
_CGCFDictionaryCopyKeys, _CGCFDictionaryCopyValues, _CGCFDictionaryCreate,
_CGCFDictionaryCreateCopy, _CGCFDictionaryCreateWithKeyAndValue,
_CGCFDictionaryGetBoolean, _CGCFDictionaryGetBooleanWithDefault,
_CGCFDictionaryGetCFTypeRef, _CGCFDictionaryGetFloat, _CGCFDictionaryGetFloatWithDefault,
_CGCFDictionaryGetInteger, _CGCFDictionaryGetIntegerWithDefault,
_CGCFDictionaryGetNumber, _CGCFDictionaryGetPDFRect, _CGCFDictionaryGetPoint,
_CGCFDictionaryGetRect, _CGCFDictionaryGetSize, _CGCFDictionarySetBoolean,
_CGCFDictionarySetCFTypeRef, _CGCFDictionarySetCString, _CGCFDictionarySetFloat,
_CGCFDictionarySetInteger, _CGCFDictionarySetLongInteger,
_CGCFDictionarySetNumber, _CGCFDictionarySetPoint, _CGCFDictionarySetRect,
_CGCFDictionarySetSize, _CGCFRelease, _CGCFRetain, _CGCFURLCopyFileData,
_CGCMSUtilsCreatePlatformRefFromData, _CGCMSUtilsGetICCProfileData,
_CGCMSUtilsGetICCProfileDescription, _CGCMSUtilsGetProcessColorModel,
_CGCMSUtilsReleasePlatformRef, _CGCancelDisplayConfiguration,
_CGCaptureAllDisplays, _CGCaptureAllDisplaysWithOptions, _CGClipCreateClipPath,
_CGClipGetFlatness, _CGClipGetIdentifier, _CGClipGetMask,
_CGClipGetMode, _CGClipGetPath, _CGClipGetRect, _CGClipGetShouldAntialias,
_CGClipGetStroke, _CGClipGetTextClipping, _CGClipGetType,
_CGClipGlyphsCreate, _CGClipGlyphsCreateCopy, _CGClipGlyphsCreateCopyByApplyingTransform,
_CGClipGlyphsEqualToClipGlyphs, _CGClipGlyphsGetAdvanceAtIndex,
_CGClipGlyphsGetAdvances, _CGClipGlyphsGetBounds, _CGClipGlyphsGetCount,
_CGClipGlyphsGetFont, _CGClipGlyphsGetFontAtIndex, _CGClipGlyphsGetFontRenderingStyle,
_CGClipGlyphsGetFontRenderingStyleAtIndex, _CGClipGlyphsGetGlyphAtIndex,
_CGClipGlyphsGetGlyphs, _CGClipGlyphsGetLength, _CGClipGlyphsGetMatrix,
_CGClipGlyphsGetMatrixAtIndex, _CGClipGlyphsRelease, _CGClipGlyphsRetain,
_CGClipMaskCreate, _CGClipMaskCreateCopy, _CGClipMaskCreateCopyByApplyingTransform,
_CGClipMaskEqualToClipMask, _CGClipMaskGetBounds, _CGClipMaskGetImage,
_CGClipMaskGetMatrix, _CGClipMaskGetRect, _CGClipMaskRelease,
_CGClipMaskRetain, _CGClipRelease, _CGClipRetain, _CGClipStackAddClip,
_CGClipStackAddRect, _CGClipStackContainsMask, _CGClipStackCreateCopy,
_CGClipStackCreateMutable, _CGClipStackCreateMutableCopy,
_CGClipStackEqual, _CGClipStackGetBounds, _CGClipStackGetClipAtIndex,
_CGClipStackGetCount, _CGClipStackGetIdentifier, _CGClipStackGetRect,
_CGClipStackIsInfinite, _CGClipStackPrint, _CGClipStackRelease,
_CGClipStackRetain, _CGClipStrokeCreate, _CGClipStrokeCreateCopy,
_CGClipStrokeCreateCopyWithTransform, _CGClipStrokeCreateStrokedPath,
_CGClipStrokeCreateWithGState, _CGClipStrokeGetDash, _CGClipStrokeGetFlatness,
_CGClipStrokeGetLineCap, _CGClipStrokeGetLineJoin, _CGClipStrokeGetLineWidth,
_CGClipStrokeGetMatrix, _CGClipStrokeGetMiterLimit, _CGClipStrokeGetShouldAntialias,
_CGClipStrokeGetStrokeAdjust, _CGClipStrokeRelease, _CGClipStrokeRetain,
_CGColorCodeFragmentGetParametricConversion, _CGColorCodeFragmentGetParametricCount,
_CGColorCodeFragmentGetTextureData, _CGColorCodeFragmentGetTextureFormat,
_CGColorCodeFragmentGetTextureGridPoints, _CGColorCodeFragmentRelease,
_CGColorConversionInfoCreate, _CGColorConversionInfoCreateFromList,
_CGColorConversionInfoCreateFromListWithArguments, _CGColorConversionInfoCreateWithColorSyncCodeFragment,
_CGColorConversionInfoCreateWithOptions, _CGColorConversionInfoGetTypeID,
_CGColorConversionInfoIterateColorSpaceFunctionsWithCallbacks,
_CGColorConversionInfoIterateColorSpaceFunctionsWithCallbacksAndOptions,
_CGColorConversionInfoIterateFunctionsWithCallbacks, _CGColorConverterCreate,
_CGColorConverterCreateSimple, _CGColorConverterGetTypeID,
_CGColorConverterIterateColorSpaceFunctionsWithCallbacks,
_CGColorConverterIterateFunctionsWithCallbacks, _CGColorConverterRelease,
_CGColorConverterRetain, _CGColorCreate, _CGColorCreateCopy,
_CGColorCreateCopyByMatchingToColorSpace, _CGColorCreateCopyWithAlpha,
_CGColorCreateGenericCMYK, _CGColorCreateGenericGray, _CGColorCreateGenericGrayGamma2_2,
_CGColorCreateGenericRGB, _CGColorCreateSRGB, _CGColorCreateWithPattern,
_CGColorCurveEqualToGammaCurve, _CGColorCurveGetGamma, _CGColorCurveGetInputRange,
_CGColorCurveGetOutputRange, _CGColorCurveGetParameters, _CGColorCurveGetProperties,
_CGColorCurveGetTRC, _CGColorCurveMapValue, _CGColorCurveOriginalIsPureGamma,
_CGColorCurvePrint, _CGColorCurveRelease, _CGColorCurveRetain,
_CGColorDataConverterRelease, _CGColorEqualToColor, _CGColorFunctionGetInputRange,
_CGColorFunctionGetOptions, _CGColorFunctionGetOutputRange,
_CGColorFunctionGetProperties, _CGColorGetAlpha, _CGColorGetColorSpace,
_CGColorGetComponents, _CGColorGetConstantColor, _CGColorGetIdentifier,
_CGColorGetNumberOfComponents, _CGColorGetPattern, _CGColorGetPatternBaseColor,
_CGColorGetTypeID, _CGColorMatrixConcat, _CGColorMatrixGetMatrix,
_CGColorMatrixGetTypeID, _CGColorMatrixIsIdentity, _CGColorMatrixMake,
_CGColorMatrixMakeIdentity, _CGColorNxMLUTGetLUT, _CGColorNxMLUTGetTypeID,
_CGColorNxMTransformGetTransform, _CGColorNxMTransformGetTypeID,
_CGColorRelease, _CGColorRetain, _CGColorSpaceConcatenate,
_CGColorSpaceCopyColorTable, _CGColorSpaceCopyDefaultColor,
_CGColorSpaceCopyICCData, _CGColorSpaceCopyICCProfile, _CGColorSpaceCopyICCProfileASCIIDescriptionString,
_CGColorSpaceCopyICCProfileDescription, _CGColorSpaceCopyName,
_CGColorSpaceCopyPropertyList, _CGColorSpaceCreateCalibratedGray,
_CGColorSpaceCreateCalibratedRGB, _CGColorSpaceCreateConversionCurve,
_CGColorSpaceCreateCopyWithNativeGamma, _CGColorSpaceCreateCopyWithPQTransferFunctions,
_CGColorSpaceCreateDeviceCMYK, _CGColorSpaceCreateDeviceGray,
_CGColorSpaceCreateDeviceN, _CGColorSpaceCreateDeviceRGB,
_CGColorSpaceCreateDisplayColorSpaceWithID, _CGColorSpaceCreateDisplayGray,
_CGColorSpaceCreateDisplayRGB, _CGColorSpaceCreateDisplayRGBWithID,
_CGColorSpaceCreateExtended, _CGColorSpaceCreateExtendedLinearized,
_CGColorSpaceCreateICCBased, _CGColorSpaceCreateIndexed, _CGColorSpaceCreateLab,
_CGColorSpaceCreateLinearized, _CGColorSpaceCreatePattern,
_CGColorSpaceCreatePlatformProfile, _CGColorSpaceCreateSystemDefaultCMYK,
_CGColorSpaceCreateSystemDefaultGray, _CGColorSpaceCreateSystemDefaultRGB,
_CGColorSpaceCreateWithColorSyncProfile, _CGColorSpaceCreateWithICCData,
_CGColorSpaceCreateWithICCProfile, _CGColorSpaceCreateWithName,
_CGColorSpaceCreateWithPlatformColorSpace, _CGColorSpaceCreateWithPropertyList,
_CGColorSpaceCreateWithURL, _CGColorSpaceDumpPropertyList,
_CGColorSpaceEqualToColorSpace, _CGColorSpaceEqualToColorSpaceIgnoringRange,
_CGColorSpaceGetAlternateColorSpace, _CGColorSpaceGetBaseColorSpace,
_CGColorSpaceGetCalibratedGrayData, _CGColorSpaceGetCalibratedRGBData,
_CGColorSpaceGetColorTable, _CGColorSpaceGetColorTableCount,
_CGColorSpaceGetColorants, _CGColorSpaceGetConversionMatrix,
_CGColorSpaceGetDescriptor, _CGColorSpaceGetIdentifier, _CGColorSpaceGetLabData,
_CGColorSpaceGetMD5Digest, _CGColorSpaceGetModel, _CGColorSpaceGetName,
_CGColorSpaceGetNames, _CGColorSpaceGetNumberOfComponents,
_CGColorSpaceGetProcessColorModel, _CGColorSpaceGetRenderingIntent,
_CGColorSpaceGetTintTransform, _CGColorSpaceGetType, _CGColorSpaceGetTypeID,
_CGColorSpaceICCGetPlatformProfile, _CGColorSpaceICCGetRange,
_CGColorSpaceIgnoresIntent, _CGColorSpaceIsHDR, _CGColorSpaceIsHLGBased,
_CGColorSpaceIsICCCompatible, _CGColorSpaceIsPQBased, _CGColorSpaceIsPSLevel2Compatible,
_CGColorSpaceIsUncalibrated, _CGColorSpaceIsWideGamutRGB,
_CGColorSpaceProfileSetsGetDestinationProfile, _CGColorSpaceRelease,
_CGColorSpaceRetain, _CGColorSpaceStreamPSDefinition, _CGColorSpaceSupportsOutput,
_CGColorSpaceUsesExtendedRange, _CGColorSpaceUsesITUR_2100TF,
_CGColorTRCGetFunction, _CGColorTRCGetGammaID, _CGColorTRCGetTypeID,
_CGColorTRCPureGammaOriginal, _CGColorTransformConvertColor,
_CGColorTransformConvertColorComponents, _CGColorTransformConvertColorFloatComponents,
_CGColorTransformConvertComponentData, _CGColorTransformConvertData,
_CGColorTransformConvertImage, _CGColorTransformConvertNeedsCMS,
_CGColorTransformConvertRequired, _CGColorTransformCreate,
_CGColorTransformCreateCodeFragment, _CGColorTransformCreateLookupTextureCodeFragment,
_CGColorTransformCreateParametricCodeFragment, _CGColorTransformGetColorSpace,
_CGColorTransformGetTypeID, _CGColorTransformRelease, _CGColorTransformRetain,
_CGCompleteDisplayConfiguration, _CGConfigureDisplayFadeEffect,
_CGConfigureDisplayMirrorOfDisplay, _CGConfigureDisplayMode,
_CGConfigureDisplayOrigin, _CGConfigureDisplayStereoOperation,
_CGConfigureDisplayWithDisplayMode, _CGContainerGetRect, _CGContainerGetTypeID,
_CGContextAddArc, _CGContextAddArcToPoint, _CGContextAddCurveToPoint,
_CGContextAddEllipseInRect, _CGContextAddFilter, _CGContextAddLineToPoint,
_CGContextAddLines, _CGContextAddPath, _CGContextAddQuadCurveToPoint,
_CGContextAddRect, _CGContextAddRects, _CGContextBeginPage,
_CGContextBeginPage2, _CGContextBeginPath, _CGContextBeginTransparencyLayer,
_CGContextBeginTransparencyLayerWithRect, _CGContextClear,
_CGContextClearRect, _CGContextClip, _CGContextClipToMask,
_CGContextClipToRect, _CGContextClipToRects, _CGContextClipToTextClipping,
_CGContextClosePath, _CGContextColorIsExtendedRGB, _CGContextConcatCTM,
_CGContextConvertPointToDeviceSpace, _CGContextConvertPointToUserSpace,
_CGContextConvertRectToDeviceSpace, _CGContextConvertRectToUserSpace,
_CGContextConvertSizeToDeviceSpace, _CGContextConvertSizeToUserSpace,
_CGContextCopyDeviceColorSpace, _CGContextCopyDisplayCaptureContentsToRect,
_CGContextCopyPath, _CGContextCopyTopGState, _CGContextCopyWindowCaptureContentsToRect,
_CGContextCopyWindowContentsToRect, _CGContextCreate, _CGContextCreateWithDelegate,
_CGContextCreateWithDelegateAndInfo, _CGContextDelegateBeginLayer,
_CGContextDelegateBeginPage, _CGContextDelegateCreate, _CGContextDelegateCreateFilter,
_CGContextDelegateDrawConicGradient, _CGContextDelegateDrawDisplayList,
_CGContextDelegateDrawGlyphs, _CGContextDelegateDrawImage,
_CGContextDelegateDrawImageFromRect, _CGContextDelegateDrawImages,
_CGContextDelegateDrawLayer, _CGContextDelegateDrawLinearGradient,
_CGContextDelegateDrawLines, _CGContextDelegateDrawPath, _CGContextDelegateDrawPathDirect,
_CGContextDelegateDrawRadialGradient, _CGContextDelegateDrawRects,
_CGContextDelegateDrawShading, _CGContextDelegateDrawWindowContents,
_CGContextDelegateEndLayer, _CGContextDelegateEndPage, _CGContextDelegateFinalize,
_CGContextDelegateGetBitmapContextInfo, _CGContextDelegateGetBounds,
_CGContextDelegateGetCallback, _CGContextDelegateGetColorTransform,
_CGContextDelegateGetDelegate, _CGContextDelegateGetInfo,
_CGContextDelegateGetLayer, _CGContextDelegateGetNext, _CGContextDelegateGetTransform,
_CGContextDelegateGetTypeID, _CGContextDelegateImplementsCallback,
_CGContextDelegateOperation, _CGContextDelegateRelease, _CGContextDelegateRetain,
_CGContextDelegateSetCallback, _CGContextDelegateSetCallbacks,
_CGContextDelegateSetNext, _CGContextDrawConicGradient, _CGContextDrawDisplayList,
_CGContextDrawImage, _CGContextDrawImageFromRect, _CGContextDrawImageWithOptions,
_CGContextDrawImages, _CGContextDrawLayerAtPoint, _CGContextDrawLayerInRect,
_CGContextDrawLinearGradient, _CGContextDrawPDFAnnotation,
_CGContextDrawPDFDocument, _CGContextDrawPDFPage, _CGContextDrawPDFPageInRect,
_CGContextDrawPDFPageInRect2, _CGContextDrawPDFPageWithAnnotations,
_CGContextDrawPDFPageWithContentTypes, _CGContextDrawPDFPageWithDrawingCallbacks,
_CGContextDrawPDFPageWithProgressCallback, _CGContextDrawPath,
_CGContextDrawPathDirect, _CGContextDrawPatternCell, _CGContextDrawRadialGradient,
_CGContextDrawShading, _CGContextDrawTiledImage, _CGContextDrawsWithCorrectShadowOffsets,
_CGContextEOClip, _CGContextEOFillPath, _CGContextEndPage,
_CGContextEndPage2, _CGContextEndTransparencyLayer, _CGContextErase,
_CGContextFillEllipseInRect, _CGContextFillPath, _CGContextFillRect,
_CGContextFillRects, _CGContextFilterCreateDictionaryWithURL,
_CGContextFlush, _CGContextGetAdjustedLineWidth, _CGContextGetAllowedFontRenderingStyle,
_CGContextGetAllowsAntialiasing, _CGContextGetAllowsDithering,
_CGContextGetAllowsFontAntialiasing, _CGContextGetAllowsFontSmoothing,
_CGContextGetAllowsFontSubpixelPositioning, _CGContextGetAllowsFontSubpixelQuantization,
_CGContextGetAlpha, _CGContextGetAlphaIsShape, _CGContextGetBaseCTM,
_CGContextGetBlackGeneration, _CGContextGetBlendMode, _CGContextGetCTM,
_CGContextGetCharacterSpacing, _CGContextGetClipBoundingBox,
_CGContextGetCompositeOperation, _CGContextGetContentMD5,
_CGContextGetDefaultUserSpaceToDeviceSpaceTransform, _CGContextGetDelegate,
_CGContextGetDelegateInfo, _CGContextGetDeviceClipBoundingBox,
_CGContextGetFillColor, _CGContextGetFillColorAsColor, _CGContextGetFillColorSpace,
_CGContextGetFillOverprint, _CGContextGetFillPattern, _CGContextGetFlatness,
_CGContextGetFont, _CGContextGetFontAntialiasingStyle, _CGContextGetFontDilation,
_CGContextGetFontRenderingStyle, _CGContextGetFontSize, _CGContextGetFontSmoothingBackgroundColor,
_CGContextGetFontSmoothingContrast, _CGContextGetFontSmoothingStyle,
_CGContextGetFontSubpixelQuantizationLevel, _CGContextGetGState,
_CGContextGetGStateMark, _CGContextGetIdentifier, _CGContextGetImageRenderingIntent,
_CGContextGetInterpolationQuality, _CGContextGetInterpolationQualityRange,
_CGContextGetLineCap, _CGContextGetLineDashCount, _CGContextGetLineDashPattern,
_CGContextGetLineJoin, _CGContextGetLineWidth, _CGContextGetLineWidthThreshold,
_CGContextGetMiterLimit, _CGContextGetOverprintMode, _CGContextGetPathBoundingBox,
_CGContextGetPathCurrentPoint, _CGContextGetPatternPhase,
_CGContextGetPixelAccess, _CGContextGetProperty, _CGContextGetRenderingIntent,
_CGContextGetRenderingResolution, _CGContextGetRenderingState,
_CGContextGetShouldAntialias, _CGContextGetShouldAntialiasFonts,
_CGContextGetShouldDrawBitmapRuns, _CGContextGetShouldSmoothFonts,
_CGContextGetShouldSubpixelPositionFonts, _CGContextGetShouldSubpixelQuantizeFonts,
_CGContextGetShouldUsePlatformNativeGlyphs, _CGContextGetSmoothness,
_CGContextGetSoftMask, _CGContextGetStrokeAdjust, _CGContextGetStrokeColor,
_CGContextGetStrokeColorAsColor, _CGContextGetStrokeColorSpace,
_CGContextGetStrokeOverprint, _CGContextGetStrokePattern,
_CGContextGetStyle, _CGContextGetTextDrawingMode, _CGContextGetTextGreekingThreshold,
_CGContextGetTextMatrix, _CGContextGetTextPosition, _CGContextGetTransferFunctions,
_CGContextGetType, _CGContextGetTypeID, _CGContextGetUndercolorRemoval,
_CGContextGetUserSpaceToDeviceSpaceTransform, _CGContextGetVectorCapabilities,
_CGContextHandleInvalid, _CGContextIsEmptyClipBoundingBox,
_CGContextIsPathEmpty, _CGContextMoveToPoint, _CGContextPathContainsPoint,
_CGContextRelease, _CGContextRemoveFilter, _CGContextReplacePathWithClipPath,
_CGContextReplacePathWithShapePath, _CGContextReplacePathWithStrokedPath,
_CGContextReplaceTopGState, _CGContextResetCTM, _CGContextResetClip,
_CGContextResetState, _CGContextResetTopGState, _CGContextRestoreGState,
_CGContextRestoreToGStateMark, _CGContextRetain, _CGContextRotateCTM,
_CGContextSaveGState, _CGContextScaleCTM, _CGContextSelectFont,
_CGContextSetAllowsAntialiasing, _CGContextSetAllowsDithering,
_CGContextSetAllowsFontAntialiasing, _CGContextSetAllowsFontSmoothing,
_CGContextSetAllowsFontSubpixelPositioning, _CGContextSetAllowsFontSubpixelQuantization,
_CGContextSetAlpha, _CGContextSetAlphaIsShape, _CGContextSetBaseCTM,
_CGContextSetBlackGeneration, _CGContextSetBlendMode, _CGContextSetCMYKFillColor,
_CGContextSetCMYKStrokeColor, _CGContextSetCTM, _CGContextSetCharacterSpacing,
_CGContextSetCompositeOperation, _CGContextSetDelegate, _CGContextSetFillColor,
_CGContextSetFillColorSpace, _CGContextSetFillColorWithColor,
_CGContextSetFillOverprint, _CGContextSetFillPattern, _CGContextSetFlatness,
_CGContextSetFlush, _CGContextSetFocusRingWithColor, _CGContextSetFont,
_CGContextSetFontAntialiasingStyle, _CGContextSetFontDilation,
_CGContextSetFontRenderingStyle, _CGContextSetFontSize, _CGContextSetFontSmoothingBackgroundColor,
_CGContextSetFontSmoothingContrast, _CGContextSetFontSmoothingStyle,
_CGContextSetFontSubpixelQuantizationLevel, _CGContextSetGrayFillColor,
_CGContextSetGrayStrokeColor, _CGContextSetImageRenderingIntent,
_CGContextSetImageReplacer, _CGContextSetInterpolationQuality,
_CGContextSetInterpolationQualityRange, _CGContextSetLineCap,
_CGContextSetLineDash, _CGContextSetLineJoin, _CGContextSetLineWidth,
_CGContextSetLineWidthThreshold, _CGContextSetMiterLimit,
_CGContextSetOverprintMode, _CGContextSetPatternPhase, _CGContextSetProperty,
_CGContextSetRGBFillColor, _CGContextSetRGBStrokeColor, _CGContextSetRenderingIntent,
_CGContextSetRenderingResolution, _CGContextSetShadow, _CGContextSetShadowWithColor,
_CGContextSetShouldAntialias, _CGContextSetShouldAntialiasFonts,
_CGContextSetShouldDrawBitmapRuns, _CGContextSetShouldSmoothFonts,
_CGContextSetShouldSubpixelPositionFonts, _CGContextSetShouldSubpixelQuantizeFonts,
_CGContextSetShouldUsePlatformNativeGlyphs, _CGContextSetSmoothness,
_CGContextSetSoftMask, _CGContextSetStrokeAdjust, _CGContextSetStrokeColor,
_CGContextSetStrokeColorSpace, _CGContextSetStrokeColorWithColor,
_CGContextSetStrokeOverprint, _CGContextSetStrokePattern,
_CGContextSetStyle, _CGContextSetTextDrawingMode, _CGContextSetTextGreekingThreshold,
_CGContextSetTextMatrix, _CGContextSetTextPosition, _CGContextSetTransferFunctions,
_CGContextSetUndercolorRemoval, _CGContextSetVectorCapabilities,
_CGContextShowGlyphs, _CGContextShowGlyphsAtPoint, _CGContextShowGlyphsAtPositions,
_CGContextShowGlyphsAtPositionsWithString, _CGContextShowGlyphsWithAdvances,
_CGContextShowText, _CGContextShowTextAtPoint, _CGContextStrokeEllipseInRect,
_CGContextStrokeLineSegments, _CGContextStrokePath, _CGContextStrokeRect,
_CGContextStrokeRectWithWidth, _CGContextSynchronize, _CGContextTranslateCTM,
_CGContextValidate, _CGContextWait, _CGConvertColorData, _CGConvertColorDataWithFormat,
_CGCryptorCreateAES, _CGCryptorCreateRC4, _CGCryptorDrain,
_CGCryptorGetCipher, _CGCryptorGetInitializationVector, _CGCryptorProcessBytes,
_CGCryptorRelease, _CGCryptorReset, _CGCursorIsDrawnInFramebuffer,
_CGCursorIsVisible, _CGDashCreate, _CGDashEqualToDash, _CGDashGetPattern,
_CGDashRelease, _CGDashRetain, _CGDataConsumerClose, _CGDataConsumerCreate,
_CGDataConsumerCreateFlateEncoder, _CGDataConsumerCreateWithCFData,
_CGDataConsumerCreateWithFile, _CGDataConsumerCreateWithFilename,
_CGDataConsumerCreateWithURL, _CGDataConsumerFlush, _CGDataConsumerGetByteCount,
_CGDataConsumerGetPosition, _CGDataConsumerGetTypeID, _CGDataConsumerGetURL,
_CGDataConsumerPrintf, _CGDataConsumerPutBytes, _CGDataConsumerRelease,
_CGDataConsumerRetain, _CGDataConsumerSetPosition, _CGDataConsumerVPrintf,
_CGDataProviderContainsLinearizedPDF, _CGDataProviderCopyData,
_CGDataProviderCreateDirect, _CGDataProviderCreateDirectAccess,
_CGDataProviderCreateMultiRangeDirectAccess, _CGDataProviderCreateSequential,
_CGDataProviderCreateWithCFData, _CGDataProviderCreateWithCopyOfData,
_CGDataProviderCreateWithData, _CGDataProviderCreateWithDataNoCopy,
_CGDataProviderCreateWithFilename, _CGDataProviderCreateWithSwappedProvider,
_CGDataProviderCreateWithURL, _CGDataProviderGetBytePtr, _CGDataProviderGetBytes,
_CGDataProviderGetBytesAtPosition, _CGDataProviderGetBytesInRanges,
_CGDataProviderGetInfo, _CGDataProviderGetProperty, _CGDataProviderGetSize,
_CGDataProviderGetSize2, _CGDataProviderGetSizeOfData, _CGDataProviderGetTypeID,
_CGDataProviderHasDataPtr, _CGDataProviderLock, _CGDataProviderRelease,
_CGDataProviderReleaseBytePtr, _CGDataProviderRetain, _CGDataProviderRetainBytePtr,
_CGDataProviderRewind, _CGDataProviderSetProperty, _CGDataProviderSkipForward,
_CGDataProviderUngetBytePtr, _CGDataProviderUnlock, _CGDefaultsCopyString,
_CGDefaultsGetBoolean, _CGDefaultsGetInteger, _CGDigesterAddBytes,
_CGDigesterCreateMD5, _CGDigesterGetDigest, _CGDigesterRelease,
_CGDirectDisplayCopyCurrentMetalDevice, _CGDisplayAddressForPosition,
_CGDisplayAvailableModes, _CGDisplayBaseAddress, _CGDisplayBestModeForParameters,
_CGDisplayBestModeForParametersAndRefreshRate, _CGDisplayBitsPerPixel,
_CGDisplayBitsPerSample, _CGDisplayBounds, _CGDisplayBytesPerRow,
_CGDisplayCanSetPalette, _CGDisplayCapture, _CGDisplayCaptureWithOptions,
_CGDisplayColorSpaceConversionCreateInvertedLinearizationCurve,
_CGDisplayColorSpaceConversionCreateLinearizationCurve, _CGDisplayColorSpaceConversionCreatePostMatrixToneMapping,
_CGDisplayColorSpaceConversionCreatePreMatrixToneMapping,
_CGDisplayColorSpaceConversionGetConversionMatrix, _CGDisplayCopyAllDisplayModes,
_CGDisplayCopyColorSpace, _CGDisplayCopyDisplayMode, _CGDisplayCreateImage,
_CGDisplayCreateImageForRect, _CGDisplayCurrentMode, _CGDisplayDefaultVisualBell,
_CGDisplayDoesNotDim, _CGDisplayFade, _CGDisplayFadeOperationInProgress,
_CGDisplayForceToGray, _CGDisplayGammaTableCapacity, _CGDisplayGetDrawingContext,
_CGDisplayHideCursor, _CGDisplayIDToOpenGLDisplayMask, _CGDisplayIOServicePort,
_CGDisplayIsActive, _CGDisplayIsAlwaysInMirrorSet, _CGDisplayIsAsleep,
_CGDisplayIsBuiltin, _CGDisplayIsCaptured, _CGDisplayIsInHWMirrorSet,
_CGDisplayIsInMirrorSet, _CGDisplayIsMain, _CGDisplayIsOnline,
_CGDisplayIsStereo, _CGDisplayListContainsTransparentContent,
_CGDisplayListContextCreate, _CGDisplayListContextCreateImage,
_CGDisplayListContextDelegateCreatePageBased, _CGDisplayListCreate,
_CGDisplayListCreateWithRect, _CGDisplayListCreateWithURL,
_CGDisplayListDrawInContext, _CGDisplayListDrawInContextDelegate,
_CGDisplayListDumpToFile, _CGDisplayListExecute, _CGDisplayListGetBoundingBox,
_CGDisplayListGetTypeID, _CGDisplayListRelease, _CGDisplayListReset,
_CGDisplayListSerializeToURL, _CGDisplayListSetBoundingBox,
_CGDisplayMirrorsDisplay, _CGDisplayModeCopyPixelEncoding,
_CGDisplayModeCreate, _CGDisplayModeGetHeight, _CGDisplayModeGetIODisplayModeID,
_CGDisplayModeGetIOFlags, _CGDisplayModeGetPixelDensity, _CGDisplayModeGetPixelHeight,
_CGDisplayModeGetPixelWidth, _CGDisplayModeGetPixelsHigh,
_CGDisplayModeGetPixelsWide, _CGDisplayModeGetRefreshRate,
_CGDisplayModeGetResolution, _CGDisplayModeGetTypeID, _CGDisplayModeGetWidth,
_CGDisplayModeIsUsableForDesktopGUI, _CGDisplayModeRelease,
_CGDisplayModeRetain, _CGDisplayModelNumber, _CGDisplayMoveCursorToPoint,
_CGDisplayPixelsHigh, _CGDisplayPixelsWide, _CGDisplayPrimaryDisplay,
_CGDisplayRegisterReconfigurationCallback, _CGDisplayRelease,
_CGDisplayRemoveReconfigurationCallback, _CGDisplayRestoreColorSyncSettings,
_CGDisplayRotation, _CGDisplaySamplesPerPixel, _CGDisplayScreenSize,
_CGDisplaySerialNumber, _CGDisplaySetDisplayMode, _CGDisplaySetInvertedPolarity,
_CGDisplaySetPalette, _CGDisplaySetStereoOperation, _CGDisplayShowCursor,
_CGDisplayStreamCreate, _CGDisplayStreamCreateWithDispatchQueue,
_CGDisplayStreamGetRunLoopSource, _CGDisplayStreamGetTypeID,
_CGDisplayStreamStart, _CGDisplayStreamStop, _CGDisplayStreamUpdateCreateMergedUpdate,
_CGDisplayStreamUpdateGetDropCount, _CGDisplayStreamUpdateGetMovedRectsDelta,
_CGDisplayStreamUpdateGetRects, _CGDisplayStreamUpdateGetTypeID,
_CGDisplaySwitchToMode, _CGDisplayUnitNumber, _CGDisplayUsesForceToGray,
_CGDisplayUsesInvertedPolarity, _CGDisplayUsesOpenGLAcceleration,
_CGDisplayVendorNumber, _CGDisplayVisualBell, _CGEnableEventStateCombining,
_CGErrorSetCallback, _CGEventCopyIOHIDEvent, _CGEventCopyNextEvent,
_CGEventCreate, _CGEventCreateCopy, _CGEventCreateData, _CGEventCreateFromData,
_CGEventCreateKeyboardEvent, _CGEventCreateMouseEvent, _CGEventCreateNextEvent,
_CGEventCreateScrollWheelEvent, _CGEventCreateScrollWheelEvent2,
_CGEventCreateSourceFromEvent, _CGEventGetDoubleValueField,
_CGEventGetFlags, _CGEventGetIntegerValueField, _CGEventGetLocation,
_CGEventGetTimestamp, _CGEventGetType, _CGEventGetTypeID,
_CGEventGetUnflippedLocation, _CGEventGetUnflippedWindowLocation,
_CGEventGetWindowLocation, _CGEventKeyboardGetUnicodeString,
_CGEventKeyboardSetUnicodeString, _CGEventPost, _CGEventPostEventToPSN,
_CGEventPostToPSN, _CGEventPostToPid, _CGEventSetDoubleValueField,
_CGEventSetFlags, _CGEventSetIntegerValueField, _CGEventSetLocation,
_CGEventSetSource, _CGEventSetTimestamp, _CGEventSetType,
_CGEventSetWindowLocation, _CGEventSourceButtonState, _CGEventSourceCounterForEventType,
_CGEventSourceCreate, _CGEventSourceFlagsState, _CGEventSourceGetKeyboardType,
_CGEventSourceGetLocalEventsFilterDuringSuppressionState,
_CGEventSourceGetLocalEventsSuppressionInterval, _CGEventSourceGetPixelsPerLine,
_CGEventSourceGetSourceStateID, _CGEventSourceGetTypeID, _CGEventSourceGetUserData,
_CGEventSourceKeyState, _CGEventSourceSecondsSinceLastEventType,
_CGEventSourceSetKeyboardType, _CGEventSourceSetLocalEventsFilterDuringSuppressionState,
_CGEventSourceSetLocalEventsSuppressionInterval, _CGEventSourceSetPixelsPerLine,
_CGEventSourceSetUserData, _CGEventTapCreate, _CGEventTapCreateForPSN,
_CGEventTapCreateForPid, _CGEventTapEnable, _CGEventTapIDEnable,
_CGEventTapIDIsEnabled, _CGEventTapIsEnabled, _CGEventTapPostEvent,
_CGFloatIsValid, _CGFontApplyFunction, _CGFontCacheCreate,
_CGFontCacheGetLocalCache, _CGFontCacheGetMaxSize, _CGFontCachePrint,
_CGFontCacheRelease, _CGFontCacheRemoveFont, _CGFontCacheReset,
_CGFontCacheRetain, _CGFontCacheSetMaxSize, _CGFontCacheSetShouldAutoExpire,
_CGFontCanCreatePostScriptSubset, _CGFontCopyCharacterSet,
_CGFontCopyFamilyName, _CGFontCopyFullName, _CGFontCopyGlyphNameForGlyph,
_CGFontCopyLocalizedName, _CGFontCopyName, _CGFontCopyPath,
_CGFontCopyPostScriptName, _CGFontCopyTableForTag, _CGFontCopyTableTags,
_CGFontCopyURL, _CGFontCopyVariationAxes, _CGFontCopyVariations,
_CGFontCreate, _CGFontCreateCopy, _CGFontCreateCopyWithVariations,
_CGFontCreateFontSubset, _CGFontCreateFontsFromData, _CGFontCreateFontsWithPath,
_CGFontCreateFontsWithURL, _CGFontCreateGlyphPath, _CGFontCreateMatchingFont,
_CGFontCreatePostScriptEncoding, _CGFontCreatePostScriptSubset,
_CGFontCreateWithDataProvider, _CGFontCreateWithFontName,
_CGFontCreateWithName, _CGFontCreateWithPathAndName, _CGFontCreateWithPlatformFont,
_CGFontCreateWithPlatformFontAndVariation, _CGFontCreateWithVariations,
_CGFontDBAddFont, _CGFontDBAddFontReferencesAtPath, _CGFontDBAddFontsAtPath,
_CGFontDBAddFontsFromPlist, _CGFontDBAddFontsInDirectory,
_CGFontDBApplyFunction, _CGFontDBCopyFontWithName, _CGFontDBCreate,
_CGFontDBCreatePlist, _CGFontDBGetFontWithName, _CGFontDBGetLocal,
_CGFontDBPurgeAllFonts, _CGFontDBPurgeFont, _CGFontDBRelease,
_CGFontDBRemoveFont, _CGFontDBSetInitializer, _CGFontDefaultAllowsFontSmoothing,
_CGFontDefaultGetAntialiasingStyle, _CGFontDefaultGetSmoothingContrast,
_CGFontDefaultGetSmoothingStyle, _CGFontFinderApplyFunction,
_CGFontFinderCopyAllURLs, _CGFontFinderCopyURLForName, _CGFontFinderCopyURLForPlatformFont,
_CGFontFinderCreate, _CGFontFinderCreateFontWithName, _CGFontFinderCreateFontWithPlatformFont,
_CGFontFinderGetDefault, _CGFontFinderRelease, _CGFontFinderRetain,
_CGFontFinderSetDefault, _CGFontGetAscent, _CGFontGetCIDsForGlyphs,
_CGFontGetCapHeight, _CGFontGetContainingBoundingBoxForGlyphs,
_CGFontGetDescent, _CGFontGetDescriptor, _CGFontGetFontBBox,
_CGFontGetFontSubsetFormat, _CGFontGetGlyphAdvances, _CGFontGetGlyphAdvancesForStyle,
_CGFontGetGlyphBBoxes, _CGFontGetGlyphBBoxesForStyle, _CGFontGetGlyphForGlyphName,
_CGFontGetGlyphIdentifiers, _CGFontGetGlyphNameForGlyph, _CGFontGetGlyphNameMaxLength,
_CGFontGetGlyphVerticalAdvances, _CGFontGetGlyphVerticalOffsets,
_CGFontGetGlyphWithGlyphName, _CGFontGetGlyphsForCIDs, _CGFontGetGlyphsForGlyphNames,
_CGFontGetGlyphsForUnichars, _CGFontGetHMetrics, _CGFontGetIdentifier,
_CGFontGetIntProperty, _CGFontGetItalicAngle, _CGFontGetLeading,
_CGFontGetMaxUnichars, _CGFontGetNumberOfGlyphs, _CGFontGetParserFont,
_CGFontGetPostScriptName, _CGFontGetProperty, _CGFontGetQuantizationLevelWithStyle,
_CGFontGetRegistryOrderingSupplement, _CGFontGetStemV, _CGFontGetTypeID,
_CGFontGetUnderlinePosition, _CGFontGetUnderlineThickness,
_CGFontGetUnicharsForGlyph, _CGFontGetUnitsPerEm, _CGFontGetVMetrics,
_CGFontGetVariationAxes, _CGFontGetVariations, _CGFontGetXHeight,
_CGFontIndexMapAddIndex, _CGFontIndexMapAddIndexes, _CGFontIndexMapAddRange,
_CGFontIndexMapCreate, _CGFontIndexMapCreateIdentity, _CGFontIndexMapGetValue,
_CGFontIndexMapGetValues, _CGFontIndexMapPrint, _CGFontIndexMapRelease,
_CGFontIndexSetAddIndex, _CGFontIndexSetAddIndexRange, _CGFontIndexSetAddIndexes,
_CGFontIndexSetContainsIndex, _CGFontIndexSetCreate, _CGFontIndexSetCreateCopy,
_CGFontIndexSetGetCount, _CGFontIndexSetGetIndexRange, _CGFontIndexSetGetIndexVector,
_CGFontIndexSetGetIndexVectorSize, _CGFontIndexSetGetIndexes,
_CGFontIndexSetGetName, _CGFontIndexSetRelease, _CGFontIndexSetRetain,
_CGFontIsBitmapOnly, _CGFontIsFixedPitch, _CGFontIsItalic,
_CGFontNameTableCopyLocales, _CGFontNameTableCopyNameForLocale,
_CGFontNameTableCopyNameForLocaleIdentifier, _CGFontNameTableCopyRootName,
_CGFontNameTableCreate, _CGFontNameTableGetPostScriptName,
_CGFontNameTablePrint, _CGFontNameTableRelease, _CGFontQuantumEqualToQuantum,
_CGFontQuantumZero, _CGFontRelease, _CGFontRenderingGetCustomAntialiasingStyle,
_CGFontRenderingGetFontSmoothingDisabled, _CGFontRetain, _CGFontSetShouldUseMulticache,
_CGFontURLCreate, _CGFunctionCopyPDFDescription, _CGFunctionCreate,
_CGFunctionEvaluate, _CGFunctionEvaluateFloat, _CGFunctionGetAssociate,
_CGFunctionGetDomain, _CGFunctionGetDomainDimension, _CGFunctionGetIdentifier,
_CGFunctionGetRange, _CGFunctionGetRangeDimension, _CGFunctionGetTypeID,
_CGFunctionIsIdentity, _CGFunctionRelease, _CGFunctionRetain,
_CGFunctionSetAssociate, _CGFunctionSetProperty, _CGGStateClipToRect,
_CGGStateCreate, _CGGStateCreateCopy, _CGGStateGetAdjustedLineWidth,
_CGGStateGetAlpha, _CGGStateGetAlphaIsShape, _CGGStateGetBlackGeneration,
_CGGStateGetCTM, _CGGStateGetCharacterSpacing, _CGGStateGetClipBoundingBox,
_CGGStateGetClipRect, _CGGStateGetClipStack, _CGGStateGetCompositeOperation,
_CGGStateGetFillColor, _CGGStateGetFillOverprint, _CGGStateGetFlatness,
_CGGStateGetFont, _CGGStateGetFontAntialiasingStyle, _CGGStateGetFontDilation,
_CGGStateGetFontRenderingStyle, _CGGStateGetFontSize, _CGGStateGetFontSmoothingBackgroundColor,
_CGGStateGetFontSmoothingContrast, _CGGStateGetFontSmoothingStyle,
_CGGStateGetFontSubpixelQuantizationLevel, _CGGStateGetFontSubpixelQuantizationStyle,
_CGGStateGetImageRenderingIntent, _CGGStateGetInfoDictionary,
_CGGStateGetInterpolationQuality, _CGGStateGetLineCap, _CGGStateGetLineDash,
_CGGStateGetLineJoin, _CGGStateGetLineWidth, _CGGStateGetLineWidthThreshold,
_CGGStateGetMiterLimit, _CGGStateGetOverprintMode, _CGGStateGetPatternPhase,
_CGGStateGetRenderingIntent, _CGGStateGetShouldAntialias,
_CGGStateGetShouldAntialiasFonts, _CGGStateGetShouldDrawBitmapRuns,
_CGGStateGetShouldSmoothFonts, _CGGStateGetShouldSubpixelPositionFonts,
_CGGStateGetShouldSubpixelQuantizeFonts, _CGGStateGetSmoothness,
_CGGStateGetSoftMask, _CGGStateGetStrokeAdjust, _CGGStateGetStrokeColor,
_CGGStateGetStrokeOverprint, _CGGStateGetStyle, _CGGStateGetTextDrawingMode,
_CGGStateGetTextGreekingThreshold, _CGGStateGetTextKnockout,
_CGGStateGetTransferFunctions, _CGGStateGetUndercolorRemoval,
_CGGStateRelease, _CGGStateResetClip, _CGGStateRetain, _CGGStateSetAlpha,
_CGGStateSetCTM, _CGGStateSetCompositeOperation, _CGGStateSetFillColor,
_CGGStateSetInfoDictionary, _CGGStateSetPatternPhase, _CGGStateSetRenderingIntent,
_CGGStateSetSoftMask, _CGGStateSetStrokeColor, _CGGStateSetStyle,
_CGGetActiveDisplayList, _CGGetDisplayTransferByFormula, _CGGetDisplayTransferByTable,
_CGGetDisplaysWithOpenGLDisplayMask, _CGGetDisplaysWithPoint,
_CGGetDisplaysWithRect, _CGGetEventTapList, _CGGetHardwareVectorCapabilities,
_CGGetLastMouseDelta, _CGGetMD5DigestOfBytes, _CGGetOnlineDisplayList,
_CGGlyphBitmapCreate, _CGGlyphBitmapCreateWithPath, _CGGlyphBitmapCreateWithPathAndDilation,
_CGGlyphBitmapRelease, _CGGlyphBitmapRetain, _CGGlyphBuilderCreate,
_CGGlyphBuilderGetQuantizationLevel, _CGGlyphBuilderLockBitmaps,
_CGGlyphBuilderRelease, _CGGlyphBuilderUnlockBitmaps, _CGGlyphLockAccess,
_CGGlyphLockAccessCustomized, _CGGlyphLockCreate, _CGGlyphLockGetQuantizationLevel,
_CGGlyphLockLockGlyphBitmaps, _CGGlyphLockRelease, _CGGlyphLockUnlock,
_CGGradientApply, _CGGradientApplyWithBlock, _CGGradientCreateWithColorComponents,
_CGGradientCreateWithColors, _CGGradientGetColorSpace, _CGGradientGetFunction,
_CGGradientGetIdentifier, _CGGradientGetLocationCount, _CGGradientGetTypeID,
_CGGradientPrint, _CGGradientRelease, _CGGradientRetain, _CGIOSurfaceContextCreate,
_CGIOSurfaceContextCreateImage, _CGIOSurfaceContextCreateImageReference,
_CGIOSurfaceContextGetBitmapInfo, _CGIOSurfaceContextGetBitsPerComponent,
_CGIOSurfaceContextGetBitsPerPixel, _CGIOSurfaceContextGetColorSpace,
_CGIOSurfaceContextGetDisplayMask, _CGIOSurfaceContextGetGPURegistryID,
_CGIOSurfaceContextGetHeight, _CGIOSurfaceContextGetSizeLimits,
_CGIOSurfaceContextGetSurface, _CGIOSurfaceContextGetWidth,
_CGIOSurfaceContextSetDisplayMask, _CGIOSurfaceContextSetGPURegistryID,
_CGImageBlockCreate, _CGImageBlockGetBytesPerRow, _CGImageBlockGetData,
_CGImageBlockGetRect, _CGImageBlockRelease, _CGImageBlockSetCreate,
_CGImageBlockSetCreateWithType, _CGImageBlockSetGetColorSpace,
_CGImageBlockSetGetComponentType, _CGImageBlockSetGetCount,
_CGImageBlockSetGetImageBlock, _CGImageBlockSetGetPixelSize,
_CGImageBlockSetGetProperty, _CGImageBlockSetGetRect, _CGImageBlockSetGetSize,
_CGImageBlockSetRelease, _CGImageBlockSetRetain, _CGImageBlockSetSetProperty,
_CGImageCopyProperty, _CGImageCreate, _CGImageCreateCopy,
_CGImageCreateCopyWithClipPath, _CGImageCreateCopyWithColorSpace,
_CGImageCreateCopyWithOptions, _CGImageCreateCopyWithRenderingIntent,
_CGImageCreateWithCGPDFStream, _CGImageCreateWithCoreImage,
_CGImageCreateWithEPSDataProvider, _CGImageCreateWithImageInRect,
_CGImageCreateWithImageProvider, _CGImageCreateWithJPEGDataProvider,
_CGImageCreateWithJPEGDataProvider2, _CGImageCreateWithMask,
_CGImageCreateWithMaskAndMatte, _CGImageCreateWithMaskingColor,
_CGImageCreateWithMaskingColors, _CGImageCreateWithPNGDataProvider,
_CGImageDumpToFile, _CGImageEPSRepCreate, _CGImageEPSRepGetAlternateImage,
_CGImageEPSRepGetBBox, _CGImageEPSRepGetSource, _CGImageEPSRepRelease,
_CGImageEPSRepRetain, _CGImageGetAlphaInfo, _CGImageGetBitmapInfo,
_CGImageGetBitsPerComponent, _CGImageGetBitsPerPixel, _CGImageGetByteOrderInfo,
_CGImageGetBytesPerRow, _CGImageGetCachingFlags, _CGImageGetClipPath,
_CGImageGetColorSpace, _CGImageGetData, _CGImageGetDataProvider,
_CGImageGetDecode, _CGImageGetEPSRep, _CGImageGetHeight, _CGImageGetIdentifier,
_CGImageGetImageProvider, _CGImageGetMask, _CGImageGetMaskingColors,
_CGImageGetMatte, _CGImageGetPixelFormatInfo, _CGImageGetProperty,
_CGImageGetRenderingIntent, _CGImageGetShouldInterpolate,
_CGImageGetTypeID, _CGImageGetUTType, _CGImageGetWidth, _CGImageHasAlpha,
_CGImageIOSurfaceSetCreate, _CGImageIOSurfaceSetGetColorSpace,
_CGImageIOSurfaceSetGetComponentType, _CGImageIOSurfaceSetGetCount,
_CGImageIOSurfaceSetGetPixelSize, _CGImageIOSurfaceSetGetProperty,
_CGImageIOSurfaceSetGetRect, _CGImageIOSurfaceSetGetSize,
_CGImageIOSurfaceSetGetTypeID, _CGImageIOSurfaceSetRelease,
_CGImageIOSurfaceSetRetain, _CGImageIOSurfaceSetSetProperty,
_CGImageIsMask, _CGImageIsOptimizedForSharing, _CGImageIsSubimage,
_CGImageMaskCreate, _CGImageNotificationCenter, _CGImageProviderCopyIOSurface,
_CGImageProviderCopyIOSurfaceSet, _CGImageProviderCopyImageBlockSet,
_CGImageProviderCopyImageBlockSetWithOptions, _CGImageProviderCopyImageTextureData,
_CGImageProviderCreate, _CGImageProviderGetAlphaInfo, _CGImageProviderGetCallbackVersion,
_CGImageProviderGetColorSpace, _CGImageProviderGetComponentType,
_CGImageProviderGetInfo, _CGImageProviderGetPixelSize, _CGImageProviderGetProperty,
_CGImageProviderGetSize, _CGImageProviderGetTypeID, _CGImageProviderRelease,
_CGImageProviderRetain, _CGImageProviderSetProperty, _CGImageRelease,
_CGImageRetain, _CGImageSetCachingFlags, _CGImageSetProperty,
_CGImageSetSharedIdentifier, _CGImageSurfaceSetGetIOSurface,
_CGImageTextureDataCopyProperties, _CGImageTextureDataCreate,
_CGImageTextureDataGetColorSpace, _CGImageTextureDataGetDataWithBlock,
_CGImageTextureDataGetNumberOfFaces, _CGImageTextureDataGetNumberOfMipmaps,
_CGImageTextureDataGetOffsetWithBlock, _CGImageTextureDataGetPixelFormat,
_CGImageTextureDataGetProperty, _CGImageTextureDataGetSize,
_CGImageTextureDataGetTypeID, _CGImageTextureDataIsCompressed,
_CGImageTextureDataRelease, _CGImageTextureDataRetain, _CGImageTextureDataSetProperty,
_CGImageTextureDataSupportsTiledLayout, _CGImageWriteToFile,
_CGInhibitLocalEvents, _CGKSeparationContextCreateWithDictionary,
_CGKSeparationContextRelease, _CGLayerCreateWithContext, _CGLayerGetContext,
_CGLayerGetSize, _CGLayerGetTypeID, _CGLayerRelease, _CGLayerRetain,
_CGLibraryLoadFunction, _CGMainDisplayID, _CGMetalContextCreate,
_CGMetalContextCreateImage, _CGMetalContextCreateImageReference,
_CGMetalContextGetBitmapInfo, _CGMetalContextGetBitsPerComponent,
_CGMetalContextGetBitsPerPixel, _CGMetalContextGetColorSpace,
_CGMetalContextGetDisplayMask, _CGMetalContextGetGPURegistryID,
_CGMetalContextGetHeight, _CGMetalContextGetTexture, _CGMetalContextGetWidth,
_CGMetalContextSetDisplayMask, _CGMetalContextSetGPURegistryID,
_CGNotificationCenterAddCallback, _CGNotificationCenterRemoveCallback,
_CGOpenGLDisplayMaskToDisplayID, _CGPDFAdvancesCreate, _CGPDFAdvancesGetHorizontalAdvance,
_CGPDFAdvancesGetVerticalAdvance, _CGPDFAdvancesPrint, _CGPDFAdvancesRelease,
_CGPDFAdvancesValidate, _CGPDFAnnotationCreate, _CGPDFAnnotationCreateWithCGPDFDictionary,
_CGPDFAnnotationGetBurnIn, _CGPDFAnnotationGetCGPDFDictionary,
_CGPDFAnnotationGetDictionary, _CGPDFAnnotationGetRect, _CGPDFAnnotationGetType,
_CGPDFAnnotationIsPristine, _CGPDFAnnotationIsVersioned, _CGPDFAnnotationSetAnnotationForKey,
_CGPDFAnnotationSetBurnIn, _CGPDFAnnotationSetIsGhost, _CGPDFAnnotationTypeID,
_CGPDFAppenderArrayAppendCGPDFReference, _CGPDFAppenderCGPDFObjectMatchesCFType,
_CGPDFAppenderCreateCFArray, _CGPDFAppenderCreateCFDictionary,
_CGPDFAppenderCreateCFObject, _CGPDFAppenderCreateCGPDFStreamObject,
_CGPDFAppenderDictionaryCreateHash, _CGPDFAppenderDictionaryGetValue,
_CGPDFAppenderDictionarySetCGPDFName, _CGPDFAppenderDictionarySetCGPDFReference,
_CGPDFAppenderDictionarySetInt32, _CGPDFAppenderDictionarySetReferenceToReference,
_CGPDFAppenderDictionarySetValue, _CGPDFArrayApplyBlock, _CGPDFArrayGetArray,
_CGPDFArrayGetBoolean, _CGPDFArrayGetCount, _CGPDFArrayGetDictionary,
_CGPDFArrayGetInteger, _CGPDFArrayGetIntegers, _CGPDFArrayGetName,
_CGPDFArrayGetNull, _CGPDFArrayGetNumber, _CGPDFArrayGetNumbers,
_CGPDFArrayGetObject, _CGPDFArrayGetOffset, _CGPDFArrayGetStream,
_CGPDFArrayGetString, _CGPDFArrayPrint, _CGPDFArrayPrintWithIndent,
_CGPDFArrayRelease, _CGPDFArrayRetain, _CGPDFBase14GetBase14Name,
_CGPDFBase14GetInfo, _CGPDFCMapCreate, _CGPDFCMapCreateWithName,
_CGPDFCMapGetCIDsForText, _CGPDFCMapGetMaxUnicodes, _CGPDFCMapGetName,
_CGPDFCMapGetROS, _CGPDFCMapGetUnicodeCMap, _CGPDFCMapGetUnicodesForIndex,
_CGPDFCMapGetZapfTable, _CGPDFCMapIsHorizontal, _CGPDFCMapRelease,
_CGPDFContentStreamCreateWithPage, _CGPDFContentStreamCreateWithStream,
_CGPDFContentStreamGetResource, _CGPDFContentStreamGetStreams,
_CGPDFContentStreamRelease, _CGPDFContentStreamRetain, _CGPDFContextAddAnnotation,
_CGPDFContextAddCatalogEntry, _CGPDFContextAddDestinationAtPoint,
_CGPDFContextAddDocumentMetadata, _CGPDFContextAddPDFXInfo,
_CGPDFContextBeginDrawingHiddenText, _CGPDFContextBeginPage,
_CGPDFContextBeginTag, _CGPDFContextClose, _CGPDFContextCreate,
_CGPDFContextCreateWithFilename, _CGPDFContextCreateWithURL,
_CGPDFContextEndDrawingHiddenText, _CGPDFContextEndPage, _CGPDFContextEndTag,
_CGPDFContextIsValidPassword, _CGPDFContextSetDestinationForRect,
_CGPDFContextSetImageTag, _CGPDFContextSetOutline, _CGPDFContextSetOutputIntent,
_CGPDFContextSetRedactionPath, _CGPDFContextSetShouldDeflate,
_CGPDFContextSetURLForRect, _CGPDFDictionaryApplyBlock, _CGPDFDictionaryApplyFunction,
_CGPDFDictionaryApplyFunctionRaw, _CGPDFDictionaryGetArray,
_CGPDFDictionaryGetBoolean, _CGPDFDictionaryGetBooleans, _CGPDFDictionaryGetCount,
_CGPDFDictionaryGetDictionary, _CGPDFDictionaryGetInteger,
_CGPDFDictionaryGetIntegers, _CGPDFDictionaryGetMatrix, _CGPDFDictionaryGetName,
_CGPDFDictionaryGetNumber, _CGPDFDictionaryGetNumbers, _CGPDFDictionaryGetObject,
_CGPDFDictionaryGetObjectReference, _CGPDFDictionaryGetOffset,
_CGPDFDictionaryGetRect, _CGPDFDictionaryGetStream, _CGPDFDictionaryGetString,
_CGPDFDictionaryGetUnresolvedObject, _CGPDFDictionaryPrint,
_CGPDFDictionaryPrintWithIndent, _CGPDFDictionaryRelease,
_CGPDFDictionaryRetain, _CGPDFDocumentAllowsCopying, _CGPDFDocumentAllowsPrinting,
_CGPDFDocumentAppendChanges, _CGPDFDocumentAppendDocumentInfo,
_CGPDFDocumentAppendMetadata, _CGPDFDocumentAppendPage, _CGPDFDocumentAuthenticateOwnerPassword,
_CGPDFDocumentAuthenticateUserPassword, _CGPDFDocumentCopyEncryptionKey,
_CGPDFDocumentCopyHashedOwnerPassword, _CGPDFDocumentCopyHashedUserPassword,
_CGPDFDocumentCopyIncrementalUpdatePositions, _CGPDFDocumentCopyInfoDictionary,
_CGPDFDocumentCopyOutputIntents, _CGPDFDocumentCopyOwnerAndUserPasswordHash,
_CGPDFDocumentCopyPage, _CGPDFDocumentCopyToConsumerWithChanges,
_CGPDFDocumentCreateLinearizedRangesForPage, _CGPDFDocumentCreateWithProvider,
_CGPDFDocumentCreateWithURL, _CGPDFDocumentEnableMRUMode,
_CGPDFDocumentEnableTaggedStructureSerialization, _CGPDFDocumentExchangePagesAtIndices,
_CGPDFDocumentGetAccessPermissions, _CGPDFDocumentGetArtBox,
_CGPDFDocumentGetBleedBox, _CGPDFDocumentGetCatalog, _CGPDFDocumentGetCropBox,
_CGPDFDocumentGetDataProvider, _CGPDFDocumentGetDestination,
_CGPDFDocumentGetEncryptionVersion, _CGPDFDocumentGetID, _CGPDFDocumentGetInfo,
_CGPDFDocumentGetLinearizedDictionary, _CGPDFDocumentGetLinearizedNamedDestinationRange,
_CGPDFDocumentGetLinearizedOutlineRange, _CGPDFDocumentGetMediaBox,
_CGPDFDocumentGetNumberOfObjects, _CGPDFDocumentGetNumberOfPages,
_CGPDFDocumentGetObject, _CGPDFDocumentGetOutline, _CGPDFDocumentGetPage,
_CGPDFDocumentGetPageBoxes, _CGPDFDocumentGetPageDictionary,
_CGPDFDocumentGetPageForPageDictionary, _CGPDFDocumentGetPageNoCreate,
_CGPDFDocumentGetPageNumberForPageDictionary, _CGPDFDocumentGetPageNumberForPageReference,
_CGPDFDocumentGetPermissions, _CGPDFDocumentGetProperty, _CGPDFDocumentGetRawPermissions,
_CGPDFDocumentGetRotationAngle, _CGPDFDocumentGetTrimBox,
_CGPDFDocumentGetTypeID, _CGPDFDocumentGetURL, _CGPDFDocumentGetVersion,
_CGPDFDocumentGetXRef, _CGPDFDocumentInsertPageAtIndex, _CGPDFDocumentIsEncrypted,
_CGPDFDocumentIsLinearized, _CGPDFDocumentIsTaggedPDF, _CGPDFDocumentIsUnlocked,
_CGPDFDocumentIsUnlockedAsOwner, _CGPDFDocumentPreloadLinearizedPageData,
_CGPDFDocumentPrintObject, _CGPDFDocumentRelease, _CGPDFDocumentRemovePageAtIndex,
_CGPDFDocumentRemoveProperty, _CGPDFDocumentRetain, _CGPDFDocumentSetDeviceCMYKColorSpace,
_CGPDFDocumentSetDeviceGrayColorSpace, _CGPDFDocumentSetDeviceRGBColorSpace,
_CGPDFDocumentSetProperty, _CGPDFDocumentUnlockAsOwnerWithPassword,
_CGPDFDocumentUnlockWithPassword, _CGPDFDrawingContextCreateWithStream,
_CGPDFDrawingContextDraw, _CGPDFDrawingContextRelease, _CGPDFEncodingCreate,
_CGPDFEncodingGetGlyphVector, _CGPDFEncodingGetGlyphVectorWithFont,
_CGPDFEncodingGetNameForIndex, _CGPDFEncodingGetUnicodeMaxLength,
_CGPDFEncodingGetUnicodesForIndex, _CGPDFEncodingRelease,
_CGPDFFontCreate, _CGPDFFontCreateToUnicodeCMap, _CGPDFFontCreateWithObject,
_CGPDFFontDescriptorGetDictionary, _CGPDFFontDescriptorGetFlags,
_CGPDFFontDescriptorRelease, _CGPDFFontDescriptorRetain, _CGPDFFontGetAdvances,
_CGPDFFontGetCIDSystemInfo, _CGPDFFontGetCIDToGlyphMap, _CGPDFFontGetCMap,
_CGPDFFontGetDescendant, _CGPDFFontGetDictionary, _CGPDFFontGetEncoding,
_CGPDFFontGetFont, _CGPDFFontGetFontBBox, _CGPDFFontGetFontDescriptor,
_CGPDFFontGetFontMatrix, _CGPDFFontGetMutator, _CGPDFFontGetName,
_CGPDFFontGetProcedures, _CGPDFFontGetROSUnicodeCMap, _CGPDFFontGetToUnicodeCMap,
_CGPDFFontGetType, _CGPDFFontIsBase14, _CGPDFFontIsEmbedded,
_CGPDFFontRelease, _CGPDFFontRetain, _CGPDFFormCreate, _CGPDFFormGetBBox,
_CGPDFFormGetMatrix, _CGPDFFormGetResources, _CGPDFFormGetStream,
_CGPDFFormRelease, _CGPDFFormRetain, _CGPDFFunctionCreateFunction,
_CGPDFGetBaseEncodingForName, _CGPDFGetNameForBaseEncoding,
_CGPDFGetNameVectorForBaseEncoding, _CGPDFGetUnicharGuessForCID,
_CGPDFGetUnicharGuessForGlyphName, _CGPDFGetUnicharVectorForBaseEncoding,
_CGPDFGetUnicharsForGlyphName, _CGPDFHexDataCreate, _CGPDFHexDataGetData,
_CGPDFHexDataTypeID, _CGPDFLayoutCreate, _CGPDFNameCreate,
_CGPDFNameGetString, _CGPDFNameTreeGetValue, _CGPDFNameTypeID,
_CGPDFObjectGetType, _CGPDFObjectGetValue, _CGPDFObjectPrint,
_CGPDFOperatorTableCreate, _CGPDFOperatorTableRelease, _CGPDFOperatorTableRetain,
_CGPDFOperatorTableSetCallback, _CGPDFPageAddAnnotation, _CGPDFPageContainsWideGamutContent,
_CGPDFPageCopyPageLabel, _CGPDFPageCopyTextString, _CGPDFPageCopyTextStringWithGlyphs,
_CGPDFPageCopyThumbnail, _CGPDFPageCreate, _CGPDFPageCreateThumbnail,
_CGPDFPageCreateWithImage, _CGPDFPageEnumerateAnnotations,
_CGPDFPageGetAnnotationAtIndex, _CGPDFPageGetAnnotationCount,
_CGPDFPageGetBackgroundColorHint, _CGPDFPageGetBoxRect, _CGPDFPageGetColorSpace,
_CGPDFPageGetContents, _CGPDFPageGetDictionary, _CGPDFPageGetDocument,
_CGPDFPageGetDrawingTransform, _CGPDFPageGetDrawingTransformForRect,
_CGPDFPageGetImages, _CGPDFPageGetPageNumber, _CGPDFPageGetProperty,
_CGPDFPageGetReferenceForAnnotation, _CGPDFPageGetRotationAngle,
_CGPDFPageGetThumbnail, _CGPDFPageGetTypeID, _CGPDFPagePrint,
_CGPDFPageRelease, _CGPDFPageRemoveAnnotation, _CGPDFPageRemoveProperty,
_CGPDFPageRetain, _CGPDFPageSetBoxRect, _CGPDFPageSetProperty,
_CGPDFPageSetRotationAngle, _CGPDFPageSortAnnotations, _CGPDFPageSubstituteAnnotation,
_CGPDFPageSubstituteAnnotationDictionary, _CGPDFReferenceCreate,
_CGPDFReferenceGetRef, _CGPDFReferenceTypeID, _CGPDFScannerCreate,
_CGPDFScannerGetContentStream, _CGPDFScannerPopArray, _CGPDFScannerPopBoolean,
_CGPDFScannerPopDictionary, _CGPDFScannerPopInteger, _CGPDFScannerPopName,
_CGPDFScannerPopNumber, _CGPDFScannerPopObject, _CGPDFScannerPopStream,
_CGPDFScannerPopString, _CGPDFScannerRelease, _CGPDFScannerRetain,
_CGPDFScannerScan, _CGPDFSourceCreateForJBIG2, _CGPDFSourceGetLength,
_CGPDFSourceGetPosition, _CGPDFSourceGetc, _CGPDFSourceIsAtEOF,
_CGPDFSourceRead, _CGPDFSourceRelease, _CGPDFSourceRetain,
_CGPDFSourceRewind, _CGPDFSourceSetPosition, _CGPDFSourceUngetc,
_CGPDFStreamCopyData, _CGPDFStreamCreateDataProvider, _CGPDFStreamCreateWithData,
_CGPDFStreamGetData, _CGPDFStreamGetDictionary, _CGPDFStreamObjectCreate,
_CGPDFStreamObjectGetData, _CGPDFStreamObjectGetDictionary,
_CGPDFStreamObjectGetFlateEncoding, _CGPDFStreamObjectSetFlateEncoding,
_CGPDFStreamObjectTypeID, _CGPDFStreamPrint, _CGPDFStreamPrintContents,
_CGPDFStreamPrintContentsWithIndent, _CGPDFStreamPrintWithIndent,
_CGPDFStreamRelease, _CGPDFStreamRetain, _CGPDFStringCopyDate,
_CGPDFStringCopyTextString, _CGPDFStringGetBytePtr, _CGPDFStringGetLength,
_CGPDFStringPrint, _CGPDFStringRelease, _CGPDFStringRetain,
_CGPDFTagTypeGetName, _CGPDFTextStringGetBBoxForIndex, _CGPDFTextStringGetCharacterAtIndex,
_CGPDFTextStringGetColorForIndex, _CGPDFTextStringGetFontForIndex,
_CGPDFTextStringGetGlyphAtIndex, _CGPDFTextStringGetLength,
_CGPDFTextStringGetPositionForIndex, _CGPDFTextStringGetTransformForIndex,
_CGPDFTextStringRelease, _CGPDFTextStringRetain, _CGPDFXRefEntryPrint,
_CGPDFXRefGetEntry, _CGPDFXRefPrint, _CGPSContextClose, _CGPSContextCreate,
_CGPSContextCreateWithFilename, _CGPSContextCreateWithURL,
_CGPSConverterAbort, _CGPSConverterConvert, _CGPSConverterConvertFromURLToURL,
_CGPSConverterCreate, _CGPSConverterGetTypeID, _CGPSConverterIsConverting,
_CGPaletteCreateWithDisplay, _CGPaletteCreateWithSamples,
_CGPaletteGetColorAtIndex, _CGPaletteGetNumberOfSamples, _CGPaletteRelease,
_CGPaletteSetColorAtIndex, _CGPathAddArc, _CGPathAddArcToPoint,
_CGPathAddCurveToPoint, _CGPathAddEllipseInRect, _CGPathAddLineToPoint,
_CGPathAddLines, _CGPathAddPath, _CGPathAddQuadCurveToPoint,
_CGPathAddRect, _CGPathAddRects, _CGPathAddRegion, _CGPathAddRelativeArc,
_CGPathAddRoundedRect, _CGPathAddUnevenCornersRoundedRect,
_CGPathApply, _CGPathApplyDashedPath, _CGPathApplyIterator,
_CGPathApplyStrokedDashedPath, _CGPathApplyWithBlock, _CGPathApplyWithBlock2,
_CGPathCloseSubpath, _CGPathContainsPoint, _CGPathCreateByNormalizingGlyphPath,
_CGPathCreateCopy, _CGPathCreateCopyByDashingPath, _CGPathCreateCopyByStrokingPath,
_CGPathCreateCopyByTransformingPath, _CGPathCreateDashedPath,
_CGPathCreateMutable, _CGPathCreateMutableCopy, _CGPathCreateMutableCopyByTransformingPath,
_CGPathCreateStrokedPath, _CGPathCreateWithEllipseInRect,
_CGPathCreateWithLineSegment, _CGPathCreateWithRect, _CGPathCreateWithRoundedRect,
_CGPathCreateWithThresholdedImage, _CGPathCreateWithThresholdedImageDebug,
_CGPathCreateWithUnevenCornersRoundedRect, _CGPathEqualToPath,
_CGPathGetBoundingBox, _CGPathGetCurrentPoint, _CGPathGetGeometricBoundingBox,
_CGPathGetNumberOfElements, _CGPathGetNumberOfPoints, _CGPathGetPathBoundingBox,
_CGPathGetTypeID, _CGPathIntersectsPath, _CGPathIntersectsRect,
_CGPathIsEllipse, _CGPathIsEllipse2, _CGPathIsEllipseWithTransform,
_CGPathIsEmpty, _CGPathIsLine, _CGPathIsRect, _CGPathIsRectWithTransform,
_CGPathIsRegion, _CGPathIsRoundedRect, _CGPathIsRoundedRectWithTransform,
_CGPathIsUnevenCornersRoundedRectWithTransform, _CGPathIsValidGlyphPath,
_CGPathMoveToPoint, _CGPathPrint, _CGPathRelease, _CGPathRetain,
_CGPatternCreate, _CGPatternCreateColoredEmpty, _CGPatternCreateUncoloredEmpty,
_CGPatternCreateWithImage, _CGPatternCreateWithImage2, _CGPatternDrawInContextDelegate,
_CGPatternGetAssociate, _CGPatternGetBounds, _CGPatternGetIdentifier,
_CGPatternGetImage, _CGPatternGetMatrix, _CGPatternGetShading,
_CGPatternGetStep, _CGPatternGetTiling, _CGPatternGetType,
_CGPatternGetTypeID, _CGPatternIsColored, _CGPatternIsOpaque,
_CGPatternNotificationCenter, _CGPatternRelease, _CGPatternRetain,
_CGPatternSetAssociate, _CGPixelAccessCreate, _CGPixelAccessCreateImageFromRect,
_CGPixelAccessCreateWithWindow, _CGPixelAccessGetAlphaBitsPerComponent,
_CGPixelAccessGetAlphaBitsPerPixel, _CGPixelAccessGetAlphaData,
_CGPixelAccessGetBitmapInfo, _CGPixelAccessGetBitsPerComponent,
_CGPixelAccessGetBitsPerPixel, _CGPixelAccessGetColorSpace,
_CGPixelAccessGetData, _CGPixelAccessGetHeight, _CGPixelAccessGetTransform,
_CGPixelAccessGetTypeID, _CGPixelAccessGetWidth, _CGPixelAccessLock,
_CGPixelAccessRect, _CGPixelAccessRelease, _CGPixelAccessTransformRect,
_CGPixelAccessUnlock, _CGPointApplyAffineTransform, _CGPointApplyInverseAffineTransform,
_CGPointCreateDictionaryRepresentation, _CGPointEqualToPoint,
_CGPointMakeWithDictionaryRepresentation, _CGPointZero, _CGPostError,
_CGPostErrorWithArguments, _CGPostKeyboardEvent, _CGPostMouseEvent,
_CGPostScrollWheelEvent, _CGPreferencesCopyString, _CGPreferencesGetBoolean,
_CGPreferencesGetCGFloat, _CGPreferencesGetInteger, _CGPreflightListenEventAccess,
_CGPreflightPostEventAccess, _CGPreflightScreenCaptureAccess,
_CGRectApplyAffineTransform, _CGRectApplyInverseAffineTransform,
_CGRectContainsPoint, _CGRectContainsRect, _CGRectCreateDictionaryRepresentation,
_CGRectDivide, _CGRectEqualToRect, _CGRectGetHeight, _CGRectGetMaxX,
_CGRectGetMaxY, _CGRectGetMidX, _CGRectGetMidY, _CGRectGetMinX,
_CGRectGetMinY, _CGRectGetWidth, _CGRectInfinite, _CGRectInset,
_CGRectIntegral, _CGRectIntersection, _CGRectIntersectsRect,
_CGRectIsEmpty, _CGRectIsInfinite, _CGRectIsIntegral, _CGRectIsNull,
_CGRectMakeWithDictionaryRepresentation, _CGRectNull, _CGRectOffset,
_CGRectStandardize, _CGRectUnion, _CGRectZero, _CGRegionContainsPoint,
_CGRegionContainsRect, _CGRegionContainsRegion, _CGRegionCopyData,
_CGRegionCreateByScalingRegion, _CGRegionCreateBySimplifyingRegion,
_CGRegionCreateByTransformingRegion, _CGRegionCreateCopy,
_CGRegionCreateDifferenceWithRegion, _CGRegionCreateEmptyRegion,
_CGRegionCreateIntersectionWithRect, _CGRegionCreateIntersectionWithRegion,
_CGRegionCreateUnionWithRect, _CGRegionCreateUnionWithRegion,
_CGRegionCreateWithBytes, _CGRegionCreateWithData, _CGRegionCreateWithInset,
_CGRegionCreateWithOffset, _CGRegionCreateWithRect, _CGRegionCreateWithRects,
_CGRegionCreateXORWithRegion, _CGRegionEnumeratorCreate, _CGRegionEnumeratorCreateWithDirection,
_CGRegionEnumeratorGetNextRect, _CGRegionEnumeratorRelease,
_CGRegionEqualToRegion, _CGRegionForwardEnumeratorGetNextBounds,
_CGRegionForwardEnumeratorGetNextRect, _CGRegionForwardEnumeratorMake,
_CGRegionGetBoundingBox, _CGRegionGetDataBytePtr, _CGRegionGetDataLength,
_CGRegionGetTypeID, _CGRegionIntersectsRect, _CGRegionIntersectsRegion,
_CGRegionIsEmpty, _CGRegionIsRect, _CGRegionIsValid, _CGRegionRelease,
_CGRegionRetain, _CGRegisterScreenRefreshCallback, _CGReleaseAllDisplays,
_CGReleaseDisplayFadeReservation, _CGReleaseScreenRefreshRects,
_CGRenderingStateCreate, _CGRenderingStateCreateCopy, _CGRenderingStateGetAllowedFontRenderingStyle,
_CGRenderingStateGetAllowsAcceleration, _CGRenderingStateGetAllowsAntialiasing,
_CGRenderingStateGetAllowsDithering, _CGRenderingStateGetAllowsFontAntialiasing,
_CGRenderingStateGetAllowsFontSmoothing, _CGRenderingStateGetAllowsFontSubpixelPositioning,
_CGRenderingStateGetAllowsFontSubpixelQuantization, _CGRenderingStateGetBaseCTM,
_CGRenderingStateGetFontRenderingStyle, _CGRenderingStateGetMaxInterpolationQuality,
_CGRenderingStateGetMinInterpolationQuality, _CGRenderingStateGetRenderingResolution,
_CGRenderingStateGetVectorCapabilities, _CGRenderingStateRelease,
_CGRenderingStateReset, _CGRenderingStateRetain, _CGRenderingStateSetAllowsAcceleration,
_CGRenderingStateSetAllowsAntialiasing, _CGRenderingStateSetAllowsDithering,
_CGRenderingStateSetAllowsFontAntialiasing, _CGRenderingStateSetAllowsFontSmoothing,
_CGRenderingStateSetAllowsFontSubpixelPositioning, _CGRenderingStateSetAllowsFontSubpixelQuantization,
_CGRenderingStateSetBaseCTM, _CGRenderingStateSetMaxInterpolationQuality,
_CGRenderingStateSetMinInterpolationQuality, _CGRenderingStateSetRenderingResolution,
_CGRenderingStateSetVectorCapabilities, _CGRenderingStateSynchronize,
_CGRequestListenEventAccess, _CGRequestPostEventAccess, _CGRequestScreenCaptureAccess,
_CGRestorePermanentDisplayConfiguration, _CGSAcceleratorForDisplayAlias,
_CGSAcceleratorForDisplayNumber, _CGSActuateDeviceWithPattern,
_CGSAddActivationRegion, _CGSAddButtonRegionInWindow, _CGSAddDragRegion,
_CGSAddDragRegionInWindow, _CGSAddStructuralRegion, _CGSAddSurface,
_CGSAddTrackingArea, _CGSAddTrackingAreas, _CGSAddTrackingRect,
_CGSAddTrackingRegion, _CGSAddWindowFilter, _CGSAddWindowToWindowMovementGroup,
_CGSAddWindowToWindowOrderingGroup, _CGSAddWindowsToSpaces,
_CGSAdjustSystemStatusBarWindows, _CGSAreEventsCaptured, _CGSAreEventsCapturedReturningMask,
_CGSAssociateMouseAndMouseCursorPosition, _CGSBeginDisplayConfiguration,
_CGSBindSurface, _CGSBlockWindowOrdering, _CGSBoundingShapeAdd,
_CGSBoundingShapeAddRect, _CGSBoundingShapeAddRegion, _CGSBoundingShapeAddRegionWithScale,
_CGSBoundingShapeCreate, _CGSBoundingShapeGetBounds, _CGSBoundingShapeGetRegion,
_CGSBoundingShapeRelease, _CGSBoundingShapeReset, _CGSBoundsEqualToBounds,
_CGSBoundsIntersection, _CGSBoundsUnion, _CGSBringAirDisplayOffline,
_CGSBringAirDisplayOnline, _CGSCancelDisplayConfiguration,
_CGSCaptureDisplay, _CGSCaptureWindowsContentsToRect, _CGSCaptureWindowsContentsToRectWithOptions,
_CGSClearActivationRegion, _CGSClearButtonRegionInWindow,
_CGSClearDragRegion, _CGSClearWindowListTags, _CGSClearWindowMovementGroup,
_CGSClearWindowOrderingGroup, _CGSClearWindowTags, _CGSCoalesceEventsInMask,
_CGSColorMaskCopyARGB8888, _CGSCompleteDisplayConfiguration,
_CGSCompleteDisplayConfigurationWithOption, _CGSCompleteWindowRightsGrant,
_CGSConfigureDisplayEnabled, _CGSConfigureDisplayFadeEffect,
_CGSConfigureDisplayMirrorOfDisplay, _CGSConfigureDisplayMirrored,
_CGSConfigureDisplayMode, _CGSConfigureDisplayOrigin, _CGSConfigureDisplayResolution,
_CGSConfigureDisplayStereoOperation, _CGSConnectionDispatchNotificationsToMainQueueIfNotMainThread,
_CGSConnectionGetHeldWindowRights, _CGSConnectionGetPID, _CGSConnectionRelinquishWindowRights,
_CGSConnectionSetSpinning, _CGSConvertRGB555toXRGB8888, _CGSConvertXRGB8888toARGB8888,
_CGSCopyActiveMenuBarDisplayIdentifier, _CGSCopyAssociatedWindows,
_CGSCopyBestManagedDisplayForPoint, _CGSCopyBestManagedDisplayForRect,
_CGSCopyConnectionProperty, _CGSCopyCurrentSessionDictionary,
_CGSCopyDisplayColorSpace, _CGSCopyDisplayInfoDictionary,
_CGSCopyDisplayModePixelEncoding, _CGSCopyDisplayRegion, _CGSCopyDisplayUUID,
_CGSCopyManagedDisplayForSpace, _CGSCopyManagedDisplayForWindow,
_CGSCopyManagedDisplaySpaces, _CGSCopyManagedDisplays, _CGSCopyPackagesPersistenceDictionary,
_CGSCopyRegion, _CGSCopyRegisteredCursorImages, _CGSCopySessionList,
_CGSCopySpaces, _CGSCopySpacesForWindows, _CGSCopySpecifiedWindowShape,
_CGSCopySurfaceColorSpace, _CGSCopyWindowAlphaShape, _CGSCopyWindowClipShape,
_CGSCopyWindowColorSpace, _CGSCopyWindowGroup, _CGSCopyWindowProperty,
_CGSCopyWindowRoutingRecordsForScreenLocation, _CGSCopyWindowShape,
_CGSCopyWindowsWithOptionsAndTags, _CGSCosmeticShieldCursor,
_CGSCreateCinematicBootWindowArray, _CGSCreateDefaultMetalDevice,
_CGSCreateGenieWindowAnimation, _CGSCreateLayerContext, _CGSCreateLoginSession,
_CGSCreateLoginSessionWithDataAndVisibility, _CGSCreateMetalSheetWindowAnimationWithParent,
_CGSCreateMetalSheetWindowAnimationWithParentAndShift, _CGSCreateRegionFromData,
_CGSCreateRegisteredCursorImage, _CGSCreateSession, _CGSCreateSessionWithDataAndOptions,
_CGSCreateSessionWithDataAndVisibility, _CGSCreateShadowCacheDebugInfo,
_CGSCreateShadowGroup, _CGSCreateSheetWindowAnimation, _CGSCreateSheetWindowAnimationWithParent,
_CGSCreateWindowDebugInfo, _CGSCurrentCursorSeed, _CGSCurrentEventFlags,
_CGSCurrentEventMask, _CGSCurrentEventTimestamp, _CGSCurrentInputPointerPosition,
_CGSCurrentKeyboardEventSeed, _CGSCursorNameForSystemCursor,
_CGSCycleWindows, _CGSDeactivateCurrContext, _CGSDefaultConnectionForThread,
_CGSDefaultKeyboardID, _CGSDeferWindowMoveEvents, _CGSDeferredUpdates,
_CGSDetectDisplays, _CGSDeviceCopyColorSpace, _CGSDeviceCreate,
_CGSDeviceDestroy, _CGSDeviceFinish, _CGSDeviceGetGeometry,
_CGSDeviceGetProfile, _CGSDeviceGetResolution, _CGSDeviceInvalidate,
_CGSDeviceLock, _CGSDeviceScroll, _CGSDeviceSynchronize, _CGSDeviceUnlock,
_CGSDiffRegion, _CGSDisableUpdate, _CGSDisableUpdateToken,
_CGSDisplayChangedSeed, _CGSDisplayConfigurationOrigin, _CGSDisplayCopyCurrentMetalDevice,
_CGSDisplayGetRefreshTiming, _CGSDisplayLoadUserPreferences,
_CGSDisplayMappingChangedSeed, _CGSDisplayMuxAcquired, _CGSDisplayMuxReleased,
_CGSDisplayRegisterReconfigurationCallbackWithUUID, _CGSDisplayStatusQuery,
_CGSDisplaySystemStateSeed, _CGSDoDeferredOrdering, _CGSDragWindowRelativeToMouse,
_CGSEnableAmbientDisplay, _CGSEnableDeferredUpdateNotifications,
_CGSEnableHDR, _CGSEventAppUnresponsiveStatus, _CGSEventCounter,
_CGSEventFlagForVirtualKeyCode, _CGSEventIsAppUnresponsive,
_CGSEventRecordTimeFromRealTimeStamp, _CGSEventSetAppIsUnresponsiveNotificationTimeout,
_CGSEventTapCreate, _CGSFindWindow, _CGSFindWindowAndOwner,
_CGSFindWindowByGeometry, _CGSFlushSurface, _CGSFlushSurfaceWithOptions,
_CGSFlushWindow, _CGSFlushWindowContentRegion, _CGSForceShowCursor,
_CGSForceWaitCursorActive, _CGSGLCompositorSettings, _CGSGeometrySeed,
_CGSGetActiveDisplayList, _CGSGetActiveMenuBarDrawingStyle,
_CGSGetActiveSpace, _CGSGetBackgroundEventMask, _CGSGetCAMetalDevice,
_CGSGetCatenatedWindowTransform, _CGSGetCoalesceEventsMask,
_CGSGetConnectionIDForPSN, _CGSGetConnectionPSN, _CGSGetCurrentCursorLocation,
_CGSGetCurrentDisplayMode, _CGSGetCurrentMouseButtonState,
_CGSGetCursorData, _CGSGetCursorDataSize, _CGSGetCursorScale,
_CGSGetDebugOptions, _CGSGetDenyWindowServerConnections, _CGSGetDisplayAddress,
_CGSGetDisplayAliasList, _CGSGetDisplayBaseAddress, _CGSGetDisplayBounds,
_CGSGetDisplayBrightness, _CGSGetDisplayDepth, _CGSGetDisplayForUUID,
_CGSGetDisplayHardwareBounds, _CGSGetDisplayList, _CGSGetDisplayMaxOpenGLSurfaceSize,
_CGSGetDisplayMaximumHDRValue, _CGSGetDisplayModeDescriptionOfLength,
_CGSGetDisplayModeDescriptionsOfLength, _CGSGetDisplayOpenGLDisplayAliasMask,
_CGSGetDisplayOpenGLDisplayMask, _CGSGetDisplayPixelEncodingOfLength,
_CGSGetDisplayReconfigureTimeWhenWindowsLastMoved, _CGSGetDisplayRowBytes,
_CGSGetDisplayTransferByFormula, _CGSGetDisplayTransferByTable,
_CGSGetDisplaysWithOpenGLDisplayMask, _CGSGetDisplaysWithPoint,
_CGSGetDisplaysWithRect, _CGSGetDisplaysWithUUID, _CGSGetDockRectWithReason,
_CGSGetEligiblePerAppDisplayList, _CGSGetEventPort, _CGSGetEventTapList,
_CGSGetEventTapTimeout, _CGSGetGestureEventSubmask, _CGSGetGlobalCursorData,
_CGSGetGlobalCursorDataSize, _CGSGetGlobalHotKeyOperatingMode,
_CGSGetHotButton, _CGSGetHotKey, _CGSGetHotKeyRepresentation,
_CGSGetHotKeyType, _CGSGetHotModifier, _CGSGetInkingState,
_CGSGetKeys, _CGSGetLoginName, _CGSGetMagicZoomWindowID, _CGSGetMenuBar,
_CGSGetMenuBarAutohideEnabled, _CGSGetMenuBarDrawingStyle,
_CGSGetNumberOfDisplayModes, _CGSGetNumberOfDisplays, _CGSGetOnScreenWindowCount,
_CGSGetOnScreenWindowList, _CGSGetOnlineDisplayList, _CGSGetOnscreenWindowBounds,
_CGSGetParentWindowList, _CGSGetPerformanceData, _CGSGetPerformanceTotalUpdateCount,
_CGSGetPerformanceTotalUpdateHistogram, _CGSGetPotentiallyActiveDisplayList,
_CGSGetProcessMenuBarWindowList, _CGSGetProcessValidity, _CGSGetQDRgnLength,
_CGSGetRegionBounds, _CGSGetRegionData, _CGSGetRegionRectCount,
_CGSGetRegisteredCursorData, _CGSGetRegisteredCursorData2,
_CGSGetRegisteredCursorDataSize, _CGSGetRevealedMenuBarBounds,
_CGSGetScreenRectForWindow, _CGSGetSharedWindow, _CGSGetSizeOfDisplayTransfer,
_CGSGetSpaceManagementMode, _CGSGetSpacePermittedResizeDirections,
_CGSGetSurfaceBinding, _CGSGetSurfaceBounds, _CGSGetSurfaceCount,
_CGSGetSurfaceList, _CGSGetSurfaceOpacity, _CGSGetSurfaceResolution,
_CGSGetSymbolicHotKeyButtonValue, _CGSGetSymbolicHotKeyRepresentation,
_CGSGetSymbolicHotKeyRepresentationList, _CGSGetSymbolicHotKeyValue,
_CGSGetSymbolicHotKeyValuesAndStates, _CGSGetSymbolicHotModifierValue,
_CGSGetSystemBackgroundWindow, _CGSGetSystemDefinedCursorData,
_CGSGetSystemDefinedCursorDataSize, _CGSGetSystemWindow, _CGSGetUpdateClientPipe,
_CGSGetWindowAccelerationCapability, _CGSGetWindowAlpha, _CGSGetWindowAutofill,
_CGSGetWindowBounds, _CGSGetWindowCount, _CGSGetWindowDepth,
_CGSGetWindowEventMask, _CGSGetWindowEventReceiver, _CGSGetWindowFlushSeed,
_CGSGetWindowGeometry, _CGSGetWindowLevel, _CGSGetWindowList,
_CGSGetWindowListWithTags, _CGSGetWindowMouseLocation, _CGSGetWindowOpacity,
_CGSGetWindowOwner, _CGSGetWindowPresenter, _CGSGetWindowResizeState,
_CGSGetWindowResolution, _CGSGetWindowShadowAndRimParameters,
_CGSGetWindowSharingState, _CGSGetWindowSize, _CGSGetWindowSubLevel,
_CGSGetWindowTags, _CGSGetWindowTransform, _CGSGetWindowTransformAtPlacement,
_CGSGetWindowType, _CGSGetWindowWorkspace, _CGSGetWindowWorkspaceIgnoringVisibility,
_CGSGetWorkspace, _CGSGetWorkspaceWindowCountWithOptionsAndTags,
_CGSGetWorkspaceWindowGroup, _CGSGetWorkspaceWindowListWithOptionsAndTags,
_CGSGetZoomParameters, _CGSGrantWindowRightsReservingWithTimeoutAndToken,
_CGSHWCaptureDesktop, _CGSHWCaptureDisplayIntoIOSurface, _CGSHWCaptureDisplayIntoIOSurfaceWithOptions,
_CGSHWCaptureSpace, _CGSHWCaptureWindowList, _CGSHardwareCursorActive,
_CGSHideCursor, _CGSHideSpaces, _CGSInhibitLocalEvents, _CGSInitCursor,
_CGSInitialEnableOfDisplayUpdates, _CGSInitialize, _CGSInitializeGamma,
_CGSInputButtonState, _CGSInputKeyState, _CGSInputModifierKeyState,
_CGSInsetRegion, _CGSInstallRemoteContextNotificationHandler,
_CGSInterruptMenuBarReveal, _CGSIntersectRegion, _CGSIntersectRegionWithRect,
_CGSInvalidateGroupedWindowShadow, _CGSInvalidateWindowShadow,
_CGSInvokeTransition, _CGSIsAmbientDisplayEnabled, _CGSIsHDREnabled,
_CGSIsHDRSupported, _CGSIsHotKeyEnabled, _CGSIsMenuBarVisibleOnSpace,
_CGSIsScreenWatcherPresent, _CGSIsSecureEventInputSet, _CGSIsSymbolicHotKeyEnabled,
_CGSIsSymbolicHotKeyEnabledForConnection, _CGSIsZoomed, _CGSKitVersion,
_CGSLockWindowBits, _CGSLockWindowRectBits, _CGSLockWindowVisibleRegion,
_CGSMachineSupportsLowPowerVideo, _CGSMainConnectionID, _CGSMainDisplayBoundsIgnoringCapture,
_CGSMainDisplayID, _CGSManagedDisplayCurrentSpaceAllowsWindow,
_CGSManagedDisplayGetCurrentSpace, _CGSManagedDisplayIsAnimating,
_CGSManagedDisplaySetCurrentSpace, _CGSManagedDisplaySetIsAnimating,
_CGSManagedDisplaySetRoleWindow, _CGSManagedDisplaysCopyRoleWindows,
_CGSManagedDisplaysGetRoleWindows, _CGSMenuBarExists, _CGSMoveManagedSpaceToDisplayIndex,
_CGSMoveSurface, _CGSMoveTrackingArea, _CGSMoveWindow, _CGSMoveWindowList,
_CGSMoveWindowWithGroup, _CGSMoveWindowsToManagedSpace, _CGSMoveWorkspaceWindowList,
_CGSMoveWorkspaceWindowListWithOptions, _CGSNewCIFilterByName,
_CGSNewConnection, _CGSNewEmptyRegion, _CGSNewRegionWithData,
_CGSNewRegionWithQDRgn, _CGSNewRegionWithRect, _CGSNewRegionWithRectList,
_CGSNewTransition, _CGSNewWindow, _CGSNewWindowWithOpaqueShape,
_CGSNextPoint, _CGSNextRect, _CGSObscureCursor, _CGSOffsetRegion,
_CGSOrderFrontConditionally, _CGSOrderPanelIfActive, _CGSOrderSurface,
_CGSOrderWindow, _CGSOrderWindowList, _CGSOrderWindowListWithGroups,
_CGSOrderWindowListWithOperation, _CGSOrderWindowWithGroup,
_CGSOverrideAppSleepNotifications, _CGSPackagesAddWindowToDraggingSpace,
_CGSPackagesAssignDraggedWindowToDestinationSpace, _CGSPackagesCopyWorkspaceIdentifierForWorkspace,
_CGSPackagesDisableFindCursor, _CGSPackagesDragWindowRelativeToMouse,
_CGSPackagesEnableConnectionOcclusionNotifications, _CGSPackagesEnableConnectionWindowModificationNotifications,
_CGSPackagesEnableWindowOcclusionNotifications, _CGSPackagesFindCursorIsDisabled,
_CGSPackagesGetWindowConstraints, _CGSPackagesGetWorkspaceForWorkspaceIdentifier,
_CGSPackagesRemoveWindowDragTransform, _CGSPackagesRemoveWindowFromDraggingSpace,
_CGSPackagesSetFindCursorPrefs, _CGSPackagesSetWindowConstraints,
_CGSPackagesSetWindowDragTransform, _CGSPersistenceAnnounceAllAppsReady,
_CGSPersistenceRegisterAsReady, _CGSPersistenceSaveSpaceConfiguration,
_CGSPersistenceWillLaunchASNsWithCompletionHandler, _CGSPersistenceWillTerminateSession,
_CGSPointInRegion, _CGSPostBroadcastNotification, _CGSPostKeyboardEvent,
_CGSPostMouseEvent, _CGSPostMouseEvents, _CGSPostNotificationToConnection,
_CGSProcessAssignToAllSpaces, _CGSProcessAssignToSpace, _CGSQuadrangleToRegion,
_CGSRealTimeStampFromEventRecordTime, _CGSReassociateWindowsSpacesByGeometry,
_CGSRectInRegion, _CGSReenableUpdate, _CGSReenableUpdateToken,
_CGSReenableUpdateTokenWithSeed, _CGSRegionCreateWithBoundingShape,
_CGSRegionEnumerator, _CGSRegionEnumeratorWithDirection, _CGSRegionFromBitmap,
_CGSRegionGetShape, _CGSRegionInRegion, _CGSRegionIntersectsRect,
_CGSRegionIntersectsRegion, _CGSRegionIsEmpty, _CGSRegionIsRectangular,
_CGSRegionMergeFlushAndMoveRegions, _CGSRegionPathEnumerator,
_CGSRegionRelease, _CGSRegionRetain, _CGSRegionToQDRgn, _CGSRegionsEqual,
_CGSRegisterConnectionNotifyProc, _CGSRegisterCursorWithData,
_CGSRegisterCursorWithImage, _CGSRegisterCursorWithImages,
_CGSRegisterNotifyProc, _CGSRegisterUpdateInformationHandler,
_CGSReleaseCIFilter, _CGSReleaseConnection, _CGSReleaseRegion,
_CGSReleaseRegionEnumerator, _CGSReleaseSession, _CGSReleaseTransition,
_CGSReleaseWindow, _CGSReleaseWindowAnimation, _CGSReleaseWindowList,
_CGSRemoteContextAddStructuralRegion, _CGSRemoteContextAddTrackingRegion,
_CGSRemoveAllSurfaces, _CGSRemoveAllTrackingAreas, _CGSRemoveConnectionNotifyProc,
_CGSRemoveDragSubregionForCommandModifier, _CGSRemoveDragSubregionInWindow,
_CGSRemoveFromOrderingGroup, _CGSRemoveHotKey, _CGSRemoveNotifyProc,
_CGSRemoveRegisteredCursor, _CGSRemoveRemoteContextNotificationHandler,
_CGSRemoveStructuralRegion, _CGSRemoveSurface, _CGSRemoveTrackingArea,
_CGSRemoveTrackingAreas, _CGSRemoveWindowFilter, _CGSRemoveWindowFromWindowMovementGroup,
_CGSRemoveWindowsFromSpaces, _CGSReorderWindows, _CGSRequestNotificationsForWindows,
_CGSResetMenuBarSystemOverrideAlphas, _CGSResetWindows, _CGSRestorePackagesManagementPersistenceData,
_CGSRevealCursor, _CGSRunningOnInstallerDisk, _CGSSaveConfiguration,
_CGSSavePerUserConfigurationData, _CGSSecondsSinceLastInputEvent,
_CGSSecondsSinceMostRecentEventInMask, _CGSServerHasValidConnections,
_CGSServerIsConnected, _CGSServerMightHaveAcceleration, _CGSServerOperationState,
_CGSServerPort, _CGSServiceForDisplayAlias, _CGSServiceForDisplayNumber,
_CGSSessionCopyAllSessionProperties, _CGSSessionCopyCurrentSessionProperties,
_CGSSessionCopyCurrentSessionReadOnceData, _CGSSessionCreateLoginSessionID,
_CGSSessionCreateSessionIDWithOptions, _CGSSessionFullScreenAppPid,
_CGSSessionIDGetFullScreenAppPid, _CGSSessionIDSetScreenLockWindowID,
_CGSSessionIDSetSleepWindowID, _CGSSessionReleaseSessionID,
_CGSSessionSetApplicationBindingsForWorkspaces, _CGSSessionSetCurrentSessionProperties,
_CGSSessionSetCurrentSessionWorkspaceApplicationBindings,
_CGSSessionSetCurrentSessionWorkspaceLaunchPath, _CGSSessionSetCurrentSessionWorkspaceNotificationConnectionID,
_CGSSessionSetCurrentSessionWorkspacePreferences, _CGSSessionSetNotificationConnectionForWorkspaces,
_CGSSessionSetPreferencesForWorkspaces, _CGSSessionSwitchToSessionID,
_CGSSetActiveMenuBarDisplayIdentifier, _CGSSetAvoidsActivation,
_CGSSetBackgroundEventMask, _CGSSetBackgroundEventMaskAndShape,
_CGSSetCIFilterValuesFromDictionary, _CGSSetConnectionProperty,
_CGSSetCursorFromData, _CGSSetCursorFromPremultipliedDataWithSeed,
_CGSSetCursorScale, _CGSSetDebugOptions, _CGSSetDebugOptionsData,
_CGSSetDebugOptionsPSN, _CGSSetDefaultSpace, _CGSSetDeferActivation,
_CGSSetDeferOrdering, _CGSSetDeferredUpdateNotificationPort,
_CGSSetDenyWindowServerConnections, _CGSSetDictionaryForCurrentSession,
_CGSSetDisplayBrightness, _CGSSetDisplayColorSpace, _CGSSetDisplayColorSpaceAndTransfer,
_CGSSetDisplayContrast, _CGSSetDisplayIntention, _CGSSetDisplayIntentionWiper,
_CGSSetDisplayOption, _CGSSetDisplayTransferByFormula, _CGSSetDisplayTransferByFormulaWithOption,
_CGSSetDisplayTransferByTable, _CGSSetDisplayTransferByTableWithOption,
_CGSSetDockCursorOverride, _CGSSetDockRectWithReason, _CGSSetEventCapture,
_CGSSetEventCaptureWindowAndMask, _CGSSetEventMask, _CGSSetEventTapOption,
_CGSSetEventTapTimeout, _CGSSetFrontWindow, _CGSSetGestureEventSubmask,
_CGSSetGlobalForceConfig, _CGSSetGlobalHotKeyOperatingMode,
_CGSSetHideOnDeact, _CGSSetHotButtonWithExclusion, _CGSSetHotKey,
_CGSSetHotKeyEnabled, _CGSSetHotKeyRepresentation, _CGSSetHotKeyRepresentationWithOptions,
_CGSSetHotKeyType, _CGSSetHotKeyWithExclusion, _CGSSetHotKeyWithOptions,
_CGSSetHotModifierWithExclusion, _CGSSetHotModifierWithOptions,
_CGSSetIOHIDEventSystemClientProperty, _CGSSetIgnoreAsFrontWindow,
_CGSSetIgnoresCycle, _CGSSetIgnoresOption, _CGSSetInkingState,
_CGSSetKeyTranslationTableFromPtr, _CGSSetKitVersion, _CGSSetLocalEventsSuppressionInterval,
_CGSSetLoginName, _CGSSetLoginwindowConnection, _CGSSetMagicMirrorProperties,
_CGSSetMagicZoom, _CGSSetMenuBar, _CGSSetMenuBarAutohideEnabled,
_CGSSetMenuBarBounds, _CGSSetMenuBarCompanionWindow, _CGSSetMenuBarDrawingStyle,
_CGSSetMenuBarInsetAndAlpha, _CGSSetMenuBarSystemOverrideAlpha,
_CGSSetMenuBars, _CGSSetMouseEventEnableFlags, _CGSSetMouseFocusWindow,
_CGSSetOtherUniversalConnection, _CGSSetPerUserConfigurationData,
_CGSSetPressureConfigurationOverride, _CGSSetPreventsActivation,
_CGSSetRegisteredCursor, _CGSSetSecureEventInput, _CGSSetSessionSwitchCubeAnimation,
_CGSSetSpaceManagementMode, _CGSSetSurfaceBackgroundBlur,
_CGSSetSurfaceBounds, _CGSSetSurfaceColorSpace, _CGSSetSurfaceLayerBackingOptions,
_CGSSetSurfaceListAlpha, _CGSSetSurfaceOpacity, _CGSSetSurfaceProperty,
_CGSSetSurfaceProxiesForNextFlush, _CGSSetSurfaceResolution,
_CGSSetSurfaceShape, _CGSSetSwipeScrollDirection, _CGSSetSymbolicHotKey,
_CGSSetSymbolicHotKeyButtonValue, _CGSSetSymbolicHotKeyEnabled,
_CGSSetSymbolicHotKeyEnabledForConnection, _CGSSetSymbolicHotKeyRepresentation,
_CGSSetSymbolicHotKeyValue, _CGSSetSymbolicHotKeyWithExclusion,
_CGSSetSymbolicHotKeyWithOptions, _CGSSetSymbolicHotModifierValue,
_CGSSetSystemDefinedCursor, _CGSSetSystemDefinedCursorWithSeed,
_CGSSetSystemStatusBarWindowSubitemOffsets, _CGSSetTrackingAreaClip,
_CGSSetTrackingAreaEnabled, _CGSSetTrackingAreaOption, _CGSSetTrackingAreaRect,
_CGSSetTrackingAreaShape, _CGSSetTrackingAreasEnabled, _CGSSetUniversalOwner,
_CGSSetWindowAccelerationState, _CGSSetWindowActive, _CGSSetWindowAlpha,
_CGSSetWindowAlphaShape, _CGSSetWindowAnimationProgress, _CGSSetWindowAutofill,
_CGSSetWindowAutofillColor, _CGSSetWindowBackgroundBlurRadius,
_CGSSetWindowBackgroundBlurRadiusStyle, _CGSSetWindowBackgroundBlurRadiusWithOpacityHint,
_CGSSetWindowCaptureExcludeShape, _CGSSetWindowClipShape,
_CGSSetWindowColorSpace, _CGSSetWindowCornerMask, _CGSSetWindowDepth,
_CGSSetWindowDidOrderInOnNonCurrentManagedSpacesOnlyNotificationBlock,
_CGSSetWindowDidOrderOutOnNonCurrentManagedSpacesNotificationBlock,
_CGSSetWindowEventMask, _CGSSetWindowEventShape, _CGSSetWindowFiltering,
_CGSSetWindowHasKeyAppearance, _CGSSetWindowHasMainAppearance,
_CGSSetWindowLevel, _CGSSetWindowLevelForGroup, _CGSSetWindowLevelsForActivation,
_CGSSetWindowListAlpha, _CGSSetWindowListBrightness, _CGSSetWindowListFadeProperties,
_CGSSetWindowListGlobalClipShape, _CGSSetWindowListSystemAlpha,
_CGSSetWindowListSystemLevel, _CGSSetWindowListTags, _CGSSetWindowListWorkspace,
_CGSSetWindowMovementGroup, _CGSSetWindowOpacity, _CGSSetWindowOpaqueShape,
_CGSSetWindowOriginRelativeToWindow, _CGSSetWindowParent,
_CGSSetWindowProperty, _CGSSetWindowResizeState, _CGSSetWindowResolution,
_CGSSetWindowShadowAndRimParameters, _CGSSetWindowShadowAndRimParametersWithStretch,
_CGSSetWindowShadowGroup, _CGSSetWindowShadowParameters, _CGSSetWindowShape,
_CGSSetWindowShapeWithWeighting, _CGSSetWindowSharingState,
_CGSSetWindowSubLevel, _CGSSetWindowTags, _CGSSetWindowTitle,
_CGSSetWindowToReleaseBackingOnOrderOut, _CGSSetWindowTransform,
_CGSSetWindowTransformAtPlacement, _CGSSetWindowTransforms,
_CGSSetWindowTransformsAtPlacement, _CGSSetWindowType, _CGSSetWindowWarp,
_CGSSetZoomParameters, _CGSShapeSurface, _CGSShapeWindow,
_CGSShieldCursor, _CGSShowCursor, _CGSShowSpaces, _CGSShutdownServerConnections,
_CGSSpaceAddOwner, _CGSSpaceAddWindowsAndRemoveFromSpaces,
_CGSSpaceCanCreateTile, _CGSSpaceClientDrivenMoveSpacersToPoint,
_CGSSpaceCopyManagedShape, _CGSSpaceCopyName, _CGSSpaceCopyOwners,
_CGSSpaceCopyShape, _CGSSpaceCopyTileSpaces, _CGSSpaceCopyValues,
_CGSSpaceCreate, _CGSSpaceCreateTile, _CGSSpaceDestroy, _CGSSpaceFinishedResizeForRect,
_CGSSpaceGetAbsoluteLevel, _CGSSpaceGetCompatID, _CGSSpaceGetInterTileSpacing,
_CGSSpaceGetRect, _CGSSpaceGetSizeForProposedTile, _CGSSpaceGetSpacersAtPoint,
_CGSSpaceGetTransform, _CGSSpaceGetType, _CGSSpaceMoveSpacersToPoint,
_CGSSpacePreferCurrentDisplay, _CGSSpaceRemoveOwner, _CGSSpaceRemoveValuesForKeys,
_CGSSpaceResetMenuBar, _CGSSpaceSetAbsoluteLevel, _CGSSpaceSetCompatID,
_CGSSpaceSetEdgeReservation, _CGSSpaceSetFrontPSN, _CGSSpaceSetInterTileSpacing,
_CGSSpaceSetName, _CGSSpaceSetOwners, _CGSSpaceSetRelativeLevel,
_CGSSpaceSetShape, _CGSSpaceSetTransform, _CGSSpaceSetType,
_CGSSpaceSetValues, _CGSSpaceTileMoveToSpaceAtIndex, _CGSSpaceWithName,
_CGSSpinControlDecodeMessage, _CGSSpinControlSetNotificationPort,
_CGSStructuralRegionMove, _CGSStructuralRegionSetChildRegionTransform,
_CGSStructuralRegionSetClippedByWindow, _CGSStructuralRegionSetEventMask,
_CGSStructuralRegionSetLevel, _CGSStructuralRegionSetShape,
_CGSSuperShieldingWindowID, _CGSSwitchConsoleToSession, _CGSSystemStatusBarRegisterWindow,
_CGSTileEvictionRecordGetManagedSpaceID, _CGSTileEvictionRecordGetTileID,
_CGSTileOwnerChangeRecordGetManagedSpaceID, _CGSTileOwnerChangeRecordGetNewOwner,
_CGSTileOwnerChangeRecordGetOldOwner, _CGSTileOwnerChangeRecordGetTileID,
_CGSTileSpaceResizeRecordGetParentSpaceID, _CGSTileSpaceResizeRecordGetSpaceID,
_CGSTileSpaceResizeRecordIsLiveResizing, _CGSTrackingRegionSetForceConfig,
_CGSTrackingRegionSetIsEnabled, _CGSTransformRegion, _CGSTranslatePointForWindow,
_CGSUnionRegion, _CGSUnionRegionWithRect, _CGSUniqueSurfaceID,
_CGSUnlockWindowBits, _CGSUnlockWindowRectBits, _CGSUnlockWindowVisibleRegion,
_CGSUnpackDeferredUpdateNotification, _CGSUnregisterUpdateInformationHandler,
_CGSUnregisterWindowWithSystemStatusBar, _CGSUnshieldCursor,
_CGSUpdateCurrentSessionWorkspaceData, _CGSUpdateSystemActivity,
_CGSUpdateWindowAnimationEdges, _CGSUpdateWindowAnimationOrigin,
_CGSWarpCursorPosition, _CGSWasBootApplePreserved, _CGSWillSwitchSpaces,
_CGSWindowAnimationChangeLevel, _CGSWindowAnimationChangeShiftPoint,
_CGSWindowAnimationHideSlot, _CGSWindowAnimationSetParent,
_CGSWindowBackdropActivate, _CGSWindowBackdropActivateAll,
_CGSWindowBackdropBlendModeStringToEnum, _CGSWindowBackdropCreateWithLevel,
_CGSWindowBackdropCreateWithLevelAndMask, _CGSWindowBackdropDeactivate,
_CGSWindowBackdropDeactivateAll, _CGSWindowBackdropGetTypeID,
_CGSWindowBackdropMaterialStringToEnum, _CGSWindowBackdropRelease,
_CGSWindowBackdropSetSaturation, _CGSWindowDirtyRegionSeed,
_CGSWindowFreezeBackdrops, _CGSWindowFreezeWithOptions, _CGSWindowGetTileRect,
_CGSWindowIsOrderedIn, _CGSWindowIsVisible, _CGSWindowListSetLockedBounds,
_CGSWindowRightForKey, _CGSWindowRightKeyForMask, _CGSWindowRightsSetGrantCompletedBlockForToken,
_CGSWindowRightsSetGrantOfferedBlockForToken, _CGSWindowScrollRegion,
_CGSWindowSetBackdropBackgroundBleed, _CGSWindowSetKeepsExcessBackingAllocation,
_CGSWindowSetResizeRegionShape, _CGSWindowSetShadowProperties,
_CGSWindowThaw, _CGSWindowThawBackdrops, _CGSWindowVisibleRegionSeed,
_CGSXorRegion, _CGSZoomPoint, _CGScreenRegisterMoveCallback,
_CGScreenUnregisterMoveCallback, _CGSessionCopyCurrentDictionary,
_CGSetDisplayTransferByByteTable, _CGSetDisplayTransferByFormula,
_CGSetDisplayTransferByTable, _CGSetLocalEventsFilterDuringSuppressionState,
_CGSetLocalEventsSuppressionInterval, _CGShadingCreateAxial,
_CGShadingCreateConic, _CGShadingCreateRadial, _CGShadingCreateWithCoreImage,
_CGShadingDelegateDrawShading, _CGShadingDrawInContextDelegate,
_CGShadingGetAssociate, _CGShadingGetBackground, _CGShadingGetBounds,
_CGShadingGetColorSpace, _CGShadingGetDescriptor, _CGShadingGetIdentifier,
_CGShadingGetType, _CGShadingGetTypeID, _CGShadingRelease,
_CGShadingRetain, _CGShadingSetAssociate, _CGShieldingWindowID,
_CGShieldingWindowLevel, _CGSizeApplyAffineTransform, _CGSizeCreateDictionaryRepresentation,
_CGSizeEqualToSize, _CGSizeMakeWithDictionaryRepresentation,
_CGSizeZero, _CGSoftMaskCreate, _CGSoftMaskDelegateDrawSoftMask,
_CGSoftMaskEqual, _CGSoftMaskGetBackground, _CGSoftMaskGetBounds,
_CGSoftMaskGetIdentifier, _CGSoftMaskGetMatrix, _CGSoftMaskGetTransfer,
_CGSoftMaskGetTypeID, _CGSoftMaskRelease, _CGSoftMaskRetain,
_CGStyleCreate, _CGStyleCreateFocusRing, _CGStyleCreateFocusRingWithColor,
_CGStyleCreateShadow, _CGStyleCreateShadow2, _CGStyleCreateShadowWithColor,
_CGStyleEqualToStyle, _CGStyleFilterContextDelegateCreate,
_CGStyleGetColor, _CGStyleGetData, _CGStyleGetDrawBoundingBox,
_CGStyleGetDrawOrdering, _CGStyleGetIdentifier, _CGStyleGetType,
_CGStyleGetTypeID, _CGStyleRelease, _CGStyleRetain, _CGStyleShouldUseCorrectShadowOffsets,
_CGTextClippingCreatePath, _CGTriangleMeshAddTriangle, _CGTriangleMeshAddTriangleWithRelativePoint,
_CGTriangleMeshAddTriangleWithTrianglePoints, _CGTriangleMeshCreate,
_CGTriangleMeshGetColorSpace, _CGTriangleMeshGetCount, _CGTriangleMeshGetNumberOfComponents,
_CGTriangleMeshGetTriangleAtIndex, _CGTriangleMeshPrint, _CGTriangleMeshRelease,
_CGTriangleMeshRetain, _CGUnregisterScreenRefreshCallback,
_CGUpdateConvolveKernelBlue, _CGUpdateConvolveKernelGreen,
_CGUpdateConvolveKernelMonochrome, _CGUpdateConvolveKernelRed,
_CGWaitForScreenRefreshRects, _CGWaitForScreenUpdateRects,
_CGWarpMouseCursorPosition, _CGWindowContextCreate, _CGWindowContextCreateImage,
_CGWindowContextGetConnection, _CGWindowContextGetWindow,
_CGWindowLevelForKey, _CGWindowListCopyWindowInfo, _CGWindowListCreate,
_CGWindowListCreateDescriptionFromArray, _CGWindowListCreateImage,
_CGWindowListCreateImageFromArray, _CGWindowServerCFMachPort,
_CGWindowServerCreateServerPort, _CPSBringNextToFront, _CPSCompleteServiceReq,
_CPSCompleteServiceReqOnConnection, _CPSDequeueServiceReq,
_CPSDequeueServiceReqOnConnection, _CPSEnableForegroundOperation,
_CPSEqualProcess, _CPSExitSpecialKeyMode, _CPSFindProcessByDisplayName,
_CPSFindProcessByPID, _CPSGetCurrentProcess, _CPSGetFrontProcess,
_CPSGetKeyBinding, _CPSGetKeyFocusProcess, _CPSGetNextProcess,
_CPSGetNextToFrontProcess, _CPSGetProcessInfo, _CPSGetWindowOwner,
_CPSGetWindowPresenter, _CPSMarkChildWindow, _CPSModifyConnectionNotifications,
_CPSOverrideKeyRegistration, _CPSPBGetProcessInfo, _CPSPostHideMostReq,
_CPSPostHideReq, _CPSPostShowReq, _CPSProcessInformationCopyDictionary,
_CPSRegisterForKey, _CPSRegisterForKeyOnConnection, _CPSRegisterWithServer,
_CPSReleaseKeyFocus, _CPSReleaseKeyFocusOnConnection, _CPSReleaseKeyFocusWithID,
_CPSSetDefaultBootstrapPort, _CPSSetFrontProcess, _CPSSetFrontProcessWithOptions,
_CPSSetMainApplicationConnection, _CPSSetNotifications, _CPSSetProcessName,
_CPSSetProcessToBringForwardAtNextApplicationExit, _CPSStealKeyFocus,
_CPSStealKeyFocusOnConnection, _CPSStealKeyFocusReturningID,
_CPSUnoverrideKeyRegistration, __CGSDebugOptionFlags_, __CGSDefaultConnection,
__CPSCreateStubApplicationWithConnection, __CPSEqualProcess,
__CPSGetCurrentProcess, __CPSGetFrontProcess, __CPSRegisterWithServer,
__CPSSetFrontProcessWithOptions, __ZN12CGBlitBufferC1Emmm,
__ZN12CGBlitBufferC2Emmm, __ZN15CGBufferStorage11FreeStorageEPvS0_,
__ZN15CGBufferStorage12UnMapStorageEPvS0_, __ZN15CGBufferStorage13ReleaseCFDataEPvS0_,
__ZN15CGBufferStorage16CreateWithBufferEPvmPFvS0_S0_ES0_,
__ZN15CGBufferStorage16CreateWithCFDataEPK8__CFData, __ZN15CGBufferStorage20ReleaseImageBlockSetEPvS0_,
__ZN15CGBufferStorage23CreateWithImageBlockSetEP15CGImageBlockSetm,
__ZN15CGBufferStorage31DataProviderReleaseInfoCallbackEPvPKvm,
__ZN15CGBufferStorage32BitmapContextReleaseDataCallbackEPvS0_,
__ZN15CGBufferStorage6CreateEm12CGBufOptions, __ZN15CGBufferStorage6ResizeEm,
__ZN5CGBuf5PrintEPKS_, __ZN5CGBuf6ReInitEmmjjjRjmP12CGColorSpacePKd22CGColorRenderingIntent12CGBufOptions,
__ZN5CGBufC1EP7CGImage, __ZN5CGBufC1EP9CGContext, __ZN5CGBufC1EPK13vImage_BufferjjjPFvPvS3_ES3_P12CGColorSpacePKd22CGColorRenderingIntent12CGBufOptions,
__ZN5CGBufC1EmmjjjP12CGColorSpacePKd22CGColorRenderingIntent12CGBufOptions,
__ZN5CGBufC2EP7CGImage, __ZN5CGBufC2EP9CGContext, __ZN5CGBufC2EPK13vImage_BufferjjjPFvPvS3_ES3_P12CGColorSpacePKd22CGColorRenderingIntent12CGBufOptions,
__ZN5CGBufC2EmmjjjP12CGColorSpacePKd22CGColorRenderingIntent12CGBufOptions,
__ZNK5CGBuf10PrintPixelERPcRmmm, __ZNK5CGBuf13CreateCGImageEb,
__ZNK5CGBuf13_GetAlphaDataERm, __ZNK5CGBuf21CreateCGBitmapContextEv,
__ZNK5CGBuf5PrintERPcRmPKc, _cglsAttachDrawable, _cglsAttachPBuffer,
_cglsAttachState, _cglsCreateContext, _cglsCreatePBuffer,
_cglsDestroyContext, _cglsDestroyPBuffer, _cglsDestroyRendererInfo,
_cglsGetInteger, _cglsGetPixelFormat, _cglsGetState, _cglsGetSurface,
_cglsGetVirtualScreen, _cglsQueryRendererInfo, _cglsSetInteger,
_cglsTexImageIOSurface2D, _cglsTexImagePBuffer, _kCGAutoBitDepthMax,
_kCGCFNumberPointerType, _kCGCFNumberSizeTType, _kCGColorBlack,
_kCGColorClear, _kCGColorConversionBlackPointCompensation,
_kCGColorConversionTRCSize, _kCGColorSpaceACESCGLinear, _kCGColorSpaceAdobeRGB1998,
_kCGColorSpaceDCIP3, _kCGColorSpaceDisplayP3, _kCGColorSpaceDisplayP3_709OETF,
_kCGColorSpaceDisplayP3_HLG, _kCGColorSpaceDisplayP3_PQ, _kCGColorSpaceDisplayP3_PQ_EOTF,
_kCGColorSpaceDisplayRGB, _kCGColorSpaceExtendedDisplayP3,
_kCGColorSpaceExtendedGray, _kCGColorSpaceExtendedITUR_2020,
_kCGColorSpaceExtendedLinearDisplayP3, _kCGColorSpaceExtendedLinearGray,
_kCGColorSpaceExtendedLinearITUR_2020, _kCGColorSpaceExtendedLinearSRGB,
_kCGColorSpaceExtendedRange, _kCGColorSpaceExtendedSRGB, _kCGColorSpaceGenericCMYK,
_kCGColorSpaceGenericExtendedLinearRGB, _kCGColorSpaceGenericGray,
_kCGColorSpaceGenericGrayGamma2_2, _kCGColorSpaceGenericHDR,
_kCGColorSpaceGenericLab, _kCGColorSpaceGenericRGB, _kCGColorSpaceGenericRGBLinear,
_kCGColorSpaceGenericXYZ, _kCGColorSpaceITUR_2020, _kCGColorSpaceITUR_2020_HLG,
_kCGColorSpaceITUR_2020_PQ, _kCGColorSpaceITUR_2020_PQ_EOTF,
_kCGColorSpaceITUR_2100_HLG, _kCGColorSpaceITUR_2100_PQ, _kCGColorSpaceITUR_709,
_kCGColorSpaceLinearDisplayP3, _kCGColorSpaceLinearGray, _kCGColorSpaceLinearITUR_2020,
_kCGColorSpaceLinearSRGB, _kCGColorSpacePerceptualStandardRGB,
_kCGColorSpaceROMMRGB, _kCGColorSpaceSRGB, _kCGColorSpaceUncalibratedCMYK,
_kCGColorSpaceUncalibratedGray, _kCGColorSpaceUncalibratedRGB,
_kCGColorTransformBlackPointCompensation, _kCGColorTransformConvertImageHeight,
_kCGColorTransformConvertImageQuality, _kCGColorTransformConvertImageWidth,
_kCGColorTransformUseCalibratedColor, _kCGColorWhite, _kCGContextBackgroundColor,
_kCGContextBoundingBox, _kCGContextClear, _kCGContextColorSpace,
_kCGContextDeviceScale, _kCGContextDisplayList, _kCGContextErase,
_kCGContextFilterInfo, _kCGContextFlush, _kCGContextGroup,
_kCGContextLog, _kCGContextResolution, _kCGContextStyle, _kCGContextStyleBegin,
_kCGContextStyleContent, _kCGContextStyleContentBegin, _kCGContextStyleContentEnd,
_kCGContextStyleEnd, _kCGContextStyleType, _kCGContextSynchronize,
_kCGContextWait, _kCGConvertColorDataUseColorSyncForHDR, _kCGDataProviderHasHighLatency,
_kCGDataProviderIndeterminateSize, _kCGDisplayBlueGammaKey,
_kCGDisplayBluePointXKey, _kCGDisplayBluePointYKey, _kCGDisplayBrightnessAffectsGammaKey,
_kCGDisplayBundleURLKey, _kCGDisplayCSProfileDataKey, _kCGDisplayEDIDKey,
_kCGDisplayEDIDOriginalKey, _kCGDisplayFixedPixelFormatKey,
_kCGDisplayGammaChannelsKey, _kCGDisplayGammaEntryCountKey,
_kCGDisplayGammaEntrySizeKey, _kCGDisplayGammaTableKey, _kCGDisplayGreenGammaKey,
_kCGDisplayGreenPointXKey, _kCGDisplayGreenPointYKey, _kCGDisplayHasBacklightKey,
_kCGDisplayHorizontalImageSizeKey, _kCGDisplayID, _kCGDisplayIOFBTransformKey,
_kCGDisplayIsDigitalKey, _kCGDisplayIsVirtualDevice, _kCGDisplayLocationKey,
_kCGDisplayParametersKey, _kCGDisplayPixelHeight, _kCGDisplayPixelWidth,
_kCGDisplayProductIDKey, _kCGDisplayProductNameKey, _kCGDisplayRedGammaKey,
_kCGDisplayRedPointXKey, _kCGDisplayRedPointYKey, _kCGDisplaySerialNumberKey,
_kCGDisplaySerialStringKey, _kCGDisplayShowDuplicateLowResolutionModes,
_kCGDisplayStreamColorSpace, _kCGDisplayStreamDestinationRect,
_kCGDisplayStreamMinimumFrameTime, _kCGDisplayStreamPreserveAspectRatio,
_kCGDisplayStreamQueueDepth, _kCGDisplayStreamShowCursor,
_kCGDisplayStreamSourceRect, _kCGDisplayStreamYCbCrMatrix,
_kCGDisplayStreamYCbCrMatrix_ITU_R_601_4, _kCGDisplayStreamYCbCrMatrix_ITU_R_709_2,
_kCGDisplayStreamYCbCrMatrix_SMPTE_240M_1995, _kCGDisplayTypeKey,
_kCGDisplayUUID, _kCGDisplayVendorIDKey, _kCGDisplayViewAngleAffectsGammaKey,
_kCGDisplayWeekOfManufactureKey, _kCGDisplayWhiteGammaKey,
_kCGDisplayWhitePointXKey, _kCGDisplayWhitePointYKey, _kCGDisplayYearOfManufactureKey,
_kCGFontNameKeyCopyright, _kCGFontNameKeyDescription, _kCGFontNameKeyDesigner,
_kCGFontNameKeyDesignerURL, _kCGFontNameKeyFontFamily, _kCGFontNameKeyFontSubfamily,
_kCGFontNameKeyFullName, _kCGFontNameKeyLicense, _kCGFontNameKeyLicenseURL,
_kCGFontNameKeyManufacturer, _kCGFontNameKeyPostScriptName,
_kCGFontNameKeyPreferredFamily, _kCGFontNameKeyPreferredSubfamily,
_kCGFontNameKeySampleText, _kCGFontNameKeyTrademark, _kCGFontNameKeyUniqueID,
_kCGFontNameKeyVendorURL, _kCGFontNameKeyVersion, _kCGFontVariationAxisDefaultValue,
_kCGFontVariationAxisMaxValue, _kCGFontVariationAxisMinValue,
_kCGFontVariationAxisName, _kCGImageBlockBaseAddressAlignmentRequest,
_kCGImageBlockBytesPerRowAlignmentRequest, _kCGImageBlockColorSpaceRequest,
_kCGImageBlockFormatBGRx8, _kCGImageBlockFormatRequest, _kCGImageBlockMarkAsReadOnlyRequest,
_kCGImageBlockSingletonRequest, _kCGImageBlockTileRequest,
_kCGImageForceConversion, _kCGImagePropertyIOSurface, _kCGImageProviderAlphaIsNotPremultiplied,
_kCGImageProviderAlphaIsOne, _kCGImageProviderAlphaIsPremultiplied,
_kCGImageProviderAlphaNoneSkipLastRequest, _kCGImageProviderPremultipliedAlphaRequest,
_kCGImageProviderSupportsMultipleResolutions, _kCGImageSurfaceDisplayMaskRequest,
_kCGImageWillDeallocate, _kCGLineWidthHairline, _kCGMenuBarActiveMaterialKey,
_kCGMenuBarDisplayIDKey, _kCGMenuBarFilterKey, _kCGMenuBarFlagsKey,
_kCGMenuBarFullScreenAppleWindowKey, _kCGMenuBarFullScreenFillWindowKey,
_kCGMenuBarHasBackstopKey, _kCGMenuBarImageWindowKey, _kCGMenuBarInactiveImageWindowKey,
_kCGMenuBarInactiveMaterialKey, _kCGMenuBarMenuTitlesArrayKey,
_kCGMenuBarRevealKey, _kCGMenuBarSpaceIDKey, _kCGMenuBarStatusBarAvailableSpace,
_kCGMenuBarSystemOverrideRevealAmountKey, _kCGMenuBarTitleMaterialKey,
_kCGMenuBarWorkspaceIDKey, _kCGPDFContextAccessPermissions,
_kCGPDFContextAllowsCopying, _kCGPDFContextAllowsPrinting,
_kCGPDFContextArtBox, _kCGPDFContextAuthor, _kCGPDFContextBleedBox,
_kCGPDFContextCreateLinearizedPDF, _kCGPDFContextCreatePDFA,
_kCGPDFContextCreator, _kCGPDFContextCropBox, _kCGPDFContextDate,
_kCGPDFContextDocumentID, _kCGPDFContextEncryptionCipher,
_kCGPDFContextEncryptionCipherAESv2, _kCGPDFContextEncryptionCipherAESv3,
_kCGPDFContextEncryptionCipherNone, _kCGPDFContextEncryptionCipherRC4,
_kCGPDFContextEncryptionHashedOwnerPassword, _kCGPDFContextEncryptionHashedUserPassword,
_kCGPDFContextEncryptionKey, _kCGPDFContextEncryptionKeyLength,
_kCGPDFContextEncryptionOwnerAndUserPasswordsHash, _kCGPDFContextEncryptionPermissions,
_kCGPDFContextKeywords, _kCGPDFContextMediaBox, _kCGPDFContextOutputIntent,
_kCGPDFContextOutputIntents, _kCGPDFContextOwnerPassword,
_kCGPDFContextProducer, _kCGPDFContextSecurityHandlerRevision,
_kCGPDFContextShouldCompress, _kCGPDFContextShouldOptimizeImagesForScreenDisplay,
_kCGPDFContextShouldOutputAllImagesAsJPEG, _kCGPDFContextSubject,
_kCGPDFContextTitle, _kCGPDFContextTrimBox, _kCGPDFContextUserPassword,
_kCGPDFDocumentAuthor, _kCGPDFDocumentCreationDate, _kCGPDFDocumentCreator,
_kCGPDFDocumentKeywords, _kCGPDFDocumentModificationDate,
_kCGPDFDocumentProducer, _kCGPDFDocumentSubject, _kCGPDFDocumentTitle,
_kCGPDFFontDataKey, _kCGPDFFontFormatKey, _kCGPDFKeyAAPLHash,
_kCGPDFOutlineChildren, _kCGPDFOutlineDestination, _kCGPDFOutlineDestinationRect,
_kCGPDFOutlineTitle, _kCGPDFTagPropertyActualText, _kCGPDFTagPropertyAlternativeText,
_kCGPDFTagPropertyExpansionText, _kCGPDFTagPropertyLanguageText,
_kCGPDFTagPropertyTitleText, _kCGPDFXDestinationOutputProfile,
_kCGPDFXInfo, _kCGPDFXOutputCondition, _kCGPDFXOutputConditionIdentifier,
_kCGPDFXOutputIntentSubtype, _kCGPDFXRegistryName, _kCGPDFXTrapped,
_kCGPDFXVersion, _kCGPSDSCCreationDateKey, _kCGPSDSCCreatorAppKey,
_kCGPSDSCCreatorConverterKey, _kCGPSDSCForKey, _kCGPSDSCInfoKey,
_kCGPSDSCNupNessKey, _kCGPSDSCOrientationKey, _kCGPSDSCPageOrderKey,
_kCGPSDSCPagesKey, _kCGPSDSCRoutingKey, _kCGPSDSCTitleKey,
_kCGPSDSCViewingOrientationKey, _kCGPSFeatureInfoKey, _kCGPSGenerateProtectedOutput,
_kCGPSOutputDeviceDPI, _kCGPSOutputFormatKey, _kCGPatternWillDeallocate,
_kCGSConnectionDefaultSpace, _kCGSConnectionIDKey, _kCGSContextIDKey,
_kCGSDisplayIDKey, _kCGSFalse, _kCGSLocationKey, _kCGSPSNHiKey,
_kCGSPSNLoKey, _kCGSPackagesCollapsedSpaceKey, _kCGSPackagesCurrentSpaceKey,
_kCGSPackagesDisplayIdentifierKey, _kCGSPackagesMainDisplayIdentifier,
_kCGSPackagesManagementDataKey, _kCGSPackagesSpaceAutoCreatedKey,
_kCGSPackagesSpacePropertiesKey, _kCGSPackagesSpacesKey, _kCGSRoutingRecordsKey,
_kCGSSessionAuditIDKey, _kCGSSessionConsoleSetKey, _kCGSSessionGroupIDKey,
_kCGSSessionIDKey, _kCGSSessionLongUserNameKey, _kCGSSessionOnConsoleKey,
_kCGSSessionOrderingKey, _kCGSSessionSecureInputPID, _kCGSSessionUserIDKey,
_kCGSSessionUserNameKey, _kCGSSpaceDictionariesKey, _kCGSSpaceIDsKey,
_kCGSTrue, _kCGSUpdateCAFlushes, _kCGSUpdateCASends, _kCGSUpdateEvents,
_kCGSUpdateIntervals, _kCGSUpdateMenuBarInterval, _kCGSUpdateMetadata,
_kCGSUpdateMirrorInterval, _kCGSUpdatePreparationInterval,
_kCGSUpdateRenderInterval, _kCGSVirtualDisplay1080pMode, _kCGSVirtualDisplayCommunicatorPID,
_kCGSVirtualDisplayInfoDictionary, _kCGSVirtualDisplayModelID,
_kCGSVirtualDisplayOwnerPID, _kCGSVirtualDisplayOwnerUID,
_kCGSVirtualDisplaySerial, _kCGSVirtualDisplayVendorID, _kCGSWindowDirtyRegion,
_kCGSWindowDisplayID, _kCGSWindowIDKey, _kCGSWindowRightBackingStoreReaderKey,
_kCGSWindowRightBackingStoreWriterKey, _kCGSWindowRightEventReceiverKey,
_kCGSWindowRightOwnerKey, _kCGSWindowRightPresenterKey, _kCGSWindowTagsKey,
_kCGSWorkspaceBindingSticky, _kCGSWorkspaceFirstUserSpaceIdentifier,
_kCGSWorkspaceIdentifierKey, _kCGSWorkspaceInterTileSpacingKey,
_kCGSWorkspaceLayoutDisplaySizeKey, _kCGSWorkspaceLayoutFirstTileSizeKey,
_kCGSWorkspaceLayoutObjectKey, _kCGSWorkspaceLayoutObjectMaxTilesKey,
_kCGSWorkspaceLayoutObjectRectKey, _kCGSWorkspaceLayoutPreferencesArrayKey,
_kCGSWorkspaceLiveResizingKey, _kCGSWorkspaceManagedParentSpaceKey,
_kCGSWorkspaceNumberKey, _kCGSWorkspaceOwnerIsStubKey, _kCGSWorkspaceOwnerKey,
_kCGSWorkspacePrincipalFullScreenWindowID, _kCGSWorkspaceReservedAreaBottomKey,
_kCGSWorkspaceReservedAreaKey, _kCGSWorkspaceReservedAreaLeftKey,
_kCGSWorkspaceReservedAreaRightKey, _kCGSWorkspaceReservedAreaTopKey,
_kCGSWorkspaceSizeConstraintsKey, _kCGSWorkspaceSizeConstraintsMaxKey,
_kCGSWorkspaceSizeConstraintsMinKey, _kCGSWorkspaceSizeConstraintsPreferredKey,
_kCGSWorkspaceSpaceIDKey, _kCGSWorkspaceSwitchOnAppActivationKey,
_kCGSWorkspaceTileLimitedClippingKey, _kCGSWorkspaceTileRectKey,
_kCGSWorkspaceTileSpaceArrayKey, _kCGSWorkspaceTileTypeKey,
_kCGSWorkspaceTileTypePrimary, _kCGSWorkspaceTileTypeSecondary,
_kCGSWorkspaceTileTypeUnknown, _kCGSWorkspaceTileWindowKey,
_kCGSWorkspaceTypeKey, _kCGSWorkspaceWallSpaceKey, _kCGWindowAlpha,
_kCGWindowBackingLocationVideoMemory, _kCGWindowBounds, _kCGWindowIsOnscreen,
_kCGWindowLayer, _kCGWindowMemoryUsage, _kCGWindowName, _kCGWindowNumber,
_kCGWindowOwnerName, _kCGWindowOwnerPID, _kCGWindowRimDensity,
_kCGWindowRimDensityActive, _kCGWindowRimDensityInactive,
_kCGWindowRimStyleHard, _kCGWindowRimStyleHardActive, _kCGWindowRimStyleHardInactive,
_kCGWindowShadowClipTop, _kCGWindowShadowClipTopActive, _kCGWindowShadowClipTopInactive,
_kCGWindowShadowDensity, _kCGWindowShadowDensityActive, _kCGWindowShadowDensityInactive,
_kCGWindowShadowRadius, _kCGWindowShadowRadiusActive, _kCGWindowShadowRadiusInactive,
_kCGWindowShadowVerticalOffset, _kCGWindowShadowVerticalOffsetActive,
_kCGWindowShadowVerticalOffsetInactive, _kCGWindowSharingState,
_kCGWindowStoreType, _kCGWindowWorkspace, _path_iterator_add_curve_to_point,
_path_iterator_add_line_to_point, _path_iterator_add_quad_curve_to_point,
_path_iterator_begin, _path_iterator_call, _path_iterator_close_subpath,
_path_iterator_create, _path_iterator_dasher_create, _path_iterator_end,
_path_iterator_move_to_point, _path_iterator_release, _path_iterator_stroker_create,
_rect_to_bounds, _region_create_with_shape, _shape_alloc_bounds,
_shape_alloc_data, _shape_alloc_qdrgn, _shape_bounds, _shape_combine,
_shape_contains_bounds, _shape_contains_point, _shape_copy,
_shape_count, _shape_difference, _shape_empty, _shape_enclose_with_bounds,
_shape_enum_alloc, _shape_enum_binary_clean_up, _shape_enum_binary_init,
_shape_enum_binary_next, _shape_enum_clip_alloc, _shape_enum_clip_next,
_shape_enum_clip_scan, _shape_enum_free, _shape_enum_next,
_shape_forward_enum, _shape_forward_enum_next, _shape_free,
_shape_inset, _shape_intersect, _shape_intersect_with_bounds,
_shape_is_empty, _shape_is_rectangular, _shape_length, _shape_offset,
_shape_qdrgn_alloc, _shape_qdrgn_free, _shape_union, _shape_xor ]
objc-classes: [ CGVirtualDisplay, CGVirtualDisplayDescriptor, CGVirtualDisplayMode,
CGVirtualDisplaySettings ]
weak-symbols: [ __Z15CGDefaultsCheckI31CGResamplingAllowTemplateMethodENT_10ResultTypeEv,
__Z18CGPreferencesCheckI31CGResamplingAllowTemplateMethodENT_10ResultTypeEv ]
- targets: [ x86_64-macos, arm64e-macos, x86_64h-macos, arm64-macos ]
symbols: [ _CGSSetDisplayAcceleratorBoost, _CGVirtualDisplaySettingsRefreshDeadlineNone ]
...
|
0 | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/CoreGraphics.framework | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/CoreGraphics.framework/Headers/CGDirectDisplay.h | /* CoreGraphics - CGDirectDisplay.h
Copyright (c) 2000-2011 Apple Inc.
All rights reserved. */
#ifndef CGDIRECTDISPLAY_H_
#define CGDIRECTDISPLAY_H_
#include <CoreFoundation/CFBase.h>
#include <CoreFoundation/CFAvailability.h>
#include <stdint.h>
#include <CoreGraphics/CGContext.h>
#include <CoreGraphics/CGError.h>
#include <CoreGraphics/CGGeometry.h>
#include <CoreGraphics/CGWindow.h>
#include <CoreGraphics/CGWindowLevel.h>
#include <mach/boolean.h>
typedef uint32_t CGDirectDisplayID;
typedef uint32_t CGOpenGLDisplayMask;
typedef double CGRefreshRate;
typedef struct CF_BRIDGED_TYPE(id) CGDisplayMode *CGDisplayModeRef;
#define kCGNullDirectDisplay ((CGDirectDisplayID)0)
#define kCGDirectMainDisplay CGMainDisplayID()
CF_IMPLICIT_BRIDGING_ENABLED
CF_ASSUME_NONNULL_BEGIN
/* Return the display ID of the current main display. */
CG_EXTERN CGDirectDisplayID CGMainDisplayID(void)
CG_AVAILABLE_STARTING(10.2);
/* Mechanisms used to find screen IDs.
The following functions take an array length (`maxDisplays') and array of
pointers to CGDirectDisplayIDs (`displays'). The array is filled in with
the displays meeting the specified criteria; no more than `maxDisplays'.
will be stored in `displays'. The number of displays meeting the criteria
is returned in `matchingDisplayCount'.
If the `displays' array is NULL, only the number of displays meeting the
specified criteria is returned in `matchingDisplayCount'. */
CG_EXTERN CGError CGGetDisplaysWithPoint(CGPoint point, uint32_t maxDisplays,
CGDirectDisplayID * __nullable displays,
uint32_t * __nullable matchingDisplayCount)
CG_AVAILABLE_STARTING(10.0);
CG_EXTERN CGError CGGetDisplaysWithRect(CGRect rect, uint32_t maxDisplays,
CGDirectDisplayID * __nullable displays,
uint32_t * __nullable matchingDisplayCount)
CG_AVAILABLE_STARTING(10.0);
CG_EXTERN CGError CGGetDisplaysWithOpenGLDisplayMask(CGOpenGLDisplayMask mask,
uint32_t maxDisplays, CGDirectDisplayID * __nullable displays,
uint32_t * __nullable matchingDisplayCount)
CG_AVAILABLE_STARTING(10.0);
/* Return a list of active displays.
If `activeDisplays' is NULL, then `maxDisplays' is ignored, and
`displayCount' is set to the number of displays. Otherwise, the list of
active displays is stored in `activeDisplays'; no more than `maxDisplays'
will be stored in `activeDisplays'.
The first display returned in the list is the main display (the one with
the menu bar). When mirroring, this will be the largest drawable display
in the mirror set, or, if all displays are the same size, the one with
the deepest pixel depth. */
CG_EXTERN CGError CGGetActiveDisplayList(uint32_t maxDisplays,
CGDirectDisplayID * __nullable activeDisplays,
uint32_t * __nullable displayCount)
CG_AVAILABLE_STARTING(10.0);
/* Return a list of online displays.
If `onlineDisplays' is NULL, then `maxDisplays' is ignored, and
`displayCount' is set to the number of displays. Otherwise, the list of
online displays is stored in `onlineDisplays'; no more than `maxDisplays'
will be stored in `onlineDisplays'.
With hardware mirroring, a display may be online but not necessarily
active or drawable. Programs which manipulate display settings such as
the palette or gamma tables need access to all displays in use, including
hardware mirrors which are not drawable. */
CG_EXTERN CGError CGGetOnlineDisplayList(uint32_t maxDisplays,
CGDirectDisplayID * __nullable onlineDisplays,
uint32_t * __nullable displayCount)
CG_AVAILABLE_STARTING(10.2);
/* Return the OpenGL display mask for `display', or 0 if `display' is an
invalid display. */
CG_EXTERN CGOpenGLDisplayMask CGDisplayIDToOpenGLDisplayMask(
CGDirectDisplayID display)
CG_AVAILABLE_STARTING(10.0);
/* Return the display for the OpenGL display mask `mask', or
`kCGNullDirectDisplay' if the bits set dont't match a display. A mask
with multiple bits set returns an arbitrary match. */
CG_EXTERN CGDirectDisplayID CGOpenGLDisplayMaskToDisplayID(
CGOpenGLDisplayMask mask)
CG_AVAILABLE_STARTING(10.2);
/* Return the screen size and screen origin of `display' in global
coordinates, or `CGRectZero' if `display' is invalid. */
CG_EXTERN CGRect CGDisplayBounds(CGDirectDisplayID display)
CG_AVAILABLE_STARTING(10.0);
/* Return the width in pixels of `display'. */
CG_EXTERN size_t CGDisplayPixelsWide(CGDirectDisplayID display)
CG_AVAILABLE_STARTING(10.0);
/* Return the height in pixels of `display'. */
CG_EXTERN size_t CGDisplayPixelsHigh(CGDirectDisplayID display)
CG_AVAILABLE_STARTING(10.0);
/* Return an array of all modes for the specified display, or NULL if
`display' is invalid. The "options" field is reserved for future
expansion; pass NULL for now. */
CG_EXTERN CFArrayRef __nullable CGDisplayCopyAllDisplayModes(
CGDirectDisplayID display, CFDictionaryRef __nullable options)
CG_AVAILABLE_STARTING(10.6);
CG_EXTERN const CFStringRef kCGDisplayShowDuplicateLowResolutionModes
CG_AVAILABLE_STARTING(10.8);
/* Return the current mode of the specified display, or NULL if `display'
is invalid. */
CG_EXTERN CGDisplayModeRef __nullable CGDisplayCopyDisplayMode(
CGDirectDisplayID display)
CG_AVAILABLE_STARTING(10.6);
/* Switch the display mode of `display' to `mode'. The "options" field is
reserved for future expansion; pass NULL for now.
The selected display mode persists for the life of the program, and
automatically reverts to the permanent setting when the program
terminates.
When changing display modes of displays in a mirroring set, other
displays in the mirroring set will be set to a display mode capable of
mirroring the bounds of the largest display being explicitly set.
Note that after switching, display parameters and addresses may change. */
CG_EXTERN CGError CGDisplaySetDisplayMode(CGDirectDisplayID display,
CGDisplayModeRef __nullable mode, CFDictionaryRef __nullable options)
CG_AVAILABLE_STARTING(10.6);
/* Return the width in points of the specified display mode. */
CG_EXTERN size_t CGDisplayModeGetWidth(CGDisplayModeRef __nullable mode)
CG_AVAILABLE_STARTING(10.6);
/* Return the height in points of the specified display mode. */
CG_EXTERN size_t CGDisplayModeGetHeight(CGDisplayModeRef __nullable mode)
CG_AVAILABLE_STARTING(10.6);
/* Return a string representing the pixel encoding of the specified display
mode, expressed as a CFString containing an IOKit graphics mode. */
CG_EXTERN CFStringRef __nullable CGDisplayModeCopyPixelEncoding(
CGDisplayModeRef __nullable mode)
CG_AVAILABLE_BUT_DEPRECATED(10.6, 10.11);
/* Return the refresh rate of the specified display mode. */
CG_EXTERN double CGDisplayModeGetRefreshRate(CGDisplayModeRef __nullable mode)
CG_AVAILABLE_STARTING(10.6);
/* Return the IOKit flags of the specified display mode. */
CG_EXTERN uint32_t CGDisplayModeGetIOFlags(CGDisplayModeRef __nullable mode)
CG_AVAILABLE_STARTING(10.6);
/* Return the IOKit display mode ID of the specified display mode. */
CG_EXTERN int32_t CGDisplayModeGetIODisplayModeID(
CGDisplayModeRef __nullable mode)
CG_AVAILABLE_STARTING(10.6);
/* Return true if the specified mode is usable for displaying the
desktop GUI; false otherwise. */
CG_EXTERN bool CGDisplayModeIsUsableForDesktopGUI(
CGDisplayModeRef __nullable mode)
CG_AVAILABLE_STARTING(10.6);
/* Return the CFTypeID for CGDisplayModeRefs. */
CG_EXTERN CFTypeID CGDisplayModeGetTypeID(void)
CG_AVAILABLE_STARTING(10.6);
/* Equivalent to `CFRetain(mode)', except it doesn't crash (as CFRetain
does) if `mode' is NULL. */
CG_EXTERN CGDisplayModeRef __nullable CGDisplayModeRetain(
CGDisplayModeRef __nullable mode)
CG_AVAILABLE_STARTING(10.6);
/* Equivalent to `CFRelease(mode)', except it doesn't crash (as CFRelease
does) if `mode' is NULL. */
CG_EXTERN void CGDisplayModeRelease(CGDisplayModeRef __nullable mode)
CG_AVAILABLE_STARTING(10.6);
/* Return the width in pixels of the specified display mode. */
CG_EXTERN size_t CGDisplayModeGetPixelWidth(CGDisplayModeRef __nullable mode)
CG_AVAILABLE_STARTING(10.8);
/* Return the height in pixels of the specified display mode. */
CG_EXTERN size_t CGDisplayModeGetPixelHeight(CGDisplayModeRef __nullable mode)
CG_AVAILABLE_STARTING(10.8);
/* Set the gamma function for `display' by specifying the coefficients of
the gamma transfer function.
Gamma values must be greater than 0. Minimum values must be in the
interval [0, 1). Maximum values must be in the interval (0, 1]. Out of
range values or maximum values greater than or equal to minimum values
return `kCGErrorRangeCheck'.
Values are computed by sampling a function for a range of indexes from 0
to 1:
value = Min + ((Max - Min) * pow(index, Gamma))
The resulting values are converted to a machine-specific format and
loaded into display hardware. */
typedef float CGGammaValue;
CG_EXTERN CGError CGSetDisplayTransferByFormula(CGDirectDisplayID display,
CGGammaValue redMin, CGGammaValue redMax, CGGammaValue redGamma,
CGGammaValue greenMin, CGGammaValue greenMax, CGGammaValue greenGamma,
CGGammaValue blueMin, CGGammaValue blueMax, CGGammaValue blueGamma)
CG_AVAILABLE_STARTING(10.0);
/* Return the coefficients of the gamma transfer function for `display'. */
CG_EXTERN CGError CGGetDisplayTransferByFormula(CGDirectDisplayID display,
CGGammaValue * __nullable redMin, CGGammaValue * __nullable redMax,
CGGammaValue * __nullable redGamma,
CGGammaValue * __nullable greenMin, CGGammaValue * __nullable greenMax,
CGGammaValue * __nullable greenGamma,
CGGammaValue * __nullable blueMin, CGGammaValue * __nullable blueMax,
CGGammaValue * __nullable blueGamma)
CG_AVAILABLE_STARTING(10.0);
/* Return the capacity, or number of entries, in the gamma table for
`display', or 0 if 'display' is invalid. */
CG_EXTERN uint32_t CGDisplayGammaTableCapacity(CGDirectDisplayID display)
CG_AVAILABLE_STARTING(10.3);
/* Set the gamma function for `display' by specifying the values in the RGB
gamma tables.
Values within each table should be in the interval [0, 1] The same table
may be passed in for red, green, and blue channels. The number of entries
in the tables is specified by `tableSize'. The tables are interpolated as
needed to generate the number of samples needed by the display hardware. */
CG_EXTERN CGError CGSetDisplayTransferByTable(CGDirectDisplayID display,
uint32_t tableSize, const CGGammaValue * __nullable redTable,
const CGGammaValue * __nullable greenTable,
const CGGammaValue * __nullable blueTable)
CG_AVAILABLE_STARTING(10.0);
/* Return the RGB gamma table values for `display'.
The number of entries in each array is specified by `capacity'; no more
than `capacity' entries will be written to each table. The number of
entries written is stored in `sampleCount'. */
CG_EXTERN CGError CGGetDisplayTransferByTable(CGDirectDisplayID display,
uint32_t capacity, CGGammaValue * __nullable redTable,
CGGammaValue * __nullable greenTable,
CGGammaValue * __nullable blueTable, uint32_t * __nullable sampleCount)
CG_AVAILABLE_STARTING(10.0);
/* Set the gamma function for `display' by specifying the values in the RGB
gamma tables as bytes.
Values within each table should be in the interval [0, 255] The same
table may be passed in for red, green, and blue channels. The number of
entries in the tables is specified by `tableSize'. The tables are
interpolated as needed to generate the number of samples needed by the
display hardware. */
CG_EXTERN CGError CGSetDisplayTransferByByteTable(CGDirectDisplayID display,
uint32_t tableSize, const uint8_t * redTable,
const uint8_t * greenTable, const uint8_t * blueTable)
CG_AVAILABLE_STARTING(10.0);
/* Restore the gamma tables of all system displays to the values in the
user's ColorSync display profile. */
CG_EXTERN void CGDisplayRestoreColorSyncSettings(void)
CG_AVAILABLE_STARTING(10.0);
/* Options used with `CGDisplayCaptureWithOptions' and
`CGCaptureAllDisplaysWithOptions'. */
typedef CF_OPTIONS(uint32_t, CGCaptureOptions) {
kCGCaptureNoOptions = 0, /* Default behavior. */
kCGCaptureNoFill __CG_DEPRECATED_ENUMERATOR = (1 << 0) /* Disables fill with black on capture. */
};
/* Return true if `display' is captured; false otherwise. */
CG_EXTERN boolean_t CGDisplayIsCaptured(CGDirectDisplayID display)
CG_AVAILABLE_BUT_DEPRECATED(10.0,10.9);
/* Capture `display' for exclusive use by an application. */
CG_EXTERN CGError CGDisplayCapture(CGDirectDisplayID display)
CG_AVAILABLE_STARTING(10.0);
/* Capture `display' for exclusive use by an application, using the options
specified by `options'. */
CG_EXTERN CGError CGDisplayCaptureWithOptions(CGDirectDisplayID display,
CGCaptureOptions options)
CG_AVAILABLE_STARTING(10.3);
/* Release the captured display `display'. */
CG_EXTERN CGError CGDisplayRelease(CGDirectDisplayID display)
CG_AVAILABLE_STARTING(10.0);
/* Capture all displays. This operation provides an immersive environment
for an appplication, and prevents other applications from trying to
adjust to display changes. */
CG_EXTERN CGError CGCaptureAllDisplays(void)
CG_AVAILABLE_STARTING(10.0);
/* Capture all displays, using the options specified by `options'. This
operation provides an immersive environment for an appplication, and
prevents other applications from trying to adjust to display changes. */
CG_EXTERN CGError CGCaptureAllDisplaysWithOptions(CGCaptureOptions options)
CG_AVAILABLE_STARTING(10.3);
/* Release all captured displays and restore the display modes to the user's
preferences. May be used in conjunction with `CGDisplayCapture' or
`CGCaptureAllDisplays'. */
CG_EXTERN CGError CGReleaseAllDisplays(void)
CG_AVAILABLE_STARTING(10.0);
/* Returns window ID of the shield window for the captured display `display',
or NULL if the display is not not shielded. */
CG_EXTERN CGWindowID CGShieldingWindowID(CGDirectDisplayID display)
CG_AVAILABLE_STARTING(10.0);
/* Returns the window level of the shield window for the captured display
`display'. */
CG_EXTERN CGWindowLevel CGShieldingWindowLevel(void)
CG_AVAILABLE_STARTING(10.0);
/* Return an image containing the contents of the display identified by
`displayID'. */
CG_EXTERN CGImageRef __nullable CGDisplayCreateImage(CGDirectDisplayID displayID)
CG_AVAILABLE_STARTING(10.6);
/* Return an image containing the contents of the rectangle `rect',
specified in display space, of the display identified by `displayID'. The
actual rectangle used is the rectangle returned from
`CGRectIntegral(rect)'. */
CG_EXTERN CGImageRef __nullable CGDisplayCreateImageForRect(
CGDirectDisplayID display, CGRect rect)
CG_AVAILABLE_STARTING(10.6);
/* Hide the mouse cursor and increment the hide cursor count. The `display'
parameter is ignored. */
CG_EXTERN CGError CGDisplayHideCursor(CGDirectDisplayID display)
CG_AVAILABLE_STARTING(10.0);
/* Decrement the hide cursor count; show the cursor if the hide cursor count
is zero. The `display' parameter is ignored. */
CG_EXTERN CGError CGDisplayShowCursor(CGDirectDisplayID display)
CG_AVAILABLE_STARTING(10.0);
/* Move the mouse cursor to the specified point relative to the origin (the
upper-left corner) of `display'. No events are generated as a result of
the move. Points that lie outside the desktop are clipped to the
desktop. */
CG_EXTERN CGError CGDisplayMoveCursorToPoint(CGDirectDisplayID display,
CGPoint point)
CG_AVAILABLE_STARTING(10.0);
/* Return the mouse position change since with the last mouse move event
received by the application. */
CG_EXTERN void CGGetLastMouseDelta(int32_t *__nullable deltaX,
int32_t * __nullable deltaY)
CG_AVAILABLE_STARTING(10.0);
/* Return a CGContext suitable for drawing to the captured display
`display', or NULL if `display' has not been captured. The context is
owned by the device and should not be released by the caller.
The context remains valid while the display is captured and while the
display configuration is unchanged. Releasing the captured display or
reconfiguring the display invalidates the drawing context.
The determine when the display configuration is changing, use
`CGDisplayRegisterReconfigurationCallback'. */
CG_EXTERN CGContextRef __nullable CGDisplayGetDrawingContext(
CGDirectDisplayID display)
CG_AVAILABLE_STARTING(10.3);
/* These are deprecated; don't use them. */
#define kCGDisplayWidth CFSTR("Width")
#define kCGDisplayHeight CFSTR("Height")
#define kCGDisplayMode CFSTR("Mode")
#define kCGDisplayBitsPerPixel CFSTR("BitsPerPixel")
#define kCGDisplayBitsPerSample CFSTR("BitsPerSample")
#define kCGDisplaySamplesPerPixel CFSTR("SamplesPerPixel")
#define kCGDisplayRefreshRate CFSTR("RefreshRate")
#define kCGDisplayModeUsableForDesktopGUI CFSTR("UsableForDesktopGUI")
#define kCGDisplayIOFlags CFSTR("IOFlags")
#define kCGDisplayBytesPerRow CFSTR("kCGDisplayBytesPerRow")
#define kCGIODisplayModeID CFSTR("IODisplayModeID")
#define kCGDisplayModeIsSafeForHardware \
CFSTR("kCGDisplayModeIsSafeForHardware")
#define kCGDisplayModeIsInterlaced \
CFSTR("kCGDisplayModeIsInterlaced")
#define kCGDisplayModeIsStretched \
CFSTR("kCGDisplayModeIsStretched")
#define kCGDisplayModeIsTelevisionOutput \
CFSTR("kCGDisplayModeIsTelevisionOutput")
/* These types are deprecated; don't use them. */
typedef uint32_t CGDisplayCount;
typedef CGError CGDisplayErr;
#define CGDisplayNoErr kCGErrorSuccess
/* These functions are deprecated; do not use them. */
/* Use the CGDisplayMode APIs instead. */
CG_EXTERN CFArrayRef __nullable CGDisplayAvailableModes(CGDirectDisplayID dsp)
CG_AVAILABLE_BUT_DEPRECATED(10.0, 10.6);
/* Use the CGDisplayMode APIs instead. */
CG_EXTERN CFDictionaryRef __nullable CGDisplayBestModeForParameters(
CGDirectDisplayID display, size_t bitsPerPixel, size_t width, size_t height,
boolean_t * __nullable exactMatch)
CG_AVAILABLE_BUT_DEPRECATED(10.0, 10.6);
/* Use the CGDisplayMode APIs instead. */
CG_EXTERN CFDictionaryRef __nullable CGDisplayBestModeForParametersAndRefreshRate(
CGDirectDisplayID display, size_t bitsPerPixel, size_t width, size_t height,
CGRefreshRate refreshRate, boolean_t * __nullable exactMatch)
CG_AVAILABLE_BUT_DEPRECATED(10.0, 10.6);
/* Use the CGDisplayMode APIs instead. */
CG_EXTERN CFDictionaryRef __nullable CGDisplayCurrentMode(
CGDirectDisplayID display)
CG_AVAILABLE_BUT_DEPRECATED(10.0, 10.6);
/* Use the CGDisplayMode APIs instead. */
CG_EXTERN CGError CGDisplaySwitchToMode(CGDirectDisplayID display,
CFDictionaryRef __nullable mode)
CG_AVAILABLE_BUT_DEPRECATED(10.0, 10.6);
CF_ASSUME_NONNULL_END
CF_IMPLICIT_BRIDGING_DISABLED
#endif /* CGDIRECTDISPLAY_H_ */
|
0 | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/CoreGraphics.framework | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/CoreGraphics.framework/Headers/CGPDFStream.h | /* CoreGraphics - CGPDFStream.h
* Copyright (c) 2002-2008 Apple Inc.
* All rights reserved. */
#ifndef CGPDFSTREAM_H_
#define CGPDFSTREAM_H_
typedef struct CGPDFStream *CGPDFStreamRef;
#include <CoreFoundation/CFBase.h>
#include <CoreFoundation/CFAvailability.h>
#include <stdint.h>
typedef CF_ENUM (int32_t, CGPDFDataFormat) {
CGPDFDataFormatRaw, CGPDFDataFormatJPEGEncoded, CGPDFDataFormatJPEG2000
};
#include <CoreGraphics/CGBase.h>
#include <CoreGraphics/CGPDFDictionary.h>
#include <CoreGraphics/CGPDFStream.h>
#include <CoreFoundation/CFData.h>
CF_IMPLICIT_BRIDGING_ENABLED
CF_ASSUME_NONNULL_BEGIN
/* Return the dictionary of `stream'. */
CG_EXTERN CGPDFDictionaryRef __nullable CGPDFStreamGetDictionary(
CGPDFStreamRef cg_nullable stream)
CG_AVAILABLE_STARTING(10.3, 2.0);
/* Return the data of `stream'. */
CG_EXTERN CFDataRef __nullable CGPDFStreamCopyData(
CGPDFStreamRef cg_nullable stream,
CGPDFDataFormat * cg_nullable format)
CG_AVAILABLE_STARTING(10.3, 2.0);
CF_ASSUME_NONNULL_END
CF_IMPLICIT_BRIDGING_DISABLED
#endif /* CGPDFSTREAM_H_ */
|
0 | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/CoreGraphics.framework | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/CoreGraphics.framework/Headers/CGRemoteOperation.h | /* CoreGraphics - CGRemoteOperation.h
Copyright (c) 2000-2011 Apple Inc.
All rights reserved. */
#ifndef CGREMOTEOPERATION_H_
#define CGREMOTEOPERATION_H_
#include <CoreFoundation/CFBase.h>
#include <CoreFoundation/CFAvailability.h>
#include <stdint.h>
#include <CoreGraphics/CGDirectDisplay.h>
#include <CoreGraphics/CGError.h>
#include <CoreGraphics/CGGeometry.h>
#include <CoreFoundation/CFMachPort.h>
CF_IMPLICIT_BRIDGING_ENABLED
CF_ASSUME_NONNULL_BEGIN
typedef CGError CGEventErr;
#define CGEventNoErr kCGErrorSuccess
/* A type representing the number of buttons being set in a synthetic mouse
event. */
typedef uint32_t CGButtonCount;
/* A type representing the number of scrolling devices being set in a
synthetic scrolling event. */
typedef uint32_t CGWheelCount;
/* A type representing a character generated by pressing one or more keys on
a keyboard. */
typedef uint16_t CGCharCode;
/* A type representing the virtual key codes used in keyboard events. */
typedef uint16_t CGKeyCode;
/* A client-supplied callback function that’s invoked when an area of the
display is modified or refreshed.
When an area of the display is modified or refreshed, your callback
function will be invoked with a count of the number of rectangles in the
refreshed areas, and a list of the refreshed rectangles. The rectangles
are in global coordinates.
To register a screen refresh callback function, call the function
`CGRegisterScreenRefreshCallback'. Quartz invokes your callback function
when operations such as drawing, window movement, scrolling, or display
reconfiguration occur on local displays. When you are finished using a
callback registration, call `CGUnregisterScreenRefreshCallback' to remove
it.
Note that a single rectangle may occupy multiple displays, either by
overlapping the displays or by residing on coincident displays when
mirroring is active. You can use the function `CGGetDisplaysWithRect' to
determine the displays a rectangle occupies. */
typedef void (*CGScreenRefreshCallback)(uint32_t count,
const CGRect * rects,
void *__nullable userInfo);
/* Register a callback function to be invoked when local displays are
refreshed or modified.
The callback function you register is invoked only if your application
has an active event loop. The callback is invoked in the same thread of
execution that is processing events within your application. */
CG_EXTERN CGError CGRegisterScreenRefreshCallback(
CGScreenRefreshCallback callback, void * __nullable userInfo)
CG_AVAILABLE_BUT_DEPRECATED(10.0,10.8);
/* Remove a previously registered callback function invoked when local
displays are refreshed or modified.
Both the callback function and the `userInfo' argument must match the
registered entry to be removed. */
CG_EXTERN void CGUnregisterScreenRefreshCallback(
CGScreenRefreshCallback callback, void * __nullable userInfo)
CG_AVAILABLE_BUT_DEPRECATED(10.0,10.8);
/* Wait for screen refresh operations.
In some applications it may be preferable to wait for screen refresh data
synchronously, using this function. You should call this function in a
thread other than the main event-processing thread.
As an alternative, Quartz also supports asynchronous notification --- see
`CGRegisterScreenRefreshCallback'. If refresh callback functions are
registered, this function should not be used.
You must deallocate the returned rectangle array with the function
`CGReleaseScreenRefreshRects'. */
CG_EXTERN CGError CGWaitForScreenRefreshRects(
CGRect *__nullable * __nullable rects, uint32_t * __nullable count)
CG_AVAILABLE_BUT_DEPRECATED(10.0, 10.8);
/* A type for `CGWaitForScreenUpdateRects' specifying the desired types of
screen update operations. */
typedef CF_OPTIONS(uint32_t, CGScreenUpdateOperation) {
kCGScreenUpdateOperationRefresh = 0,
kCGScreenUpdateOperationMove = (1u << 0),
kCGScreenUpdateOperationReducedDirtyRectangleCount = (1u << 31)
};
/* A type representing the distance a region on the screen moves in pixel
units.
The fields `dX' and `dY' describe the direction of movement. Positive
values of `dX' indicate movement to the right; negative values indicate
movement to the left. Positive values of `dY' indicate movement downward;
negative values indicate movement upward. */
struct CGScreenUpdateMoveDelta {
int32_t dX, dY;
};
typedef struct CGScreenUpdateMoveDelta CGScreenUpdateMoveDelta;
/* A type specifying a client-supplied callback function that’s invoked when
an area of the display is moved.
When an area of the display is moved, your callback function will be
invoked with a count of the number of rectangles in the moved area, and a
list of the moved rectangles. The rectangles are in global coordinates,
and describe the area prior to the move operation.
Your function should not modify, deallocate or free memory pointed to by
`rectArray'.
A single rectangle may occupy multiple displays, either by overlapping
the displays or by residing on coincident displays when mirroring is
active. Use `CGGetDisplaysWithRect' to determine the displays a rectangle
occupies. */
typedef void (*CGScreenUpdateMoveCallback)(CGScreenUpdateMoveDelta delta,
size_t count, const CGRect * rects, void * __nullable userInfo);
/* Register a callback function to be invoked when an area of the display is
moved. The callback is invoked on the same thread of execution that is
processing events within your application. */
CG_EXTERN CGError CGScreenRegisterMoveCallback(
CGScreenUpdateMoveCallback callback, void * __nullable userInfo)
CG_AVAILABLE_BUT_DEPRECATED(10.3,10.8);
/* Remove a previously registered screen update callback function. */
CG_EXTERN void CGScreenUnregisterMoveCallback(
CGScreenUpdateMoveCallback callback, void * __nullable userInfo)
CG_AVAILABLE_BUT_DEPRECATED(10.3,10.8);
/* Wait for screen update operations.
The parameter `requestedOperations' specifies the desired types of screen
update operations. There are several possible choices:
-- Specify `kCGScreenUpdateOperationRefresh' if you want all move
operations to be returned as refresh operations.
-- Specify `(kCGScreenUpdateOperationRefresh|kCGScreenUpdateOperationMove)'
if you want to distinguish between move and refresh operations.
-- Add `kCGScreenUpdateOperationReducedDirtyRectangleCount' to the screen
operations if you want to minimize the number of rectangles returned
to represent changed areas of the display.
You should deallocate the returned screen update rects by calling
`CGReleaseScreenRefreshRects'.
In some applications it may be preferable to wait for screen update data
synchronously. You should call this function in a thread other than the
main event-processing thread.
As an alternative, Quartz also supports asynchronous notification --- see
`CGRegisterScreenRefreshCallback' and `CGScreenRegisterMoveCallback'. If
refresh or move callback functions are registered, this function should
not be used. */
CG_EXTERN CGError CGWaitForScreenUpdateRects(
CGScreenUpdateOperation requestedOperations,
CGScreenUpdateOperation * __nullable currentOperation,
CGRect * __nullable * __nullable rects, size_t * __nullable rectCount,
CGScreenUpdateMoveDelta * __nullable delta)
CG_AVAILABLE_BUT_DEPRECATED(10.3,10.8);
/* Deallocate the list of rectangles received from
`CGWaitForScreenRefreshRects' or `CGWaitForScreenUpdateRects'. */
CG_EXTERN void CGReleaseScreenRefreshRects(CGRect * __nullable rects)
CG_AVAILABLE_BUT_DEPRECATED(10.0,10.8);
/* Return true if the mouse cursor is visible, false otherwise. */
CG_EXTERN boolean_t CGCursorIsVisible(void)
CG_AVAILABLE_BUT_DEPRECATED(10.3,10.9);
/* Return true if the mouse cursor is drawn in frame buffer memory, false
otherwise. (The cursor could exist in an overlay plane or a similar
mechanism that puts pixels on-screen without altering frame buffer
content.) If the cursor is drawn in the frame buffer, it is read back
along with window data.
The return value is based on the union of the state of the cursor on all
displays. If the cursor is drawn in the frame buffer on any display, this
function returns true. */
CG_EXTERN boolean_t CGCursorIsDrawnInFramebuffer(void)
CG_AVAILABLE_BUT_DEPRECATED(10.3,10.9);
/* Move the mouse cursor to the desired position in global display
coordinates without generating events. */
CG_EXTERN CGError CGWarpMouseCursorPosition(CGPoint newCursorPosition)
CG_AVAILABLE_STARTING(10.0);
/* After posting a left mouse down with remote mouse drag suppressing
hardware mouse move events, after some time with no remote mouse drag
events a warning is logged to aid in diagnosing "my hardware mouse is
dead" problems.
Mouse-down conditions of arbitrary length may be produced deliberately,
as when scrolling through a lengthly document. */
#define kCGMouseDownEventMaskingDeadSwitchTimeout (60.0)
/* Connect or disconnect the mouse and cursor while an application is in the
foreground.
When you call this function to disconnect the cursor and mouse, all
events received by your application have a constant absolute location but
contain mouse delta (change in X and Y) data. You may hide the cursor or
change it into something appropriate for your application. You can
reposition the cursor by using the function `CGDisplayMoveCursorToPoint'
or `CGWarpMouseCursorPosition'. */
CG_EXTERN CGError CGAssociateMouseAndMouseCursorPosition(boolean_t connected)
CG_AVAILABLE_STARTING(10.0);
/* Return a CFMachPort that corresponds to the Mac OS X Window Server's
server port.
Use this function to detect if the window server process exits or is not
running. If this function returns NULL, the window server is not running.
This code example shows how to register a callback function to detect
when the window server exits:
static void handleWindowServerDeath(CFMachPortRef port, void *info) {
printf("Window Server port death detected!\n");
CFRelease(port);
exit(1);
}
static void watchForServerDeath() {
CFMachPortRef port = CGWindowServerCreateServerPort();
CFMachPortSetInvalidationCallBack(port, handleWindowServerDeath);
}
Note that when the window server exits, there may be a few seconds during
which no window server is running. This function will return NULL until a
new window server is running.
Your program must run a CFRunLoop for the port death callback to occur. A
program which does not use a CFRunLoop may periodically call
`CFMachPortIsValid' to check whether the port is valid. */
CG_EXTERN CFMachPortRef __nullable CGWindowServerCreateServerPort(void)
CG_AVAILABLE_STARTING(10.8);
/* This function is obsolete. Use Quartz events and Quartz event sources
instead. */
CG_EXTERN CGError CGEnableEventStateCombining(boolean_t combineState)
CG_AVAILABLE_BUT_DEPRECATED(10.1, 10.6);
/* This function obsolete. Use
`CGEventSourceSetLocalEventsFilterDuringSuppressionState' instead. */
CG_EXTERN CGError CGInhibitLocalEvents(boolean_t inhibit)
CG_AVAILABLE_BUT_DEPRECATED(10.0, 10.6);
/* This function is obsolete. Use `CGEventCreateMouseEvent' instead.
Synthesize a low-level mouse-button event on the local machine.
The parameter `mouseCursorPosition' specifies the new coordinates of the
mouse in global display space.
Pass true for `updateMouseCursorPosition' if the on-screen cursor should
be moved to the location specified in the `mouseCursorPosition'
parameter; otherwise, pass false.
The parameter `buttonCount' specifies the number of mouse buttons, up to
a maximum of 32.
Pass true for `mouseButtonDown' to specify that the primary or left mouse
button is down; otherwise, pass false. The remaining parameters are
Boolean values that specify whether the remaining mouse buttons are down
(true) or up (false). The second value, if any, should specify the state
of the secondary mouse button (right). A third value should specify the
state of the center button, and the remaining buttons should be in USB
device order.
Based on the values entered, the appropriate mouse-down, mouse-up,
mouse-move, or mouse-drag events are generated, by comparing the new
state with the current state. */
CG_EXTERN CGError CGPostMouseEvent(CGPoint mouseCursorPosition,
boolean_t updateMouseCursorPosition, CGButtonCount buttonCount,
boolean_t mouseButtonDown, ... )
CG_AVAILABLE_BUT_DEPRECATED(10.0, 10.6);
/* This function is obsolete. Use `CGEventCreateScrollWheelEvent' instead.
Synthesize scroll wheel events.
The parameter `wheelCount' specifies the number of scrolling devices, up
to a maximum of 3.
The parameter `wheel1' specifies a value that reflects the movement of
the primary scrolling device on the mouse. The second and third values,
if any, reflect the movements of the other scrolling devices on the
mouse.
Scrolling movement is represented by small signed integer values,
typically in a range from -10 to +10. Large values may have unexpected
results, depending on the application that processes the event. */
CG_EXTERN CGError CGPostScrollWheelEvent(CGWheelCount wheelCount,
int32_t wheel1, ... )
CG_AVAILABLE_BUT_DEPRECATED(10.0, 10.6);
/* This function is obsolete. Use `CGEventCreateKeyboardEvent' instead. */
CG_EXTERN CGError CGPostKeyboardEvent(CGCharCode keyChar, CGKeyCode virtualKey,
boolean_t keyDown)
CG_AVAILABLE_BUT_DEPRECATED(10.0, 10.6);
/* A type specifying masks for classes of low-level events that can be
filtered during event suppression states. */
typedef CF_OPTIONS(uint32_t, CGEventFilterMask) {
kCGEventFilterMaskPermitLocalMouseEvents = 0x00000001,
kCGEventFilterMaskPermitLocalKeyboardEvents = 0x00000002,
kCGEventFilterMaskPermitSystemDefinedEvents = 0x00000004
};
#define kCGEventFilterMaskPermitAllEvents \
(kCGEventFilterMaskPermitLocalMouseEvents \
| kCGEventFilterMaskPermitLocalKeyboardEvents \
| kCGEventFilterMaskPermitSystemDefinedEvents)
/* A type specifying the event suppression states that can occur after
posting an event. */
typedef CF_ENUM(uint32_t, CGEventSuppressionState) {
kCGEventSuppressionStateSuppressionInterval = 0,
kCGEventSuppressionStateRemoteMouseDrag,
kCGNumberOfEventSuppressionStates
};
/* This function is obsolete. Use
`CGEventSourceSetLocalEventsFilterDuringSuppressionState' instead. */
CG_EXTERN CGError CGSetLocalEventsFilterDuringSuppressionState(
CGEventFilterMask filter, CGEventSuppressionState state)
CG_AVAILABLE_BUT_DEPRECATED(10.1, 10.6);
/* This function is obsolete. Use
`CGEventSourceSetLocalEventsSuppressionInterval' instead. */
CG_EXTERN CGError CGSetLocalEventsSuppressionInterval(CFTimeInterval seconds)
CG_AVAILABLE_BUT_DEPRECATED(10.0, 10.6);
/* This function is obsolete. Use `CGWindowServerCreateServerPort'
instead. */
CG_EXTERN CFMachPortRef __nullable CGWindowServerCFMachPort(void) CF_RETURNS_RETAINED
CG_AVAILABLE_BUT_DEPRECATED(10.1, 10.8);
/* Obsolete. Present for backwards compatibility with old header typos. */
#define kCGEventSupressionStateSupressionInterval \
kCGEventSuppressionStateSuppressionInterval
#define kCGEventSupressionStateRemoteMouseDrag \
kCGEventSuppressionStateRemoteMouseDrag
#define kCGNumberOfEventSupressionStates \
kCGNumberOfEventSuppressionStates
#define CGEventSupressionState \
CGEventSuppressionState
#define CGSetLocalEventsFilterDuringSupressionState(filter, state) \
CGSetLocalEventsFilterDuringSuppressionState(filter, state)
/* A type representing the count of items in an array of Quartz rectangles. */
typedef uint32_t CGRectCount;
CF_ASSUME_NONNULL_END
CF_IMPLICIT_BRIDGING_DISABLED
#endif /* CGREMOTEOPERATION_H_ */
|
0 | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/CoreGraphics.framework | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/CoreGraphics.framework/Headers/CGColorSpace.h | /* CoreGraphics - CGColorSpace.h
Copyright (c) 1999-2013 Apple Inc.
All rights reserved. */
#ifndef CGCOLORSPACE_H_
#define CGCOLORSPACE_H_
#include <CoreFoundation/CFBase.h>
#include <CoreFoundation/CFAvailability.h>
#include <stdint.h>
typedef struct CF_BRIDGED_TYPE(id) CGColorSpace *CGColorSpaceRef;
#include <CoreGraphics/CGBase.h>
#include <CoreGraphics/CGDataProvider.h>
CF_IMPLICIT_BRIDGING_ENABLED
/* Color rendering intents. */
typedef CF_ENUM (int32_t, CGColorRenderingIntent) {
kCGRenderingIntentDefault,
kCGRenderingIntentAbsoluteColorimetric,
kCGRenderingIntentRelativeColorimetric,
kCGRenderingIntentPerceptual,
kCGRenderingIntentSaturation
};
/* The model of a color space. */
typedef CF_ENUM (int32_t, CGColorSpaceModel) {
kCGColorSpaceModelUnknown = -1,
kCGColorSpaceModelMonochrome,
kCGColorSpaceModelRGB,
kCGColorSpaceModelCMYK,
kCGColorSpaceModelLab,
kCGColorSpaceModelDeviceN,
kCGColorSpaceModelIndexed,
kCGColorSpaceModelPattern,
kCGColorSpaceModelXYZ
};
CF_ASSUME_NONNULL_BEGIN
#define CG_HDR_BT_2100 1
/* The name of the "Generic" Gray color space. It is a legacy
color space so use it only if you definitely know that you
need it. If you need just a reasonable monochrome color space,
please use Generic Gray Gamma 2.2, i.e. use
kCGColorSpaceGenericGrayGamma2_2 name instead of
kCGColorSpaceGenericGray. */
CG_EXTERN const CFStringRef kCGColorSpaceGenericGray
CG_AVAILABLE_STARTING(10.4, 9.0);
/* The name of the "Generic" RGB color space. It is a legacy
color space so use it only if you definitely know that you
need it. If you need just a reasonable RGB color space,
please use sRGB, i.e. use kCGColorSpaceSRGB name
instead of kCGColorSpaceGenericRGB. */
CG_EXTERN const CFStringRef kCGColorSpaceGenericRGB
CG_AVAILABLE_STARTING(10.4, 9.0);
/* The name of the "Generic" CMYK color space. */
CG_EXTERN const CFStringRef kCGColorSpaceGenericCMYK
CG_AVAILABLE_STARTING(10.4, 9.0);
CG_EXTERN const CFStringRef kCGColorSpaceDisplayP3
CG_AVAILABLE_STARTING(10.11.2, 9.3);
/* The name of the "Generic" linear RGB color space. This is the same as
`kCGColorSpaceGenericRGB' but with a 1.0 gamma. */
CG_EXTERN const CFStringRef kCGColorSpaceGenericRGBLinear
CG_AVAILABLE_STARTING(10.5, 9.0);
/* The name of the Adobe RGB (1998) color space. For more information, see
"Adobe RGB (1998) Color Image Encoding", Version 2005-05, Adobe Systems
Inc. (http://www.adobe.com). */
CG_EXTERN const CFStringRef kCGColorSpaceAdobeRGB1998
CG_AVAILABLE_STARTING(10.5, 9.0);
/* The name of the sRGB color space. The capitalization in the name, while
strictly inaccurate, avoids interpretational ambiguity. For more
information, see IEC 61966-2-1 (1999-10): "Multimedia systems and
equipment - Colour measurement and management - Part 2-1: Colour
management - Default RGB colour space - sRGB". */
CG_EXTERN const CFStringRef kCGColorSpaceSRGB
CG_AVAILABLE_STARTING(10.5, 9.0);
/* The "Generic" gray color space with γ = 2.2. */
CG_EXTERN const CFStringRef kCGColorSpaceGenericGrayGamma2_2
CG_AVAILABLE_STARTING(10.6, 9.0);
CG_EXTERN const CFStringRef kCGColorSpaceGenericXYZ
CG_AVAILABLE_STARTING(10.11, 9.0);
/* The name of the "Generic" L*a*b* color space. This is the same as
L*a*b* colorspace created by `CGColorSpaceCreateLab' with
white_point[0.9642, 1.0, 0.8249] (i.e. D50), black_point[0.0, 0.0, 0.0]
and range [-128, 128, -128, 128]. */
CG_EXTERN const CFStringRef kCGColorSpaceGenericLab
CG_AVAILABLE_STARTING(10.13, 11.0);
CG_EXTERN const CFStringRef kCGColorSpaceACESCGLinear
CG_AVAILABLE_STARTING(10.11, 9.0);
CG_EXTERN const CFStringRef kCGColorSpaceITUR_709
CG_AVAILABLE_STARTING(10.11, 9.0);
CG_EXTERN const CFStringRef kCGColorSpaceITUR_2020
CG_AVAILABLE_STARTING(10.11, 9.0);
CG_EXTERN const CFStringRef kCGColorSpaceROMMRGB
CG_AVAILABLE_STARTING(10.11, 9.0);
CG_EXTERN const CFStringRef kCGColorSpaceDCIP3
CG_AVAILABLE_STARTING(10.11, 9.0);
CG_EXTERN const CFStringRef kCGColorSpaceLinearITUR_2020
CG_AVAILABLE_STARTING(12.0, 15.0);
CG_EXTERN const CFStringRef kCGColorSpaceExtendedITUR_2020
CG_AVAILABLE_STARTING(11.0, 14.0);
CG_EXTERN const CFStringRef kCGColorSpaceExtendedLinearITUR_2020
CG_AVAILABLE_STARTING(10.14.3, 12.3);
CG_EXTERN const CFStringRef kCGColorSpaceLinearDisplayP3
CG_AVAILABLE_STARTING(12.0, 15.0);
CG_EXTERN const CFStringRef kCGColorSpaceExtendedDisplayP3
CG_AVAILABLE_STARTING(11.0, 14.0);
CG_EXTERN const CFStringRef kCGColorSpaceExtendedLinearDisplayP3
CG_AVAILABLE_STARTING(10.14.3, 12.3);
CG_EXTERN const CFStringRef kCGColorSpaceITUR_2100_PQ
CG_AVAILABLE_STARTING(11.0, 14.0);
CG_EXTERN const CFStringRef kCGColorSpaceITUR_2100_HLG
CG_AVAILABLE_STARTING(11.0, 14.0);
CG_EXTERN const CFStringRef kCGColorSpaceDisplayP3_PQ
CG_AVAILABLE_STARTING(10.15.4, 13.4);
CG_EXTERN const CFStringRef kCGColorSpaceDisplayP3_HLG
CG_AVAILABLE_STARTING(10.14.6, 12.6);
CG_EXTERN const CFStringRef kCGColorSpaceITUR_2020_PQ
CG_AVAILABLE_BUT_DEPRECATED(10.15.4, 11.0, 13.4, 14.0); // Use kCGColorSpaceITUR_2100_PQ.
CG_EXTERN const CFStringRef kCGColorSpaceITUR_2020_HLG
CG_AVAILABLE_BUT_DEPRECATED(10.15.6, 11.0, 12.6, 14.0); // Use kCGColorSpaceITUR_2100_HLG.
CG_EXTERN const CFStringRef kCGColorSpaceDisplayP3_PQ_EOTF
CG_AVAILABLE_BUT_DEPRECATED(10.14.6, 10.15.4, 12.6, 13.4);
CG_EXTERN const CFStringRef kCGColorSpaceITUR_2020_PQ_EOTF
CG_AVAILABLE_BUT_DEPRECATED(10.14.6, 10.15.4, 12.6, 13.4); // Use kCGColorSpaceITUR_2100_PQ.
/* The name of the extended sRGB color space.
The extended sRGB color space allows to specify colors beyond the range of [0.0, 1.0],
while still preserving the colorimetry and encoding of sRGB (see above for more details).
The negative values will be encoded as the signed reflection of original encoding functions,
i.e. y(x) = sign(x)*f(abs(x)) where f(x) represents the encoding function.
The capitalization in the name is for avoiding interpretational ambiguity. */
CG_EXTERN const CFStringRef kCGColorSpaceExtendedSRGB
CG_AVAILABLE_STARTING(10.12, 10.0);
/* The name of the sRGB color space variant with linear gamma */
CG_EXTERN const CFStringRef kCGColorSpaceLinearSRGB
CG_AVAILABLE_STARTING(10.12, 10.0);
/* The name of the extended sRGB color space variant with linear gamma */
CG_EXTERN const CFStringRef kCGColorSpaceExtendedLinearSRGB
CG_AVAILABLE_STARTING(10.12, 10.0);
/* The name of the extended Gray color space. This color space has the same colorimetry as Generic Gray 2.2.
The negative values will be encoded as the signed reflection of original encoding functions,
i.e. y(x) = sign(x)*f(abs(x)) where f(x) represents the encoding function. */
CG_EXTERN const CFStringRef kCGColorSpaceExtendedGray
CG_AVAILABLE_STARTING(10.12, 10.0);
/* The name of the Generic Gray 2.2 color space variant with linear gamma */
CG_EXTERN const CFStringRef kCGColorSpaceLinearGray
CG_AVAILABLE_STARTING(10.12, 10.0);
/* The name of the extended Generic Gray 2.2 color space variant with linear gamma */
CG_EXTERN const CFStringRef kCGColorSpaceExtendedLinearGray
CG_AVAILABLE_STARTING(10.12, 10.0);
/* Create a DeviceGray color space. */
CG_EXTERN CGColorSpaceRef cg_nullable CGColorSpaceCreateDeviceGray(void)
CG_AVAILABLE_STARTING(10.0, 2.0);
/* Create a DeviceRGB color space. */
CG_EXTERN CGColorSpaceRef cg_nullable CGColorSpaceCreateDeviceRGB(void)
CG_AVAILABLE_STARTING(10.0, 2.0);
/* Create a DeviceCMYK color space. */
CG_EXTERN CGColorSpaceRef cg_nullable CGColorSpaceCreateDeviceCMYK(void)
CG_AVAILABLE_STARTING(10.0, 2.0);
/* Create a calibrated gray color space. `whitePoint' is an array of 3
numbers specifying the tristimulus value, in the CIE 1931 XYZ-space, of
the diffuse white point. `blackPoint' is an array of 3 numbers specifying
the tristimulus value, in CIE 1931 XYZ-space, of the diffuse black point.
`gamma' defines the gamma for the gray component. Specifying `blackPoint'
is not required and in such a case `blackPoint' will be assumed to be
[0.0, 0.0, 0.0]. */
CG_EXTERN CGColorSpaceRef __nullable CGColorSpaceCreateCalibratedGray(const CGFloat
whitePoint[CG_NONNULL_ARRAY 3], const CGFloat blackPoint[__nullable 3], CGFloat gamma)
CG_AVAILABLE_STARTING(10.0, 2.0);
/* Create a calibrated RGB color space. `whitePoint' is an array of 3
numbers specifying the tristimulus value, in the CIE 1931 XYZ-space, of
the diffuse white point. `blackPoint' is an array of 3 numbers specifying
the tristimulus value, in CIE 1931 XYZ-space, of the diffuse black point.
`gamma' is an array of 3 numbers specifying the gamma for the red, green,
and blue components of the color space. `matrix' is an array of 9 numbers
specifying the linear interpretation of the gamma-modified RGB values of
the color space with respect to the final XYZ representation.
Not all parameters need to be specified. If `blackPoint' is NULL it will be
assumed to be [0.0, 0.0, 0.0]. If `gamma' is NULL it will be assumed to be
linear for all components. If `matrix' is NULL it will be assumed to be identity. */
CG_EXTERN CGColorSpaceRef __nullable CGColorSpaceCreateCalibratedRGB(const CGFloat
whitePoint[CG_NONNULL_ARRAY 3], const CGFloat blackPoint[__nullable 3],
const CGFloat gamma[__nullable 3], const CGFloat matrix[__nullable 9])
CG_AVAILABLE_STARTING(10.0, 2.0);
/* Create an L*a*b* color space. `whitePoint' is an array of 3 numbers
specifying the tristimulus value, in the CIE 1931 XYZ-space, of the
diffuse white point. `blackPoint' is an array of 3 numbers specifying the
tristimulus value, in CIE 1931 XYZ-space, of the diffuse black point.
`range' is an array of four numbers specifying the range of valid values
for the a* and b* components of the color space. Not all parameters need to be
specified. If `blackPoint'in NULL it will be assumed to be [0.0, 0.0, 0.0].
If `range' is NULL it will be assumed to be [-100, 100, -100, 100]. */
CG_EXTERN CGColorSpaceRef __nullable CGColorSpaceCreateLab(const CGFloat whitePoint[CG_NONNULL_ARRAY 3],
const CGFloat blackPoint[__nullable 3], const CGFloat range[__nullable 4])
CG_AVAILABLE_STARTING(10.0, 2.0);
/* Create an ICC-based color space using the ICC profile raw data specified by
`data' which can be either CFDataRef or CGDataProviderRef */
CG_EXTERN CGColorSpaceRef __nullable CGColorSpaceCreateWithICCData(CFTypeRef cg_nullable data)
CG_AVAILABLE_STARTING(10.12, 10.0);
/* Create an ICC-based color space. `nComponents' specifies the number of
color components in the color space defined by the ICC profile data. This
must match the number of components actually in the ICC profile, and must
be 1, 3, or 4. `range' is an array of 2*nComponents numbers specifying
the minimum and maximum valid values of the corresponding color
components, so that for color component k, range[2*k] <= c[k] <=
range[2*k+1], where c[k] is the k'th color component. `profile' is a data
provider specifying the ICC profile. `alternate' specifies an alternate
color space to be used in case the ICC profile is not supported. It must
have `nComponents' color components. If `alternate' is NULL, then the
color space used will be DeviceGray, DeviceRGB, or DeviceCMYK, depending
on whether `nComponents' is 1, 3, or 4, respectively. */
CG_EXTERN CGColorSpaceRef __nullable CGColorSpaceCreateICCBased(size_t nComponents,
const CGFloat * __nullable range, CGDataProviderRef cg_nullable profile,
CGColorSpaceRef __nullable alternate)
CG_AVAILABLE_STARTING(10.0, 2.0);
/* Create an indexed color space. A sample value in an indexed color space
is treated as an index into the color table of the color space. `base'
specifies the base color space in which the values in the color table are
to be interpreted. `lastIndex' is an integer which specifies the maximum
valid index value; it must be less than or equal to 255. `colorTable' is
an array of m * (lastIndex + 1) bytes, where m is the number of color
components in the base color space. Each byte is an unsigned integer in
the range 0 to 255 that is scaled to the range of the corresponding color
component in the base color space. */
CG_EXTERN CGColorSpaceRef __nullable CGColorSpaceCreateIndexed(CGColorSpaceRef cg_nullable baseSpace,
size_t lastIndex, const unsigned char * cg_nullable colorTable)
CG_AVAILABLE_STARTING(10.0, 2.0);
/* Create a pattern color space. `baseSpace' is the underlying color space
of the pattern color space. For colored patterns, `baseSpace' should be
NULL; for uncolored patterns, `baseSpace' specifies the color space of
colors which will be painted through the pattern. */
CG_EXTERN CGColorSpaceRef __nullable CGColorSpaceCreatePattern(CGColorSpaceRef __nullable baseSpace)
CG_AVAILABLE_STARTING(10.0, 2.0);
typedef const struct CF_BRIDGED_TYPE(id) ColorSyncProfile* ColorSyncProfileRef;
CG_EXTERN const CFStringRef kCGColorSpaceExtendedRange;
/* Create a color space using ColorSyncProfileRef.
To create an extended color space include kCGColorSpaceExtendedRange/kCFBooleanTrue
key/value pair in `options' dictionary. */
CG_EXTERN CGColorSpaceRef __nullable CGColorSpaceCreateWithColorSyncProfile(ColorSyncProfileRef __nullable, CFDictionaryRef __nullable options)
CG_AVAILABLE_STARTING(12.0, 15.0);
/* Create a color space using `name' as the identifier for the color
space. */
CG_EXTERN CGColorSpaceRef __nullable CGColorSpaceCreateWithName(CFStringRef cg_nullable name)
CG_AVAILABLE_STARTING(10.2, 2.0);
/* Equivalent to `CFRetain(space)', except it doesn't crash (as CFRetain
does) if `space' is NULL. */
CG_EXTERN CGColorSpaceRef cg_nullable CGColorSpaceRetain(CGColorSpaceRef cg_nullable space)
CG_AVAILABLE_STARTING(10.0, 2.0);
/* Equivalent to `CFRelease(space)', except it doesn't crash (as CFRelease
does) if `space' is NULL. */
CG_EXTERN void CGColorSpaceRelease(CGColorSpaceRef cg_nullable space)
CG_AVAILABLE_STARTING(10.0, 2.0);
/* Return the system name of the color space. This applies to all color spaces
created using `CGColorSpaceCreateWithName' as well as to ICC-based colorspaces
created using `CGColorSpaceCreateWithICCData' or `CGColorSpaceCreateICCBased'
if they are equivalent to respective named system color spaces. Device color spaces
also return unique names. This function will return NULL for other color spaces.
Example:
CGColorSpaceRef space = CGColorSpaceCreateWithICCData(icc_data);
CFStringRef name = CGColorSpaceGetName(space);
if (name != NULL && CFEqual(name, kCGColorSpaceDisplayP3)) {
// your color space is Display P3
...
}
*/
CG_EXTERN CFStringRef __nullable CGColorSpaceGetName(CGColorSpaceRef cg_nullable space)
CG_AVAILABLE_STARTING(10.13, 11.0);
/* Same as `CGColorSpaceGetName' but with ownership released to the caller. */
CG_EXTERN CFStringRef __nullable CGColorSpaceCopyName(CGColorSpaceRef cg_nullable space)
CG_AVAILABLE_STARTING(10.6, 10.0);
/* Return the CFTypeID for CGColorSpaces. */
CG_EXTERN CFTypeID CGColorSpaceGetTypeID(void)
CG_AVAILABLE_STARTING(10.2, 2.0);
/* Return the number of color components in the color space `space'. */
CG_EXTERN size_t CGColorSpaceGetNumberOfComponents(CGColorSpaceRef cg_nullable space)
CG_AVAILABLE_STARTING(10.0, 2.0);
/* Return the color space model of `space'. */
CG_EXTERN CGColorSpaceModel CGColorSpaceGetModel(CGColorSpaceRef cg_nullable space)
CG_AVAILABLE_STARTING(10.5, 2.0);
/* Return the base color space of `space' if `space' is a pattern or indexed
color space; otherwise, return NULL. To determine whether a color space
is an indexed or pattern color space, use `CGColorSpaceGetModel'. */
CG_EXTERN CGColorSpaceRef __nullable CGColorSpaceGetBaseColorSpace(CGColorSpaceRef cg_nullable space)
CG_AVAILABLE_STARTING(10.5, 2.0);
/* Return the number of entries in the color table of `space' if `space' is
an indexed color space; otherwise, return 0. To determine whether a color
space is an indexed color space, use `CGColorSpaceGetModel'. */
CG_EXTERN size_t CGColorSpaceGetColorTableCount(CGColorSpaceRef cg_nullable space)
CG_AVAILABLE_STARTING(10.5, 2.0);
/* Copy the entries in the color table of `space' to `table' if `space' is
an indexed color space; otherwise, do nothing. The array pointed to by
`table' should be at least as large as the number of entries in the color
table; the returned data is in the same format as that passed to
`CGColorSpaceCreateIndexed'. To determine whether a color space is an
indexed color space, use `CGColorSpaceGetModel'. */
CG_EXTERN void CGColorSpaceGetColorTable(CGColorSpaceRef cg_nullable space,
uint8_t * cg_nullable table) CG_AVAILABLE_STARTING(10.5, 2.0);
/* Return a copy of the ICC profile data of `space', or NULL if the color space
doesn't have an ICC profile. */
CG_EXTERN CFDataRef __nullable CGColorSpaceCopyICCData(CGColorSpaceRef cg_nullable space)
CG_AVAILABLE_STARTING(10.12, 10.0);
/* Return true if gamut of the RGB color space is greater than 85% of NTSC gamut */
CG_EXTERN bool CGColorSpaceIsWideGamutRGB(CGColorSpaceRef)
CG_AVAILABLE_STARTING(10.12, 10.0);
/* Return true if color space uses transfer functions defined in ITU Rec.2100
Please use CGColorSpaceUsesITUR_2100TF instead */
CG_EXTERN bool CGColorSpaceIsHDR(CGColorSpaceRef)
CG_AVAILABLE_BUT_DEPRECATED(10.15, 10.15.4, 13.0, 13.4);
/* Return true if color space uses transfer functions defined in ITU Rec.2100 */
CG_EXTERN bool CGColorSpaceUsesITUR_2100TF(CGColorSpaceRef)
CG_AVAILABLE_STARTING(11.0, 14.0);
CG_EXTERN bool CGColorSpaceIsPQBased(CGColorSpaceRef s)
CG_AVAILABLE_STARTING(12.0, 15.0);
CG_EXTERN bool CGColorSpaceIsHLGBased(CGColorSpaceRef s)
CG_AVAILABLE_STARTING(12.0, 15.0);
/* Return true if `space' can be used as a destination color space; false
otherwise. */
CG_EXTERN bool CGColorSpaceSupportsOutput(CGColorSpaceRef space)
CG_AVAILABLE_STARTING(10.12, 10.0);
CG_EXTERN CFPropertyListRef __nullable
CGColorSpaceCopyPropertyList(CGColorSpaceRef space)
CG_AVAILABLE_STARTING(10.12, 10.0);
CG_EXTERN CGColorSpaceRef __nullable
CGColorSpaceCreateWithPropertyList(CFPropertyListRef plist)
CG_AVAILABLE_STARTING(10.12, 10.0);
/* Return true if `space' uses extended range [-Inf, +Inf]; false
otherwise. */
CG_EXTERN bool CGColorSpaceUsesExtendedRange(CGColorSpaceRef space)
CG_AVAILABLE_STARTING(10.12, 10.0);
/* Create a linearized copy of the color space if the color space is matrix based.
Return NULL if otherwise */
CG_EXTERN CGColorSpaceRef __nullable CGColorSpaceCreateLinearized(CGColorSpaceRef space)
CG_AVAILABLE_STARTING(11.0, 14.0);
/* Create a copy of the color space which uses extended range [-Inf, +Inf] if the color space is
matrix based. Return NULL if otherwise */
CG_EXTERN CGColorSpaceRef __nullable CGColorSpaceCreateExtended(CGColorSpaceRef space)
CG_AVAILABLE_STARTING(11.0, 14.0);
/* Create a linearized copy of the color space which uses extended range [-Inf, +Inf]
if the color space is matrix based. Return NULL if otherwise */
CG_EXTERN CGColorSpaceRef __nullable CGColorSpaceCreateExtendedLinearized(CGColorSpaceRef space)
CG_AVAILABLE_STARTING(11.0, 14.0);
/* Deprecated functions */
/* Please use `CGColorSpaceCreateWithICCData' */
CG_EXTERN CGColorSpaceRef __nullable CGColorSpaceCreateWithICCProfile(CFDataRef cg_nullable data)
CG_AVAILABLE_BUT_DEPRECATED(10.5, 10.13, 2.0, 11.0);
/* Please use `CGColorSpaceCopyICCData' */
CG_EXTERN CFDataRef __nullable CGColorSpaceCopyICCProfile(CGColorSpaceRef cg_nullable space)
CG_AVAILABLE_BUT_DEPRECATED(10.5, 10.13, 2.0, 11.0);
/* Please use `CGColorSpaceCreateWithColorSyncProfile' */
CG_EXTERN CGColorSpaceRef __nullable
CGColorSpaceCreateWithPlatformColorSpace(const void * cg_nullable ref)
CG_AVAILABLE_BUT_DEPRECATED(10.0, 12.0, 9.0, 15.0);
CF_ASSUME_NONNULL_END
CF_IMPLICIT_BRIDGING_DISABLED
#endif /* CGCOLORSPACE_H_ */
|
0 | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/CoreGraphics.framework | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/CoreGraphics.framework/Headers/CGGeometry.h | /* CoreGraphics - CGGeometry.h
Copyright (c) 1998-2011 Apple Inc.
All rights reserved. */
#ifndef CGGEOMETRY_H_
#define CGGEOMETRY_H_
#include <CoreGraphics/CGBase.h>
#include <CoreFoundation/CFDictionary.h>
#include <CoreFoundation/CFBase.h>
#include <CoreFoundation/CFAvailability.h>
#include <stdint.h>
CF_IMPLICIT_BRIDGING_ENABLED
CF_ASSUME_NONNULL_BEGIN
/* Points. */
struct
CGPoint {
CGFloat x;
CGFloat y;
};
typedef struct CG_BOXABLE CGPoint CGPoint;
/* Sizes. */
struct CGSize {
CGFloat width;
CGFloat height;
};
typedef struct CG_BOXABLE CGSize CGSize;
/* Vectors. */
#define CGVECTOR_DEFINED 1
struct CGVector {
CGFloat dx;
CGFloat dy;
};
typedef struct CG_BOXABLE CGVector CGVector;
/* Rectangles. */
struct CGRect {
CGPoint origin;
CGSize size;
};
typedef struct CG_BOXABLE CGRect CGRect;
/* Rectangle edges. */
typedef CF_CLOSED_ENUM(uint32_t, CGRectEdge) {
CGRectMinXEdge, CGRectMinYEdge, CGRectMaxXEdge, CGRectMaxYEdge
};
/* The "zero" point -- equivalent to CGPointMake(0, 0). */
CG_EXTERN const CGPoint CGPointZero
CG_AVAILABLE_STARTING(10.0, 2.0);
/* The "zero" size -- equivalent to CGSizeMake(0, 0). */
CG_EXTERN const CGSize CGSizeZero
CG_AVAILABLE_STARTING(10.0, 2.0);
/* The "zero" rectangle -- equivalent to CGRectMake(0, 0, 0, 0). */
CG_EXTERN const CGRect CGRectZero
CG_AVAILABLE_STARTING(10.0, 2.0);
/* The "empty" rect. This is the rectangle returned when, for example, we
intersect two disjoint rectangles. Note that the null rect is not the
same as the zero rect. */
CG_EXTERN const CGRect CGRectNull
CG_AVAILABLE_STARTING(10.0, 2.0);
/* The infinite rectangle. */
CG_EXTERN const CGRect CGRectInfinite
CG_AVAILABLE_STARTING(10.4, 2.0);
/* Make a point from `(x, y)'. */
CG_INLINE CGPoint CGPointMake(CGFloat x, CGFloat y);
/* Make a size from `(width, height)'. */
CG_INLINE CGSize CGSizeMake(CGFloat width, CGFloat height);
/* Make a vector from `(dx, dy)'. */
CG_INLINE CGVector CGVectorMake(CGFloat dx, CGFloat dy);
/* Make a rect from `(x, y; width, height)'. */
CG_INLINE CGRect CGRectMake(CGFloat x, CGFloat y, CGFloat width,
CGFloat height);
/* Return the leftmost x-value of `rect'. */
CG_EXTERN CGFloat CGRectGetMinX(CGRect rect)
CG_AVAILABLE_STARTING(10.0, 2.0);
/* Return the midpoint x-value of `rect'. */
CG_EXTERN CGFloat CGRectGetMidX(CGRect rect)
CG_AVAILABLE_STARTING(10.0, 2.0);
/* Return the rightmost x-value of `rect'. */
CG_EXTERN CGFloat CGRectGetMaxX(CGRect rect)
CG_AVAILABLE_STARTING(10.0, 2.0);
/* Return the bottommost y-value of `rect'. */
CG_EXTERN CGFloat CGRectGetMinY(CGRect rect)
CG_AVAILABLE_STARTING(10.0, 2.0);
/* Return the midpoint y-value of `rect'. */
CG_EXTERN CGFloat CGRectGetMidY(CGRect rect)
CG_AVAILABLE_STARTING(10.0, 2.0);
/* Return the topmost y-value of `rect'. */
CG_EXTERN CGFloat CGRectGetMaxY(CGRect rect)
CG_AVAILABLE_STARTING(10.0, 2.0);
/* Return the width of `rect'. */
CG_EXTERN CGFloat CGRectGetWidth(CGRect rect)
CG_AVAILABLE_STARTING(10.0, 2.0);
/* Return the height of `rect'. */
CG_EXTERN CGFloat CGRectGetHeight(CGRect rect)
CG_AVAILABLE_STARTING(10.0, 2.0);
/* Return true if `point1' and `point2' are the same, false otherwise. */
CG_EXTERN bool CGPointEqualToPoint(CGPoint point1, CGPoint point2)
CG_AVAILABLE_STARTING(10.0, 2.0);
/* Return true if `size1' and `size2' are the same, false otherwise. */
CG_EXTERN bool CGSizeEqualToSize(CGSize size1, CGSize size2)
CG_AVAILABLE_STARTING(10.0, 2.0);
/* Return true if `rect1' and `rect2' are the same, false otherwise. */
CG_EXTERN bool CGRectEqualToRect(CGRect rect1, CGRect rect2)
CG_AVAILABLE_STARTING(10.0, 2.0);
/* Standardize `rect' -- i.e., convert it to an equivalent rect which has
positive width and height. */
CG_EXTERN CGRect CGRectStandardize(CGRect rect) __attribute__ ((warn_unused_result))
CG_AVAILABLE_STARTING(10.0, 2.0);
/* Return true if `rect' is empty (that is, if it has zero width or height),
false otherwise. A null rect is defined to be empty. */
CG_EXTERN bool CGRectIsEmpty(CGRect rect)
CG_AVAILABLE_STARTING(10.0, 2.0);
/* Return true if `rect' is the null rectangle, false otherwise. */
CG_EXTERN bool CGRectIsNull(CGRect rect)
CG_AVAILABLE_STARTING(10.0, 2.0);
/* Return true if `rect' is the infinite rectangle, false otherwise. */
CG_EXTERN bool CGRectIsInfinite(CGRect rect)
CG_AVAILABLE_STARTING(10.4, 2.0);
/* Inset `rect' by `(dx, dy)' -- i.e., offset its origin by `(dx, dy)', and
decrease its size by `(2*dx, 2*dy)'. */
CG_EXTERN CGRect CGRectInset(CGRect rect, CGFloat dx, CGFloat dy) __attribute__ ((warn_unused_result))
CG_AVAILABLE_STARTING(10.0, 2.0);
/* Expand `rect' to the smallest rect containing it with integral origin and
size. */
CG_EXTERN CGRect CGRectIntegral(CGRect rect) __attribute__ ((warn_unused_result))
CG_AVAILABLE_STARTING(10.0, 2.0);
/* Return the union of `r1' and `r2'. */
CG_EXTERN CGRect CGRectUnion(CGRect r1, CGRect r2) __attribute__ ((warn_unused_result))
CG_AVAILABLE_STARTING(10.0, 2.0);
/* Return the intersection of `r1' and `r2'. This may return a null rect. */
CG_EXTERN CGRect CGRectIntersection(CGRect r1, CGRect r2) __attribute__ ((warn_unused_result))
CG_AVAILABLE_STARTING(10.0, 2.0);
/* Offset `rect' by `(dx, dy)'. */
CG_EXTERN CGRect CGRectOffset(CGRect rect, CGFloat dx, CGFloat dy) __attribute__ ((warn_unused_result))
CG_AVAILABLE_STARTING(10.0, 2.0);
/* Make two new rectangles, `slice' and `remainder', by dividing `rect' with
a line that's parallel to one of its sides, specified by `edge' -- either
`CGRectMinXEdge', `CGRectMinYEdge', `CGRectMaxXEdge', or
`CGRectMaxYEdge'. The size of `slice' is determined by `amount', which
measures the distance from the specified edge. */
CG_EXTERN void CGRectDivide(CGRect rect, CGRect * slice,
CGRect * remainder, CGFloat amount, CGRectEdge edge)
CG_AVAILABLE_STARTING(10.0, 2.0);
/* Return true if `point' is contained in `rect', false otherwise. */
CG_EXTERN bool CGRectContainsPoint(CGRect rect, CGPoint point)
CG_AVAILABLE_STARTING(10.0, 2.0);
/* Return true if `rect2' is contained in `rect1', false otherwise. `rect2'
is contained in `rect1' if the union of `rect1' and `rect2' is equal to
`rect1'. */
CG_EXTERN bool CGRectContainsRect(CGRect rect1, CGRect rect2)
CG_AVAILABLE_STARTING(10.0, 2.0);
/* Return true if `rect1' intersects `rect2', false otherwise. `rect1'
intersects `rect2' if the intersection of `rect1' and `rect2' is not the
null rect. */
CG_EXTERN bool CGRectIntersectsRect(CGRect rect1, CGRect rect2)
CG_AVAILABLE_STARTING(10.0, 2.0);
/*** Persistent representations. ***/
/* Return a dictionary representation of `point'. */
CG_EXTERN CFDictionaryRef CGPointCreateDictionaryRepresentation(
CGPoint point)
CG_AVAILABLE_STARTING(10.5, 2.0);
/* Make a CGPoint from the contents of `dict' (presumably returned earlier
from `CGPointCreateDictionaryRepresentation') and store the value in
`point'. Returns true on success; false otherwise. */
CG_EXTERN bool CGPointMakeWithDictionaryRepresentation(
CFDictionaryRef cg_nullable dict, CGPoint * cg_nullable point)
CG_AVAILABLE_STARTING(10.5, 2.0);
/* Return a dictionary representation of `size'. */
CG_EXTERN CFDictionaryRef CGSizeCreateDictionaryRepresentation(CGSize size)
CG_AVAILABLE_STARTING(10.5, 2.0);
/* Make a CGSize from the contents of `dict' (presumably returned earlier
from `CGSizeCreateDictionaryRepresentation') and store the value in
`size'. Returns true on success; false otherwise. */
CG_EXTERN bool CGSizeMakeWithDictionaryRepresentation(
CFDictionaryRef cg_nullable dict, CGSize * cg_nullable size)
CG_AVAILABLE_STARTING(10.5, 2.0);
/* Return a dictionary representation of `rect'. */
CG_EXTERN CFDictionaryRef CGRectCreateDictionaryRepresentation(CGRect)
CG_AVAILABLE_STARTING(10.5, 2.0);
/* Make a CGRect from the contents of `dict' (presumably returned earlier
from `CGRectCreateDictionaryRepresentation') and store the value in
`rect'. Returns true on success; false otherwise. */
CG_EXTERN bool CGRectMakeWithDictionaryRepresentation(
CFDictionaryRef cg_nullable dict, CGRect * cg_nullable rect)
CG_AVAILABLE_STARTING(10.5, 2.0);
/*** Definitions of inline functions. ***/
CG_INLINE CGPoint
CGPointMake(CGFloat x, CGFloat y)
{
CGPoint p; p.x = x; p.y = y; return p;
}
CG_INLINE CGSize
CGSizeMake(CGFloat width, CGFloat height)
{
CGSize size; size.width = width; size.height = height; return size;
}
CG_INLINE CGVector
CGVectorMake(CGFloat dx, CGFloat dy)
{
CGVector vector; vector.dx = dx; vector.dy = dy; return vector;
}
CG_INLINE CGRect
CGRectMake(CGFloat x, CGFloat y, CGFloat width, CGFloat height)
{
CGRect rect;
rect.origin.x = x; rect.origin.y = y;
rect.size.width = width; rect.size.height = height;
return rect;
}
CG_INLINE bool
__CGPointEqualToPoint(CGPoint point1, CGPoint point2)
{
return point1.x == point2.x && point1.y == point2.y;
}
#define CGPointEqualToPoint __CGPointEqualToPoint
CG_INLINE bool
__CGSizeEqualToSize(CGSize size1, CGSize size2)
{
return size1.width == size2.width && size1.height == size2.height;
}
#define CGSizeEqualToSize __CGSizeEqualToSize
CF_ASSUME_NONNULL_END
CF_IMPLICIT_BRIDGING_DISABLED
#endif /* CGGEOMETRY_H_ */
|
0 | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/CoreGraphics.framework | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/CoreGraphics.framework/Headers/CGPDFArray.h | /* CoreGraphics - CGPDFArray.h
* Copyright (c) 2002-2008 Apple Inc.
* All rights reserved. */
#ifndef CGPDFARRAY_H_
#define CGPDFARRAY_H_
#include <CoreFoundation/CFBase.h>
#include <CoreFoundation/CFAvailability.h>
#include <stdint.h>
typedef struct CGPDFArray *CGPDFArrayRef;
#include <CoreGraphics/CGPDFDictionary.h>
#include <CoreGraphics/CGPDFObject.h>
#include <CoreGraphics/CGPDFStream.h>
#include <CoreGraphics/CGPDFString.h>
CF_IMPLICIT_BRIDGING_ENABLED
CF_ASSUME_NONNULL_BEGIN
#/* Return the number of items in `array'. */
CG_EXTERN size_t CGPDFArrayGetCount(CGPDFArrayRef cg_nullable array)
CG_AVAILABLE_STARTING(10.3, 2.0);
/* Look up the object at `index' in `array' and return the result in
`value'. Return true on success; false otherwise. */
CG_EXTERN bool CGPDFArrayGetObject(CGPDFArrayRef cg_nullable array, size_t index,
CGPDFObjectRef __nullable * __nullable value)
CG_AVAILABLE_STARTING(10.3, 2.0);
/* Look up the object at `index' in `array' and, if it's a null, return
true; otherwise, return false. */
CG_EXTERN bool CGPDFArrayGetNull(CGPDFArrayRef cg_nullable array, size_t index)
CG_AVAILABLE_STARTING(10.3, 2.0);
/* Look up the object at `index' in `array' and, if it's a boolean, return
the result in `value'. Return true on success; false otherwise. */
CG_EXTERN bool CGPDFArrayGetBoolean(CGPDFArrayRef cg_nullable array,
size_t index, CGPDFBoolean * __nullable value)
CG_AVAILABLE_STARTING(10.3, 2.0);
/* Look up the object at `index' in `array' and, if it's an integer, return
the result in `value'. Return true on success; false otherwise. */
CG_EXTERN bool CGPDFArrayGetInteger(CGPDFArrayRef cg_nullable array,
size_t index, CGPDFInteger * __nullable value)
CG_AVAILABLE_STARTING(10.3, 2.0);
/* Look up the object at `index' in `array' and, if it's a number (real or
integer), return the result in `value'. Return true on success; false
otherwise. */
CG_EXTERN bool CGPDFArrayGetNumber(CGPDFArrayRef cg_nullable array,
size_t index, CGPDFReal * __nullable value)
CG_AVAILABLE_STARTING(10.3, 2.0);
/* Look up the object at `index' in `array' and, if it's a name, return the
result in `value'. Return true on success; false otherwise. */
CG_EXTERN bool CGPDFArrayGetName(CGPDFArrayRef cg_nullable array,
size_t index, const char * __nullable * __nullable value)
CG_AVAILABLE_STARTING(10.3, 2.0);
/* Look up the object at `index' in `array' and, if it's a string, return
the result in `value'. Return true on success; false otherwise. */
CG_EXTERN bool CGPDFArrayGetString(CGPDFArrayRef cg_nullable array,
size_t index, CGPDFStringRef __nullable * __nullable value)
CG_AVAILABLE_STARTING(10.3, 2.0);
/* Look up the object at `index' in `array' and, if it's an array, return it
in `value'. Return true on success; false otherwise. */
CG_EXTERN bool CGPDFArrayGetArray(CGPDFArrayRef cg_nullable array,
size_t index, CGPDFArrayRef __nullable * __nullable value)
CG_AVAILABLE_STARTING(10.3, 2.0);
/* Look up the object at `index' in `array' and, if it's a dictionary,
return it in `value'. Return true on success; false otherwise. */
CG_EXTERN bool CGPDFArrayGetDictionary(CGPDFArrayRef cg_nullable array,
size_t index, CGPDFDictionaryRef __nullable * __nullable value)
CG_AVAILABLE_STARTING(10.3, 2.0);
/* Look up the object at `index' in `array' and, if it's a stream, return it
in `value'. Return true on success; false otherwise. */
CG_EXTERN bool CGPDFArrayGetStream(CGPDFArrayRef cg_nullable array,
size_t index, CGPDFStreamRef __nullable * __nullable value)
CG_AVAILABLE_STARTING(10.3, 2.0);
/* The block function for `CGPDFArrayApplyBlock'. `index' is the current
iterator index, `value' is the CGPDFObject at this index. If the block
returns true, the iteration of the array will continue, otherwise if
the block returns false, the iterator will stop and return early. */
typedef bool (^CGPDFArrayApplierBlock)(size_t index,
CGPDFObjectRef value, void * __nullable info);
/* Enumerate all of the objects in `array', calling the block-function `block' once
for each value in the array. Passes the current iterator index, the current
value, and `info' to `block'. If `block' returns true, iteration will continue
over all values. If `block' returns false, iteration will stop and return
early. */
CG_EXTERN void CGPDFArrayApplyBlock(CGPDFArrayRef cg_nullable array,
CGPDFArrayApplierBlock cg_nullable block, void * __nullable info)
CG_AVAILABLE_STARTING(10.14, 12.0);
CF_ASSUME_NONNULL_END
CF_IMPLICIT_BRIDGING_DISABLED
#endif /* CGPDFARRAY_H_ */
|
0 | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/CoreGraphics.framework | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/CoreGraphics.framework/Headers/CGFunction.h | /* CoreGraphics - CGFunction.h
Copyright (c) 1999-2011 Apple Inc.
All rights reserved. */
#ifndef CGFUNCTION_H_
#define CGFUNCTION_H_
#include <CoreFoundation/CFBase.h>
/* A CGFunction is a general floating-point function evaluator which uses a
user-specified callback to map an arbitrary number of inputs to an
arbitrary number of outputs. */
typedef struct CF_BRIDGED_TYPE(id) CGFunction *CGFunctionRef;
#include <CoreGraphics/CGBase.h>
#include <CoreFoundation/CFBase.h>
#include <CoreFoundation/CFAvailability.h>
#include <stdint.h>
CF_IMPLICIT_BRIDGING_ENABLED
CF_ASSUME_NONNULL_BEGIN
/* This callback evaluates a function, using `in' as inputs, and places the
result in `out'. `info' is the info parameter passed to the CGFunction
creation functions. */
typedef void (*CGFunctionEvaluateCallback)(void * __nullable info,
const CGFloat * in, CGFloat * out);
/* When a function is deallocated, this callback releases `info', the info
parameter passed to the CGFunction creation functions. */
typedef void (*CGFunctionReleaseInfoCallback)(void * __nullable info);
/* Callbacks for a CGFunction.
`version' is the version number of this structure. This structure is
version 0.
`evaluate' is the callback used to evaluate the function.
`releaseInfo', if non-NULL, is the callback used to release the info
parameter passed to the CGFunction creation functions when the
function is deallocated. */
struct CGFunctionCallbacks {
unsigned int version;
CGFunctionEvaluateCallback __nullable evaluate;
CGFunctionReleaseInfoCallback __nullable releaseInfo;
};
typedef struct CGFunctionCallbacks CGFunctionCallbacks;
/* Return the CFTypeID for CGFunctionRefs. */
CG_EXTERN CFTypeID CGFunctionGetTypeID(void)
CG_AVAILABLE_STARTING(10.2, 2.0);
/* Create a CGFunction using `callbacks' to evaluate the function. `info' is
passed to each of the callback functions. `domainDimension' is the number
of input values to the function; `rangeDimension' is the number of output
values from the function.
`domain' is an array of 2M values, where M is the number of input values.
For each k from 0 to M-1, domain[2*k] must be less than or equal to
domain[2*k+1]. The k'th input value (in[k]) will be clipped to lie in
this interval, so that domain[2*k] <= in[k] <= domain[2*k+1]. If `domain'
is NULL, then the input values will not be clipped. However, it's
strongly recommended that `domain' be specified; each domain interval
should specify reasonable values for the minimum and maximum in that
dimension.
`range' is an array of 2N values, where N is the number of output values.
For each k from 0 to N-1, range[2*k] must be less than or equal to
range[2*k+1]. The k'th output value (out[k]) will be clipped to lie in
this interval, so that range[2*k] <= out[k] <= range[2*k+1]. If `range'
is NULL, then the output values will not be clipped. However, it's
strongly recommended that `range' be specified; each range interval
should specify reasonable values for the minimum and maximum in that
dimension.
The contents of the callbacks structure is copied, so, for example, a
pointer to a structure on the stack can be passed to this function. */
CG_EXTERN CGFunctionRef __nullable CGFunctionCreate(void * __nullable info,
size_t domainDimension, const CGFloat *__nullable domain,
size_t rangeDimension, const CGFloat * __nullable range,
const CGFunctionCallbacks * cg_nullable callbacks)
CG_AVAILABLE_STARTING(10.2, 2.0);
/* Equivalent to `CFRetain(function)', except it doesn't crash (as CFRetain
does) if `function' is NULL. */
CG_EXTERN CGFunctionRef cg_nullable CGFunctionRetain(
CGFunctionRef cg_nullable function)
CG_AVAILABLE_STARTING(10.2, 2.0);
/* Equivalent to `CFRelease(function)', except it doesn't crash (as
CFRelease does) if `function' is NULL. */
CG_EXTERN void CGFunctionRelease(CGFunctionRef cg_nullable function)
CG_AVAILABLE_STARTING(10.2, 2.0);
CF_ASSUME_NONNULL_END
CF_IMPLICIT_BRIDGING_DISABLED
#endif /* CGFUNCTION_H_ */
|
0 | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/CoreGraphics.framework | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/CoreGraphics.framework/Headers/CGPath.h | /* CoreGraphics - CGPath.h
Copyright (c) 2001-2011 Apple Inc.
All rights reserved. */
#ifndef CGPATH_H_
#define CGPATH_H_
#include <CoreFoundation/CFBase.h>
#include <CoreFoundation/CFAvailability.h>
#include <stdint.h>
typedef struct CF_BRIDGED_TYPE(id) CGPath *CGMutablePathRef;
typedef const struct CF_BRIDGED_TYPE(id) CGPath *CGPathRef;
#include <CoreGraphics/CGBase.h>
#include <CoreGraphics/CGAffineTransform.h>
#include <CoreFoundation/CFBase.h>
CF_IMPLICIT_BRIDGING_ENABLED
CF_ASSUME_NONNULL_BEGIN
/* Line join styles. */
typedef CF_ENUM(int32_t, CGLineJoin) {
kCGLineJoinMiter,
kCGLineJoinRound,
kCGLineJoinBevel
};
/* Line cap styles. */
typedef CF_ENUM(int32_t, CGLineCap) {
kCGLineCapButt,
kCGLineCapRound,
kCGLineCapSquare
};
/* Return the CFTypeID for CGPathRefs. */
CG_EXTERN CFTypeID CGPathGetTypeID(void)
CG_AVAILABLE_STARTING(10.2, 2.0);
/* Create a mutable path. */
CG_EXTERN CGMutablePathRef CGPathCreateMutable(void)
CG_AVAILABLE_STARTING(10.2, 2.0);
/* Create a copy of `path'. */
CG_EXTERN CGPathRef __nullable CGPathCreateCopy(CGPathRef cg_nullable path)
CG_AVAILABLE_STARTING(10.2, 2.0);
/* Create a copy of `path' transformed by `transform'. */
CG_EXTERN CGPathRef __nullable CGPathCreateCopyByTransformingPath(
CGPathRef cg_nullable path, const CGAffineTransform * __nullable transform)
CG_AVAILABLE_STARTING(10.7, 5.0);
/* Create a mutable copy of `path'. */
CG_EXTERN CGMutablePathRef __nullable CGPathCreateMutableCopy(
CGPathRef cg_nullable path)
CG_AVAILABLE_STARTING(10.2, 2.0);
/* Create a mutable copy of `path' transformed by `transform'. */
CG_EXTERN CGMutablePathRef __nullable CGPathCreateMutableCopyByTransformingPath(
CGPathRef cg_nullable path, const CGAffineTransform * __nullable transform)
CG_AVAILABLE_STARTING(10.7, 5.0);
/* Return a path representing a rectangle bounded by `rect'. The rectangle
forms a complete subpath of the path --- that is, it begins with a "move
to" and ends with a "close subpath" --- oriented in the clockwise
direction. If `transform' is non-NULL, then the lines representing the
rectangle will be transformed by `transform' before they are added to the
path. */
CG_EXTERN CGPathRef CGPathCreateWithRect(CGRect rect,
const CGAffineTransform * __nullable transform)
CG_AVAILABLE_STARTING(10.5, 4.0);
/* Return a path representing an ellipse bounded by `rect'. The ellipse is
approximated by a sequence of Bézier curves. The center of the ellipse is
the midpoint of `rect'. If `rect' is square, then the ellipse will be
circular with radius equal to one-half the width (equivalently, one-half
the height) of `rect'. If `rect' is rectangular, then the major- and
minor-axes will be the `width' and `height' of rect. The ellipse forms a
complete subpath of the path --- that is, it begins with a "move to" and
ends with a "close subpath" --- oriented in the clockwise direction. If
`transform' is non-NULL, then the constructed Bézier curves representing
the ellipse will be transformed by `transform' before they are added to
the path. */
CG_EXTERN CGPathRef CGPathCreateWithEllipseInRect(CGRect rect,
const CGAffineTransform * __nullable transform)
CG_AVAILABLE_STARTING(10.7, 5.0);
/* Return a path representing a rounded rectangle. The rounded rectangle
coincides with the edges of `rect'. Each corner is consists of
one-quarter of an ellipse with axes equal to `cornerWidth' and
`cornerHeight'. The rounded rectangle forms a complete subpath of the
path --- that is, it begins with a "move to" and ends with a "close
subpath" --- oriented in the clockwise direction. If `transform' is
non-NULL, then the path elements representing the rounded rectangle will
be transformed by `transform' before they are added to the path. */
CG_EXTERN CGPathRef CGPathCreateWithRoundedRect(CGRect rect,
CGFloat cornerWidth, CGFloat cornerHeight,
const CGAffineTransform * __nullable transform)
CG_AVAILABLE_STARTING(10.9, 7.0);
/* Add a rounded rectangle to `path'. The rounded rectangle coincides with
the edges of `rect'. Each corner is consists of one-quarter of an ellipse
with axes equal to `cornerWidth' and `cornerHeight'. The rounded
rectangle forms a complete subpath of the path --- that is, it begins
with a "move to" and ends with a "close subpath" --- oriented in the
clockwise direction. If `transform' is non-NULL, then the path elements
representing the rounded rectangle will be transformed by `transform'
before they are added to the path. */
CG_EXTERN void CGPathAddRoundedRect(CGMutablePathRef cg_nullable path,
const CGAffineTransform * __nullable transform, CGRect rect,
CGFloat cornerWidth, CGFloat cornerHeight)
CG_AVAILABLE_STARTING(10.9, 7.0);
/* Create a dashed path from `path'. The parameters `phase', `lengths', and
`count' have the same meaning as the corresponding parameters for
`CGContextSetLineDash'. If `transform' is non-NULL, then the elements of
the constructed path will be transformed by `transform' before they are
added to the path. */
CG_EXTERN CGPathRef __nullable CGPathCreateCopyByDashingPath(
CGPathRef cg_nullable path, const CGAffineTransform * __nullable transform,
CGFloat phase, const CGFloat * __nullable lengths, size_t count)
CG_AVAILABLE_STARTING(10.7, 5.0);
/* Create a stroked path from `path'. The parameters `lineWidth', `lineCap',
`lineJoin', and `miterLimit' have the same meaning as the corresponding
CGContext parameters. If `transform' is non-NULL, then the elements of
the constructed path will be transformed by `transform' before they are
added to the path. */
CG_EXTERN CGPathRef __nullable CGPathCreateCopyByStrokingPath(
CGPathRef cg_nullable path, const CGAffineTransform * __nullable transform,
CGFloat lineWidth, CGLineCap lineCap,
CGLineJoin lineJoin, CGFloat miterLimit)
CG_AVAILABLE_STARTING(10.7, 5.0);
/* Equivalent to `CFRetain(path)', except it doesn't crash (as CFRetain
does) if `path' is NULL. */
CG_EXTERN CGPathRef cg_nullable CGPathRetain(CGPathRef cg_nullable path)
CG_AVAILABLE_STARTING(10.2, 2.0);
/* Equivalent to `CFRelease(path)', except it doesn't crash (as CFRelease
does) if `path' is NULL. */
CG_EXTERN void CGPathRelease(CGPathRef cg_nullable path)
CG_AVAILABLE_STARTING(10.2, 2.0);
/* Return true if `path1' is equal to `path2'; false otherwise. */
CG_EXTERN bool CGPathEqualToPath(CGPathRef cg_nullable path1,
CGPathRef cg_nullable path2)
CG_AVAILABLE_STARTING(10.2, 2.0);
/*** Path construction functions. ***/
/* Move the current point to `(x, y)' in `path' and begin a new subpath. If
`m' is non-NULL, then transform `(x, y)' by `m' first. */
CG_EXTERN void CGPathMoveToPoint(CGMutablePathRef cg_nullable path,
const CGAffineTransform * __nullable m, CGFloat x, CGFloat y)
CG_AVAILABLE_STARTING(10.2, 2.0);
/* Append a straight line segment from the current point to `(x, y)' in
`path' and move the current point to `(x, y)'. If `m' is non-NULL, then
transform `(x, y)' by `m' first. */
CG_EXTERN void CGPathAddLineToPoint(CGMutablePathRef cg_nullable path,
const CGAffineTransform * __nullable m, CGFloat x, CGFloat y)
CG_AVAILABLE_STARTING(10.2, 2.0);
/* Append a quadratic curve from the current point to `(x, y)' with control
point `(cpx, cpy)' in `path' and move the current point to `(x, y)'. If
`m' is non-NULL, then transform all points by `m' first. */
CG_EXTERN void CGPathAddQuadCurveToPoint(CGMutablePathRef cg_nullable path,
const CGAffineTransform *__nullable m, CGFloat cpx, CGFloat cpy,
CGFloat x, CGFloat y)
CG_AVAILABLE_STARTING(10.2, 2.0);
/* Append a cubic Bézier curve from the current point to `(x,y)' with
control points `(cp1x, cp1y)' and `(cp2x, cp2y)' in `path' and move the
current point to `(x, y)'. If `m' is non-NULL, then transform all points
by `m' first. */
CG_EXTERN void CGPathAddCurveToPoint(CGMutablePathRef cg_nullable path,
const CGAffineTransform * __nullable m, CGFloat cp1x, CGFloat cp1y,
CGFloat cp2x, CGFloat cp2y, CGFloat x, CGFloat y)
CG_AVAILABLE_STARTING(10.2, 2.0);
/* Append a line from the current point to the starting point of the current
subpath of `path' and end the subpath. */
CG_EXTERN void CGPathCloseSubpath(CGMutablePathRef cg_nullable path)
CG_AVAILABLE_STARTING(10.2, 2.0);
/*** Path construction convenience functions. ***/
/* Add `rect' to `path'. If `m' is non-NULL, then first transform `rect' by
`m' before adding it to `path'. */
CG_EXTERN void CGPathAddRect(CGMutablePathRef cg_nullable path,
const CGAffineTransform * __nullable m, CGRect rect)
CG_AVAILABLE_STARTING(10.2, 2.0);
/* Add each rectangle specified by `rects', an array of `count' CGRects, to
`path'. If `m' is non-NULL, then first transform each rectangle by `m'
before adding it to `path'. */
CG_EXTERN void CGPathAddRects(CGMutablePathRef cg_nullable path,
const CGAffineTransform * __nullable m, const CGRect * __nullable rects,
size_t count)
CG_AVAILABLE_STARTING(10.2, 2.0);
/* Move to the first element of `points', an array of `count' CGPoints, and
append a line from each point to the next point in `points'. If `m' is
non-NULL, then first transform each point by `m'. */
CG_EXTERN void CGPathAddLines(CGMutablePathRef cg_nullable path,
const CGAffineTransform * __nullable m, const CGPoint * __nullable points,
size_t count)
CG_AVAILABLE_STARTING(10.2, 2.0);
/* Add an ellipse (an oval) inside `rect' to `path'. The ellipse is
approximated by a sequence of Bézier curves. The center of the ellipse is
the midpoint of `rect'. If `rect' is square, then the ellipse will be
circular with radius equal to one-half the width (equivalently, one-half
the height) of `rect'. If `rect' is rectangular, then the major- and
minor-axes will be the `width' and `height' of rect. The ellipse forms a
complete subpath of `path' --- that is, it begins with a "move to" and
ends with a "close subpath" --- oriented in the clockwise direction. If
`m' is non-NULL, then the constructed Bézier curves representing the
ellipse will be transformed by `m' before they are added to `path'. */
CG_EXTERN void CGPathAddEllipseInRect(CGMutablePathRef cg_nullable path,
const CGAffineTransform * __nullable m, CGRect rect)
CG_AVAILABLE_STARTING(10.4, 2.0);
/* Add an arc of a circle to `path', possibly preceded by a straight line
segment. The arc is approximated by a sequence of Bézier curves. The
center of the arc is `(x,y)'; `radius' is its radius. `startAngle' is the
angle to the first endpoint of the arc, measured counter-clockwise from
the positive x-axis. `startAngle + delta' is the angle to the second
endpoint of the arc. If `delta' is positive, then the arc is drawn
counter-clockwise; if negative, clockwise. `startAngle' and `delta' are
measured in radians. If `matrix' is non-NULL, then the constructed Bézier
curves representing the arc will be transformed by `matrix' before they
are added to the path. */
CG_EXTERN void CGPathAddRelativeArc(CGMutablePathRef cg_nullable path,
const CGAffineTransform * __nullable matrix, CGFloat x, CGFloat y,
CGFloat radius, CGFloat startAngle, CGFloat delta)
CG_AVAILABLE_STARTING(10.7, 5.0);
/* Add an arc of a circle to `path', possibly preceded by a straight line
segment. The arc is approximated by a sequence of Bézier curves. `(x, y)'
is the center of the arc; `radius' is its radius; `startAngle' is the
angle to the first endpoint of the arc; `endAngle' is the angle to the
second endpoint of the arc; and `clockwise' is true if the arc is to be
drawn clockwise, false otherwise. `startAngle' and `endAngle' are
measured in radians. If `m' is non-NULL, then the constructed Bézier
curves representing the arc will be transformed by `m' before they are
added to `path'.
Note that using values very near 2π can be problematic. For example,
setting `startAngle' to 0, `endAngle' to 2π, and `clockwise' to true will
draw nothing. (It's easy to see this by considering, instead of 0 and 2π,
the values ε and 2π - ε, where ε is very small.) Due to round-off error,
however, it's possible that passing the value `2 * M_PI' to approximate
2π will numerically equal to 2π + δ, for some small δ; this will cause a
full circle to be drawn.
If you want a full circle to be drawn clockwise, you should set
`startAngle' to 2π, `endAngle' to 0, and `clockwise' to true. This avoids
the instability problems discussed above. */
CG_EXTERN void CGPathAddArc(CGMutablePathRef cg_nullable path,
const CGAffineTransform * __nullable m,
CGFloat x, CGFloat y, CGFloat radius, CGFloat startAngle, CGFloat endAngle,
bool clockwise)
CG_AVAILABLE_STARTING(10.2, 2.0);
/* Add an arc of a circle to `path', possibly preceded by a straight line
segment. The arc is approximated by a sequence of Bézier curves. `radius'
is the radius of the arc. The resulting arc is tangent to the line from
the current point of `path' to `(x1, y1)', and the line from `(x1, y1)'
to `(x2, y2)'. If `m' is non-NULL, then the constructed Bézier curves
representing the arc will be transformed by `m' before they are added to
`path'. */
CG_EXTERN void CGPathAddArcToPoint(CGMutablePathRef cg_nullable path,
const CGAffineTransform * __nullable m, CGFloat x1, CGFloat y1,
CGFloat x2, CGFloat y2, CGFloat radius)
CG_AVAILABLE_STARTING(10.2, 2.0);
/* Add `path2' to `path1'. If `m' is non-NULL, then the points in `path2'
will be transformed by `m' before they are added to `path1'. */
CG_EXTERN void CGPathAddPath(CGMutablePathRef cg_nullable path1,
const CGAffineTransform * __nullable m, CGPathRef cg_nullable path2)
CG_AVAILABLE_STARTING(10.2, 2.0);
/*** Path information functions. ***/
/* Return true if `path' contains no elements, false otherwise. */
CG_EXTERN bool CGPathIsEmpty(CGPathRef cg_nullable path)
CG_AVAILABLE_STARTING(10.2, 2.0);
/* Return true if `path' represents a rectangle, false otherwise. */
CG_EXTERN bool CGPathIsRect(CGPathRef cg_nullable path, CGRect * __nullable rect)
CG_AVAILABLE_STARTING(10.2, 2.0);
/* Return the current point of the current subpath of `path'. If there is no
current point, then return CGPointZero. */
CG_EXTERN CGPoint CGPathGetCurrentPoint(CGPathRef cg_nullable path)
CG_AVAILABLE_STARTING(10.2, 2.0);
/* Return the bounding box of `path'. The bounding box is the smallest
rectangle completely enclosing all points in the path, including control
points for Bézier cubic and quadratic curves. If the path is empty, then
return `CGRectNull'. */
CG_EXTERN CGRect CGPathGetBoundingBox(CGPathRef cg_nullable path)
CG_AVAILABLE_STARTING(10.2, 2.0);
/* Return the path bounding box of `path'. The path bounding box is the
smallest rectangle completely enclosing all points in the path, *not*
including control points for Bézier cubic and quadratic curves. If the
path is empty, then return `CGRectNull'. */
CG_EXTERN CGRect CGPathGetPathBoundingBox(CGPathRef cg_nullable path)
CG_AVAILABLE_STARTING(10.6, 4.0);
/* Return true if `point' is contained in `path'; false otherwise. A point
is contained in a path if it is inside the painted region when the path
is filled; if `eoFill' is true, then the even-odd fill rule is used to
evaluate the painted region of the path, otherwise, the winding-number
fill rule is used. If `m' is non-NULL, then the point is transformed by
`m' before determining whether the path contains it. */
CG_EXTERN bool CGPathContainsPoint(CGPathRef cg_nullable path,
const CGAffineTransform * __nullable m, CGPoint point, bool eoFill)
CG_AVAILABLE_STARTING(10.4, 2.0);
/* The types of path elements returned by `CGPathApply'. */
typedef CF_ENUM(int32_t, CGPathElementType) {
kCGPathElementMoveToPoint,
kCGPathElementAddLineToPoint,
kCGPathElementAddQuadCurveToPoint,
kCGPathElementAddCurveToPoint,
kCGPathElementCloseSubpath
};
/* An element of a path returned by `CGPathApply'. */
struct CGPathElement {
CGPathElementType type;
CGPoint * points;
};
typedef struct CGPathElement CGPathElement;
/* The prototype for the function called by `CGPathApplyFunction'. */
typedef void (*CGPathApplierFunction)(void * __nullable info,
const CGPathElement * element);
/* For element of `path', call `function', passing it the path element and
`info'. */
CG_EXTERN void CGPathApply(CGPathRef cg_nullable path, void * __nullable info,
CGPathApplierFunction cg_nullable function)
CG_AVAILABLE_STARTING(10.2, 2.0);
typedef void (^CGPathApplyBlock)(const CGPathElement * element);
CG_EXTERN void CGPathApplyWithBlock(CGPathRef path, CGPathApplyBlock CF_NOESCAPE block)
CG_AVAILABLE_STARTING(10.13, 11.0);
CF_ASSUME_NONNULL_END
CF_IMPLICIT_BRIDGING_DISABLED
#endif /* CGPATH_H_ */
|
0 | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/CoreGraphics.framework | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/CoreGraphics.framework/Headers/CGPDFContext.h | /* CoreGraphics - CGPDFContext.h
Copyright (c) 2000-2011 Apple Inc.
All rights reserved. */
#ifndef CGPDFCONTEXT_H_
#define CGPDFCONTEXT_H_
#include <CoreFoundation/CFBase.h>
#include <CoreFoundation/CFAvailability.h>
#include <stdint.h>
#include <CoreGraphics/CGBase.h>
#include <CoreGraphics/CGContext.h>
#include <CoreGraphics/CGDataConsumer.h>
#include <CoreFoundation/CFDictionary.h>
CF_IMPLICIT_BRIDGING_ENABLED
CF_ASSUME_NONNULL_BEGIN
/* Create a PDF context, using `consumer' for output. `mediaBox' is the
default page media bounding box; if NULL, then a default page size is
used. `auxiliaryInfo' specifies additional information used by the PDF
context when generating the PDF file. The keys and values in
`auxiliaryInfo' are described below. If `mediaBox' is non-NULL, then its
value overrides the value of `kCGPDFContextMediaBox' if specified in the
`auxiliaryInfo' dictionary. */
CG_EXTERN CGContextRef __nullable CGPDFContextCreate(CGDataConsumerRef cg_nullable consumer,
const CGRect *__nullable mediaBox, CFDictionaryRef __nullable auxiliaryInfo)
CG_AVAILABLE_STARTING(10.0, 2.0);
/* Create a PDF context for writing to `url'. This function behaves in the
same manner as the above function, except that the output data will be
written to `url'. */
CG_EXTERN CGContextRef __nullable CGPDFContextCreateWithURL(CFURLRef cg_nullable url,
const CGRect * __nullable mediaBox, CFDictionaryRef __nullable auxiliaryInfo)
CG_AVAILABLE_STARTING(10.0, 2.0);
/* Close a PDF context. After closing the context, all pending data is
written to the context's destination, and the PDF file is completed. No
additional data will be written to the context's destionation after
closing. */
CG_EXTERN void CGPDFContextClose(CGContextRef cg_nullable context)
CG_AVAILABLE_STARTING(10.5, 2.0);
/* Begin a new page in the PDF context `context'. */
CG_EXTERN void CGPDFContextBeginPage(CGContextRef cg_nullable context,
CFDictionaryRef __nullable pageInfo) CG_AVAILABLE_STARTING(10.4, 2.0);
/* End the current page in the PDF context `context'. */
CG_EXTERN void CGPDFContextEndPage(CGContextRef cg_nullable context)
CG_AVAILABLE_STARTING(10.4, 2.0);
/* Add the metadata stream specified by `metadata' to the document catalog
of `context', as described in Table 3.25, "Entries in the catalog
dictionary", of the PDF 1.7 specification. The contents of metadata must
be XML formatted according to the Extensible Metadata Platform, as
described in section 10.2.2, "Metadata Streams", of the PDF 1.7
specification. */
CG_EXTERN void CGPDFContextAddDocumentMetadata(CGContextRef cg_nullable context,
CFDataRef __nullable metadata) CG_AVAILABLE_STARTING(10.7, 4.0);
/* Set the URL associated with `rect' to `url' in the PDF context
`context'. */
CG_EXTERN void CGPDFContextSetURLForRect(CGContextRef cg_nullable context, CFURLRef url,
CGRect rect) CG_AVAILABLE_STARTING(10.4, 2.0);
/* Create a PDF destination named `name' at `point' in the current page of
the PDF context `context'. */
CG_EXTERN void CGPDFContextAddDestinationAtPoint(CGContextRef cg_nullable context,
CFStringRef name, CGPoint point) CG_AVAILABLE_STARTING(10.4, 2.0);
/* Specify a destination named `name' to jump to when clicking in `rect' of
the current page of the PDF context `context'. */
CG_EXTERN void CGPDFContextSetDestinationForRect(CGContextRef cg_nullable context,
CFStringRef name, CGRect rect) CG_AVAILABLE_STARTING(10.4, 2.0);
/*** Keys for the auxiliary info dictionary or the page info dictionary. ***/
/* The media box for the document or for a given page. Optional; if present,
the value of this key must be a CFData containing a CGRect (stored by
value, not by reference). */
CG_EXTERN const CFStringRef kCGPDFContextMediaBox
CG_AVAILABLE_STARTING(10.4, 2.0);
/* The crop box for the document or for a given page. Optional; if present,
the value of this key must be a CFData containing a CGRect (stored by
value, not by reference). */
CG_EXTERN const CFStringRef kCGPDFContextCropBox CG_AVAILABLE_STARTING(10.4, 2.0);
/* The bleed box for the document or for a given page. Optional; if present,
the value of this key must be a CFData containing a CGRect (stored by
value, not by reference). */
CG_EXTERN const CFStringRef kCGPDFContextBleedBox CG_AVAILABLE_STARTING(10.4, 2.0);
/* The trim box for the document or for a given page. Optional; if present,
the value of this key must be a CFData containing a CGRect (stored by
value, not by reference). */
CG_EXTERN const CFStringRef kCGPDFContextTrimBox CG_AVAILABLE_STARTING(10.4, 2.0);
/* The art box for the document or for a given page. Optional; if present,
the value of this key must be a CFData containing a CGRect (stored by
value, not by reference). */
CG_EXTERN const CFStringRef kCGPDFContextArtBox CG_AVAILABLE_STARTING(10.4, 2.0);
/*** Keys for auxiliary info dictionary. ***/
/* The document's title. Optional; if present, the value of this key must be
a CFString. */
CG_EXTERN const CFStringRef kCGPDFContextTitle CG_AVAILABLE_STARTING(10.4, 2.0);
/* The name of the person who created this document. Optional; if present,
the value of this key must be a CFString. */
CG_EXTERN const CFStringRef kCGPDFContextAuthor CG_AVAILABLE_STARTING(10.4, 2.0);
/* The subject of a document. Optional; if present, the value of this key
must be a CFString. */
CG_EXTERN const CFStringRef kCGPDFContextSubject CG_AVAILABLE_STARTING(10.5, 2.0);
/* The keywords for this document. This key is optional. If the value of
this key is a CFString, the /Keywords entry will be the specified string.
If the value of this key is a CFArray, then it must be an array of
CFStrings. The /Keywords entry will in this case be the concatenation of
the specified strings separated by commas (","). In addition, an entry
with the key "/AAPL:Keywords" will be stored in the document information
dictionary; its value is an array consisting of each of the specified
strings. The value of this key must be in one of the above forms;
otherwise, this key is ignored. */
CG_EXTERN const CFStringRef kCGPDFContextKeywords CG_AVAILABLE_STARTING(10.5, 2.0);
/* The name of the application that created the original data used to create
this document. Optional; if present, the value of this key must be a
CFString. */
CG_EXTERN const CFStringRef kCGPDFContextCreator CG_AVAILABLE_STARTING(10.4, 2.0);
/* The "owner password" of the PDF document. If this key is specified, the
document will be encrypted using the value as the owner password;
otherwise, the document will not be encrypted. The value of this key must
be a CFStringRef which can be represented in ASCII encoding; only the
first 32 bytes will be used for the password. There is no default value
for this key.
If the value of this key cannot be represented in ASCII, the document
will not be created and the creation function will return NULL. */
CG_EXTERN const CFStringRef kCGPDFContextOwnerPassword CG_AVAILABLE_STARTING(10.4, 2.0);
/* The "user password" of the PDF document. If the document is encrypted,
then the value of this key will be the user password for the document; if
unspecified, the user password will be the empty string. The value of
this key must be a CFStringRef which can be represented in ASCII
encoding; only the first 32 bytes will be used for the password.
If the value of this key cannot be represented in ASCII, the document
will not be created and the creation function will return NULL. */
CG_EXTERN const CFStringRef kCGPDFContextUserPassword CG_AVAILABLE_STARTING(10.4, 2.0);
/* Specifies the encryption key length in bits; see Table 3.18 "Entries
common to all encryption dictionaries", PDF Reference: Adobe PDF version
1.5 (4th ed.) for more info. Optional; if present, the value of this key
must be a CFNumber with value which is a multiple of 8 between 40 and
128, inclusive. If this key is absent or invalid, the encryption key
length defaults to 40 bits. */
CG_EXTERN const CFStringRef kCGPDFContextEncryptionKeyLength CG_AVAILABLE_STARTING(10.5, 2.0);
/* Used to specify whether the document allows printing when unlocked with
the user password. The value of this key must be a CFBooleanRef. The
default value of this key is "kCFBooleanTrue". */
CG_EXTERN const CFStringRef kCGPDFContextAllowsPrinting CG_AVAILABLE_STARTING(10.4, 2.0);
/* Used to specify whether the document allows copying when unlocked with
the user password. The value of this key must be a CFBooleanRef. The
default value of this key is "kCFBooleanTrue". */
CG_EXTERN const CFStringRef kCGPDFContextAllowsCopying CG_AVAILABLE_STARTING(10.4, 2.0);
/* The document's PDF/X output intent. Optional; if present, the value of
this key must be a CFDictionaryRef. The dictionary is added to the
/OutputIntents entry in the PDF file's document catalog. The keys and
values contained in the dictionary must match those specified in section
9.10.4 of the PDF 1.4 specification, ISO/DIS 15930-3 document published
by ISO/TC 130, and Adobe Technical Note #5413. */
CG_EXTERN const CFStringRef kCGPDFContextOutputIntent CG_AVAILABLE_STARTING(10.4, 14.0);
/* The following keys are supported in the output intent dictionary:
kCGPDFXOutputIntentSubtype ("S"): The output intent subtype. This key is
required; the value of this key must be a CFString equal to "GTS_PDFX";
otherwise, the dictionary is ignored. */
CG_EXTERN const CFStringRef kCGPDFXOutputIntentSubtype CG_AVAILABLE_STARTING(10.4, 14.0);
/* kCGPDFXOutputConditionIdentifier ("OutputConditionIdentifier"): A string
identifying the intended output device or production condition in a
human- or machine-readable form. This key is required; the value of this
key must be a CFString. For best results, the string should be
representable losslessly in ASCII encoding. */
CG_EXTERN const CFStringRef kCGPDFXOutputConditionIdentifier CG_AVAILABLE_STARTING(10.4, 14.0);
/* kCGPDFXOutputCondition ("OutputCondition"): A text string identifying the
intended output device or production condition in a human-readable form.
This key is optional; if present, the value of this key must be a
CFString. */
CG_EXTERN const CFStringRef kCGPDFXOutputCondition CG_AVAILABLE_STARTING(10.4, 14.0);
/* kCGPDFXRegistryName ("RegistryName"): A string identifying the registry
in which the condition designated by `kCGPDFXOutputConditionIdentifier'
is defined. This key is optional; if present, the value of this key must
be a CFString. For best results, the string should be representable
losslessly in ASCII encoding. */
CG_EXTERN const CFStringRef kCGPDFXRegistryName CG_AVAILABLE_STARTING(10.4, 14.0);
/* kCGPDFXInfo ("Info"): A human-readable text string containing additional
information about the intended target device or production condition.
This key is required if the value of `kCGPDFXOutputConditionIdentifier'
does not specify a standard production condition; it is optional
otherwise. If present, the value of this key must be a CFString. */
CG_EXTERN const CFStringRef kCGPDFXInfo CG_AVAILABLE_STARTING(10.4, 14.0);
/* kCGPDFXDestinationOutputProfile ("DestOutputProfile"): An ICC profile
stream defining the transformation from the PDF document's source colors
to output device colorants. This key is required if the value of
`kCGPDFXOutputConditionIdentifier' does not specify a standard production
condition; it is optional otherwise. If present, the value of this key
must be a ICC-based CGColorSpaceRef. */
CG_EXTERN const CFStringRef kCGPDFXDestinationOutputProfile CG_AVAILABLE_STARTING(10.4, 14.0);
/* The document's output intents. Optional; if present, the value must be a
CFArrayRef containing one or more CFDictionaryRefs. The array is added to
the PDF document in the /OutputIntents entry in the PDF file's document
catalog. Each dictionary in the array must be of form specified above for
the `kCGPDFContextOutputIntent' key, except that only the first
dictionary in the array may contain the `kCGPDFXOutputIntentSubtype'
("S") key with a value of "GTS_PDFX". If both `kCGPDFContextOutputIntent'
and `kCGPDFContextOutputIntents' keys are specified, the former is
ignored. */
CG_EXTERN const CFStringRef kCGPDFContextOutputIntents CG_AVAILABLE_STARTING(10.4, 14.0);
/* The document's access permissions, expressed as a CFNumber. The number is
defined by ORing together the desired CGPDFAccessPermissions values. */
CG_EXTERN const CFStringRef kCGPDFContextAccessPermissions CG_AVAILABLE_STARTING(10.13, 11.0);
/* Set the outline in the PDF created by a CGPDFContext (no effect in other types of CGContexts). */
CG_EXTERN void CGPDFContextSetOutline(CGContextRef context, __nullable CFDictionaryRef outline)
CG_AVAILABLE_STARTING(10.13, 11.0);
/* Output a linearized PDF */
CG_EXTERN const CFStringRef kCGPDFContextCreateLinearizedPDF
CG_AVAILABLE_STARTING(11.0, 14.0);
/* Output a PDF that conforms to PDF/A-2u (ISO 19005-2). The value of this key
must be a CFBooleanRef. The default value of this key is "kCFBooleanFalse". */
CG_EXTERN const CFStringRef kCGPDFContextCreatePDFA CG_AVAILABLE_STARTING(11.0, 14.0);
/* Tagged PDF Authoring */
/* Tagged PDF Authoring is based on the Marked Content and Tagged PDF features defined
in the Adobe Portable Document Format Version 1.7 November 2006. Link:
http://www.adobe.com/content/dam/Adobe/en/devnet/acrobat/pdfs/pdf_reference_1-7.pdf
These features are described in Chapter 10, "Document Interchange", starting on page 841.
- Marked-content operators (Section 10.5) identify portions of a content streams with
additional properties, typically a tagged structure declaring accessibility information.
- Logical structure facilities (Section 10.6) declares a hierarchical organization of the
tags used by marked-content operators. This reflects the logical structure that tags
should be read by an application presenting a PDF document.
- Tagged PDF (Section 10.7) defines the properties of tags, and focuses on the accessibility
features they provide. */
/* All CGPDFTagType reflect official "Role Types" defined in the Adobe Portable Document
Format Version 1.7 November 2006. The enums below are defined between pages 899 to 912. */
typedef CF_ENUM (int32_t, CGPDFTagType) {
/* Page 899 - 901, TABLE 10.20 Standard structure types for grouping elements */
CGPDFTagTypeDocument = 100,
CGPDFTagTypePart,
CGPDFTagTypeArt,
CGPDFTagTypeSection,
CGPDFTagTypeDiv,
CGPDFTagTypeBlockQuote,
CGPDFTagTypeCaption,
CGPDFTagTypeTOC,
CGPDFTagTypeTOCI,
CGPDFTagTypeIndex,
CGPDFTagTypeNonStructure,
CGPDFTagTypePrivate,
/* Page 901, TABLE 10.21 Block-level structure elements. Long form descriptions on page 902 - 903 */
/* Paragraph like elements */
CGPDFTagTypeParagraph = 200,
CGPDFTagTypeHeader,
CGPDFTagTypeHeader1,
CGPDFTagTypeHeader2,
CGPDFTagTypeHeader3,
CGPDFTagTypeHeader4,
CGPDFTagTypeHeader5,
CGPDFTagTypeHeader6,
/* List elements */
CGPDFTagTypeList = 300,
CGPDFTagTypeListItem,
CGPDFTagTypeLabel,
CGPDFTagTypeListBody,
/* Table element */
CGPDFTagTypeTable = 400,
CGPDFTagTypeTableRow,
CGPDFTagTypeTableHeaderCell,
CGPDFTagTypeTableDataCell,
CGPDFTagTypeTableHeader,
CGPDFTagTypeTableBody,
CGPDFTagTypeTableFooter,
/* Page 905, TABLE 10.25 Standard structure types for inline-level structure elements */
CGPDFTagTypeSpan = 500,
CGPDFTagTypeQuote,
CGPDFTagTypeNote,
CGPDFTagTypeReference,
CGPDFTagTypeBibliography,
CGPDFTagTypeCode,
CGPDFTagTypeLink,
CGPDFTagTypeAnnotation,
/* Page 911, TABLE 10.26 Standard structure types for Ruby and Warichu elements (PDF 1.5) */
CGPDFTagTypeRuby = 600,
CGPDFTagTypeRubyBaseText,
CGPDFTagTypeRubyAnnotationText,
CGPDFTagTypeRubyPunctuation,
CGPDFTagTypeWarichu,
CGPDFTagTypeWarichuText,
CGPDFTagTypeWarichuPunctiation,
/* Page 912, TABLE 10.27 Standard structure types for illustration elements */
CGPDFTagTypeFigure = 700,
CGPDFTagTypeFormula,
CGPDFTagTypeForm,
} CG_AVAILABLE_STARTING(10.15, 13.0);
/* For a given CGPDFTagType, return a C-string that matches the names defined in section 10.7.3: Standard Structure Types.
These are defined on pages 899 - 912. Returns NULL for an unknown value. */
CG_EXTERN const char* cg_nullable CGPDFTagTypeGetName(CGPDFTagType tagType) CG_AVAILABLE_STARTING(10.15, 13.0);
/* The following CGPDFTagProperty keys are to be paired with CFStringRef values in
CGPDFContextBeginTag(...)'s optional tagProperties dictionary. These key-value pairs
encode accessibility information for the defined tag. */
typedef CFStringRef CGPDFTagProperty CF_TYPED_ENUM;
/* Actual text, defined on page 860:
"Text that is an exact replacement for the structure element and its children..."
"...useful when extracting the document’s contents in support of accessibility..."
This can be used to more precisely control what string is extracted by a user when
they copy and paste from a document. */
CG_EXTERN const CGPDFTagProperty _Nonnull kCGPDFTagPropertyActualText CG_AVAILABLE_STARTING(10.15, 13.0);
/* Alternative text, defined on page 860:
"An alternate description of the structure element and its children in human-readable form".
This is typically used for graphical content, like an image. */
CG_EXTERN const CGPDFTagProperty _Nonnull kCGPDFTagPropertyAlternativeText CG_AVAILABLE_STARTING(10.15, 13.0);
/* Title, defined on page 859:
Title of the node in a human-readable form. This should *not* be used for accessibility,
but can be useful when presenting the structure of a tagged node tree. */
CG_EXTERN const CGPDFTagProperty _Nonnull kCGPDFTagPropertyTitleText CG_AVAILABLE_STARTING(10.15, 13.0);
/* Language of text content, defined on page 860:
Typically you should use the document's catalog to get its language, but if a section
of text is not the same language as the document, this may be set and allow you to
look at what language it is hinting at. */
CG_EXTERN const CGPDFTagProperty _Nonnull kCGPDFTagPropertyLanguageText CG_AVAILABLE_STARTING(10.15, 13.0);
/* General usage of CGPDFContextBeginTag(...) and CGPDFContextEndTag(...):
- Create a CG PDF context using CGPDFContextCreate(...).
- Begin and end pages as you normally would, through CGPDFContextBeginPage(...), CGPDFContextEndPage(...).
- When drawing content for a page, you may tag any series of draw commands with balanced series of push / pops,
which will mark your content with the given tag type and optional tag properties.
- Pushing a tag saves the current tag to a tag-stack, assigning the given tag as the "current tag".
- Popping removes the top-most element of the tag-stack. The remaining top-most element becomes the "current tag".
- Any pushed tag is a child of the "current tag". This allows you to push children to parent-tags, and to build
a tag structure tree.
- When saving the context to a file, the file will be authored with marked content sequences in the page's content-
stream, as well as the implicitly built tagged structure there. */
/* Sets the current tag to the given tagType with an associated tagProperties dictionary. The previous tag will be pushed
to a tag-stack. The previous tag can be restored through CGPDFContextEndTag(...). This new tag will record any future
drawing commands to the given context as part of itself, unless another tag is pushed or the tag is popped. When the
PDF context is serialized to a PDF file, these tags will create marked content sequences around the associated draw commands
around the page's content stream. Note that tagProperties is an optional dictionary that allows you to specificy additional
properties of the marked content: content may want to re-declare how text should be extracted, any alt text for figures,
or explicitly declare what language the text is in. All child-tags (tags pushed on top of other tags) will inherit their
parent tag's properties. */
CG_EXTERN void CGPDFContextBeginTag(CGContextRef _Nonnull context, CGPDFTagType tagType, CFDictionaryRef cg_nullable tagProperties)
CG_AVAILABLE_STARTING(10.15, 13.0);
/* Pop the current tag. Sets the current tag to the previous tag on the tag-stack. If there was no previous tag, then the
current tag will be set to the root document tag (of type CGPDFTagTypeDocument). */
CG_EXTERN void CGPDFContextEndTag(CGContextRef _Nonnull context) CG_AVAILABLE_STARTING(10.15, 13.0);
CF_ASSUME_NONNULL_END
CF_IMPLICIT_BRIDGING_DISABLED
#endif /* CGPDFCONTEXT_H_ */
|
0 | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/CoreGraphics.framework | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/CoreGraphics.framework/Headers/CGPDFObject.h | /* CoreGraphics - CGPDFObject.h
Copyright (c) 2002-2011 Apple Inc.
All rights reserved. */
#ifndef CGPDFOBJECT_H_
#define CGPDFOBJECT_H_
#include <CoreGraphics/CGBase.h>
#include <CoreFoundation/CFBase.h>
#include <CoreFoundation/CFAvailability.h>
#include <stdint.h>
CF_IMPLICIT_BRIDGING_ENABLED
CF_ASSUME_NONNULL_BEGIN
/* A type for boolean values. */
typedef unsigned char CGPDFBoolean;
/* A type for integer values. */
typedef long int CGPDFInteger;
/* A type for real values. */
typedef CGFloat CGPDFReal;
/* A type to hold any object. */
typedef struct CGPDFObject *CGPDFObjectRef;
/* An identifier to describe an object's type. */
typedef CF_ENUM (int32_t, CGPDFObjectType) {
kCGPDFObjectTypeNull = 1,
kCGPDFObjectTypeBoolean,
kCGPDFObjectTypeInteger,
kCGPDFObjectTypeReal,
kCGPDFObjectTypeName,
kCGPDFObjectTypeString,
kCGPDFObjectTypeArray,
kCGPDFObjectTypeDictionary,
kCGPDFObjectTypeStream
};
/* Return the type of `object'. */
CG_EXTERN CGPDFObjectType CGPDFObjectGetType(CGPDFObjectRef cg_nullable object)
CG_AVAILABLE_STARTING(10.3, 2.0);
/* Get the value of `object'. If the type of `object' is equal to `type',
then copy the value of `object' to `value' (if it's non-NULL) and return
true. Otherwise, if the type of `object' is `kCGPDFObjectTypeInteger' and
`type' is equal to `kCGPDFObjectTypeReal', then convert the value of
`object' to floating point and copy the result to `value' (if it's
non-NULL) and return true. Otherwise, return false. */
CG_EXTERN bool CGPDFObjectGetValue(CGPDFObjectRef cg_nullable object,
CGPDFObjectType type, void * __nullable value)
CG_AVAILABLE_STARTING(10.3, 2.0);
CF_ASSUME_NONNULL_END
CF_IMPLICIT_BRIDGING_DISABLED
#endif /* CGPDFOBJECT_H_ */
|
0 | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/CoreGraphics.framework | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/CoreGraphics.framework/Headers/CGEvent.h | /* CoreGraphics - CGEvent.h
Copyright (c) 2004-2013 Apple Inc.
All rights reserved. */
#ifndef CGEVENT_H_
#define CGEVENT_H_
#include <CoreFoundation/CFBase.h>
#include <CoreFoundation/CFAvailability.h>
#include <stdint.h>
#include <CoreGraphics/CGEventTypes.h>
CF_IMPLICIT_BRIDGING_ENABLED
CF_ASSUME_NONNULL_BEGIN
/* Return the type identifier for the opaque type `CGEventRef'. */
CG_EXTERN CFTypeID CGEventGetTypeID(void)
CG_AVAILABLE_STARTING(10.4);
/* Return a new event using the event source `source'. If `source' is NULL,
the default source is used. */
CG_EXTERN CGEventRef __nullable CGEventCreate(CGEventSourceRef __nullable source)
CG_AVAILABLE_STARTING(10.4);
/* Return a "flattened" data representation of an event. */
CG_EXTERN CFDataRef __nullable CGEventCreateData(
CFAllocatorRef __nullable allocator,
CGEventRef __nullable event)
CG_AVAILABLE_STARTING(10.4);
/* Return an event created from a "flattened" data representation of the
event. */
CG_EXTERN CGEventRef __nullable CGEventCreateFromData(
CFAllocatorRef __nullable allocator, CFDataRef __nullable data)
CG_AVAILABLE_STARTING(10.4);
/* Return a new mouse event.
The event source may be taken from another event, or may be NULL.
`mouseType' should be one of the mouse event types. `mouseCursorPosition'
should be the position of the mouse cursor in global coordinates.
`mouseButton' should be the button that's changing state; `mouseButton'
is ignored unless `mouseType' is one of `kCGEventOtherMouseDown',
`kCGEventOtherMouseDragged', or `kCGEventOtherMouseUp'.
The current implemementation of the event system supports a maximum of
thirty-two buttons. Mouse button 0 is the primary button on the mouse.
Mouse button 1 is the secondary mouse button (right). Mouse button 2 is
the center button, and the remaining buttons are in USB device order. */
CG_EXTERN CGEventRef __nullable CGEventCreateMouseEvent(
CGEventSourceRef __nullable source,
CGEventType mouseType, CGPoint mouseCursorPosition,
CGMouseButton mouseButton)
CG_AVAILABLE_STARTING(10.4);
/* Return a new keyboard event.
The event source may be taken from another event, or may be NULL. Based
on the virtual key code values entered, the appropriate key down, key up,
or flags changed events are generated.
All keystrokes needed to generate a character must be entered, including
SHIFT, CONTROL, OPTION, and COMMAND keys. For example, to produce a 'Z',
the SHIFT key must be down, the 'z' key must go down, and then the SHIFT
and 'z' key must be released:
CGEventCreateKeyboardEvent(source, (CGKeyCode)56, true); // shift down
CGEventCreateKeyboardEvent(source, (CGKeyCode) 6, true); // 'z' down
CGEventCreateKeyboardEvent(source, (CGKeyCode) 6, false); // 'z' up
CGEventCreateKeyboardEvent(source, (CGKeyCode)56, false); // 'shift up */
CG_EXTERN CGEventRef __nullable CGEventCreateKeyboardEvent(
CGEventSourceRef __nullable source,
CGKeyCode virtualKey, bool keyDown)
CG_AVAILABLE_STARTING(10.4);
/* Return a new scrollwheel event.
The event source may be taken from another event, or may be NULL. The
scrolling units may be specified in lines using `kCGScrollEventUnitLine'
or in pixels using `kCGScrollEventUnitPixel'. `kCGScrollEventUnitPixel'
will produce an event that most applications interpret as a smooth
scrolling event.
One or more wheels must be specified. The current implementation supports
up to three wheels.
Every scrollwheel event can be interpreted to be scrolling by pixel or by
line. The scale between the two is about 10 pixels per line by default.
The scale can be altered by setting a custom value for the event source,
using `CGEventSourceSetPixelsPerLine'. */
CG_EXTERN CGEventRef __nullable CGEventCreateScrollWheelEvent(
CGEventSourceRef __nullable source,
CGScrollEventUnit units, uint32_t wheelCount, int32_t wheel1, ...)
CG_AVAILABLE_STARTING(10.5);
/* A non-variadic variant version of SLEventCreateScrollWheelEvent. */
CG_EXTERN CGEventRef __nullable CGEventCreateScrollWheelEvent2(
CGEventSourceRef __nullable source,
CGScrollEventUnit units, uint32_t wheelCount, int32_t wheel1, int32_t wheel2, int32_t wheel3)
CG_AVAILABLE_STARTING(10.13);
/* Return a copy of `event'. */
CG_EXTERN CGEventRef __nullable CGEventCreateCopy(CGEventRef __nullable event)
CG_AVAILABLE_STARTING(10.4);
/* Return an event source created from an existing event.
Event filters may use the event source to generate events that are
compatible with an event being filtered.
Note that `CGEventCreateSourceFromEvent' may return NULL if the event
was generated with a private CGEventSourceStateID owned by another
process. Such events should be filtered based on the public state. */
CG_EXTERN CGEventSourceRef __nullable CGEventCreateSourceFromEvent(
CGEventRef __nullable event)
CG_AVAILABLE_STARTING(10.4);
/* Set the event source of an event. */
CG_EXTERN void CGEventSetSource(CGEventRef __nullable event,
CGEventSourceRef __nullable source)
CG_AVAILABLE_STARTING(10.4);
/* Return the event type of an event (left mouse down, for example). */
CG_EXTERN CGEventType CGEventGetType(CGEventRef __nullable event)
CG_AVAILABLE_STARTING(10.4);
/* Set the event type of an event. */
CG_EXTERN void CGEventSetType(CGEventRef __nullable event, CGEventType type)
CG_AVAILABLE_STARTING(10.4);
/* Return the timestamp of an event. */
CG_EXTERN CGEventTimestamp CGEventGetTimestamp(CGEventRef __nullable event)
CG_AVAILABLE_STARTING(10.4);
/* Set the timestamp of an event. */
CG_EXTERN void CGEventSetTimestamp(CGEventRef __nullable event,
CGEventTimestamp timestamp)
CG_AVAILABLE_STARTING(10.4);
/* Return the location of an event in global display coordinates.
CGPointZero is returned if event is not a valid CGEventRef. */
CG_EXTERN CGPoint CGEventGetLocation(CGEventRef __nullable event)
CG_AVAILABLE_STARTING(10.4);
/* Return the location of an event relative to the lower-left corner of the
main display. CGPointZero is returned if event is not a valid CGEventRef. */
CG_EXTERN CGPoint CGEventGetUnflippedLocation(CGEventRef __nullable event)
CG_AVAILABLE_STARTING(10.5);
/* Set the location of an event in global display coordinates. */
CG_EXTERN void CGEventSetLocation(CGEventRef __nullable event, CGPoint location)
CG_AVAILABLE_STARTING(10.4);
/* Return the event flags of an event. (CGEventFlags)0 if event is not a valid
CGEventRef. */
CG_EXTERN CGEventFlags CGEventGetFlags(CGEventRef __nullable event)
CG_AVAILABLE_STARTING(10.4);
/* Set the event flags of an event. */
CG_EXTERN void CGEventSetFlags(CGEventRef __nullable event, CGEventFlags flags)
CG_AVAILABLE_STARTING(10.4);
/* Return the Unicode string associated with a keyboard event.
When you call this function with a NULL string or a maximum string length
of 0, the function still returns the actual count of Unicode characters
in the event. */
CG_EXTERN void CGEventKeyboardGetUnicodeString(CGEventRef __nullable event,
UniCharCount maxStringLength, UniCharCount *__nullable actualStringLength,
UniChar * __nullable unicodeString)
CG_AVAILABLE_STARTING(10.4);
/* Set the Unicode string associated with a keyboard event.
By default, the system translates the virtual key code in a keyboard
event into a Unicode string based on the keyboard ID in the event source.
This function allows you to manually override this string. Note that
application frameworks may ignore the Unicode string in a keyboard event
and do their own translation based on the virtual keycode and perceived
event state. */
CG_EXTERN void CGEventKeyboardSetUnicodeString(CGEventRef __nullable event,
UniCharCount stringLength, const UniChar * __nullable unicodeString)
CG_AVAILABLE_STARTING(10.4);
/* Return the integer value of a field in an event. */
CG_EXTERN int64_t CGEventGetIntegerValueField(CGEventRef __nullable event,
CGEventField field)
CG_AVAILABLE_STARTING(10.4);
/* Set the integer value of a field in an event.
Before calling this function, the event type must be set using a typed
event creation function such as `CGEventCreateMouseEvent', or by calling
`CGEventSetType'.
If you are creating a mouse event generated by a tablet, call this
function and specify the field `kCGMouseEventSubtype' with a value of
`kCGEventMouseSubtypeTabletPoint' or `kCGEventMouseSubtypeTabletProximity'
before setting other parameters. */
CG_EXTERN void CGEventSetIntegerValueField(CGEventRef __nullable event,
CGEventField field, int64_t value)
CG_AVAILABLE_STARTING(10.4);
/* Return the floating-point value of a field in an event.
In cases where the field value is represented within the event by a fixed
point number or an integer, the result is scaled to the appropriate range
as part of creating the floating-point representation. */
CG_EXTERN double CGEventGetDoubleValueField(CGEventRef __nullable event,
CGEventField field)
CG_AVAILABLE_STARTING(10.4);
/* Set the floating-point value of a field in an event.
Before calling this function, the event type must be set using a typed
event creation function such as `CGEventCreateMouseEvent', or by calling
`CGEventSetType'.
In cases where the field’s value is represented within the event by a
fixed point number or integer, the value parameter is scaled as needed
and converted to the appropriate type. */
CG_EXTERN void CGEventSetDoubleValueField(CGEventRef __nullable event,
CGEventField field, double value)
CG_AVAILABLE_STARTING(10.4);
/* Event taps.
Taps may be placed at the point where HIDSystem events enter the server,
at the point where HIDSystem and remote control events enter a session,
at the point where events have been annotated to flow to a specific
application, or at the point where events are delivered to the
application. Taps may be inserted at a specified point at the head of
pre-existing filters, or appended after any pre-existing filters.
Taps may be passive event listeners, or active filters. An active filter
may pass an event through unmodified, modify an event, or discard an
event. When a tap is registered, it identifies the set of events to be
observed with a mask, and indicates if it is a passive or active event
filter. Multiple event type bitmasks may be ORed together.
Taps may only be placed at `kCGHIDEventTap' by a process running as the
root user. NULL is returned for other users.
Taps placed at `kCGHIDEventTap', `kCGSessionEventTap',
`kCGAnnotatedSessionEventTap', or on a specific process may only receive
key up and down events if access for assistive devices is enabled
(Preferences Accessibility panel, Keyboard view) or the caller is enabled
for assistive device access, as by `AXMakeProcessTrusted'. If the tap is
not permitted to monitor these events when the tap is created, then the
appropriate bits in the mask are cleared. If that results in an empty
mask, then NULL is returned.
An event tap is represented as a `CFMachPortRef'. The event tap may be
added to an appropriate run loop by calling `CFRunLoopAddSource'.
Releasing the CFMachPortRef will release the tap.
A `CGEventTapProxy' is an opaque reference to state within the client
application associated with the tap. The tap function may pass this
reference to other functions, such as the event-posting routines.
The event tap callback runs from the CFRunLoop to which the tap
CFMachPort is added as a source. Thread safety is defined by the
CFRunLoop and its environment. */
/* Create an event tap. */
CG_EXTERN CFMachPortRef __nullable CGEventTapCreate(CGEventTapLocation tap,
CGEventTapPlacement place, CGEventTapOptions options,
CGEventMask eventsOfInterest, CGEventTapCallBack callback,
void * __nullable userInfo)
CG_AVAILABLE_STARTING(10.4);
/* Create an event tap for a specified process.
Events routed to individual applications may be tapped using another
function. `CGEventTapCreateForPSN' will report all events routed to the
specified application. */
CG_EXTERN CFMachPortRef __nullable CGEventTapCreateForPSN(
void * processSerialNumber,
CGEventTapPlacement place, CGEventTapOptions options,
CGEventMask eventsOfInterest, CGEventTapCallBack callback,
void *__nullable userInfo)
CG_AVAILABLE_STARTING(10.4);
CG_EXTERN CFMachPortRef __nullable CGEventTapCreateForPid(pid_t pid,
CGEventTapPlacement place, CGEventTapOptions options,
CGEventMask eventsOfInterest, CGEventTapCallBack callback,
void * __nullable userInfo) CG_AVAILABLE_STARTING(10.11);
/* Enable or disable an event tap.
Taps are normally enabled when created. If a tap becomes unresponsive or
a user requests taps be disabled, an appropriate `kCGEventTapDisabled...'
event is passed to the registered CGEventTapCallBack function. An event
tap may be re-enabled by calling this function. */
CG_EXTERN void CGEventTapEnable(CFMachPortRef tap, bool enable)
CG_AVAILABLE_STARTING(10.4);
/* Return true if `tap' is enabled; false otherwise. */
CG_EXTERN bool CGEventTapIsEnabled(CFMachPortRef tap)
CG_AVAILABLE_STARTING(10.4);
/* Post an event from an event tap into the event stream.
You can use this function to post a new event at the same point to which
an event returned from an event tap callback function would be posted.
The new event enters the system before the event returned by the callback
enters the system. Events posted into the system will be seen by all taps
placed after the tap posting the event. */
CG_EXTERN void CGEventTapPostEvent(CGEventTapProxy __nullable proxy,
CGEventRef __nullable event)
CG_AVAILABLE_STARTING(10.4);
/* Post an event into the event stream at a specified location.
This function posts the specified event immediately before any event taps
instantiated for that location, and the event passes through any such
taps. */
CG_EXTERN void CGEventPost(CGEventTapLocation tap, CGEventRef __nullable event)
CG_AVAILABLE_STARTING(10.4);
/* Post an event into the event stream for a specific application.
This function makes it possible for an application to establish
an event routing policy, for example, by tapping events at the
`kCGAnnotatedSessionEventTap' location and then posting the events
to another desired process.
This function posts the specified event immediately before any event taps
instantiated for the specified process, and the event passes through any
such taps. */
/* DEPRECATED; use CGEventPostToPid instead. */
CG_EXTERN void CGEventPostToPSN(void * __nullable processSerialNumber,
CGEventRef __nullable event)
CG_AVAILABLE_STARTING(10.4);
CG_EXTERN void CGEventPostToPid( pid_t pid,
CGEventRef __nullable event)
CG_AVAILABLE_STARTING(10.11);
/* Gets a list of currently installed event taps.
`tapList' is an array of event tap information structures of length
`maxNumberOfTaps'. You are responsible for allocating storage for this
array. On return, your array contains a list of currently installed event
taps. On return, the number of event taps that are currently installed is
stored in `eventTapCount'. If you pass NULL in this parameter, the
`maxNumberOfTaps' parameter is ignored, and the number of event taps that
are currently installed is stored in `eventTapCount'.
Each call to this function has the side effect of resetting the minimum
and maximum latencies in the `tapList' parameter to the corresponding
average values. Values reported in these fields reflect the minimum and
maximum values seen since the preceding call, or the instantiation of the
tap. This allows a monitoring tool to evaluate the best and worst case
latency over time and under various operating conditions. */
CG_EXTERN CGError CGGetEventTapList(uint32_t maxNumberOfTaps,
CGEventTapInformation * __nullable tapList,
uint32_t * __nullable eventTapCount)
CG_AVAILABLE_STARTING(10.4);
/* Checks whether the current process already has event listening access */
CG_EXTERN bool CGPreflightListenEventAccess(void) CG_AVAILABLE_STARTING(10.15);
/* Requests event listening access if absent, potentially prompting */
CG_EXTERN bool CGRequestListenEventAccess(void) CG_AVAILABLE_STARTING(10.15);
/* Checks whether the current process already has event synthesizing access */
CG_EXTERN bool CGPreflightPostEventAccess(void) CG_AVAILABLE_STARTING(10.15);
/* Requests event synthesizing access if absent, potentially prompting */
CG_EXTERN bool CGRequestPostEventAccess(void) CG_AVAILABLE_STARTING(10.15);
CF_ASSUME_NONNULL_END
CF_IMPLICIT_BRIDGING_DISABLED
#endif /* CGEVENT_H_ */
|
0 | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/CoreGraphics.framework | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/CoreGraphics.framework/Headers/CGEventSource.h | /* CoreGraphics - CGEventSource.h
Copyright (c) 2004-2008 Apple Inc.
All rights reserved. */
#ifndef CGEVENTSOURCE_H_
#define CGEVENTSOURCE_H_
#include <CoreFoundation/CFBase.h>
#include <CoreFoundation/CFAvailability.h>
#include <stdint.h>
#include <CoreGraphics/CGRemoteOperation.h>
#include <CoreGraphics/CGEventTypes.h>
CF_IMPLICIT_BRIDGING_ENABLED
CF_ASSUME_NONNULL_BEGIN
/* An event source contains accumulated state related to event generation
and event posting, allowing for customized event generation and
processing.
A source state, represented by a `CGEventSourceStateID', refers to a
global event state table. These tables contain accumulated information on
modifier flag state, keyboard key state, mouse button state, and related
internal parameters placed in effect by posting events with associated
sources.
Two pre-existing event state tables are defined:
The `kCGEventSourceStateCombinedSessionState' table reflects the
combined state of all event sources posting to the current user login
session. If your program is posting events from within a login session,
you should use this source state when you create an event source.
The `kCGEventSourceStateHIDSystemState' table reflects the combined
state of all hardware event sources posting from the HID system. If
your program is a daemon or a user space device driver interpreting
hardware state and generating events, you should use this source state
when you create an event source.
Very specialized applications such as remote control programs may want to
generate and track event source state independent of other processes.
These programs should use the `kCGEventSourceStatePrivate' value in
creating their event source. An independent state table and unique source
state ID (`CGEventSourceStateID') are created to track the event source's
state. This independent state table is owned by the creating event source
and released with it. */
/* Return the CFTypeID for CGEventSourceRefs. */
CG_EXTERN CFTypeID CGEventSourceGetTypeID(void)
CG_AVAILABLE_STARTING(10.4);
/* Return a Quartz event source created with a specified source state. */
CG_EXTERN CGEventSourceRef __nullable CGEventSourceCreate(
CGEventSourceStateID stateID)
CG_AVAILABLE_STARTING(10.4);
/* Return the keyboard type to be used with a Quartz event source.
Result of CGSDefaultKeyboardID() is returned if source is not a valid
CGEventSourceRef. */
CG_EXTERN CGEventSourceKeyboardType CGEventSourceGetKeyboardType(
CGEventSourceRef __nullable source)
CG_AVAILABLE_STARTING(10.4);
/* Set the keyboard type to be used with a Quartz event source. */
CG_EXTERN void CGEventSourceSetKeyboardType(CGEventSourceRef __nullable source,
CGEventSourceKeyboardType keyboardType)
CG_AVAILABLE_STARTING(10.4);
/* Return the scale of pixels per line in a scrolling event source.
This function returns the scale of pixels per line in the specified event
source. For example, if the scale in the event source is 10.5 pixels per
line, this function would return 10.5. Every scrolling event can be
interpreted to be scrolling by pixel or by line. By default, the scale is
about ten pixels per line. kCGSDefaultScrollwheelScale is returned in case
of invalid source */
CG_EXTERN double CGEventSourceGetPixelsPerLine(
CGEventSourceRef __nullable source)
CG_AVAILABLE_STARTING(10.5);
/* Set the scale of pixels per line in a scrolling event source.
This function sets the scale of pixels per line in the specified event
source. For example, if you pass the value 12 as the `pixelsPerLine'
parameter, the scale of pixels per line in the event source would be
changed to 12. Every scrolling event can be interpreted to be scrolling
by pixel or by line. By default, the scale is about ten pixels per
line. */
CG_EXTERN void CGEventSourceSetPixelsPerLine(CGEventSourceRef __nullable source,
double pixelsPerLine)
CG_AVAILABLE_STARTING(10.5);
/* Return the source state associated with a Quartz event source.
For event sources created with the `kCGEventSourceStatePrivate' source
state, this function returns the ID of the private source state table
created for the event source. This unique ID may be passed to the
`CGEventSourceCreate' function to create a second event source sharing
the same state table. This may be useful, for example, in creating
separate mouse and keyboard sources which share a common private state.
kCGEventSourceStateCombinedSessionState is returned in case of invalid
source. */
CG_EXTERN CGEventSourceStateID CGEventSourceGetSourceStateID(
CGEventSourceRef __nullable source)
CG_AVAILABLE_STARTING(10.4);
/* Return a Boolean value indicating the current button state of a Quartz
event source. If true, the button is down; if false, the button is up. */
CG_EXTERN bool CGEventSourceButtonState(CGEventSourceStateID stateID,
CGMouseButton button)
CG_AVAILABLE_STARTING(10.4);
/* Return a Boolean value indicating the current keyboard state of a Quartz
event source. If true, the key is down; if false, the key is up. */
CG_EXTERN bool CGEventSourceKeyState(CGEventSourceStateID stateID,
CGKeyCode key)
CG_AVAILABLE_STARTING(10.4);
/* Return the current flags of a Quartz event source. If true, the key is
down; if false, the key is up. */
CG_EXTERN CGEventFlags CGEventSourceFlagsState(CGEventSourceStateID stateID)
CG_AVAILABLE_STARTING(10.4);
/* Return the elapsed time since the last event for a Quartz event source.
To get the elapsed time since the previous input event --- keyboard,
mouse, or tablet --- specify `kCGAnyInputEventType'. */
CG_EXTERN CFTimeInterval CGEventSourceSecondsSinceLastEventType(
CGEventSourceStateID stateID, CGEventType eventType)
CG_AVAILABLE_STARTING(10.4);
/* Return a count of events of a given type seen since the Window Server
started.
Modifier keys produce `kCGEventFlagsChanged' events, not `kCGEventKeyDown'
events, and do so both on press and release. The volume, brightness, and
CD eject keys on some keyboards (both desktop and laptop) do not generate
key up or key down events.
For various reasons, the number of key up and key down events may not be
the same when all keyboard keys are up. As a result, a mismatch does not
necessarily indicate that some keys are down.
Key autorepeat events are not counted. */
CG_EXTERN uint32_t CGEventSourceCounterForEventType(CGEventSourceStateID
stateID, CGEventType eventType)
CG_AVAILABLE_STARTING(10.4);
/* Set the 64-bit user-specified data for a Quartz event source.
Each input event includes 64 bits of user-specified data. This function
sets the user-specified data for all events created by the specified
event source. This data may also be set per event using the
`CGEventGetIntegerValueField' function. */
CG_EXTERN void CGEventSourceSetUserData(CGEventSourceRef __nullable source,
int64_t userData)
CG_AVAILABLE_STARTING(10.4);
/* Return the 64-bit user-specified data for a Quartz event source.
Each input event includes 64 bits of user-specified data. This function
gets the user-specified data for all events created by the specified
event source. This data may also be obtained per event using the
`CGEventGetIntegerValueField' function. 0 is returned in case of invalid
source. */
CG_EXTERN int64_t CGEventSourceGetUserData(CGEventSourceRef __nullable source)
CG_AVAILABLE_STARTING(10.4);
/* Set the mask that indicates which classes of local hardware events are
enabled during event suppression.
By default, the system does not suppress local hardware events from the
keyboard or mouse during a short interval after a Quartz event is posted
--- see `CGEventSourceSetLocalEventsSuppressionInterval' --- and during a
synthetic mouse drag (mouse movement with the left or only mouse button
down).
Some applications may want to disable events from some of the local
hardware during this interval. For example, if you post mouse events
only, you may wish to suppress local mouse events and permit local
keyboard events to pass through. This function lets you specify an event
source, a suppression state (event suppression interval or mouse drag),
and a filter mask of event classes to be passed through. The new local
events filter takes effect with the next Quartz event you post using this
event source. */
CG_EXTERN void CGEventSourceSetLocalEventsFilterDuringSuppressionState(
CGEventSourceRef __nullable source, CGEventFilterMask filter,
CGEventSuppressionState state)
CG_AVAILABLE_STARTING(10.4);
/* Return the mask that indicates which classes of local hardware events are
enabled during event suppression.
You can configure the system to suppress local hardware events from the
keyboard or mouse during a short interval after a Quartz event is posted
or during a synthetic mouse drag (mouse movement with the left or only
mouse button down). For information about setting this local events
filter, see `CGEventSourceSetLocalEventsFilterDuringSuppressionState'.
This function lets you specify an event source and a suppression state
(event suppression interval or mouse drag), and returns a filter mask of
event categories to be passed through during suppression.
(CGEventFilterMask)0 is retuned in case of invalid source. */
CG_EXTERN CGEventFilterMask
CGEventSourceGetLocalEventsFilterDuringSuppressionState(
CGEventSourceRef __nullable source, CGEventSuppressionState state)
CG_AVAILABLE_STARTING(10.4);
/* Set the interval that local hardware events may be suppressed following
the posting of a Quartz event.
This function sets the period of time in seconds that local hardware
events may be suppressed after posting a Quartz event created with the
specified event source. The default suppression interval is 0.25
seconds. */
CG_EXTERN void CGEventSourceSetLocalEventsSuppressionInterval(
CGEventSourceRef __nullable source, CFTimeInterval seconds)
CG_AVAILABLE_STARTING(10.4);
/* Return the interval that local hardware events may be suppressed
following the posting of a Quartz event.
kCGSDefaultLocalEventSuppressionInterval is retuned in case of invalid
source.*/
CG_EXTERN CFTimeInterval CGEventSourceGetLocalEventsSuppressionInterval(
CGEventSourceRef __nullable source)
CG_AVAILABLE_STARTING(10.4);
CF_ASSUME_NONNULL_END
CF_IMPLICIT_BRIDGING_DISABLED
#endif /* CGEVENTSOURCE_H_ */
|
0 | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/CoreGraphics.framework | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/CoreGraphics.framework/Headers/CGDirectPalette.h | /* CoreGraphics - CGDirectPalette.h
Copyright (c) 2000-2011 Apple Inc.
All rights reserved. */
#ifndef CGDIRECTPALETTE_H_
#define CGDIRECTPALETTE_H_
#include <CoreGraphics/CGDirectDisplay.h>
/* These types are deprecated; don't use them. */
struct CGDeviceColor {
float red;
float green;
float blue;
};
typedef struct CGDeviceColor CGDeviceColor;
#endif /* CGDIRECTPALETTE_H_ */
|
0 | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/CoreGraphics.framework | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/CoreGraphics.framework/Headers/CGImage.h | /* CoreGraphics - CGImage.h
* Copyright (c) 2000-2008 Apple Inc.
* All rights reserved. */
#ifndef CGIMAGE_H_
#define CGIMAGE_H_
#include <CoreFoundation/CFBase.h>
#include <CoreFoundation/CFAvailability.h>
#include <stdint.h>
typedef struct CF_BRIDGED_TYPE(id) CGImage *CGImageRef;
#include <CoreGraphics/CGColorSpace.h>
#include <CoreGraphics/CGDataProvider.h>
#include <CoreGraphics/CGGeometry.h>
CF_IMPLICIT_BRIDGING_ENABLED
CF_ASSUME_NONNULL_BEGIN
typedef CF_ENUM(uint32_t, CGImageAlphaInfo) {
kCGImageAlphaNone, /* For example, RGB. */
kCGImageAlphaPremultipliedLast, /* For example, premultiplied RGBA */
kCGImageAlphaPremultipliedFirst, /* For example, premultiplied ARGB */
kCGImageAlphaLast, /* For example, non-premultiplied RGBA */
kCGImageAlphaFirst, /* For example, non-premultiplied ARGB */
kCGImageAlphaNoneSkipLast, /* For example, RBGX. */
kCGImageAlphaNoneSkipFirst, /* For example, XRGB. */
kCGImageAlphaOnly /* No color data, alpha data only */
};
typedef CF_ENUM(uint32_t, CGImageByteOrderInfo) {
kCGImageByteOrderMask = 0x7000,
kCGImageByteOrderDefault = (0 << 12),
kCGImageByteOrder16Little = (1 << 12),
kCGImageByteOrder32Little = (2 << 12),
kCGImageByteOrder16Big = (3 << 12),
kCGImageByteOrder32Big = (4 << 12)
} CG_AVAILABLE_STARTING(10.0, 2.0);
typedef CF_ENUM(uint32_t, CGImagePixelFormatInfo) {
kCGImagePixelFormatMask = 0xF0000,
kCGImagePixelFormatPacked = (0 << 16),
kCGImagePixelFormatRGB555 = (1 << 16), /* Only for RGB 16 bits per pixel */
kCGImagePixelFormatRGB565 = (2 << 16), /* Only for RGB 16 bits per pixel */
kCGImagePixelFormatRGB101010 = (3 << 16), /* Only for RGB 32 bits per pixel */
kCGImagePixelFormatRGBCIF10 = (4 << 16), /* Only for RGB 32 bits per pixel */
} CG_AVAILABLE_STARTING(10.14, 12.0);
typedef CF_OPTIONS(uint32_t, CGBitmapInfo) {
kCGBitmapAlphaInfoMask = 0x1F,
kCGBitmapFloatInfoMask = 0xF00,
kCGBitmapFloatComponents = (1 << 8),
kCGBitmapByteOrderMask = kCGImageByteOrderMask,
kCGBitmapByteOrderDefault = kCGImageByteOrderDefault,
kCGBitmapByteOrder16Little = kCGImageByteOrder16Little,
kCGBitmapByteOrder32Little = kCGImageByteOrder32Little,
kCGBitmapByteOrder16Big = kCGImageByteOrder16Big,
kCGBitmapByteOrder32Big = kCGImageByteOrder32Big
} CG_AVAILABLE_STARTING(10.0, 2.0);
#ifdef __BIG_ENDIAN__
# define kCGBitmapByteOrder16Host kCGBitmapByteOrder16Big
# define kCGBitmapByteOrder32Host kCGBitmapByteOrder32Big
#else /* Little endian. */
# define kCGBitmapByteOrder16Host kCGBitmapByteOrder16Little
# define kCGBitmapByteOrder32Host kCGBitmapByteOrder32Little
#endif
/* Return the CFTypeID for CGImageRefs. */
CG_EXTERN CFTypeID CGImageGetTypeID(void)
CG_AVAILABLE_STARTING(10.2, 2.0);
/* Create an image. */
CG_EXTERN CGImageRef __nullable CGImageCreate(size_t width, size_t height,
size_t bitsPerComponent, size_t bitsPerPixel, size_t bytesPerRow,
CGColorSpaceRef cg_nullable space, CGBitmapInfo bitmapInfo,
CGDataProviderRef cg_nullable provider,
const CGFloat * __nullable decode, bool shouldInterpolate,
CGColorRenderingIntent intent)
CG_AVAILABLE_STARTING(10.0, 2.0);
/* Create an image mask. Legal values for bits per component are 1, 2, 4 and 8.
* Bits per pixel must be either the same as bits per component or 8, with
* exception of 8 bits per component where bits per pixel can be also 16 or 32.
*/
CG_EXTERN CGImageRef __nullable CGImageMaskCreate(size_t width, size_t height,
size_t bitsPerComponent, size_t bitsPerPixel, size_t bytesPerRow,
CGDataProviderRef cg_nullable provider, const CGFloat * __nullable decode,
bool shouldInterpolate)
CG_AVAILABLE_STARTING(10.0, 2.0);
/* Return a copy of `image'. Only the image structure itself is copied; the
underlying data is not. */
CG_EXTERN CGImageRef __nullable CGImageCreateCopy(CGImageRef cg_nullable image)
CG_AVAILABLE_STARTING(10.4, 2.0);
/* Create an image from `source', a data provider of JPEG-encoded data. */
CG_EXTERN CGImageRef __nullable CGImageCreateWithJPEGDataProvider(
CGDataProviderRef cg_nullable source, const CGFloat * __nullable decode,
bool shouldInterpolate,
CGColorRenderingIntent intent)
CG_AVAILABLE_STARTING(10.1, 2.0);
/* Create an image using `source', a data provider for PNG-encoded data. */
CG_EXTERN CGImageRef __nullable CGImageCreateWithPNGDataProvider(
CGDataProviderRef cg_nullable source, const CGFloat * __nullable decode,
bool shouldInterpolate,
CGColorRenderingIntent intent)
CG_AVAILABLE_STARTING(10.2, 2.0);
/* Create an image using the data contained within the subrectangle `rect'
of `image'.
The new image is created by
1) adjusting `rect' to integral bounds by calling "CGRectIntegral";
2) intersecting the result with a rectangle with origin (0, 0) and size
equal to the size of `image';
3) referencing the pixels within the resulting rectangle, treating the
first pixel of the image data as the origin of the image.
If the resulting rectangle is the null rectangle, this function returns
NULL.
If W and H are the width and height of image, respectively, then the
point (0,0) corresponds to the first pixel of the image data; the point
(W-1, 0) is the last pixel of the first row of the image data; (0, H-1)
is the first pixel of the last row of the image data; and (W-1, H-1) is
the last pixel of the last row of the image data.
The resulting image retains a reference to the original image, so you may
release the original image after calling this function. */
CG_EXTERN CGImageRef __nullable CGImageCreateWithImageInRect(
CGImageRef cg_nullable image, CGRect rect)
CG_AVAILABLE_STARTING(10.4, 2.0);
/* Create a new image from `image' masked by `mask', which may be an image
mask or an image.
If `mask' is an image mask, then it indicates which parts of the context
are to be painted with the image when drawn in a context, and which are
to be masked out (left unchanged). The source samples of the image mask
determine which areas are painted, acting as an "inverse alpha": if the
value of a source sample in the image mask is S, then the corresponding
region in `image' is blended with the destination using an alpha of
(1-S). (For example, if S is 1, then the region is not painted, while if
S is 0, the region is fully painted.)
If `mask' is an image, then it serves as alpha mask for blending the
image onto the destination. The source samples of `mask' determine which
areas are painted: if the value of the source sample in mask is S, then
the corresponding region in image is blended with the destination with an
alpha of S. (For example, if S is 0, then the region is not painted,
while if S is 1, the region is fully painted.)
The parameter `image' may not be an image mask and may not have an image
mask or masking color associated with it.
If `mask' is an image, then it must be in a monochrome color space
(e.g. DeviceGray, GenericGray, etc...), may not have alpha, and may not
itself be masked by an image mask or a masking color. */
CG_EXTERN CGImageRef __nullable CGImageCreateWithMask(
CGImageRef cg_nullable image, CGImageRef cg_nullable mask)
CG_AVAILABLE_STARTING(10.4, 2.0);
/* Create a new image from `image' masked by `components', an array of 2N
values { min[1], max[1], ... min[N], max[N] } where N is the number of
components in color space of `image'. Any image sample with color value
{c[1], ... c[N]} where min[i] <= c[i] <= max[i] for 1 <= i <= N is masked
out (that is, not painted).
Each value in `components' must be a valid image sample value: if `image'
has integral pixel components, then each value of must be in the range
[0..2**bitsPerComponent - 1] (where `bitsPerComponent' is the number of
bits/component of `image'); if `image' has floating-point pixel
components, then each value may be any floating-point number which is a
valid color component.
The parameter `image' may not be an image mask, and may not already have
an image mask or masking color associated with it. */
CG_EXTERN CGImageRef __nullable CGImageCreateWithMaskingColors(
CGImageRef cg_nullable image, const CGFloat * cg_nullable components)
CG_AVAILABLE_STARTING(10.4, 2.0);
/* Create a copy of `image', replacing the image's color space with `space'.
Returns NULL if `image' is an image mask, or if the number of components
of `space' isn't the same as the number of components of the color space
of `image'. */
CG_EXTERN CGImageRef __nullable CGImageCreateCopyWithColorSpace(
CGImageRef cg_nullable image, CGColorSpaceRef cg_nullable space)
CG_AVAILABLE_STARTING(10.3, 2.0);
/* Equivalent to `CFRetain(image)'. */
CG_EXTERN CGImageRef cg_nullable CGImageRetain(CGImageRef cg_nullable image)
CG_AVAILABLE_STARTING(10.0, 2.0);
/* Equivalent to `CFRelease(image)'. */
CG_EXTERN void CGImageRelease(CGImageRef cg_nullable image)
CG_AVAILABLE_STARTING(10.0, 2.0);
/* Return true if `image' is an image mask, false otherwise. */
CG_EXTERN bool CGImageIsMask(CGImageRef cg_nullable image)
CG_AVAILABLE_STARTING(10.0, 2.0);
/* Return the width of `image'. */
CG_EXTERN size_t CGImageGetWidth(CGImageRef cg_nullable image)
CG_AVAILABLE_STARTING(10.0, 2.0);
/* Return the height of `image'. */
CG_EXTERN size_t CGImageGetHeight(CGImageRef cg_nullable image)
CG_AVAILABLE_STARTING(10.0, 2.0);
/* Return the number of bits/component of `image'. */
CG_EXTERN size_t CGImageGetBitsPerComponent(CGImageRef cg_nullable image)
CG_AVAILABLE_STARTING(10.0, 2.0);
/* Return the number of bits/pixel of `image'. */
CG_EXTERN size_t CGImageGetBitsPerPixel(CGImageRef cg_nullable image)
CG_AVAILABLE_STARTING(10.0, 2.0);
/* Return the number of bytes/row of `image'. */
CG_EXTERN size_t CGImageGetBytesPerRow(CGImageRef cg_nullable image)
CG_AVAILABLE_STARTING(10.0, 2.0);
/* Return the color space of `image', or NULL if `image' is an image
mask. */
CG_EXTERN CGColorSpaceRef __nullable CGImageGetColorSpace(CGImageRef cg_nullable image)
CG_AVAILABLE_STARTING(10.0, 2.0);
/* Return the alpha info of `image'. */
CG_EXTERN CGImageAlphaInfo CGImageGetAlphaInfo(CGImageRef cg_nullable image)
CG_AVAILABLE_STARTING(10.0, 2.0);
/* Return the data provider of `image'. */
CG_EXTERN CGDataProviderRef __nullable CGImageGetDataProvider(CGImageRef cg_nullable image)
CG_AVAILABLE_STARTING(10.0, 2.0);
/* Return the decode array of `image'. */
CG_EXTERN const CGFloat * __nullable CGImageGetDecode(CGImageRef cg_nullable image)
CG_AVAILABLE_STARTING(10.0, 2.0);
/* Return the interpolation parameter of `image'. */
CG_EXTERN bool CGImageGetShouldInterpolate(CGImageRef cg_nullable image)
CG_AVAILABLE_STARTING(10.0, 2.0);
/* Return the rendering intent of `image'. */
CG_EXTERN CGColorRenderingIntent CGImageGetRenderingIntent(cg_nullable CGImageRef image)
CG_AVAILABLE_STARTING(10.0, 2.0);
/* Return the bitmap info of `image'. */
CG_EXTERN CGBitmapInfo CGImageGetBitmapInfo(CGImageRef cg_nullable image)
CG_AVAILABLE_STARTING(10.4, 2.0);
/* Return the byte order info of `image'. */
CG_EXTERN CGImageByteOrderInfo CGImageGetByteOrderInfo(CGImageRef cg_nullable image) CG_AVAILABLE_STARTING(10.14, 12.0);
/* Return the pixel format of `image'. */
CG_EXTERN CGImagePixelFormatInfo CGImageGetPixelFormatInfo(CGImageRef cg_nullable image) CG_AVAILABLE_STARTING(10.14, 12.0);
/* Return the UTType of `image'. */
CG_EXTERN CFStringRef __nullable CGImageGetUTType(cg_nullable CGImageRef image)
CG_AVAILABLE_STARTING(10.11, 9.0);
CF_ASSUME_NONNULL_END
CF_IMPLICIT_BRIDGING_DISABLED
#endif /* CGIMAGE_H_ */
|
0 | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/CoreGraphics.framework | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/CoreGraphics.framework/Headers/CGDisplayFade.h | /* CoreGraphics - CGDisplayFade.h
Copyright (c) 2002-2008 Apple Inc.
All rights reserved. */
#ifndef CGDISPLAYFADE_H_
#define CGDISPLAYFADE_H_
#include <CoreFoundation/CFBase.h>
#include <CoreFoundation/CFAvailability.h>
#include <stdint.h>
#include <CoreGraphics/CGDirectDisplay.h>
#include <CoreGraphics/CGDisplayConfiguration.h>
CF_IMPLICIT_BRIDGING_ENABLED
CF_ASSUME_NONNULL_BEGIN
/* These APIs are used to fade displays to and from a solid color without
resorting to playing with the gamma table APIs and losing ColorSync
calibration.
These APIs should be used in preference to manipulating the gamma tables
for purposes of performing fade effects. */
typedef uint32_t CGDisplayFadeReservationToken;
#define kCGDisplayFadeReservationInvalidToken (0)
typedef float CGDisplayBlendFraction;
/* Values for the limits of the fade. `kCGDisplayBlendNormal' represents a
normal display state. `kCGDisplayBlendSolidColor' represents a display
blended to a solid color */
#define kCGDisplayBlendNormal (0.0)
#define kCGDisplayBlendSolidColor (1.0)
/* Time in seconds to perform a fade operation. */
typedef float CGDisplayFadeInterval;
/* Set the display fade time and color for a display reconfigure operation.
Call this function after `CGBeginDisplayConfiguration' and before
`CGCompleteDisplayConfiguration'.
When `CGCompleteDisplayConfiguration' is called, a fade-out effect will
occur prior to the display reconfiguration. When the reconfiguration is
complete, control returns to the calling program; the fade-in effect runs
asynchronously. */
CG_EXTERN CGError CGConfigureDisplayFadeEffect(
CGDisplayConfigRef __nullable config,
CGDisplayFadeInterval fadeOutSeconds, CGDisplayFadeInterval fadeInSeconds,
float fadeRed, float fadeGreen, float fadeBlue)
CG_AVAILABLE_STARTING(10.2);
/* It may be desirable to perform fade operations at other times, such as
when transitioning between game play and cinematic sequences. The
following API provides a mechanism for controlling display fade
operations outside of display mode reconfigurations. */
/* Return a reservation token for the display hardware. Before performing a
fade operation, the caller must reserve the hardware for the expected
period of time that the program will be doing fades.
Failing to release the hardware by the end of the reservation interval
will result in the reservation token becomingn invalid, and the hardware
being unfaded back to a normal state. The reservation interval is limited
to a maximum of 15 seconds and should be greater than zero. */
typedef float CGDisplayReservationInterval;
#define kCGMaxDisplayReservationInterval ((CGDisplayReservationInterval)(15.0))
CG_EXTERN CGError CGAcquireDisplayFadeReservation(CGDisplayReservationInterval
seconds, CGDisplayFadeReservationToken * __nullable token)
CG_AVAILABLE_STARTING(10.2);
/* Release a display fade reservation, and unfades the display if needed.
The reservation token is no longer valid after this operation.
`CGReleaseDisplayFadeReservation' may be safely called while an
asynchronous fade operation is running; if the ending blend value is
`kCGDisplayBlendNormal', this will not disturb the running operation. The
reservation is dropped when the fade operation completes. */
CG_EXTERN CGError CGReleaseDisplayFadeReservation(
CGDisplayFadeReservationToken token)
CG_AVAILABLE_STARTING(10.2);
/* Perform a fade operation. The reservation token `token' must have been
previously acquired from `CGAcquireDisplayFadeReservation'. The duration
of the fade is specified by `duration'. The starting and ending values of
the alpha component of the desired blend color are specified by
`startBlend' and `endBlend', respectively. The RGB blend color is
specified by the three components `(redBlend, greenBlend, blueBlend)'. If
the operation should be synchronous, specify true for `synchronous',
otherwise specify false.
Over the fade operation time interval, the system interpolates the
blending coefficient between the specified starting and ending values,
applying a nonlinear (sine-based) bias term, and blends the video output
with the specified color based on the resulting value.
If the time interval is specifed as 0, then the ending state blend value
is applied at once and the function returns.
The maximum allowable time interval is 15 seconds.
If the `synchronous' is true, the function does not return until the fade
operation is complete. If false, the function returns at once, and the
fade operation runs asynchronously.
To perform a two-second fade-to-black, waiting until complete:
CGDisplayFade(token,
2, // 2 seconds
kCGDisplayBlendNormal, // Starting state
kCGDisplayBlendSolidColor, // Ending state
0, 0, 0, // black
true); // Wait for completion
To perform a two-second fade-from-black to normal, without waiting for
completion:
CGDisplayFade(token,
2, // 2 seconds
kCGDisplayBlendSolidColor, // Starting state
kCGDisplayBlendNormal, // Ending state
0, 0, 0, // black
false); // Don't wait for completion */
CG_EXTERN CGError CGDisplayFade(CGDisplayFadeReservationToken token,
CGDisplayFadeInterval duration, CGDisplayBlendFraction startBlend,
CGDisplayBlendFraction endBlend, float redBlend, float greenBlend,
float blueBlend, boolean_t synchronous)
CG_AVAILABLE_STARTING(10.2);
/* Return true if a fade operation is currently in progress, false
otherwise. */
CG_EXTERN boolean_t CGDisplayFadeOperationInProgress(void)
CG_AVAILABLE_BUT_DEPRECATED(10.2, 10.9);
CF_ASSUME_NONNULL_END
CF_IMPLICIT_BRIDGING_DISABLED
#endif /* CGDISPLAYFADE_H_ */
|
0 | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/CoreGraphics.framework | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/CoreGraphics.framework/Headers/CGPDFOperatorTable.h | /* CoreGraphics - CGPDFOperatorTable.h
* Copyright (c) 2004-2008 Apple Inc.
* All rights reserved. */
#ifndef CGPDFOPERATORTABLE_H_
#define CGPDFOPERATORTABLE_H_
#include <CoreFoundation/CFBase.h>
#include <CoreFoundation/CFAvailability.h>
#include <stdint.h>
typedef struct CGPDFOperatorTable *CGPDFOperatorTableRef;
#include <CoreGraphics/CGPDFScanner.h>
CF_IMPLICIT_BRIDGING_ENABLED
CF_ASSUME_NONNULL_BEGIN
typedef void (*CGPDFOperatorCallback)(CGPDFScannerRef scanner,
void * __nullable info);
/* Return an empty operator table. */
CG_EXTERN CGPDFOperatorTableRef __nullable CGPDFOperatorTableCreate(void)
CG_AVAILABLE_STARTING(10.4, 2.0);
/* Increment the retain count of `table'. */
CG_EXTERN CGPDFOperatorTableRef cg_nullable CGPDFOperatorTableRetain(
CGPDFOperatorTableRef cg_nullable table)
CG_AVAILABLE_STARTING(10.4, 2.0);
/* Decrement the retain count of `table'. */
CG_EXTERN void CGPDFOperatorTableRelease(
CGPDFOperatorTableRef cg_nullable table)
CG_AVAILABLE_STARTING(10.4, 2.0);
/* Set the callback for the operator named `name' to `callback' */
CG_EXTERN void CGPDFOperatorTableSetCallback(
CGPDFOperatorTableRef cg_nullable table,
const char * cg_nullable name, CGPDFOperatorCallback cg_nullable callback)
CG_AVAILABLE_STARTING(10.4, 2.0);
CF_ASSUME_NONNULL_END
CF_IMPLICIT_BRIDGING_DISABLED
#endif /* CGPDFOPERATORTABLE_H_ */
|
0 | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/CoreGraphics.framework | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/CoreGraphics.framework/Headers/CGPDFString.h | /* CoreGraphics - CGPDFString.h
* Copyright (c) 2002-2008 Apple Inc.
* All rights reserved. */
#ifndef CGPDFSTRING_H_
#define CGPDFSTRING_H_
#include <CoreFoundation/CFBase.h>
#include <CoreFoundation/CFAvailability.h>
#include <stdint.h>
typedef struct CGPDFString *CGPDFStringRef;
#include <CoreGraphics/CGBase.h>
#include <CoreFoundation/CFDate.h>
#include <CoreFoundation/CFString.h>
CF_IMPLICIT_BRIDGING_ENABLED
CF_ASSUME_NONNULL_BEGIN
/* Return the length of `string'. */
CG_EXTERN size_t CGPDFStringGetLength(CGPDFStringRef cg_nullable string)
CG_AVAILABLE_STARTING(10.3, 2.0);
/* Return a pointer to the bytes of `string'. */
CG_EXTERN const unsigned char * __nullable CGPDFStringGetBytePtr(
CGPDFStringRef cg_nullable string)
CG_AVAILABLE_STARTING(10.3, 2.0);
/* Return a CFString representing `string' as a "text string". See Section
3.8.1 "Text Strings", PDF Reference: Adobe PDF version 1.6 (5th ed.) for
more information. */
CG_EXTERN CFStringRef __nullable CGPDFStringCopyTextString(
CGPDFStringRef cg_nullable string)
CG_AVAILABLE_STARTING(10.3, 2.0);
/* Convert `string' to a CFDate. See Section 3.8.3 "Dates", PDF Reference:
Adobe PDF version 1.6 (5th ed.) for more information. */
CG_EXTERN CFDateRef __nullable CGPDFStringCopyDate(
CGPDFStringRef cg_nullable string)
CG_AVAILABLE_STARTING(10.4, 2.0);
CF_ASSUME_NONNULL_END
CF_IMPLICIT_BRIDGING_DISABLED
#endif /* CGPDFSTRING_H_ */
|
0 | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/CoreGraphics.framework | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/CoreGraphics.framework/Headers/CGWindow.h | /* CoreGraphics - CGWindow.h
Copyright (c) 2006-2008 Apple Inc.
All rights reserved. */
#ifndef CGWINDOW_H_
#define CGWINDOW_H_
#include <CoreFoundation/CFBase.h>
#include <CoreFoundation/CFAvailability.h>
#include <stdint.h>
/* The CGWindowID contains a unique value within the user session
representing a window */
typedef uint32_t CGWindowID;
/* Values used for `CGWindowSharingType'. */
typedef CF_ENUM(uint32_t, CGWindowSharingType) {
kCGWindowSharingNone = 0,
kCGWindowSharingReadOnly = 1,
kCGWindowSharingReadWrite = 2
};
/* Values used for `CGWindowBackingType'. */
typedef CF_ENUM(uint32_t, CGWindowBackingType) {
kCGBackingStoreRetained = 0,
kCGBackingStoreNonretained = 1,
kCGBackingStoreBuffered = 2
};
#include <CoreGraphics/CGBase.h>
#include <CoreGraphics/CGImage.h>
#include <CoreFoundation/CFDictionary.h>
#include <CoreFoundation/CFArray.h>
CF_IMPLICIT_BRIDGING_ENABLED
CF_ASSUME_NONNULL_BEGIN
/* A value which is never the window ID of any window. */
#define kCGNullWindowID ((CGWindowID)0)
/* Keys for window dictionaries. */
/* The window ID, a unique value within the user session representing the
window. The value of this key is a CFNumber 32-bit signed integer
value. */
CG_EXTERN const CFStringRef kCGWindowNumber
CG_AVAILABLE_STARTING(10.5);
/* The backing store type of the window, one of `kCGBackingStoreRetained',
`kCGBackingStoreNonretained', or `kCGBackingStoreBuffered'. The value of
this key is a CFNumber 32-bit signed integer value. */
CG_EXTERN const CFStringRef kCGWindowStoreType
CG_AVAILABLE_STARTING(10.5);
/* The window layer number of the window. The value of this key is a
CFNumber 32-bit signed integer value. */
CG_EXTERN const CFStringRef kCGWindowLayer
CG_AVAILABLE_STARTING(10.5);
/* The bounds of the window in screen space, with the origin at the
upper-left corner of the main display. The value of this key is a
CFDictionary; use `CGRectMakeWithDictionaryRepresentation' to obtain the
bounds as a CGRect value. */
CG_EXTERN const CFStringRef kCGWindowBounds
CG_AVAILABLE_STARTING(10.5);
/* The sharing state of the window, one of `kCGWindowSharingNone',
`kCGWindowSharingReadOnly', or `kCGWindowSharingReadWrite'. The value of
this key is a CFNumber 32-bit signed integer value. */
CG_EXTERN const CFStringRef kCGWindowSharingState
CG_AVAILABLE_STARTING(10.5);
/* The alpha fade of the window. The value of this key is a CFNumber
floating-point value. The value 1.0 is normal (opaque); the value 0.0 is
fully transparent (invisible). */
CG_EXTERN const CFStringRef kCGWindowAlpha
CG_AVAILABLE_STARTING(10.5);
/* The process ID of the process that owns the window. The value of this key
is a CFNumber 32-bit signed integer value. */
CG_EXTERN const CFStringRef kCGWindowOwnerPID
CG_AVAILABLE_STARTING(10.5);
/* An estimate of the memory in bytes currently used by the window and its
supporting data structures. The value of this key is a CFNumber 64-bit
signed integer value. */
CG_EXTERN const CFStringRef kCGWindowMemoryUsage
CG_AVAILABLE_STARTING(10.5);
/* Optional keys for window dictionaries. */
/* If present, the workspace ID of the workspace associated with the window.
The value of this key is a CFNumber 32-bit signed integer value. */
CG_EXTERN const CFStringRef kCGWindowWorkspace
CG_AVAILABLE_BUT_DEPRECATED(10.5, 10.8);
/* If present, the name of the application process which owns the window.
The value of this key is a CFString. */
CG_EXTERN const CFStringRef kCGWindowOwnerName
CG_AVAILABLE_STARTING(10.5);
/* If present, the name of the window. The value of this key is a
CFString. */
CG_EXTERN const CFStringRef kCGWindowName
CG_AVAILABLE_STARTING(10.5);
/* If present, true if the window is ordered on screen, false otherwise. If
the key is not present, then the window is not ordered on screen. The
value of this key is a CFBoolean. */
CG_EXTERN const CFStringRef kCGWindowIsOnscreen
CG_AVAILABLE_STARTING(10.5);
/* If present, true if the window backing store is in video memory, false
otherwise. If the key is not present, then the window backing store is in
main memory. The value of this key is a CFBoolean. */
CG_EXTERN const CFStringRef kCGWindowBackingLocationVideoMemory
CG_AVAILABLE_STARTING(10.5);
/* Flags for CGWindowListOption values. These may be ORed together. */
typedef CF_OPTIONS(uint32_t, CGWindowListOption) {
/* List all windows in this user session, including both on- and
off-screen windows. The parameter `relativeToWindow' should be
`kCGNullWindowID'. */
kCGWindowListOptionAll = 0,
/* List all on-screen windows in this user session, ordered from front to
back. The parameter `relativeToWindow' should be `kCGNullWindowID'. */
kCGWindowListOptionOnScreenOnly = (1 << 0),
/* List all on-screen windows above the window specified by
`relativeToWindow', ordered from front to back. */
kCGWindowListOptionOnScreenAboveWindow = (1 << 1),
/* List all on-screen windows below the window specified by
`relativeToWindow', ordered from front to back. */
kCGWindowListOptionOnScreenBelowWindow = (1 << 2),
/* Include the window specified by `relativeToWindow' in any list,
effectively creating `at-or-above' or `at-or-below' lists. */
kCGWindowListOptionIncludingWindow = (1 << 3),
/* Exclude any windows from the list that are elements of the desktop. */
kCGWindowListExcludeDesktopElements = (1 << 4)
};
/* Return an array of window dictionaries for windows within the user
session.
This function returns NULL if the caller is not running within a Quartz
GUI session or the window server is disabled. You should release the
array when you are finished using it. */
CG_EXTERN CFArrayRef __nullable CGWindowListCopyWindowInfo(CGWindowListOption option,
CGWindowID relativeToWindow)
CG_AVAILABLE_STARTING(10.5);
/* Return an array of CGWindowID values for windows within the user session.
This function returns NULL if the caller is not running within a Quartz
GUI session or the window server is disabled. You should release the
array when you are finished using it. */
CG_EXTERN CFArrayRef __nullable CGWindowListCreate(CGWindowListOption option,
CGWindowID relativeToWindow)
CG_AVAILABLE_STARTING(10.5)
CF_SWIFT_UNAVAILABLE("No replacement at present");
/* Return an array of window dictionaries, each corresponding to a window ID
specified in `windowArray'.
This function returns NULL if the caller is not running within a Quartz
GUI session or the window server is disabled. You should release the
array when you are finished using it. */
CG_EXTERN CFArrayRef __nullable CGWindowListCreateDescriptionFromArray(
CFArrayRef __nullable windowArray)
CG_AVAILABLE_STARTING(10.5);
/* Flags for CGWindowImageOption values. These may be ORed together. */
typedef CF_OPTIONS(uint32_t, CGWindowImageOption) {
/* If `CGRectNull' is passed as the screen bounds, then then bounds
computation includes window frame ornamentation, such as a shadow. */
kCGWindowImageDefault = 0,
/* If `CGRectNull' is passed as the screen bounds, then then bounds
computation excludes window frame ornamentation, such as a shadow. */
kCGWindowImageBoundsIgnoreFraming = (1 << 0),
/* Force the created image to be opaque. Empty areas are white */
kCGWindowImageShouldBeOpaque = (1 << 1),
/* Only draw the windows' shadows, not the windows themselves. */
kCGWindowImageOnlyShadows = (1 << 2),
/* Return the best image resolution. The screen size may be
different than the returned image size. */
kCGWindowImageBestResolution = (1 << 3),
/* Return the nominal image resolution. The screen size
equals the returned image size. */
kCGWindowImageNominalResolution = (1 << 4)
};
/* Create an image containing a composite of the specified set of windows
contained within a rectangular area. The set of windows is specified
using options from `CGWindowListOption', along with an optional
additional window ID.
The windows list options are:
--- kCGWindowListOptionAll, kCGWindowListOptionOnScreenOnly: Use all
on-screen windows in this user session to construct the image. The
parameter `windowID' should be `kCGNullWindowID'.
--- kCGWindowListOptionOnScreenAboveWindow: Use all on-screen windows in
this user session above the window specified by `windowID', ordered from
front to back, to construct the image. To include the window specified by
`windowID', add the flag `kCGWindowListOptionIncludingWindow'.
--- kCGWindowListOptionOnScreenBelowWindow: Use all on-screen windows in
this user session below the window specified by `windowID', ordered from
front to back, to construct the image. To include the window specified by
`windowID', add the flag `kCGWindowListOptionIncludingWindow'.
--- kCGWindowListOptionIncludingWindow: Use only the window specified by
`windowID' to construct the image.
The parameter `screenBounds' specifies the rectangle in screen space
(origin at the upper-left; y-value increasing downward). Setting
`screenBounds' to `CGRectInfinite' will include all the windows on the
entire desktop. Setting `screenBounds' to `CGRectNull' will use the
bounding box of the specified windows as the screen space rectangle.
The parameter `imageOptions' allows you to specify whether the window
frame ornamentation, such as a shadow or similar effect, should be
included or excluded in the bounds calculation when `CGRectNull' is
specified for the window bounds.
If no windows meet the specified criteria, or the windows can't be read,
then a transparent black image will be returned.
Any on-screen window with sharing type `kCGWindowSharingNone' will not
be included in the image.
This function returns NULL if the caller is not running within a Quartz
GUI session or the window server is disabled. */
CG_EXTERN CGImageRef __nullable CGWindowListCreateImage(CGRect screenBounds,
CGWindowListOption listOption, CGWindowID windowID,
CGWindowImageOption imageOption)
CG_AVAILABLE_STARTING(10.5);
/* Create an image containing a composite of the specified set of windows
contained within a rectangular area à la `CGWindowListCreateImage'. The
set of windows is specified by `windowArray', an array of window IDs. */
CG_EXTERN CGImageRef __nullable CGWindowListCreateImageFromArray(
CGRect screenBounds, CFArrayRef windowArray,
CGWindowImageOption imageOption)
CG_AVAILABLE_STARTING(10.5);
/* A CFNumberRef encoding appropriate for use with a CGWindowID. */
#define kCGWindowIDCFNumberType kCFNumberSInt32Type
/* CFNumberRef encoding appropriate for use with CGWindowSharingType */
#define kCGWindowSharingCFNumberType kCFNumberSInt32Type
/* CFNumberRef encoding appropriate for use with CGWindowBackingType */
#define kCGWindowBackingCFNumberType kCFNumberSInt32Type
/* Checks whether the current process already has screen capture access */
CG_EXTERN bool CGPreflightScreenCaptureAccess(void) CG_AVAILABLE_STARTING(10.15);
/* Requests event listening access if absent, potentially prompting */
CG_EXTERN bool CGRequestScreenCaptureAccess(void) CG_AVAILABLE_STARTING(10.15);
CF_ASSUME_NONNULL_END
CF_IMPLICIT_BRIDGING_DISABLED
#endif /* CGWINDOW_H_ */
|
0 | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/CoreGraphics.framework | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/CoreGraphics.framework/Headers/CGConvertColorDataWithFormat.h | /* CoreGraphics - CGConvertColorDataWithFormat.h
Copyright (c)2021 Apple Inc.
All rights reserved. */
#ifndef CGCONVERTCOLORDATAWITHFORMAT_H
#define CGCONVERTCOLORDATAWITHFORMAT_H
#include <CoreGraphics/CoreGraphics.h>
#include <CoreFoundation/CoreFoundation.h>
typedef struct {
uint32_t version; // current version = 0
CFTypeRef colorspace_info; // one of:
// - CGColorSpaceRef,
// - CFStringRef (known name used by CGColorSpaceCreateWithName),
// - CFPropertyListRef (flattened CGColorSpaceRef used by IOSurface)
CGBitmapInfo bitmap_info; // see CGImage.h
size_t bits_per_component;
size_t bytes_per_row; // can be 0, if data is pixel aligned
CGColorRenderingIntent intent; // set to kCGRenderingIntentDefault if unknown
CGFloat* decode; // pass NULL; reserved for future use
} CGColorDataFormat;
CG_EXTERN bool CGConvertColorDataWithFormat(size_t width,
size_t height,
void* dst_data,
CGColorDataFormat dst_format,
void* src_data,
CGColorDataFormat src_format,
CFDictionaryRef options);
#endif /* CGCONVERTCOLORDATAWITHFORMAT_H */
|
0 | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/CoreGraphics.framework | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/CoreGraphics.framework/Headers/CGDisplayConfiguration.h | /* CoreGraphics - CGDisplayConfiguration.h
Copyright (c) 2002-2011 Apple Inc.
All rights reserved. */
#ifndef CGDISPLAYCONFIGURATION_H_
#define CGDISPLAYCONFIGURATION_H_
#include <CoreFoundation/CFBase.h>
#include <CoreFoundation/CFAvailability.h>
#include <stdint.h>
#include <IOKit/IOKitLib.h>
#include <CoreGraphics/CGDirectDisplay.h>
CF_IMPLICIT_BRIDGING_ENABLED
CF_ASSUME_NONNULL_BEGIN
/* The display reconfiguration process:
- Call `CGBeginDisplayConfiguration' to start.
- Make all desired changes for all displays.
- Commit the changes using `CGPerformDisplayConfiguration', or cancel
with `CGCancelDisplayConfiguration'.
The resulting layout will be adjusted to remove gaps or overlaps from the
requested layout, if needed. */
typedef struct _CGDisplayConfigRef *CGDisplayConfigRef;
/* Begin a new set of display configuration changes. This function creates a
display configuration which provides a context for a set of display
configuration changes. Use `CGCompleteDisplayConfiguration' to apply the
changes in a single transaction. */
CG_EXTERN CGError CGBeginDisplayConfiguration(
CGDisplayConfigRef __nullable * __nullable config)
CG_AVAILABLE_STARTING(10.0);
/* Configure the origin of a display in global display coordinates.
The new origin of the display is placed as close as possible to the
requested location, without overlapping or leaving a gap between
displays.
Any display whose origin is not explicitly set in a reconfiguration will
be repositioned to a location as close as possible to its current
location without overlapping or leaving a gap between displays.
Note that setting the origin of a display which is mirroring another
display will remove that display from any mirroring set. */
CG_EXTERN CGError CGConfigureDisplayOrigin(
CGDisplayConfigRef __nullable config,
CGDirectDisplayID display, int32_t x, int32_t y)
CG_AVAILABLE_STARTING(10.0);
/* Configure the display mode of a display. The "options" field is reserved
for future expansion; pass NULL for now.
A display mode is a set of properties such as width, height, pixel depth,
and refresh rate, and options such as stretched LCD panel filling.
If you use this function to change the mode of a display in a mirroring
set, Quartz may adjust the bounds, resolutions, and depth of the other
displays in the set to a safe mode, with matching depth and the smallest
enclosing size. */
CG_EXTERN CGError CGConfigureDisplayWithDisplayMode(
CGDisplayConfigRef __nullable config,
CGDirectDisplayID display, CGDisplayModeRef __nullable mode,
CFDictionaryRef __nullable options)
CG_AVAILABLE_STARTING(10.6);
/* Enable or disable stereo operation for a display.
Note that the system normally detects the presence of a stereo window,
and will automatically switch a display containing a stereo window to
stereo operation. This function provides a mechanism to force a display
to stereo operation, and to set options (such as blue line sync signal)
when in stereo operation.
When in stereo operation, a display may need to generate a special stereo
sync signal as part of the video output. The sync signal consists of a
blue line which occupies the first 25% of the last scanline for the left
eye view, and the first 75% of the last scanline for the right eye view.
The remainder of the scanline is black. To force the display to generate
this sync signal, pass true for `forceBlueLine'; otherwise, pass false.
Returns `kCGErrorSuccess' on success, or `kCGErrorRangeCheck' if the
display does not support the stereo operation settings requested.
On success, the display resolution, mirroring mode, and available display
modes may change due to hardware-specific capabilities and limitations.
You should check these settings to verify that they are appropriate for
your application. */
CG_EXTERN CGError CGConfigureDisplayStereoOperation(
CGDisplayConfigRef __nullable config,
CGDirectDisplayID display, boolean_t stereo, boolean_t forceBlueLine)
CG_AVAILABLE_STARTING(10.4);
/* Make a display a mirror of a master display.
Pass `kCGNullDirectDisplay' for the master display to disable mirroring.
Pass `CGMainDisplayID()' for the master display to mirror the main
display.
Display mirroring and display matte generation are implemented either in
hardware (preferred) or software, at the discretion of the device driver.
- Hardware mirroring
With hardware mirroring enabled, all drawing is directed to the primary
display --- see CGDisplayPrimaryDisplay.
If the device driver selects hardware matte generation, the display
bounds and rowbytes values are adjusted to reflect the active drawable
area.
- Software mirroring
In this form of mirroring, identical content is drawn into each display
in the mirroring set. Applications that use the window system need not
be concerned about mirroring, as the window system takes care of all
flushing of window content to the appropriate displays.
Applications that draw directly to the display, as with display
capture, must make sure to draw the same content to all mirrored
displays in a software mirror set. When drawing to software mirrored
displays using a full screen OpenGL context (not drawing through a
window), you should create shared OpenGL contexts for each display and
re-render for each display.
You can use the function `CGGetActiveDisplayList' to determine which
displays are active, or drawable. This automatically gives your
application the correct view of the current displays. */
CG_EXTERN CGError CGConfigureDisplayMirrorOfDisplay(
CGDisplayConfigRef __nullable config,
CGDirectDisplayID display, CGDirectDisplayID master)
CG_AVAILABLE_STARTING(10.2);
/* Cancel a set of display configuration changes. On return, the
configuration is cancelled and is no longer valid. */
CG_EXTERN CGError CGCancelDisplayConfiguration(
CGDisplayConfigRef __nullable config)
CG_AVAILABLE_STARTING(10.0);
/* Complete a set of display configuration changes. On return, the
configuration is no longer valid.
A configuration change can apply for the life of an application, the life
of a login session, or permanently. If a request is made to make a change
permanent, and the change cannot be supported by Mac OS X user interface,
then the configuration change lasts only for the current login session.
A permanent configuration change also becomes the current session's
configuration.
When the system reverts configurations at app termination, the
configuration reverts to the session or permanent configuration setting.
When the system reverts configurations at session termination, the
configuration reverts to the permanent configuration setting.
This operation may fail if an unsupported display mode is requested, or
if another app is running in full-screen mode. */
typedef CF_OPTIONS(uint32_t, CGConfigureOption) {
kCGConfigureForAppOnly = 0,
kCGConfigureForSession = 1,
kCGConfigurePermanently = 2
};
CG_EXTERN CGError CGCompleteDisplayConfiguration(
CGDisplayConfigRef __nullable config,
CGConfigureOption option)
CG_AVAILABLE_STARTING(10.0);
/* Restore the permanent display configuration settings for the current
user. */
CG_EXTERN void CGRestorePermanentDisplayConfiguration(void)
CG_AVAILABLE_STARTING(10.2);
/* Display changes are reported via a callback mechanism.
Callbacks are invoked when the app is listening for events, on the event
processing thread, or from within the display reconfiguration function
when in the program that is driving the reconfiguration.
Callbacks should avoid changing display configurations, and should not
raise exceptions or perform a non-local return such as calling longjmp().
Before display reconfiguration, a callback fires to inform applications
of a configuration change. The callback runs once for each on-line
display. The flag is set to `kCGDisplayBeginConfigurationFlag'. This
callback does not carry other per-display information, as details of how
a reconfiguration affects a particular device rely on device-specific
behaviors which may not be exposed by a device driver.
After display reconfiguration, at the time the callback function is
invoked, all display state reported by CoreGraphics, QuickDraw, and the
Carbon Display Manager API will be up to date. This callback runs after
the Carbon Display Manager notification callbacks. The callback runs once
for each added, removed, and currently on-line display. Note that in the
case of removed displays, calls into the CoreGraphics API with the
removed display ID will fail. */
typedef CF_OPTIONS(uint32_t, CGDisplayChangeSummaryFlags) {
kCGDisplayBeginConfigurationFlag = (1 << 0),
kCGDisplayMovedFlag = (1 << 1),
kCGDisplaySetMainFlag = (1 << 2),
kCGDisplaySetModeFlag = (1 << 3),
kCGDisplayAddFlag = (1 << 4),
kCGDisplayRemoveFlag = (1 << 5),
kCGDisplayEnabledFlag = (1 << 8),
kCGDisplayDisabledFlag = (1 << 9),
kCGDisplayMirrorFlag = (1 << 10),
kCGDisplayUnMirrorFlag = (1 << 11),
kCGDisplayDesktopShapeChangedFlag = (1 << 12)
};
/* A client-supplied callback function that’s invoked whenever the
configuration of a local display is changed. */
typedef void(*CGDisplayReconfigurationCallBack)(CGDirectDisplayID display,
CGDisplayChangeSummaryFlags flags, void * __nullable userInfo);
/* Register a display reconfiguration callback procedure. The `userInfo'
argument is passed back to the callback procedure each time it is
invoked. */
CG_EXTERN CGError CGDisplayRegisterReconfigurationCallback(
CGDisplayReconfigurationCallBack __nullable callback,
void * __nullable userInfo)
CG_AVAILABLE_STARTING(10.3);
/* Remove a display reconfiguration callback procedure. */
CG_EXTERN CGError CGDisplayRemoveReconfigurationCallback(
CGDisplayReconfigurationCallBack __nullable callback,
void * __nullable userInfo)
CG_AVAILABLE_STARTING(10.3);
/* Specialized configuration changes should be done outside of the scope of
a `CGBeginDisplayConfiguration'/`CGCompleteDisplayConfiguration' pair, as
they may alter things such as the available display modes which a normal
reconfiguration sequence might assume are invariant. */
/* Immediately enable or disable stereo operation for a display.
Note that the system normally detects the presence of a stereo window,
and will automatically switch a display containing a stereo window to
stereo operation. This function provides a mechanism to force a display
to stereo operation, and to set options (such as blue line sync signal)
when in stereo operation.
When in stereo operation, a display may need to generate a special stereo
sync signal as part of the video output. The sync signal consists of a
blue line which occupies the first 25% of the last scanline for the left
eye view, and the first 75% of the last scanline for the right eye view.
The remainder of the scanline is black. To force the display to generate
this sync signal, pass true for `forceBlueLine'; otherwise, pass false.
Returns `kCGErrorSuccess' on success, or `kCGErrorRangeCheck' if the
display does not support the stereo operation settings requested.
On success, the display resolution, mirroring mode, and available display
modes may change due to hardware-specific capabilities and limitations.
You should check these settings to verify that they are appropriate for
your application. */
CG_EXTERN CGError CGDisplaySetStereoOperation(CGDirectDisplayID display,
boolean_t stereo, boolean_t forceBlueLine, CGConfigureOption option)
CG_AVAILABLE_STARTING(10.4);
/* Return true if the display is connected, awake, and available for
drawing; false otherwise. */
CG_EXTERN boolean_t CGDisplayIsActive(CGDirectDisplayID display)
CG_AVAILABLE_STARTING(10.2);
/* Return true if the display is asleep (and is therefore not drawable);
false otherwise. */
CG_EXTERN boolean_t CGDisplayIsAsleep(CGDirectDisplayID display)
CG_AVAILABLE_STARTING(10.2);
/* Return true if the display is connected or online; false otherwise. */
CG_EXTERN boolean_t CGDisplayIsOnline(CGDirectDisplayID display)
CG_AVAILABLE_STARTING(10.2);
/* Return true if the display is the current main display; false
otherwise. */
CG_EXTERN boolean_t CGDisplayIsMain(CGDirectDisplayID display)
CG_AVAILABLE_STARTING(10.2);
/* Return true if the display is built-in, such as the internal display in
portable systems; false otherwise. */
CG_EXTERN boolean_t CGDisplayIsBuiltin(CGDirectDisplayID display)
CG_AVAILABLE_STARTING(10.2);
/* Return true if the display is in a mirroring set; false otherwise. */
CG_EXTERN boolean_t CGDisplayIsInMirrorSet(CGDirectDisplayID display)
CG_AVAILABLE_STARTING(10.2);
/* Return true if the display is always in a mirroring set and cannot be
unmirrored; false otherwise. */
CG_EXTERN boolean_t CGDisplayIsAlwaysInMirrorSet(CGDirectDisplayID display)
CG_AVAILABLE_STARTING(10.2);
/* Return true if the display is in a hardware mirroring set; false
otherwise. */
CG_EXTERN boolean_t CGDisplayIsInHWMirrorSet(CGDirectDisplayID display)
CG_AVAILABLE_STARTING(10.2);
/* For a secondary display in a mirror set, return the display being
mirrored (the primary display), or `kCGNullDirectDisplay' if the display
is the primary display or if the display is unmirrored. */
CG_EXTERN CGDirectDisplayID CGDisplayMirrorsDisplay(CGDirectDisplayID display)
CG_AVAILABLE_STARTING(10.2);
/* Return true if the display is using OpenGL acceleration; false
otherwise. */
CG_EXTERN boolean_t CGDisplayUsesOpenGLAcceleration(CGDirectDisplayID display)
CG_AVAILABLE_STARTING(10.2);
/* Return true if the display is running in a stereo graphics mode; false
otherwise. */
CG_EXTERN boolean_t CGDisplayIsStereo(CGDirectDisplayID display)
CG_AVAILABLE_STARTING(10.4); /* 10.4.3 and later. */
/* Return the primary display in a hardware mirror set, or `display' if the
display is not hardware-mirrored. */
CG_EXTERN CGDirectDisplayID CGDisplayPrimaryDisplay(CGDirectDisplayID display)
CG_AVAILABLE_STARTING(10.2);
/* Return the logical unit number of a display. */
CG_EXTERN uint32_t CGDisplayUnitNumber(CGDirectDisplayID display)
CG_AVAILABLE_STARTING(10.2);
/* Return the vendor number of a display's monitor. */
CG_EXTERN uint32_t CGDisplayVendorNumber(CGDirectDisplayID display)
CG_AVAILABLE_STARTING(10.2);
/* Return the model number of a display's monitor. */
CG_EXTERN uint32_t CGDisplayModelNumber(CGDirectDisplayID display)
CG_AVAILABLE_STARTING(10.2);
/* Return the serial number of a display's monitor. */
CG_EXTERN uint32_t CGDisplaySerialNumber(CGDirectDisplayID display)
CG_AVAILABLE_STARTING(10.2);
/* Return the IOKit service port of a display. */
CG_EXTERN io_service_t CGDisplayIOServicePort(CGDirectDisplayID display)
CG_AVAILABLE_BUT_DEPRECATED(10.2, 10.9);
/* Return the width and height of a display in millimeters.
If 'display' is not a valid display ID, the size returned has a width and
height of 0.
If Extended Display Identification Data (EDID) for the display device is
not available, the size is estimated based on the device width and height
in pixels from `CGDisplayBounds', with an assumed resolution of 2.835
pixels/mm, or 72 DPI, a reasonable guess for displays predating EDID
support. */
CG_EXTERN CGSize CGDisplayScreenSize(CGDirectDisplayID display)
CG_AVAILABLE_STARTING(10.3);
/* Return the rotation angle of a display in degrees clockwise.
A display rotation of 90° implies the display is rotated clockwise 90°,
such that what was the physical bottom of the display is now the left
side, and what was the physical top is now the right side.
If `display' is not a valid display ID, the rotation returned is 0. */
CG_EXTERN double CGDisplayRotation(CGDirectDisplayID display)
CG_AVAILABLE_STARTING(10.5);
/* Return the color space of a display. */
CG_EXTERN CGColorSpaceRef CGDisplayCopyColorSpace(
CGDirectDisplayID display)
CG_AVAILABLE_STARTING(10.5);
/* These functions are deprecated; do not use them. */
CG_EXTERN CGError CGConfigureDisplayMode(CGDisplayConfigRef __nullable config,
CGDirectDisplayID display, CFDictionaryRef __nullable mode)
CG_AVAILABLE_BUT_DEPRECATED(10.0, 10.6);
CF_ASSUME_NONNULL_END
CF_IMPLICIT_BRIDGING_DISABLED
#endif /* CGDISPLAYCONFIGURATION_H_ */
|
0 | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/CoreGraphics.framework | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/CoreGraphics.framework/Headers/CGBitmapContext.h | /* CoreGraphics - CGBitmapContext.h
Copyright (c) 2000-2011 Apple Inc.
All rights reserved. */
#ifndef CGBITMAPCONTEXT_H_
#define CGBITMAPCONTEXT_H_
#include <CoreGraphics/CGBase.h>
#include <CoreGraphics/CGContext.h>
#include <CoreFoundation/CFBase.h>
#include <CoreFoundation/CFAvailability.h>
#include <stdint.h>
CF_IMPLICIT_BRIDGING_ENABLED
CF_ASSUME_NONNULL_BEGIN
/* The callback for releasing the data supplied to
`CGBitmapContextCreateWithData'. */
typedef void (*CGBitmapContextReleaseDataCallback)(void * __nullable releaseInfo,
void * __nullable data);
/* Create a bitmap context. The context draws into a bitmap which is `width'
pixels wide and `height' pixels high. The number of components for each
pixel is specified by `space', which may also specify a destination color
profile. Note that the only legal case when `space' can be NULL is when
alpha is specified as kCGImageAlphaOnly. The number of bits for each
component of a pixel is specified by `bitsPerComponent'. The number of bytes
per pixel is equal to `(bitsPerComponent * number of components + 7)/8'.
Each row of the bitmap consists of `bytesPerRow' bytes, which must be at
least `width * bytes per pixel' bytes; in addition, `bytesPerRow' must be
an integer multiple of the number of bytes per pixel. `data', if non-NULL,
points to a block of memory at least `bytesPerRow * height' bytes. If `data'
is NULL, the context will allocate the data itself; this data will be freed
when the context is deallocated. `bitmapInfo' specifies whether the bitmap
should contain an alpha channel and how it's to be generated, along with
whether the components are floating-point or integer. If `releaseCallback' is
non-NULL, it is called when the context is freed with `releaseInfo' and
`data' as arguments. */
CG_EXTERN CGContextRef __nullable CGBitmapContextCreateWithData(
void * __nullable data, size_t width, size_t height, size_t bitsPerComponent,
size_t bytesPerRow, CGColorSpaceRef cg_nullable space, uint32_t bitmapInfo,
CGBitmapContextReleaseDataCallback __nullable releaseCallback,
void * __nullable releaseInfo)
CG_AVAILABLE_STARTING(10.6, 4.0);
/* Create a bitmap context. The context draws into a bitmap which is `width'
pixels wide and `height' pixels high. The number of components for each
pixel is specified by `space', which may also specify a destination color
profile. Note that the only legal case when `space' can be NULL is when
alpha is specified as kCGImageAlphaOnly.The number of bits for each component
of a pixel is specified by `bitsPerComponent'. The number of bytes per pixel
is equal to `(bitsPerComponent * number of components + 7)/8'. Each row of
the bitmap consists of `bytesPerRow' bytes, which must be at least
`width * bytes per pixel' bytes; in addition, `bytesPerRow' must be an
integer multiple of the number of bytes per pixel. `data', if non-NULL,
points to a block of memory at least `bytesPerRow * height' bytes.
If `data' is NULL, the data for context is allocated automatically and freed
when the context is deallocated. `bitmapInfo' specifies whether the bitmap
should contain an alpha channel and how it's to be generated, along with
whether the components are floating-point or integer. */
CG_EXTERN CGContextRef __nullable CGBitmapContextCreate(void * __nullable data,
size_t width, size_t height, size_t bitsPerComponent, size_t bytesPerRow,
CGColorSpaceRef cg_nullable space, uint32_t bitmapInfo)
CG_AVAILABLE_STARTING(10.0, 2.0);
/* Return the data associated with the bitmap context `context', or NULL if
`context' is not a bitmap context. */
CG_EXTERN void * __nullable CGBitmapContextGetData(CGContextRef cg_nullable context)
CG_AVAILABLE_STARTING(10.2, 2.0);
/* Return the width of the bitmap context `context', or 0 if `context' is
not a bitmap context. */
CG_EXTERN size_t CGBitmapContextGetWidth(CGContextRef cg_nullable context)
CG_AVAILABLE_STARTING(10.2, 2.0);
/* Return the height of the bitmap context `context', or 0 if `context' is
not a bitmap context. */
CG_EXTERN size_t CGBitmapContextGetHeight(CGContextRef cg_nullable context)
CG_AVAILABLE_STARTING(10.2, 2.0);
/* Return the bits per component of the bitmap context `context', or 0 if
`context' is not a bitmap context. */
CG_EXTERN size_t CGBitmapContextGetBitsPerComponent(CGContextRef cg_nullable context)
CG_AVAILABLE_STARTING(10.2, 2.0);
/* Return the bits per pixel of the bitmap context `context', or 0 if
`context' is not a bitmap context. */
CG_EXTERN size_t CGBitmapContextGetBitsPerPixel(CGContextRef cg_nullable context)
CG_AVAILABLE_STARTING(10.2, 2.0);
/* Return the bytes per row of the bitmap context `context', or 0 if
`context' is not a bitmap context. */
CG_EXTERN size_t CGBitmapContextGetBytesPerRow(CGContextRef cg_nullable context)
CG_AVAILABLE_STARTING(10.2, 2.0);
/* Return the color space of the bitmap context `context', or NULL if
`context' is not a bitmap context. */
CG_EXTERN CGColorSpaceRef __nullable CGBitmapContextGetColorSpace(
CGContextRef cg_nullable context)
CG_AVAILABLE_STARTING(10.2, 2.0);
/* Return the alpha info of the bitmap context `context', or
"kCGImageAlphaNone" if `context' is not a bitmap context. */
CG_EXTERN CGImageAlphaInfo CGBitmapContextGetAlphaInfo(
CGContextRef cg_nullable context)
CG_AVAILABLE_STARTING(10.2, 2.0);
/* Return the bitmap info of the bitmap context `context', or 0 if `context'
is not a bitmap context. */
CG_EXTERN CGBitmapInfo CGBitmapContextGetBitmapInfo(
CGContextRef cg_nullable context)
CG_AVAILABLE_STARTING(10.4, 2.0);
/* Return an image containing a snapshot of the bitmap context `context'. If
context is not a bitmap context, or if the image cannot be created for
any reason, this function returns NULL. This is a "copy" operation ---
subsequent changes to context will not affect the contents of the
returned image.
Note that in some cases the copy will actually follow "copy-on-write"
semantics, so that the actual physical copy of the bits will only occur
if the underlying data in the bitmap context is modified. As a
consequence, you may wish to use the resulting image and release it
before performing more drawing into the bitmap context; in this way, the
actual physical copy of the data may be avoided. */
CG_EXTERN CGImageRef __nullable CGBitmapContextCreateImage(
CGContextRef cg_nullable context)
CG_AVAILABLE_STARTING(10.4, 2.0);
CF_ASSUME_NONNULL_END
CF_IMPLICIT_BRIDGING_DISABLED
#endif /* CGBITMAPCONTEXT_H_ */
|
0 | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/CoreGraphics.framework | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/CoreGraphics.framework/Headers/CGLayer.h | /* CoreGraphics - CGLayer.h
* Copyright (c) 2004-2008 Apple Inc.
* All rights reserved. */
#ifndef CGLAYER_H_
#define CGLAYER_H_
#include <CoreFoundation/CFBase.h>
#include <CoreFoundation/CFAvailability.h>
#include <stdint.h>
typedef struct CF_BRIDGED_TYPE(id) CGLayer *CGLayerRef;
#include <CoreGraphics/CGBase.h>
#include <CoreGraphics/CGContext.h>
CF_IMPLICIT_BRIDGING_ENABLED
CF_ASSUME_NONNULL_BEGIN
/* Create a layer of size `size' relative to the context `context'. The
value of `size' is specified in default user space (base space) units.
The parameter `auxiliaryInfo' should be NULL; it is reserved for future
expansion. */
CG_EXTERN CGLayerRef __nullable CGLayerCreateWithContext(
CGContextRef cg_nullable context,
CGSize size, CFDictionaryRef __nullable auxiliaryInfo)
CG_AVAILABLE_STARTING(10.4, 2.0);
/* Equivalent to `CFRetain(layer)', except it doesn't crash (as CFRetain
does) if `layer' is NULL. */
CG_EXTERN CGLayerRef cg_nullable CGLayerRetain(CGLayerRef cg_nullable layer)
CG_AVAILABLE_STARTING(10.4, 2.0);
/* Equivalent to `CFRelease(layer)', except it doesn't crash (as CFRelease
does) if `layer' is NULL. */
CG_EXTERN void CGLayerRelease(CGLayerRef cg_nullable layer)
CG_AVAILABLE_STARTING(10.4, 2.0);
/* Return the size of the layer `layer'. CGSizeZero if invalid `layer'. */
CG_EXTERN CGSize CGLayerGetSize(CGLayerRef cg_nullable layer)
CG_AVAILABLE_STARTING(10.4, 2.0);
/* Return the context of `layer'. */
CG_EXTERN CGContextRef __nullable CGLayerGetContext(CGLayerRef cg_nullable layer)
CG_AVAILABLE_STARTING(10.4, 2.0);
/* Draw the contents of `layer' into `rect' of `context'. The contents are
scaled, if necessary, to fit into `rect'; the rectangle `rect' is in user
space. */
CG_EXTERN void CGContextDrawLayerInRect(CGContextRef cg_nullable context,
CGRect rect, CGLayerRef cg_nullable layer)
CG_AVAILABLE_STARTING(10.4, 2.0);
/* Draw the contents of `layer' at `point' in `context'. This is equivalent
to calling "CGContextDrawLayerInRect" with a rectangle having origin at
`point' and size equal to the size of `layer'. */
CG_EXTERN void CGContextDrawLayerAtPoint(CGContextRef cg_nullable context,
CGPoint point, CGLayerRef cg_nullable layer)
CG_AVAILABLE_STARTING(10.4, 2.0);
/* Return the CFTypeID for CGLayerRefs. */
CG_EXTERN CFTypeID CGLayerGetTypeID(void)
CG_AVAILABLE_STARTING(10.4, 2.0);
CF_ASSUME_NONNULL_END
CF_IMPLICIT_BRIDGING_DISABLED
#endif /* CGLAYER_H_ */
|
0 | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/CoreGraphics.framework | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/CoreGraphics.framework/Headers/CGSession.h | /* CoreGraphics - CGSession.h
Copyright (c) 2003-2008 Apple Inc.
All rights reserved. */
#ifndef CGSESSION_H_
#define CGSESSION_H_
#include <CoreFoundation/CFBase.h>
#include <CoreFoundation/CFAvailability.h>
#include <stdint.h>
#include <CoreGraphics/CGBase.h>
#include <CoreFoundation/CoreFoundation.h>
CF_IMPLICIT_BRIDGING_ENABLED
CF_ASSUME_NONNULL_BEGIN
/* Return a window server session dictionary, or NULL if the caller is not
running within a Quartz GUI session or the window server is disabled. You
should release the dictionary when you are finished using it. */
CG_EXTERN CFDictionaryRef __nullable CGSessionCopyCurrentDictionary(void)
CG_AVAILABLE_STARTING(10.3);
/* Keys for window server session dictionaries. */
/* The user ID for the session's current user, specified as a CFNumber
32-bit unsigned integer value. */
#define kCGSessionUserIDKey CFSTR("kCGSSessionUserIDKey")
/* The session's short user name as set by the login operation, specified as
a CFString value. */
#define kCGSessionUserNameKey CFSTR("kCGSSessionUserNameKey")
/* The set of hardware composing a console, specified as a CFNumber 32-bit
unsigned integer value. */
#define kCGSessionConsoleSetKey CFSTR("kCGSSessionConsoleSetKey")
/* An indication of whether the session is on a console, specified as a
CFBoolean value. */
#define kCGSessionOnConsoleKey CFSTR("kCGSSessionOnConsoleKey")
/* An indication of whether the login operation has been done, specified as
a CFBoolean value. */
#define kCGSessionLoginDoneKey CFSTR("kCGSessionLoginDoneKey")
/* When the GUI session on a console changes, this notification is posted
via `notify_post'. */
#define kCGNotifyGUIConsoleSessionChanged \
"com.apple.coregraphics.GUIConsoleSessionChanged"
/* When a user logs in or out of a session, this notification is posted via
`notify_post'. */
#define kCGNotifyGUISessionUserChanged \
"com.apple.coregraphics.GUISessionUserChanged"
CF_ASSUME_NONNULL_END
CF_IMPLICIT_BRIDGING_DISABLED
#endif /* CGSESSION_H_ */
|
0 | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/CoreGraphics.framework | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/CoreGraphics.framework/Headers/CGPDFDictionary.h | /* CoreGraphics - CGPDFDictionary.h
* Copyright (c) 2002-2008 Apple Inc.
* All rights reserved. */
#ifndef CGPDFDICTIONARY_H_
#define CGPDFDICTIONARY_H_
#include <CoreFoundation/CFBase.h>
#include <CoreFoundation/CFAvailability.h>
#include <stdint.h>
typedef struct CGPDFDictionary *CGPDFDictionaryRef;
#include <CoreGraphics/CGPDFArray.h>
#include <CoreGraphics/CGPDFObject.h>
#include <CoreGraphics/CGPDFStream.h>
#include <CoreGraphics/CGPDFString.h>
CF_IMPLICIT_BRIDGING_ENABLED
CF_ASSUME_NONNULL_BEGIN
/* Return the number of entries in `dictionary'. */
CG_EXTERN size_t CGPDFDictionaryGetCount(CGPDFDictionaryRef cg_nullable dict)
CG_AVAILABLE_STARTING(10.3, 2.0);
/* Look up the object associated with `key' in `dict' and return the result
in `value'. Return true on success; false otherwise. */
CG_EXTERN bool CGPDFDictionaryGetObject(CGPDFDictionaryRef cg_nullable dict,
const char * key, CGPDFObjectRef __nullable * __nullable value)
CG_AVAILABLE_STARTING(10.3, 2.0);
/* Look up the object associated with `key' in `dict' and, if it's a
boolean, return the result in `value'. Return true on success; false
otherwise. */
CG_EXTERN bool CGPDFDictionaryGetBoolean(CGPDFDictionaryRef cg_nullable dict,
const char * key, CGPDFBoolean * __nullable value)
CG_AVAILABLE_STARTING(10.3, 2.0);
/* Look up the object associated with `key' in `dict' and, if it's an
integer, return the result in `value'. Return true on success; false
otherwise. */
CG_EXTERN bool CGPDFDictionaryGetInteger(CGPDFDictionaryRef cg_nullable dict,
const char * key, CGPDFInteger * __nullable value)
CG_AVAILABLE_STARTING(10.3, 2.0);
/* Look up the object associated with `key' in `dict' and, if it's a number
(real or integer), return the result in `value'. Return true on success;
false otherwise. */
CG_EXTERN bool CGPDFDictionaryGetNumber(CGPDFDictionaryRef cg_nullable dict,
const char * key, CGPDFReal * __nullable value)
CG_AVAILABLE_STARTING(10.3, 2.0);
/* Look up the object associated with `key' in `dict' and, if it's a name,
return the result in `value'. Return true on success; false otherwise. */
CG_EXTERN bool CGPDFDictionaryGetName(CGPDFDictionaryRef cg_nullable dict,
const char * key, const char * __nullable * __nullable value)
CG_AVAILABLE_STARTING(10.3, 2.0);
/* Look up the object associated with `key' in `dict' and, if it's a string,
return the result in `value'. Return true on success; false otherwise. */
CG_EXTERN bool CGPDFDictionaryGetString(CGPDFDictionaryRef cg_nullable dict,
const char * key, CGPDFStringRef __nullable * __nullable value)
CG_AVAILABLE_STARTING(10.3, 2.0);
/* Look up the object associated with `key' in `dict' and, if it's an array,
return the result in `value'. Return true on success; false otherwise. */
CG_EXTERN bool CGPDFDictionaryGetArray(CGPDFDictionaryRef cg_nullable dict,
const char * key, CGPDFArrayRef __nullable * __nullable value)
CG_AVAILABLE_STARTING(10.3, 2.0);
/* Look up the object associated with `key' in `dict' and, if it's a
dictionary, return the result in `value'. Return true on success; false
otherwise. */
CG_EXTERN bool CGPDFDictionaryGetDictionary(CGPDFDictionaryRef cg_nullable dict,
const char * key, CGPDFDictionaryRef __nullable * __nullable value)
CG_AVAILABLE_STARTING(10.3, 2.0);
/* Look up the object associated with `key' in `dict' and, if it's a stream,
return the result in `value'. Return true on success; false otherwise. */
CG_EXTERN bool CGPDFDictionaryGetStream(CGPDFDictionaryRef cg_nullable dict,
const char * key, CGPDFStreamRef __nullable * __nullable value)
CG_AVAILABLE_STARTING(10.3, 2.0);
/* The callback for `CGPDFDictionaryApplyFunction'. `key' is the current
key, `value' is the value for `key', and `info' is the parameter passed
to `CGPDFDictionaryApplyFunction'. */
typedef void (*CGPDFDictionaryApplierFunction)(const char * key,
CGPDFObjectRef value, void * __nullable info);
/* Enumerate all of the keys in `dict', calling `function' once for each
key/value pair. Passes the current key, the associated value, and `info'
to `function'. */
CG_EXTERN void CGPDFDictionaryApplyFunction(CGPDFDictionaryRef cg_nullable dict,
CGPDFDictionaryApplierFunction cg_nullable function, void * __nullable info)
CG_AVAILABLE_STARTING(10.3, 2.0);
/* The block function for `CGPDFDictionaryApplyBlock'. `key' is the current
key, `value' is the value for `key', and `info' is the parameter passed
to `CGPDFDictionaryApplyBlock'. If the block returns true, the iteration
of the dictionary will continue, otherwise if the block returns false,
the iterator will stop and return early. */
typedef bool (^CGPDFDictionaryApplierBlock)(const char * key,
CGPDFObjectRef value, void * __nullable info);
/* Enumerate all of the keys in `dict', calling the block-function `block' once
for each key/value pair. Passes the current key, the associated value, and
`info' to `block'. If `block' returns true, iteration will continue over all
key/value pairs. If `block' returns false, iteration will stop and return
early. */
CG_EXTERN void CGPDFDictionaryApplyBlock(CGPDFDictionaryRef cg_nullable dict,
CGPDFDictionaryApplierBlock cg_nullable block, void * __nullable info)
CG_AVAILABLE_STARTING(10.14, 12.0);
CF_ASSUME_NONNULL_END
CF_IMPLICIT_BRIDGING_DISABLED
#endif /* CGPDFDICTIONARY_H_ */
|
0 | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/CoreGraphics.framework | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/CoreGraphics.framework/Headers/CGDataConsumer.h | /* CoreGraphics - CGDataConsumer.h
* Copyright (c) 1999-2008 Apple Inc.
* All rights reserved. */
#ifndef CGDATACONSUMER_H_
#define CGDATACONSUMER_H_
#include <CoreFoundation/CFBase.h>
#include <CoreFoundation/CFAvailability.h>
#include <stdint.h>
typedef struct CF_BRIDGED_TYPE(id) CGDataConsumer *CGDataConsumerRef;
#include <CoreGraphics/CGBase.h>
#include <CoreFoundation/CFURL.h>
CF_IMPLICIT_BRIDGING_ENABLED
CF_ASSUME_NONNULL_BEGIN
/* This callback is called to copy `count' bytes from `buffer' to the data
consumer. */
typedef size_t (*CGDataConsumerPutBytesCallback)(void * __nullable info,
const void * buffer, size_t count);
/* This callback is called to release the `info' pointer when the data
provider is freed. */
typedef void (*CGDataConsumerReleaseInfoCallback)(void * __nullable info);
/* Callbacks for writing data.
`putBytes' copies `count' bytes from `buffer' to the consumer, and
returns the number of bytes copied. It should return 0 if no more data
can be written to the consumer.
`releaseConsumer', if non-NULL, is called when the consumer is freed. */
struct CGDataConsumerCallbacks {
CGDataConsumerPutBytesCallback __nullable putBytes;
CGDataConsumerReleaseInfoCallback __nullable releaseConsumer;
};
typedef struct CGDataConsumerCallbacks CGDataConsumerCallbacks;
/* Return the CFTypeID for CGDataConsumerRefs. */
CG_EXTERN CFTypeID CGDataConsumerGetTypeID(void)
CG_AVAILABLE_STARTING(10.2, 2.0);
/* Create a data consumer using `callbacks' to handle the data. `info' is
passed to each of the callback functions. */
CG_EXTERN CGDataConsumerRef __nullable CGDataConsumerCreate(
void * __nullable info, const CGDataConsumerCallbacks * cg_nullable cbks)
CG_AVAILABLE_STARTING(10.0, 2.0);
/* Create a data consumer which writes data to `url'. */
CG_EXTERN CGDataConsumerRef __nullable CGDataConsumerCreateWithURL(
CFURLRef cg_nullable url)
CG_AVAILABLE_STARTING(10.0, 2.0);
/* Create a data consumer which writes to `data'. */
CG_EXTERN CGDataConsumerRef __nullable CGDataConsumerCreateWithCFData(
CFMutableDataRef cg_nullable data)
CG_AVAILABLE_STARTING(10.4, 2.0);
/* Equivalent to `CFRetain(consumer)'. */
CG_EXTERN CGDataConsumerRef cg_nullable CGDataConsumerRetain(
CGDataConsumerRef cg_nullable consumer)
CG_AVAILABLE_STARTING(10.0, 2.0);
/* Equivalent to `CFRelease(consumer)'. */
CG_EXTERN void CGDataConsumerRelease(cg_nullable CGDataConsumerRef consumer)
CG_AVAILABLE_STARTING(10.0, 2.0);
CF_ASSUME_NONNULL_END
CF_IMPLICIT_BRIDGING_DISABLED
#endif /* CGDATACONSUMER_H_ */
|
0 | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/CoreGraphics.framework | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/CoreGraphics.framework/Headers/CGPDFPage.h | /* CoreGraphics - CGPDFPage.h
Copyright (c) 2001-2011 Apple Inc.
All rights reserved. */
#ifndef CGPDFPAGE_H_
#define CGPDFPAGE_H_
#include <CoreFoundation/CFBase.h>
#include <CoreFoundation/CFAvailability.h>
#include <stdint.h>
typedef struct CF_BRIDGED_TYPE(id) CGPDFPage *CGPDFPageRef;
#include <CoreGraphics/CGAffineTransform.h>
#include <CoreGraphics/CGPDFDictionary.h>
#include <CoreGraphics/CGPDFDocument.h>
CF_IMPLICIT_BRIDGING_ENABLED
CF_ASSUME_NONNULL_BEGIN
typedef CF_ENUM (int32_t, CGPDFBox) {
kCGPDFMediaBox = 0,
kCGPDFCropBox = 1,
kCGPDFBleedBox = 2,
kCGPDFTrimBox = 3,
kCGPDFArtBox = 4
};
/* Equivalent to `CFRetain(page)', except it doesn't crash (as CFRetain
does) if `page' is NULL. */
CG_EXTERN CGPDFPageRef __nullable CGPDFPageRetain(CGPDFPageRef cg_nullable page)
CG_AVAILABLE_STARTING(10.3, 2.0);
/* Equivalent to `CFRelease(page)', except it doesn't crash (as CFRelease
does) if `page' is NULL. */
CG_EXTERN void CGPDFPageRelease(CGPDFPageRef cg_nullable page)
CG_AVAILABLE_STARTING(10.3, 2.0);
/* Return the document of `page'. */
CG_EXTERN CGPDFDocumentRef __nullable CGPDFPageGetDocument(
CGPDFPageRef cg_nullable page)
CG_AVAILABLE_STARTING(10.3, 2.0);
/* Return the page number of `page'. */
CG_EXTERN size_t CGPDFPageGetPageNumber(CGPDFPageRef cg_nullable page)
CG_AVAILABLE_STARTING(10.3, 2.0);
/* Return the rectangle associated with `box' in `page'. This is the value
of the corresponding entry (such as /MediaBox, /ArtBox, and so on) in the
page's dictionary. Return CGRectNull if `page' is not a valid CGPDFPageRef
or `box' is not a valid CGPDFBox. */
CG_EXTERN CGRect CGPDFPageGetBoxRect(CGPDFPageRef cg_nullable page, CGPDFBox box)
CG_AVAILABLE_STARTING(10.3, 2.0);
/* Return the rotation angle (in degrees) of `page'. This is the value of
the /Rotate entry in the page's dictionary. Return 0 if `page' is not a valid
CGPDFPageRef. */
CG_EXTERN int CGPDFPageGetRotationAngle(CGPDFPageRef cg_nullable page)
CG_AVAILABLE_STARTING(10.3, 2.0);
/* Return a transform mapping the box specified by `box' to `rect' as
follows:
- Compute the effective rect by intersecting the rect associated with
`box' and the /MediaBox entry of the page.
- Rotate the effective rect according to the page's /Rotate entry.
- Center the resulting rect on `rect'. If `rotation' is non-zero, then
the rect will rotated clockwise by `rotation' degrees. `rotation'
must be a multiple of 90.
- Scale the rect down, if necessary, so that it coincides with the
edges of `rect'. If `preserveAspectRatio' is true, then the final
rect will coincide with the edges of `rect' only in the more
restrictive dimension. */
CG_EXTERN CGAffineTransform CGPDFPageGetDrawingTransform(
CGPDFPageRef cg_nullable page, CGPDFBox box, CGRect rect, int rotate,
bool preserveAspectRatio)
CG_AVAILABLE_STARTING(10.3, 2.0);
/* Return the dictionary of `page'. */
CG_EXTERN CGPDFDictionaryRef __nullable CGPDFPageGetDictionary(
CGPDFPageRef cg_nullable page)
CG_AVAILABLE_STARTING(10.3, 2.0);
/* Return the CFTypeID for CGPDFPageRefs. */
CG_EXTERN CFTypeID CGPDFPageGetTypeID(void)
CG_AVAILABLE_STARTING(10.3, 2.0);
CF_ASSUME_NONNULL_END
CF_IMPLICIT_BRIDGING_DISABLED
#endif /* CGPDFPAGE_H_ */
|
0 | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/CoreGraphics.framework | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/CoreGraphics.framework/Headers/CGPDFContentStream.h | /* CoreGraphics - CGPDFContentStream.h
Copyright (c) 2004-2011 Apple Inc.
All rights reserved. */
#ifndef CGPDFCONTENTSTREAM_H_
#define CGPDFCONTENTSTREAM_H_
typedef struct CGPDFContentStream *CGPDFContentStreamRef;
#include <CoreGraphics/CGPDFPage.h>
CF_IMPLICIT_BRIDGING_ENABLED
CF_ASSUME_NONNULL_BEGIN
/* Create a content stream from `page'. */
CG_EXTERN CGPDFContentStreamRef CGPDFContentStreamCreateWithPage(
CGPDFPageRef page) CG_AVAILABLE_STARTING(10.4, 2.0);
/* Create a content stream from `stream'. */
CG_EXTERN CGPDFContentStreamRef CGPDFContentStreamCreateWithStream(
CGPDFStreamRef stream, CGPDFDictionaryRef streamResources,
CGPDFContentStreamRef cg_nullable parent)
CG_AVAILABLE_STARTING(10.4, 2.0);
/* Increment the retain count of `cs'. */
CG_EXTERN CGPDFContentStreamRef CGPDFContentStreamRetain(
CGPDFContentStreamRef cs) CG_AVAILABLE_STARTING(10.4, 2.0);
/* Decrement the retain count of `cs'. */
CG_EXTERN void CGPDFContentStreamRelease(CGPDFContentStreamRef cs)
CG_AVAILABLE_STARTING(10.4, 2.0);
/* Return the array of CGPDFStreamRefs comprising the entire content stream
of `cs'. */
CG_EXTERN CFArrayRef __nullable CGPDFContentStreamGetStreams(CGPDFContentStreamRef cs)
CG_AVAILABLE_STARTING(10.4, 2.0);
/* Return the resource named `name' in category `category' of the resource
dictionaries of `cs'. */
CG_EXTERN CGPDFObjectRef __nullable CGPDFContentStreamGetResource(
CGPDFContentStreamRef cs, const char *category, const char *name)
CG_AVAILABLE_STARTING(10.4, 2.0);
CF_ASSUME_NONNULL_END
CF_IMPLICIT_BRIDGING_DISABLED
#endif /* CGPDFCONTENTSTREAM_H_ */
|
0 | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/CoreGraphics.framework | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/CoreGraphics.framework/Headers/CGPDFScanner.h | /* CoreGraphics - CGPDFScanner.h
Copyright (c) 2004-2011 Apple Inc.
All rights reserved. */
#ifndef CGPDFSCANNER_H_
#define CGPDFSCANNER_H_
#include <CoreFoundation/CFBase.h>
#include <CoreFoundation/CFAvailability.h>
#include <stdint.h>
typedef struct CGPDFScanner *CGPDFScannerRef;
#include <CoreGraphics/CGPDFContentStream.h>
#include <CoreGraphics/CGPDFOperatorTable.h>
CF_IMPLICIT_BRIDGING_ENABLED
CF_ASSUME_NONNULL_BEGIN
/* Create a scanner. */
CG_EXTERN CGPDFScannerRef CGPDFScannerCreate(
CGPDFContentStreamRef cs,
CGPDFOperatorTableRef __nullable table, void * __nullable info)
CG_AVAILABLE_STARTING(10.4, 2.0);
/* Retain `scanner'. */
CG_EXTERN CGPDFScannerRef cg_nullable CGPDFScannerRetain(
CGPDFScannerRef cg_nullable scanner)
CG_AVAILABLE_STARTING(10.4, 2.0);
/* Release `scanner'. */
CG_EXTERN void CGPDFScannerRelease(CGPDFScannerRef cg_nullable scanner)
CG_AVAILABLE_STARTING(10.4, 2.0);
/* Scan the content stream of `scanner'. Returns true if the entire stream
was scanned successfully; false if scanning failed for some reason (for
example, if the stream's data is corrupted). */
CG_EXTERN bool CGPDFScannerScan(CGPDFScannerRef cg_nullable scanner)
CG_AVAILABLE_STARTING(10.4, 2.0);
/* Return the content stream associated with `scanner'. */
CG_EXTERN CGPDFContentStreamRef CGPDFScannerGetContentStream(
CGPDFScannerRef scanner)
CG_AVAILABLE_STARTING(10.4, 2.0);
/* Pop an object from the stack of `scanner' and return it in `value'. */
CG_EXTERN bool CGPDFScannerPopObject(CGPDFScannerRef scanner,
CGPDFObjectRef __nullable * __nullable value)
CG_AVAILABLE_STARTING(10.4, 2.0);
/* Pop an object from the stack of `scanner' and, if it's a boolean, return
it in `value'. Return false if the top of the stack isn't a boolean. */
CG_EXTERN bool CGPDFScannerPopBoolean(CGPDFScannerRef scanner,
CGPDFBoolean * __nullable value)
CG_AVAILABLE_STARTING(10.4, 2.0);
/* Pop an object from the stack of `scanner' and, if it's an integer, return
it in `value'. Return false if the top of the stack isn't an integer. */
CG_EXTERN bool CGPDFScannerPopInteger(CGPDFScannerRef scanner,
CGPDFInteger * __nullable value)
CG_AVAILABLE_STARTING(10.4, 2.0);
/* Pop an object from the stack of `scanner' and, if it's a number, return
it in `value'. Return false if the top of the stack isn't a number. */
CG_EXTERN bool CGPDFScannerPopNumber(CGPDFScannerRef scanner,
CGPDFReal * __nullable value)
CG_AVAILABLE_STARTING(10.4, 2.0);
/* Pop an object from the stack of `scanner' and, if it's a name, return it
in `value'. Return false if the top of the stack isn't a name. */
CG_EXTERN bool CGPDFScannerPopName(CGPDFScannerRef scanner,
const char * __nullable * __nullable value)
CG_AVAILABLE_STARTING(10.4, 2.0);
/* Pop an object from the stack of `scanner' and, if it's a string, return
it in `value'. Return false if the top of the stack isn't a string. */
CG_EXTERN bool CGPDFScannerPopString(CGPDFScannerRef scanner,
CGPDFStringRef __nullable * __nullable value)
CG_AVAILABLE_STARTING(10.4, 2.0);
/* Pop an object from the stack of `scanner' and, if it's an array, return
it in `value'. Return false if the top of the stack isn't an array. */
CG_EXTERN bool CGPDFScannerPopArray(CGPDFScannerRef scanner,
CGPDFArrayRef __nullable * __nullable value)
CG_AVAILABLE_STARTING(10.4, 2.0);
/* Pop an object from the stack of `scanner' and, if it's a dictionary,
return it in `value'. Return false if the top of the stack isn't a
dictionary. */
CG_EXTERN bool CGPDFScannerPopDictionary(CGPDFScannerRef scanner,
CGPDFDictionaryRef __nullable * __nullable value)
CG_AVAILABLE_STARTING(10.4, 2.0);
/* Pop an object from the stack of `scanner' and, if it's a stream, return
it in `value'. Return false if the top of the stack isn't a stream. */
CG_EXTERN bool CGPDFScannerPopStream(CGPDFScannerRef scanner,
CGPDFStreamRef __nullable * __nullable value)
CG_AVAILABLE_STARTING(10.4, 2.0);
CF_ASSUME_NONNULL_END
CF_IMPLICIT_BRIDGING_DISABLED
#endif /* CGPDFSCANNER_H_ */
|
0 | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/CoreGraphics.framework | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/CoreGraphics.framework/Headers/CGBase.h | /* CoreGraphics - CGBase.h
Copyright (c) 2000-2011 Apple Inc.
All rights reserved. */
#ifndef CGBASE_H_
#define CGBASE_H_
#include <stdbool.h>
#include <stddef.h>
#include <float.h>
#include <TargetConditionals.h>
#include <CoreFoundation/CFBase.h>
#include <os/availability.h>
/* Definition of `__CG_HAS_COMPILER_ATTRIBUTE'. */
#if !defined(__CG_HAS_COMPILER_ATTRIBUTE)
# if defined(__has_attribute)
# define __CG_HAS_COMPILER_ATTRIBUTE(attribute) __has_attribute(attribute)
# elif defined(__GNUC__) && __GNUC__ >= 4
# define __CG_HAS_COMPILER_ATTRIBUTE(attribute) (1)
# else
# define __CG_HAS_COMPILER_ATTRIBUTE(attribute) (0)
# endif
#endif
/* Definition of `__CG_HAS_COMPILER_EXTENSION'. */
#if !defined(__CG_HAS_COMPILER_EXTENSION)
# if defined(__has_extension)
# define __CG_HAS_COMPILER_EXTENSION(extension) __has_extension(extension)
# elif defined(__has_feature)
# define __CG_HAS_COMPILER_EXTENSION(extension) __has_feature(extension)
# else
# define __CG_HAS_COMPILER_EXTENSION(extension) (0)
# endif
#endif
/* Define `__WIN32__' where appropriate if it's not already defined. */
#if !defined(__WIN32__)
# if defined(_WIN32) || defined(__CYGWIN32__)
# define __WIN32__ 1
# endif
#endif
/* Definition of `CG_EXTERN'. */
#if !defined(CG_EXTERN)
# if defined(__WIN32__)
# if defined(CG_BUILDING_CG)
# if defined(__cplusplus)
# define CG_EXTERN extern "C" __declspec(dllexport)
# else
# define CG_EXTERN extern __declspec(dllexport)
# endif
# else /* !defined(CG_BUILDING_CG) */
# if defined(__cplusplus)
# define CG_EXTERN extern "C" __declspec(dllimport)
# else
# define CG_EXTERN extern __declspec(dllimport)
# endif
# endif /* !defined(CG_BUILDING_CG) */
# else /* !defined(__WIN32__) */
# if defined(__cplusplus)
# define CG_EXTERN extern "C" __attribute__((visibility("default")))
# else
# define CG_EXTERN extern __attribute__((visibility("default")))
# endif
# endif /* !defined(__WIN32__) */
#endif /* !defined(CG_EXTERN) */
/* Definition of `CG_LOCAL'. */
#if !defined(CG_LOCAL)
# if __CG_HAS_COMPILER_ATTRIBUTE(visibility)
# if defined(__cplusplus)
# define CG_LOCAL extern "C" __attribute__((visibility("hidden")))
# else
# define CG_LOCAL extern __attribute__((visibility("hidden")))
# endif
# else
# define CG_LOCAL CG_EXTERN
# endif
#endif /* !defined(CG_LOCAL) */
/* Definition of `CG_EXTERN_64` */
#if !defined(CG_EXTERN_64)
# if defined(__LP64__)
# define CG_EXTERN_64 CG_EXTERN
# else /* !defined(__LP64__) */
# define CG_EXTERN_64 CG_LOCAL
# endif /* defined(__LP64__) */
#endif /* !defined(CG_EXTERN_64) */
/* Definition of `CG_SKYLIGHT_EXTERN_64` */
#if !defined(CG_SKYLIGHT_EXTERN_64)
# if defined(__LP64__)
# define CG_SKYLIGHT_EXTERN_64 CG_EXTERN
# else /* !defined(__LP64__) */
# if defined(CG_BUILDING_CG)
# define CG_SKYLIGHT_EXTERN_64 CG_EXTERN
# else /* !defined(CG_BUILDING_CG) */
# define CG_SKYLIGHT_EXTERN_64 CG_LOCAL
# endif /* !defined(CG_BUILDING_CG) */
# endif /* defined(__LP64__) */
#endif /* !defined(CG_SKYLIGHT_EXTERN_64) */
/* Definition of `CG_EXTERN_32` */
#if !defined(CG_EXTERN_32)
# if defined(__LP64__)
# define CG_EXTERN_32 CG_LOCAL __attribute__((unused))
# else /* !defined(__LP64__) */
# define CG_EXTERN_32 CG_EXTERN
# endif /* defined(__LP64__) */
#endif /* !defined(CG_EXTERN_32) */
/* Definition of `CG_LOCAL_64` */
#if !defined(CG_LOCAL_64)
# if defined(__LP64__)
# define CG_LOCAL_64 CG_LOCAL
# else /* !defined(__LP64__) */
# define CG_LOCAL_64 CG_LOCAL __attribute__((unused))
# endif /* defined(__LP64__) */
#endif /* !defined(CG_LOCAL_64) */
/* Definition of `CG_LOCAL_32` */
#if !defined(CG_LOCAL_32)
# if defined(__LP64__)
# define CG_LOCAL_32 CG_LOCAL __attribute__((unused))
# else /* !defined(__LP64__) */
# define CG_LOCAL_32 CG_LOCAL
# endif /* defined(__LP64__) */
#endif /* !defined(CG_LOCAL_32) */
/* Definition of `__CG_DEPRECATED'. */
#if !defined(__CG_DEPRECATED)
# if __CG_HAS_COMPILER_ATTRIBUTE(deprecated) && !defined(CG_BUILDING_CG)
# define __CG_DEPRECATED __attribute__((deprecated))
# else
# define __CG_DEPRECATED
# endif
#endif
/* Definition of `__CG_DEPRECATED_WITH_MSG'. */
#if !defined(__CG_DEPRECATED_WITH_MSG)
# if __CG_HAS_COMPILER_ATTRIBUTE(deprecated) \
&& __CG_HAS_COMPILER_EXTENSION(attribute_deprecated_with_message) \
&& !defined(CG_BUILDING_CG)
# define __CG_DEPRECATED_WITH_MSG(msg) __attribute__((deprecated(msg)))
# else
# define __CG_DEPRECATED_WITH_MSG(msg) __CG_DEPRECATED
# endif
#endif
/* Definition of `__CG_DEPRECATED_ENUMERATOR'. */
#if !defined(__CG_DEPRECATED_ENUMERATOR)
# if __CG_HAS_COMPILER_ATTRIBUTE(deprecated) \
&& __CG_HAS_COMPILER_EXTENSION(enumerator_attributes) \
&& !defined(CG_BUILDING_CG)
# define __CG_DEPRECATED_ENUMERATOR __attribute__((deprecated))
# else
# define __CG_DEPRECATED_ENUMERATOR
# endif
#endif
/* Definition of `__CG_DEPRECATED_ENUMERATOR_WITH_MSG'. */
#if !defined(__CG_DEPRECATED_ENUMERATOR_WITH_MSG)
# if __CG_HAS_COMPILER_ATTRIBUTE(deprecated) \
&& __CG_HAS_COMPILER_EXTENSION(attribute_deprecated_with_message) \
&& __CG_HAS_COMPILER_EXTENSION(enumerator_attributes) \
&& !defined(CG_BUILDING_CG)
# define __CG_DEPRECATED_ENUMERATOR_WITH_MSG(msg) __attribute__((deprecated(msg)))
# else
# define __CG_DEPRECATED_ENUMERATOR_WITH_MSG(msg) __CG_DEPRECATED_ENUMERATOR
# endif
#endif
/* Define `CG_AVAILABLE_STARTING' and `CG_AVAILABLE_BUT_DEPRECATED'. */
#define GET_CG_AVAIL_MACRO(_1,_2,NAME,...) NAME
#define CG_AVAILABLE_STARTING(...) GET_CG_AVAIL_MACRO(__VA_ARGS__, CG_AVAILABLE_STARTING2, CG_AVAILABLE_STARTING1)(__VA_ARGS__)
#define CG_AVAILABLE_STARTING_IOS(i) API_AVAILABLE(ios(i))
#define CG_AVAILABLE_STARTING1(m) API_AVAILABLE(macos(m))
#define CG_AVAILABLE_STARTING2(m,i) API_AVAILABLE(macos(m), ios(i))
#define GET_CG_AVAIL_BUT_DEPR_MACRO(_1,_2,_3,_4,_5,NAME,...) NAME
#define CG_AVAILABLE_BUT_DEPRECATED(...) GET_CG_AVAIL_BUT_DEPR_MACRO(__VA_ARGS__, CG_AVAILABLE_BUT_DEPRECATED5, CG_AVAILABLE_BUT_DEPRECATED4, CG_AVAILABLE_BUT_DEPRECATED3, CG_AVAILABLE_BUT_DEPRECATED2, CG_AVAILABLE_BUT_DEPRECATED1)(__VA_ARGS__)
#define CG_AVAILABLE_BUT_DEPRECATED1(m0)
#define CG_AVAILABLE_BUT_DEPRECATED2(m0,m1) API_DEPRECATED("No longer supported", macos(m0,m1))
#define CG_AVAILABLE_BUT_DEPRECATED3(m0,m1,w) API_DEPRECATED(w, macos(m0,m1))
#define CG_AVAILABLE_BUT_DEPRECATED4(m0,m1,i0,i1) API_DEPRECATED("No longer supported", macos(m0,m1), ios(i0,i1))
#define CG_AVAILABLE_BUT_DEPRECATED5(m0,m1,i0,i1,w) API_DEPRECATED(w, macos(m0,m1), ios(i0,i1))
#define CG_UNAVAILABLE_DESKTOP API_UNAVAILABLE(macos)
#define CG_UNAVAILABLE_EMBEDDED API_UNAVAILABLE(ios, tvos, watchos)
#if (defined(TARGET_OS_LINUX) && TARGET_OS_LINUX) || defined(CG_LINUX)
# undef __OSX_AVAILABLE_STARTING
# undef __OSX_AVAILABLE_BUT_DEPRECATED
# undef CG_AVAILABLE_STARTING
# undef CG_AVAILABLE_STARTING_IOS
# undef CG_AVAILABLE_BUT_DEPRECATED
# undef CG_UNAVAILABLE_DESKTOP
# undef CG_UNAVAILABLE_EMBEDDED
# if defined(__x86_64__)
typedef unsigned int boolean_t;
# else
typedef int boolean_t;
# endif
# define CG_OS_VERSION_2020 1
#else
# if TARGET_OS_OSX
# define CG_OSX_VERSION(v) ((v) > 0 && __MAC_OS_X_VERSION_MAX_ALLOWED >= (v))
# else
# define CG_OSX_VERSION(v) (0)
#endif
# if TARGET_OS_IPHONE
# define CG_IOS_VERSION(v) ((v) > 0 && __IPHONE_OS_VERSION_MIN_REQUIRED >= (v))
# else
# define CG_IOS_VERSION(v) (0)
# endif
# if TARGET_OS_TV
# define CG_TV_VERSION(v) ((v) > 0 && __TV_OS_VERSION_MIN_REQUIRED >= (v))
# else
# define CG_TV_VERSION(v) (0)
# endif
# if TARGET_OS_WATCH
# define CG_WATCH_VERSION(v) ((v) > 0 && __WATCH_OS_VERSION_MIN_REQUIRED >= (v))
# else
# define CG_WATCH_VERSION(v) (0)
# endif
# define CG_BRIDGE_VERSION(v) (0)
# define CG_OS_VERSION_2020 (CG_OSX_VERSION(__MAC_10_16) || \
CG_IOS_VERSION(__IPHONE_14_0) || \
CG_TV_VERSION(__TVOS_14_0) || \
CG_WATCH_VERSION(__WATCHOS_7_0) || \
CG_BRIDGE_VERSION(50000))
#endif
#ifndef __OSX_AVAILABLE_STARTING
# define __OSX_AVAILABLE_STARTING(m0,i)
# define __OSX_AVAILABLE_BUT_DEPRECATED(m0,m1,i0,i1)
# define CG_AVAILABLE_STARTING(...)
# define CG_AVAILABLE_STARTING_IOS(...)
# define CG_AVAILABLE_BUT_DEPRECATED(...)
# define CG_UNAVAILABLE_DESKTOP
# define CG_UNAVAILABLE_EMBEDDED
#endif
/* Definition of `__CG_STATIC_ASSERT'. */
#if !defined(__CG_STATIC_ASSERT)
# if defined(__cplusplus) && __CG_HAS_COMPILER_EXTENSION(cxx_static_assert)
# define __CG_STATIC_ASSERT(constant_expression) \
static_assert(constant_expression, #constant_expression)
# elif !defined(__cplusplus) && __CG_HAS_COMPILER_EXTENSION(c_static_assert)
# define __CG_STATIC_ASSERT(constant_expression) \
_Static_assert(constant_expression, #constant_expression)
# else
# define __CG_STATIC_ASSERT(constant_expression)
# endif
#endif
/* Definition of `CG_INLINE'. */
#if !defined(CG_INLINE)
# if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
# define CG_INLINE static inline
# elif defined(__cplusplus)
# define CG_INLINE static inline
# elif defined(__GNUC__)
# define CG_INLINE static __inline__
# elif defined(__WIN32__)
# define CG_INLINE static __inline
# else
# define CG_INLINE static
# endif
#endif
/* Definition of `__CG_NO_INLINE'. */
#if !defined(__CG_NO_INLINE)
# if __CG_HAS_COMPILER_ATTRIBUTE(noinline)
# define __CG_NO_INLINE static __attribute__((noinline))
# else
# define __CG_NO_INLINE static
# endif
#endif
/* Definition of `__CG_FORMAT_PRINTF'. */
#if !defined(__CG_FORMAT_PRINTF)
# if __CG_HAS_COMPILER_ATTRIBUTE(format)
# define __CG_FORMAT_PRINTF(FORMAT_STRING, STARTING_ARG) \
__attribute__((format(printf, FORMAT_STRING, STARTING_ARG))) \
__attribute__((nonnull(FORMAT_STRING)))
# else
# define __CG_FORMAT_PRINTF(FORMAT_STRING, STARTING_ARG)
# endif
#endif
/* Definition of `__CG_FORMAT_VPRINTF'. */
#if !defined(__CG_FORMAT_VPRINTF)
# if __CG_HAS_COMPILER_ATTRIBUTE(format)
# define __CG_FORMAT_VPRINTF(FORMAT_STRING) \
__attribute__((format(printf, FORMAT_STRING, 0)))
# else
# define __CG_FORMAT_VPRINTF(FORMAT_STRING)
# endif
#endif
/* Definition of `CGFLOAT_TYPE', `CGFLOAT_IS_DOUBLE', `CGFLOAT_MIN', and
`CGFLOAT_MAX'. */
#if defined(__LP64__) && __LP64__
# define CGFLOAT_TYPE double
# define CGFLOAT_IS_DOUBLE 1
# define CGFLOAT_MIN DBL_MIN
# define CGFLOAT_MAX DBL_MAX
# define CGFLOAT_EPSILON DBL_EPSILON
#else
# define CGFLOAT_TYPE float
# define CGFLOAT_IS_DOUBLE 0
# define CGFLOAT_MIN FLT_MIN
# define CGFLOAT_MAX FLT_MAX
# define CGFLOAT_EPSILON FLT_EPSILON
#endif
/* Definition of the `CGFloat' type and `CGFLOAT_DEFINED'. */
typedef CGFLOAT_TYPE CGFloat;
#define CGFLOAT_DEFINED 1
/* Definition of `CG_OBSOLETE'. Deprecated; to be removed. */
#if !defined(CG_OBSOLETE)
# define CG_OBSOLETE __CG_DEPRECATED
#endif
/* Definition of `CG_PRIVATE_EXTERN'. Deprecated; to be removed. */
#if !defined(CG_PRIVATE_EXTERN) && !defined(CG_BUILDING_CG)
# define CG_PRIVATE_EXTERN CG_LOCAL
#endif
typedef struct CF_BRIDGED_TYPE(id) CF_BRIDGED_MUTABLE_TYPE(IOSurface) __IOSurface *IOSurfaceRef
__attribute__((swift_name("IOSurfaceRef")))
;
/* 'cg_nullable' will be dropped for new Swift clients. All others get currently the old behavior */
#if defined(__swift__)
# define cg_nullable
#else
# define cg_nullable __nullable
#endif
#if __has_feature(nullability_on_arrays)
# define CG_NONNULL_ARRAY __nonnull
# define CG_NULLABLE_ARRAY __nullable
#else
# define CG_NONNULL_ARRAY
# define CG_NULLABLE_ARRAY
#endif
/* Definition of the `CG_BOXABLE'. */
#if defined(__has_attribute) && __has_attribute(objc_boxable)
# define CG_BOXABLE __attribute__((objc_boxable))
#else
# define CG_BOXABLE
#endif
#endif /* CGBASE_H_ */
|
0 | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/CoreGraphics.framework | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.h | /* CoreGraphics - CoreGraphics.h
Copyright (c) 2000-2011 Apple Inc.
All rights reserved. */
#ifndef COREGRAPHICS_H_
#define COREGRAPHICS_H_
#include <CoreGraphics/CGBase.h>
#include <CoreGraphics/CGAffineTransform.h>
#include <CoreGraphics/CGBitmapContext.h>
#include <CoreGraphics/CGColor.h>
#include <CoreGraphics/CGColorConversionInfo.h>
#include <CoreGraphics/CGColorSpace.h>
#include <CoreGraphics/CGConvertColorDataWithFormat.h>
#include <CoreGraphics/CGContext.h>
#include <CoreGraphics/CGDataConsumer.h>
#include <CoreGraphics/CGDataProvider.h>
#include <CoreGraphics/CGError.h>
#include <CoreGraphics/CGFont.h>
#include <CoreGraphics/CGFunction.h>
#include <CoreGraphics/CGGeometry.h>
#include <CoreGraphics/CGGradient.h>
#include <CoreGraphics/CGImage.h>
#include <CoreGraphics/CGLayer.h>
#include <CoreGraphics/CGPDFArray.h>
#include <CoreGraphics/CGPDFContentStream.h>
#include <CoreGraphics/CGPDFContext.h>
#include <CoreGraphics/CGPDFDictionary.h>
#include <CoreGraphics/CGPDFDocument.h>
#include <CoreGraphics/CGPDFObject.h>
#include <CoreGraphics/CGPDFOperatorTable.h>
#include <CoreGraphics/CGPDFPage.h>
#include <CoreGraphics/CGPDFScanner.h>
#include <CoreGraphics/CGPDFStream.h>
#include <CoreGraphics/CGPDFString.h>
#include <CoreGraphics/CGPath.h>
#include <CoreGraphics/CGPattern.h>
#include <CoreGraphics/CGShading.h>
#include <CoreGraphics/CGDirectDisplay.h>
#include <CoreGraphics/CGDirectPalette.h>
#include <CoreGraphics/CGDisplayConfiguration.h>
#include <CoreGraphics/CGDisplayFade.h>
#include <CoreGraphics/CGDisplayStream.h>
#include <CoreGraphics/CGEvent.h>
#include <CoreGraphics/CGEventSource.h>
#include <CoreGraphics/CGEventTypes.h>
#include <CoreGraphics/CGPSConverter.h>
#include <CoreGraphics/CGRemoteOperation.h>
#include <CoreGraphics/CGSession.h>
#include <CoreGraphics/CGWindow.h>
#include <CoreGraphics/CGWindowLevel.h>
#include <CoreGraphics/CGDirectDisplayMetal.h>
#endif /* COREGRAPHICS_H_ */
|
0 | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/CoreGraphics.framework | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/CoreGraphics.framework/Headers/CGContext.h | /* CoreGraphics - CGContext.h
Copyright (c) 2000-2012 Apple Inc.
All rights reserved. */
#ifndef CGCONTEXT_H_
#define CGCONTEXT_H_
#include <CoreFoundation/CFBase.h>
#include <CoreFoundation/CFAvailability.h>
#include <stdint.h>
typedef struct CF_BRIDGED_TYPE(id) CGContext *CGContextRef;
#include <CoreGraphics/CGBase.h>
#include <CoreGraphics/CGAffineTransform.h>
#include <CoreGraphics/CGColor.h>
#include <CoreGraphics/CGColorSpace.h>
#include <CoreGraphics/CGFont.h>
#include <CoreGraphics/CGGradient.h>
#include <CoreGraphics/CGImage.h>
#include <CoreGraphics/CGPath.h>
#include <CoreGraphics/CGPattern.h>
#include <CoreGraphics/CGPDFDocument.h>
#include <CoreGraphics/CGShading.h>
CF_IMPLICIT_BRIDGING_ENABLED
CF_ASSUME_NONNULL_BEGIN
/* Drawing modes for paths. */
typedef CF_ENUM (int32_t, CGPathDrawingMode) {
kCGPathFill,
kCGPathEOFill,
kCGPathStroke,
kCGPathFillStroke,
kCGPathEOFillStroke
};
/* Drawing modes for text. */
typedef CF_ENUM (int32_t, CGTextDrawingMode) {
kCGTextFill,
kCGTextStroke,
kCGTextFillStroke,
kCGTextInvisible,
kCGTextFillClip,
kCGTextStrokeClip,
kCGTextFillStrokeClip,
kCGTextClip
};
/* Text encodings. */
typedef CF_ENUM (int32_t, CGTextEncoding) {
kCGEncodingFontSpecific,
kCGEncodingMacRoman
} CG_AVAILABLE_BUT_DEPRECATED(10.0, 10.9, 2.0, 7.0);
/* Interpolation quality. */
typedef CF_ENUM (int32_t, CGInterpolationQuality) {
kCGInterpolationDefault = 0, /* Let the context decide. */
kCGInterpolationNone = 1, /* Never interpolate. */
kCGInterpolationLow = 2, /* Low quality, fast interpolation. */
kCGInterpolationMedium = 4, /* Medium quality, slower than kCGInterpolationLow. */
kCGInterpolationHigh = 3 /* Highest quality, slower than kCGInterpolationMedium. */
};
/* Blend modes.
The blend modes from kCGBlendModeNormal to kCGBlendModeLuminosity are
supported in Mac OS X 10.4 and later. The Porter-Duff blend modes (from
kCGBlendModeClear to kCGBlendModePlusLighter) are supported in Mac OS X
10.5 and later. The names of the Porter-Duff blend modes are historical.
Note that the Porter-Duff blend modes are not necessarily supported in
every context. In particular, they are only guaranteed to work in
bitmap-based contexts, such as those created by CGBitmapContextCreate. It
is your responsibility to make sure that they do what you want when you
use them in a CGContext. */
typedef CF_ENUM (int32_t, CGBlendMode) {
/* Available in Mac OS X 10.4 & later. */
kCGBlendModeNormal,
kCGBlendModeMultiply,
kCGBlendModeScreen,
kCGBlendModeOverlay,
kCGBlendModeDarken,
kCGBlendModeLighten,
kCGBlendModeColorDodge,
kCGBlendModeColorBurn,
kCGBlendModeSoftLight,
kCGBlendModeHardLight,
kCGBlendModeDifference,
kCGBlendModeExclusion,
kCGBlendModeHue,
kCGBlendModeSaturation,
kCGBlendModeColor,
kCGBlendModeLuminosity,
/* Available in Mac OS X 10.5 & later. R, S, and D are, respectively,
premultiplied result, source, and destination colors with alpha; Ra,
Sa, and Da are the alpha components of these colors.
The Porter-Duff "source over" mode is called `kCGBlendModeNormal':
R = S + D*(1 - Sa)
Note that the Porter-Duff "XOR" mode is only titularly related to the
classical bitmap XOR operation (which is unsupported by
CoreGraphics). */
kCGBlendModeClear, /* R = 0 */
kCGBlendModeCopy, /* R = S */
kCGBlendModeSourceIn, /* R = S*Da */
kCGBlendModeSourceOut, /* R = S*(1 - Da) */
kCGBlendModeSourceAtop, /* R = S*Da + D*(1 - Sa) */
kCGBlendModeDestinationOver, /* R = S*(1 - Da) + D */
kCGBlendModeDestinationIn, /* R = D*Sa */
kCGBlendModeDestinationOut, /* R = D*(1 - Sa) */
kCGBlendModeDestinationAtop, /* R = S*(1 - Da) + D*Sa */
kCGBlendModeXOR, /* R = S*(1 - Da) + D*(1 - Sa) */
kCGBlendModePlusDarker, /* R = MAX(0, (1 - D) + (1 - S)) */
kCGBlendModePlusLighter /* R = MIN(1, S + D) */
};
/* Return the CFTypeID for CGContextRefs. */
CG_EXTERN CFTypeID CGContextGetTypeID(void)
CG_AVAILABLE_STARTING(10.2, 2.0);
/** Graphics state functions. **/
/* Push a copy of the current graphics state onto the graphics state stack.
Note that the path is not considered part of the graphics state, and is
not saved. */
CG_EXTERN void CGContextSaveGState(CGContextRef cg_nullable c)
CG_AVAILABLE_STARTING(10.0, 2.0);
/* Restore the current graphics state from the one on the top of the
graphics state stack, popping the graphics state stack in the process. */
CG_EXTERN void CGContextRestoreGState(CGContextRef cg_nullable c)
CG_AVAILABLE_STARTING(10.0, 2.0);
/** Coordinate space transformations. **/
/* Scale the current graphics state's transformation matrix (the CTM) by
`(sx, sy)'. */
CG_EXTERN void CGContextScaleCTM(CGContextRef cg_nullable c,
CGFloat sx, CGFloat sy)
CG_AVAILABLE_STARTING(10.0, 2.0);
/* Translate the current graphics state's transformation matrix (the CTM) by
`(tx, ty)'. */
CG_EXTERN void CGContextTranslateCTM(CGContextRef cg_nullable c,
CGFloat tx, CGFloat ty)
CG_AVAILABLE_STARTING(10.0, 2.0);
/* Rotate the current graphics state's transformation matrix (the CTM) by
`angle' radians. */
CG_EXTERN void CGContextRotateCTM(CGContextRef cg_nullable c, CGFloat angle)
CG_AVAILABLE_STARTING(10.0, 2.0);
/* Concatenate the current graphics state's transformation matrix (the CTM)
with the affine transform `transform'. */
CG_EXTERN void CGContextConcatCTM(CGContextRef cg_nullable c,
CGAffineTransform transform)
CG_AVAILABLE_STARTING(10.0, 2.0);
/* Return the current graphics state's transformation matrix. Returns
CGAffineTransformIdentity in case of inavlid context. */
CG_EXTERN CGAffineTransform CGContextGetCTM(CGContextRef cg_nullable c)
CG_AVAILABLE_STARTING(10.0, 2.0);
/** Drawing attribute functions. **/
/* Set the line width in the current graphics state to `width'. */
CG_EXTERN void CGContextSetLineWidth(CGContextRef cg_nullable c, CGFloat width)
CG_AVAILABLE_STARTING(10.0, 2.0);
/* Set the line cap in the current graphics state to `cap'. */
CG_EXTERN void CGContextSetLineCap(CGContextRef cg_nullable c, CGLineCap cap)
CG_AVAILABLE_STARTING(10.0, 2.0);
/* Set the line join in the current graphics state to `join'. */
CG_EXTERN void CGContextSetLineJoin(CGContextRef cg_nullable c, CGLineJoin join)
CG_AVAILABLE_STARTING(10.0, 2.0);
/* Set the miter limit in the current graphics state to `limit'. */
CG_EXTERN void CGContextSetMiterLimit(CGContextRef cg_nullable c, CGFloat limit)
CG_AVAILABLE_STARTING(10.0, 2.0);
/* Set the line dash patttern in the current graphics state of `c'. */
CG_EXTERN void CGContextSetLineDash(CGContextRef cg_nullable c, CGFloat phase,
const CGFloat * __nullable lengths, size_t count)
CG_AVAILABLE_STARTING(10.0, 2.0);
/* Set the path flatness parameter in the current graphics state of `c' to
`flatness'. */
CG_EXTERN void CGContextSetFlatness(CGContextRef cg_nullable c, CGFloat flatness)
CG_AVAILABLE_STARTING(10.0, 2.0);
/* Set the alpha value in the current graphics state of `c' to `alpha'. */
CG_EXTERN void CGContextSetAlpha(CGContextRef cg_nullable c, CGFloat alpha)
CG_AVAILABLE_STARTING(10.0, 2.0);
/* Set the blend mode of `context' to `mode'. */
CG_EXTERN void CGContextSetBlendMode(CGContextRef cg_nullable c, CGBlendMode mode)
CG_AVAILABLE_STARTING(10.4, 2.0);
/** Path construction functions. **/
/* Note that a context has a single path in use at any time: a path is not
part of the graphics state. */
/* Begin a new path. The old path is discarded. */
CG_EXTERN void CGContextBeginPath(CGContextRef cg_nullable c)
CG_AVAILABLE_STARTING(10.0, 2.0);
/* Start a new subpath at point `(x, y)' in the context's path. */
CG_EXTERN void CGContextMoveToPoint(CGContextRef cg_nullable c,
CGFloat x, CGFloat y)
CG_AVAILABLE_STARTING(10.0, 2.0);
/* Append a straight line segment from the current point to `(x, y)'. */
CG_EXTERN void CGContextAddLineToPoint(CGContextRef cg_nullable c,
CGFloat x, CGFloat y)
CG_AVAILABLE_STARTING(10.0, 2.0);
/* Append a cubic Bezier curve from the current point to `(x,y)', with
control points `(cp1x, cp1y)' and `(cp2x, cp2y)'. */
CG_EXTERN void CGContextAddCurveToPoint(CGContextRef cg_nullable c, CGFloat cp1x,
CGFloat cp1y, CGFloat cp2x, CGFloat cp2y, CGFloat x, CGFloat y)
CG_AVAILABLE_STARTING(10.0, 2.0);
/* Append a quadratic curve from the current point to `(x, y)', with control
point `(cpx, cpy)'. */
CG_EXTERN void CGContextAddQuadCurveToPoint(CGContextRef cg_nullable c,
CGFloat cpx, CGFloat cpy, CGFloat x, CGFloat y)
CG_AVAILABLE_STARTING(10.0, 2.0);
/* Close the current subpath of the context's path. */
CG_EXTERN void CGContextClosePath(CGContextRef cg_nullable c)
CG_AVAILABLE_STARTING(10.0, 2.0);
/** Path construction convenience functions. **/
/* Add a single rect to the context's path. */
CG_EXTERN void CGContextAddRect(CGContextRef cg_nullable c, CGRect rect)
CG_AVAILABLE_STARTING(10.0, 2.0);
/* Add a set of rects to the context's path. */
CG_EXTERN void CGContextAddRects(CGContextRef cg_nullable c,
const CGRect * __nullable rects, size_t count)
CG_AVAILABLE_STARTING(10.0, 2.0);
/* Add a set of lines to the context's path. */
CG_EXTERN void CGContextAddLines(CGContextRef cg_nullable c,
const CGPoint * __nullable points, size_t count)
CG_AVAILABLE_STARTING(10.0, 2.0);
/* Add an ellipse inside `rect' to the current path of `context'. See the
function `CGPathAddEllipseInRect' for more information on how the path
for the ellipse is constructed. */
CG_EXTERN void CGContextAddEllipseInRect(CGContextRef cg_nullable c, CGRect rect)
CG_AVAILABLE_STARTING(10.4, 2.0);
/* Add an arc of a circle to the context's path, possibly preceded by a
straight line segment. `(x, y)' is the center of the arc; `radius' is its
radius; `startAngle' is the angle to the first endpoint of the arc;
`endAngle' is the angle to the second endpoint of the arc; and
`clockwise' is 1 if the arc is to be drawn clockwise, 0 otherwise.
`startAngle' and `endAngle' are measured in radians. */
CG_EXTERN void CGContextAddArc(CGContextRef cg_nullable c, CGFloat x, CGFloat y,
CGFloat radius, CGFloat startAngle, CGFloat endAngle, int clockwise)
CG_AVAILABLE_STARTING(10.0, 2.0);
/* Add an arc of a circle to the context's path, possibly preceded by a
straight line segment. `radius' is the radius of the arc. The arc is
tangent to the line from the current point to `(x1, y1)', and the line
from `(x1, y1)' to `(x2, y2)'. */
CG_EXTERN void CGContextAddArcToPoint(CGContextRef cg_nullable c,
CGFloat x1, CGFloat y1, CGFloat x2, CGFloat y2, CGFloat radius)
CG_AVAILABLE_STARTING(10.0, 2.0);
/* Add `path' to the path of context. The points in `path' are transformed
by the CTM of context before they are added. */
CG_EXTERN void CGContextAddPath(CGContextRef cg_nullable c,
CGPathRef cg_nullable path)
CG_AVAILABLE_STARTING(10.2, 2.0);
/** Path stroking. **/
/* Replace the path in `context' with the stroked version of the path, using
the parameters of `context' to calculate the stroked path. The resulting
path is created such that filling it with the appropriate color will
produce the same results as stroking the original path. You can use this
path in the same way you can use the path of any context; for example,
you can clip to the stroked version of a path by calling this function
followed by a call to "CGContextClip". */
CG_EXTERN void CGContextReplacePathWithStrokedPath(CGContextRef cg_nullable c)
CG_AVAILABLE_STARTING(10.4, 2.0);
/** Path information functions. **/
/* Return true if the path of `context' contains no elements, false
otherwise. */
CG_EXTERN bool CGContextIsPathEmpty(CGContextRef cg_nullable c)
CG_AVAILABLE_STARTING(10.0, 2.0);
/* Return the current point of the current subpath of the path of
`context'. */
CG_EXTERN CGPoint CGContextGetPathCurrentPoint(CGContextRef cg_nullable c)
CG_AVAILABLE_STARTING(10.0, 2.0);
/* Return the bounding box of the path of `context'. The bounding box is the
smallest rectangle completely enclosing all points in the path, including
control points for Bezier and quadratic curves. */
CG_EXTERN CGRect CGContextGetPathBoundingBox(CGContextRef cg_nullable c)
CG_AVAILABLE_STARTING(10.0, 2.0);
/* Return a copy of the path of `context'. The returned path is specified in
the current user space of `context'. */
CG_EXTERN CGPathRef __nullable CGContextCopyPath(CGContextRef cg_nullable c)
CG_AVAILABLE_STARTING(10.2, 2.0);
/* Return true if `point' is contained in the current path of `context'. A
point is contained within a context's path if it is inside the painted
region when the path is stroked or filled with opaque colors using the
path drawing mode `mode'. `point' is specified is user space. */
CG_EXTERN bool CGContextPathContainsPoint(CGContextRef cg_nullable c,
CGPoint point, CGPathDrawingMode mode)
CG_AVAILABLE_STARTING(10.4, 2.0);
/** Path drawing functions. **/
/* Draw the context's path using drawing mode `mode'. */
CG_EXTERN void CGContextDrawPath(CGContextRef cg_nullable c,
CGPathDrawingMode mode)
CG_AVAILABLE_STARTING(10.0, 2.0);
/** Path drawing convenience functions. **/
/* Fill the context's path using the winding-number fill rule. Any open
subpath of the path is implicitly closed. */
CG_EXTERN void CGContextFillPath(CGContextRef cg_nullable c)
CG_AVAILABLE_STARTING(10.0, 2.0);
/* Fill the context's path using the even-odd fill rule. Any open subpath of
the path is implicitly closed. */
CG_EXTERN void CGContextEOFillPath(CGContextRef cg_nullable c)
CG_AVAILABLE_STARTING(10.0, 2.0);
/* Stroke the context's path. */
CG_EXTERN void CGContextStrokePath(CGContextRef cg_nullable c)
CG_AVAILABLE_STARTING(10.0, 2.0);
/* Fill `rect' with the current fill color. */
CG_EXTERN void CGContextFillRect(CGContextRef cg_nullable c, CGRect rect)
CG_AVAILABLE_STARTING(10.0, 2.0);
/* Fill `rects', an array of `count' CGRects, with the current fill
color. */
CG_EXTERN void CGContextFillRects(CGContextRef cg_nullable c,
const CGRect * __nullable rects, size_t count)
CG_AVAILABLE_STARTING(10.0, 2.0);
/* Stroke `rect' with the current stroke color and the current linewidth. */
CG_EXTERN void CGContextStrokeRect(CGContextRef cg_nullable c, CGRect rect)
CG_AVAILABLE_STARTING(10.0, 2.0);
/* Stroke `rect' with the current stroke color, using `width' as the the
line width. */
CG_EXTERN void CGContextStrokeRectWithWidth(CGContextRef cg_nullable c,
CGRect rect, CGFloat width)
CG_AVAILABLE_STARTING(10.0, 2.0);
/* Clear `rect' (that is, set the region within the rect to transparent). */
CG_EXTERN void CGContextClearRect(CGContextRef cg_nullable c, CGRect rect)
CG_AVAILABLE_STARTING(10.0, 2.0);
/* Fill an ellipse (an oval) inside `rect'. */
CG_EXTERN void CGContextFillEllipseInRect(CGContextRef cg_nullable c,
CGRect rect)
CG_AVAILABLE_STARTING(10.4, 2.0);
/* Stroke an ellipse (an oval) inside `rect'. */
CG_EXTERN void CGContextStrokeEllipseInRect(CGContextRef cg_nullable c,
CGRect rect)
CG_AVAILABLE_STARTING(10.4, 2.0);
/* Stroke a sequence of line segments one after another in `context'. The
line segments are specified by `points', an array of `count' CGPoints.
This function is equivalent to
CGContextBeginPath(context);
for (k = 0; k < count; k += 2) {
CGContextMoveToPoint(context, s[k].x, s[k].y);
CGContextAddLineToPoint(context, s[k+1].x, s[k+1].y);
}
CGContextStrokePath(context); */
CG_EXTERN void CGContextStrokeLineSegments(CGContextRef cg_nullable c,
const CGPoint * __nullable points, size_t count)
CG_AVAILABLE_STARTING(10.4, 2.0);
/** Clipping functions. **/
/* Intersect the context's path with the current clip path and use the
resulting path as the clip path for subsequent rendering operations. Use
the winding-number fill rule for deciding what's inside the path. */
CG_EXTERN void CGContextClip(CGContextRef cg_nullable c)
CG_AVAILABLE_STARTING(10.0, 2.0);
/* Intersect the context's path with the current clip path and use the
resulting path as the clip path for subsequent rendering operations. Use
the even-odd fill rule for deciding what's inside the path. */
CG_EXTERN void CGContextEOClip(CGContextRef cg_nullable c)
CG_AVAILABLE_STARTING(10.0, 2.0);
/* Reset the current clip of `c' to the default value. */
CG_EXTERN void CGContextResetClip(CGContextRef c);
/* Add `mask' transformed to `rect' to the clipping area of `context'. The
mask, which may be either an image mask or an image, is mapped into the
specified rectangle and intersected with the current clipping area of the
context.
If `mask' is an image mask, then it clips in a manner identical to the
behavior if it were used with "CGContextDrawImage": it indicates an area
to be masked out (left unchanged) when drawing. The source samples of the
image mask determine which points of the clipping area are changed,
acting as an "inverse alpha": if the value of a source sample in the
image mask is S, then the corresponding point in the current clipping
area will be multiplied by an alpha of (1-S). (For example, if S is 1,
then the point in the clipping area becomes clear, while if S is 0, the
point in the clipping area is unchanged.
If `mask' is an image, then it serves as alpha mask and is blended with
the current clipping area. The source samples of mask determine which
points of the clipping area are changed: if the value of the source
sample in mask is S, then the corresponding point in the current clipping
area will be multiplied by an alpha of S. (For example, if S is 0, then
the point in the clipping area becomes clear, while if S is 1, the point
in the clipping area is unchanged.
If `mask' is an image, then its color space must be of kCGColorSpaceModelMonochrome
model, may not have alpha, and may not be masked by an image mask or masking
color. */
CG_EXTERN void CGContextClipToMask(CGContextRef cg_nullable c, CGRect rect,
CGImageRef cg_nullable mask)
CG_AVAILABLE_STARTING(10.4, 2.0);
/* Return the bounding box of the clip path of `c' in user space. The
bounding box is the smallest rectangle completely enclosing all points in
the clip. */
CG_EXTERN CGRect CGContextGetClipBoundingBox(CGContextRef cg_nullable c)
CG_AVAILABLE_STARTING(10.3, 2.0);
/** Clipping convenience functions. **/
/* Intersect the current clipping path with `rect'. Note that this function
resets the context's path to the empty path. */
CG_EXTERN void CGContextClipToRect(CGContextRef cg_nullable c, CGRect rect)
CG_AVAILABLE_STARTING(10.0, 2.0);
/* Intersect the current clipping path with the clipping region formed by
creating a path consisting of all rects in `rects'. Note that this
function resets the context's path to the empty path. */
CG_EXTERN void CGContextClipToRects(CGContextRef cg_nullable c,
const CGRect * rects, size_t count)
CG_AVAILABLE_STARTING(10.0, 2.0);
/** Primitive color functions. **/
/* Set the current fill color in the context `c' to `color'. */
CG_EXTERN void CGContextSetFillColorWithColor(CGContextRef cg_nullable c,
CGColorRef cg_nullable color)
CG_AVAILABLE_STARTING(10.3, 2.0);
/* Set the current stroke color in the context `c' to `color'. */
CG_EXTERN void CGContextSetStrokeColorWithColor(CGContextRef cg_nullable c,
CGColorRef cg_nullable color)
CG_AVAILABLE_STARTING(10.3, 2.0);
/** Color space functions. **/
/* Set the current fill color space in `context' to `space'. As a
side-effect, set the fill color to a default value appropriate for the
color space. */
CG_EXTERN void CGContextSetFillColorSpace(CGContextRef cg_nullable c,
CGColorSpaceRef cg_nullable space)
CG_AVAILABLE_STARTING(10.0, 2.0);
/* Set the current stroke color space in `context' to `space'. As a
side-effect, set the stroke color to a default value appropriate for the
color space. */
CG_EXTERN void CGContextSetStrokeColorSpace(CGContextRef cg_nullable c,
CGColorSpaceRef cg_nullable space)
CG_AVAILABLE_STARTING(10.0, 2.0);
/** Color functions. **/
/* Set the components of the current fill color in `context' to the values
specifed by `components'. The number of elements in `components' must be
one greater than the number of components in the current fill color space
(N color components + 1 alpha component). The current fill color space
must not be a pattern color space. */
CG_EXTERN void CGContextSetFillColor(CGContextRef cg_nullable c,
const CGFloat * cg_nullable components)
CG_AVAILABLE_STARTING(10.0, 2.0);
/* Set the components of the current stroke color in `context' to the values
specifed by `components'. The number of elements in `components' must be
one greater than the number of components in the current stroke color
space (N color components + 1 alpha component). The current stroke color
space must not be a pattern color space. */
CG_EXTERN void CGContextSetStrokeColor(CGContextRef cg_nullable c,
const CGFloat * cg_nullable components)
CG_AVAILABLE_STARTING(10.0, 2.0);
/** Pattern functions. **/
/* Set the components of the current fill color in `context' to the values
specifed by `components', and set the current fill pattern to `pattern'.
The number of elements in `components' must be one greater than the
number of components in the current fill color space (N color components
+ 1 alpha component). The current fill color space must be a pattern
color space. */
CG_EXTERN void CGContextSetFillPattern(CGContextRef cg_nullable c,
CGPatternRef cg_nullable pattern, const CGFloat * cg_nullable components)
CG_AVAILABLE_STARTING(10.0, 2.0);
/* Set the components of the current stroke color in `context' to the values
specifed by `components', and set the current stroke pattern to
`pattern'. The number of elements in `components' must be one greater
than the number of components in the current stroke color space (N color
components + 1 alpha component). The current stroke color space must be a
pattern color space. */
CG_EXTERN void CGContextSetStrokePattern(CGContextRef cg_nullable c,
CGPatternRef cg_nullable pattern, const CGFloat * cg_nullable components)
CG_AVAILABLE_STARTING(10.0, 2.0);
/* Set the pattern phase in the current graphics state of `context' to
`phase'. */
CG_EXTERN void CGContextSetPatternPhase(CGContextRef cg_nullable c, CGSize phase)
CG_AVAILABLE_STARTING(10.0, 2.0);
/** Color convenience functions. **/
/* Set the current fill color space in `context' to `DeviceGray' and set the
components of the current fill color to `(gray, alpha)'. */
CG_EXTERN void CGContextSetGrayFillColor(CGContextRef cg_nullable c,
CGFloat gray, CGFloat alpha)
CG_AVAILABLE_STARTING(10.0, 2.0);
/* Set the current stroke color space in `context' to `DeviceGray' and set
the components of the current stroke color to `(gray, alpha)'. */
CG_EXTERN void CGContextSetGrayStrokeColor(CGContextRef cg_nullable c,
CGFloat gray, CGFloat alpha)
CG_AVAILABLE_STARTING(10.0, 2.0);
/* Set the current fill color space in `context' to `DeviceRGB' and set the
components of the current fill color to `(red, green, blue, alpha)'. */
CG_EXTERN void CGContextSetRGBFillColor(CGContextRef cg_nullable c, CGFloat red,
CGFloat green, CGFloat blue, CGFloat alpha)
CG_AVAILABLE_STARTING(10.0, 2.0);
/* Set the current stroke color space in `context' to `DeviceRGB' and set
the components of the current stroke color to `(red, green, blue,
alpha)'. */
CG_EXTERN void CGContextSetRGBStrokeColor(CGContextRef cg_nullable c,
CGFloat red, CGFloat green, CGFloat blue, CGFloat alpha)
CG_AVAILABLE_STARTING(10.0, 2.0);
/* Set the current fill color space in `context' to `DeviceCMYK' and set the
components of the current fill color to `(cyan, magenta, yellow, black,
alpha)'. */
CG_EXTERN void CGContextSetCMYKFillColor(CGContextRef cg_nullable c,
CGFloat cyan, CGFloat magenta, CGFloat yellow, CGFloat black, CGFloat alpha)
CG_AVAILABLE_STARTING(10.0, 2.0);
/* Set the current stroke color space in `context' to `DeviceCMYK' and set
the components of the current stroke color to `(cyan, magenta, yellow,
black, alpha)'. */
CG_EXTERN void CGContextSetCMYKStrokeColor(CGContextRef cg_nullable c,
CGFloat cyan, CGFloat magenta, CGFloat yellow, CGFloat black, CGFloat alpha)
CG_AVAILABLE_STARTING(10.0, 2.0);
/** Rendering intent. **/
/* Set the rendering intent in the current graphics state of `context' to
`intent'. */
CG_EXTERN void CGContextSetRenderingIntent(CGContextRef cg_nullable c,
CGColorRenderingIntent intent)
CG_AVAILABLE_STARTING(10.0, 2.0);
/** Image functions. **/
/* Draw `image' in the rectangular area specified by `rect' in the context
`c'. The image is scaled, if necessary, to fit into `rect'. */
CG_EXTERN void CGContextDrawImage(CGContextRef cg_nullable c, CGRect rect,
CGImageRef cg_nullable image)
CG_AVAILABLE_STARTING(10.0, 2.0);
/* Draw `image' tiled in the context `c'. The image is scaled to the size
specified by `rect' in user space, positioned at the origin of `rect' in
user space, then replicated, stepping the width of `rect' horizontally
and the height of `rect' vertically, to fill the current clip region.
Unlike patterns, the image is tiled in user space, so transformations
applied to the CTM affect the final result. */
CG_EXTERN void CGContextDrawTiledImage(CGContextRef cg_nullable c, CGRect rect,
CGImageRef cg_nullable image)
CG_AVAILABLE_STARTING(10.5, 2.0);
/* Return the interpolation quality for image rendering of `context'. The
interpolation quality is a gstate parameter which controls the level of
interpolation performed when an image is interpolated (for example, when
scaling the image). Note that it is merely a hint to the context: not all
contexts support all interpolation quality levels. */
CG_EXTERN CGInterpolationQuality
CGContextGetInterpolationQuality(CGContextRef cg_nullable c)
CG_AVAILABLE_STARTING(10.0, 2.0);
/* Set the interpolation quality of `context' to `quality'. */
CG_EXTERN void CGContextSetInterpolationQuality(CGContextRef cg_nullable c,
CGInterpolationQuality quality)
CG_AVAILABLE_STARTING(10.0, 2.0);
/** Shadow support. **/
/* Set the shadow parameters in `context'. `offset' specifies a translation
in base-space; `blur' is a non-negative number specifying the amount of
blur; `color' specifies the color of the shadow, which may contain a
non-opaque alpha value. If `color' is NULL, it's equivalent to specifying
a fully transparent color. The shadow is a gstate parameter. After a
shadow is specified, all objects drawn subsequently will be shadowed. To
turn off shadowing, set the shadow color to a fully transparent color (or
pass NULL as the color), or use the standard gsave/grestore mechanism. */
CG_EXTERN void CGContextSetShadowWithColor(CGContextRef cg_nullable c,
CGSize offset, CGFloat blur, CGColorRef __nullable color)
CG_AVAILABLE_STARTING(10.3, 2.0);
/* Equivalent to calling
CGContextSetShadowWithColor(context, offset, blur, color)
where color is black with 1/3 alpha (i.e., RGBA = {0, 0, 0, 1.0/3.0}) in
the DeviceRGB color space. */
CG_EXTERN void CGContextSetShadow(CGContextRef cg_nullable c, CGSize offset,
CGFloat blur)
CG_AVAILABLE_STARTING(10.3, 2.0);
/** Gradient and shading functions. **/
/* Fill the current clipping region of `context' with a linear gradient from
`startPoint' to `endPoint'. The location 0 of `gradient' corresponds to
`startPoint'; the location 1 of `gradient' corresponds to `endPoint';
colors are linearly interpolated between these two points based on the
values of the gradient's locations. The option flags control whether the
gradient is drawn before the start point or after the end point. */
CG_EXTERN void CGContextDrawLinearGradient(CGContextRef cg_nullable c,
CGGradientRef cg_nullable gradient, CGPoint startPoint, CGPoint endPoint,
CGGradientDrawingOptions options)
CG_AVAILABLE_STARTING(10.5, 2.0);
/* Fill the current clipping region of `context' with a radial gradient
between two circles defined by the center point and radius of each
circle. The location 0 of `gradient' corresponds to a circle centered at
`startCenter' with radius `startRadius'; the location 1 of `gradient'
corresponds to a circle centered at `endCenter' with radius `endRadius';
colors are linearly interpolated between these two circles based on the
values of the gradient's locations. The option flags control whether the
gradient is drawn before the start circle or after the end circle. */
CG_EXTERN void CGContextDrawRadialGradient(CGContextRef cg_nullable c,
CGGradientRef cg_nullable gradient, CGPoint startCenter, CGFloat startRadius,
CGPoint endCenter, CGFloat endRadius, CGGradientDrawingOptions options)
CG_AVAILABLE_STARTING(10.5, 2.0);
/* Fill the current clipping region of `context' with `shading'. */
CG_EXTERN void CGContextDrawShading(CGContextRef cg_nullable c,
cg_nullable CGShadingRef shading)
CG_AVAILABLE_STARTING(10.2, 2.0);
/** Text functions. **/
/* Set the current character spacing in `context' to `spacing'. The
character spacing is added to the displacement between the origin of one
character and the origin of the next. */
CG_EXTERN void CGContextSetCharacterSpacing(CGContextRef cg_nullable c,
CGFloat spacing)
CG_AVAILABLE_STARTING(10.0, 2.0);
/* Set the user-space point at which text will be drawn in the context `c'
to `(x, y)'. */
CG_EXTERN void CGContextSetTextPosition(CGContextRef cg_nullable c,
CGFloat x, CGFloat y)
CG_AVAILABLE_STARTING(10.0, 2.0);
/* Return the user-space point at which text will be drawn in `context'. */
CG_EXTERN CGPoint CGContextGetTextPosition(CGContextRef cg_nullable c)
CG_AVAILABLE_STARTING(10.0, 2.0);
/* Set the text matrix in the context `c' to `t'. */
CG_EXTERN void CGContextSetTextMatrix(CGContextRef cg_nullable c,
CGAffineTransform t)
CG_AVAILABLE_STARTING(10.0, 2.0);
/* Return the text matrix in the context `c'. Returns CGAffineTransformIdentity
if `c' is not a valid context. */
CG_EXTERN CGAffineTransform CGContextGetTextMatrix(CGContextRef cg_nullable c)
CG_AVAILABLE_STARTING(10.0, 2.0);
/* Set the text drawing mode in the current graphics state of the context
`c' to `mode'. */
CG_EXTERN void CGContextSetTextDrawingMode(CGContextRef cg_nullable c,
CGTextDrawingMode mode)
CG_AVAILABLE_STARTING(10.0, 2.0);
/* Set the font in the current graphics state of the context `c' to
`font'. */
CG_EXTERN void CGContextSetFont(CGContextRef cg_nullable c,
CGFontRef cg_nullable font)
CG_AVAILABLE_STARTING(10.0, 2.0);
/* Set the font size in the current graphics state of the context `c' to
`size'. */
CG_EXTERN void CGContextSetFontSize(CGContextRef cg_nullable c, CGFloat size)
CG_AVAILABLE_STARTING(10.0, 2.0);
/* Draw `glyphs', an array of `count' CGGlyphs, at the points specified by
`positions'. Each element of `positions' specifies the position from the
associated glyph; the positions are specified in user space. */
CG_EXTERN void CGContextShowGlyphsAtPositions(CGContextRef cg_nullable c,
const CGGlyph * cg_nullable glyphs, const CGPoint * cg_nullable Lpositions,
size_t count)
CG_AVAILABLE_STARTING(10.5, 2.0);
/** PDF functions. **/
/* Draw `page' in the current user space of the context `c'. */
CG_EXTERN void CGContextDrawPDFPage(CGContextRef cg_nullable c,
CGPDFPageRef cg_nullable page)
CG_AVAILABLE_STARTING(10.3, 2.0);
/** Output page functions. **/
/* Begin a new page. */
CG_EXTERN void CGContextBeginPage(CGContextRef cg_nullable c,
const CGRect * __nullable mediaBox)
CG_AVAILABLE_STARTING(10.0, 2.0);
/* End the current page. */
CG_EXTERN void CGContextEndPage(CGContextRef cg_nullable c)
CG_AVAILABLE_STARTING(10.0, 2.0);
/** Context functions. **/
/* Equivalent to `CFRetain(c)'. */
CG_EXTERN CGContextRef cg_nullable CGContextRetain(CGContextRef cg_nullable c)
CG_AVAILABLE_STARTING(10.0, 2.0);
/* Equivalent to `CFRelease(c)'. */
CG_EXTERN void CGContextRelease(CGContextRef cg_nullable c)
CG_AVAILABLE_STARTING(10.0, 2.0);
/* Flush all drawing to the destination. */
CG_EXTERN void CGContextFlush(CGContextRef cg_nullable c)
CG_AVAILABLE_STARTING(10.0, 2.0);
/* Synchronized drawing. */
CG_EXTERN void CGContextSynchronize(CGContextRef cg_nullable c)
CG_AVAILABLE_STARTING(10.0, 2.0);
/** Antialiasing functions. **/
/* Turn on antialiasing if `shouldAntialias' is true; turn it off otherwise.
This parameter is part of the graphics state. */
CG_EXTERN void CGContextSetShouldAntialias(CGContextRef cg_nullable c,
bool shouldAntialias)
CG_AVAILABLE_STARTING(10.0, 2.0);
/* Allow antialiasing in `context' if `allowsAntialiasing' is true; don't
allow it otherwise. This parameter is not part of the graphics state. A
context will perform antialiasing if both `allowsAntialiasing' and the
graphics state parameter `shouldAntialias' are true. */
CG_EXTERN void CGContextSetAllowsAntialiasing(CGContextRef cg_nullable c,
bool allowsAntialiasing)
CG_AVAILABLE_STARTING(10.4, 2.0);
/** Font display functions. **/
/* Turn on font smoothing if `shouldSmoothFonts' is true; turn it off
otherwise. This parameter is part of the graphics state. Note that this
doesn't guarantee that font smoothing will occur: not all destination
contexts support font smoothing. */
CG_EXTERN void CGContextSetShouldSmoothFonts(CGContextRef cg_nullable c,
bool shouldSmoothFonts)
CG_AVAILABLE_STARTING(10.2, 2.0);
/* If `allowsFontSmoothing' is true, then allow font smoothing when
displaying text in `context'; otherwise, don't allow font smoothing. This
parameter is not part of the graphics state. Fonts will be smoothed if
they are antialiased when drawn and if both `allowsFontSmoothing' and the
graphics state parameter `shouldSmoothFonts' are true. */
CG_EXTERN void CGContextSetAllowsFontSmoothing(CGContextRef cg_nullable c,
bool allowsFontSmoothing)
CG_AVAILABLE_STARTING(10.2, 2.0);
/* If `shouldSubpixelPositionFonts' is true, then glyphs may be placed at
subpixel positions (if allowed) when displaying text in `context';
otherwise, glyphs will be forced to integer pixel boundaries. This
parameter is part of the graphics state. */
CG_EXTERN void CGContextSetShouldSubpixelPositionFonts(
CGContextRef cg_nullable c, bool shouldSubpixelPositionFonts)
CG_AVAILABLE_STARTING(10.5, 2.0);
/* If `allowsFontSubpixelPositioning' is true, then allow font subpixel
positioning when displaying text in `context'; otherwise, don't allow
subpixel positioning. This parameter is not part of the graphics state. A
context will place glyphs at subpixel positions if fonts will be
antialiased when drawn and if both `allowsFontSubpixelPositioning' and
the graphics state parameter `shouldSubpixelPositionFonts' are true. */
CG_EXTERN void CGContextSetAllowsFontSubpixelPositioning(
CGContextRef cg_nullable c, bool allowsFontSubpixelPositioning)
CG_AVAILABLE_STARTING(10.5, 2.0);
/* If `shouldSubpixelQuantizeFonts' is true, then quantize the subpixel
positions of glyphs when displaying text in `context'; otherwise, don't
quantize the subpixel positions. This parameter is part of the graphics
state. */
CG_EXTERN void CGContextSetShouldSubpixelQuantizeFonts(
CGContextRef cg_nullable c, bool shouldSubpixelQuantizeFonts)
CG_AVAILABLE_STARTING(10.5, 2.0);
/* If `allowsFontSubpixelQuantization' is true, then allow font subpixel
quantization when displaying text in `context'; otherwise, don't allow
subpixel quantization. This parameter is not part of the graphics state.
A context quantizes subpixel positions if glyphs will be drawn at
subpixel positions and `allowsFontSubpixelQuantization' and the graphics
state parameter `shouldSubpixelQuantizeFonts' are both true. */
CG_EXTERN void CGContextSetAllowsFontSubpixelQuantization(
CGContextRef cg_nullable c, bool allowsFontSubpixelQuantization)
CG_AVAILABLE_STARTING(10.5, 2.0);
/** Transparency layer support. **/
/* Begin a transparency layer in `context'. All subsequent drawing
operations until a corresponding `CGContextEndTransparencyLayer' are
composited into a fully transparent backdrop (which is treated as a
separate destination buffer from the context). After the transparency
layer is ended, the result is composited into the context using the
global alpha and shadow state of the context. This operation respects the
clipping region of the context. After a call to this function, all of the
parameters in the graphics state remain unchanged with the exception of
the following:
- The global alpha is set to 1.
- The shadow is turned off.
- The blend mode is set to `kCGBlendModeNormal'.
Ending the transparency layer restores these parameters to the values
they had before `CGContextBeginTransparencyLayer' was called.
Transparency layers may be nested. */
CG_EXTERN void CGContextBeginTransparencyLayer(CGContextRef cg_nullable c,
CFDictionaryRef __nullable auxiliaryInfo)
CG_AVAILABLE_STARTING(10.3, 2.0);
/* Begin a transparency layer in `context'. This function is identical to
`CGContextBeginTransparencyLayer' except that the content of the
transparency layer will be bounded by `rect' (specified in user space). */
CG_EXTERN void CGContextBeginTransparencyLayerWithRect(
CGContextRef cg_nullable c, CGRect rect, CFDictionaryRef __nullable auxInfo)
CG_AVAILABLE_STARTING(10.5, 2.0);
/* End a tranparency layer. */
CG_EXTERN void CGContextEndTransparencyLayer(CGContextRef cg_nullable c)
CG_AVAILABLE_STARTING(10.3, 2.0);
/** User space to device space tranformations. **/
/* Return the affine transform mapping the user space (abstract coordinates)
of `context' to device space (pixels). */
CG_EXTERN CGAffineTransform
CGContextGetUserSpaceToDeviceSpaceTransform(CGContextRef cg_nullable c)
CG_AVAILABLE_STARTING(10.4, 2.0);
/* Transform `point' from the user space of `context' to device space. */
CG_EXTERN CGPoint CGContextConvertPointToDeviceSpace(CGContextRef cg_nullable c,
CGPoint point)
CG_AVAILABLE_STARTING(10.4, 2.0);
/* Transform `point' from device space to the user space of `context'. */
CG_EXTERN CGPoint CGContextConvertPointToUserSpace(CGContextRef cg_nullable c,
CGPoint point)
CG_AVAILABLE_STARTING(10.4, 2.0);
/* Transform `size' from the user space of `context' to device space. */
CG_EXTERN CGSize CGContextConvertSizeToDeviceSpace(CGContextRef cg_nullable c,
CGSize size)
CG_AVAILABLE_STARTING(10.4, 2.0);
/* Transform `size' from device space to the user space of `context'. */
CG_EXTERN CGSize CGContextConvertSizeToUserSpace(CGContextRef cg_nullable c,
CGSize size)
CG_AVAILABLE_STARTING(10.4, 2.0);
/* Transform `rect' from the user space of `context' to device space. Since
affine transforms do not preserve rectangles in general, this function
returns the smallest rectangle which contains the transformed corner
points of `rect'. */
CG_EXTERN CGRect CGContextConvertRectToDeviceSpace(CGContextRef cg_nullable c,
CGRect rect)
CG_AVAILABLE_STARTING(10.4, 2.0);
/* Transform `rect' from device space to the user space of `context'. Since
affine transforms do not preserve rectangles in general, this function
returns the smallest rectangle which contains the transformed corner
points of `rect'. */
CG_EXTERN CGRect CGContextConvertRectToUserSpace(CGContextRef cg_nullable c,
CGRect rect)
CG_AVAILABLE_STARTING(10.4, 2.0);
/** Deprecated functions. **/
/* DEPRECATED; use the CoreText API instead. */
CG_EXTERN void CGContextSelectFont(CGContextRef cg_nullable c,
const char * cg_nullable name, CGFloat size, CGTextEncoding textEncoding)
CG_AVAILABLE_BUT_DEPRECATED(10.0, 10.9,
2.0, 7.0);
/* DEPRECATED; use the CoreText API instead. */
CG_EXTERN void CGContextShowText(CGContextRef cg_nullable c,
const char * cg_nullable string, size_t length)
CG_AVAILABLE_BUT_DEPRECATED(10.0, 10.9,
2.0, 7.0);
/* DEPRECATED; use the CoreText API instead. */
CG_EXTERN void CGContextShowTextAtPoint(CGContextRef cg_nullable c,
CGFloat x, CGFloat y, const char * cg_nullable string, size_t length)
CG_AVAILABLE_BUT_DEPRECATED(10.0, 10.9,
2.0, 7.0);
/* DEPRECATED; use the CoreText API instead. */
CG_EXTERN void CGContextShowGlyphs(CGContextRef cg_nullable c,
const CGGlyph * __nullable g, size_t count)
CG_AVAILABLE_BUT_DEPRECATED(10.0, 10.9,
2.0, 7.0);
/* DEPRECATED; use the CoreText API instead. */
CG_EXTERN void CGContextShowGlyphsAtPoint(CGContextRef cg_nullable c, CGFloat x,
CGFloat y, const CGGlyph * __nullable glyphs, size_t count)
CG_AVAILABLE_BUT_DEPRECATED(10.0, 10.9,
2.0, 7.0);
/* DEPRECATED; use the CoreText API instead. */
CG_EXTERN void CGContextShowGlyphsWithAdvances(CGContextRef cg_nullable c,
const CGGlyph * __nullable glyphs, const CGSize * __nullable advances,
size_t count)
CG_AVAILABLE_BUT_DEPRECATED(10.3, 10.9,
2.0, 7.0);
/* DEPRECATED; use the CGPDFPage API instead. */
CG_EXTERN void CGContextDrawPDFDocument(CGContextRef cg_nullable c, CGRect rect,
CGPDFDocumentRef cg_nullable document, int page)
CG_AVAILABLE_BUT_DEPRECATED(10.0, 10.5) CG_UNAVAILABLE_EMBEDDED;
CF_ASSUME_NONNULL_END
CF_IMPLICIT_BRIDGING_DISABLED
#endif /* CGCONTEXT_H_ */
|
0 | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/CoreGraphics.framework | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/CoreGraphics.framework/Headers/CGFont.h | /* CoreGraphics - CGFont.h
Copyright (c) 1999-2012 Apple Inc.
All rights reserved. */
#ifndef CGFONT_H_
#define CGFONT_H_
#include <CoreFoundation/CFBase.h>
#include <CoreFoundation/CFAvailability.h>
#include <stdint.h>
/* The type used to represent a CoreGraphics font. */
typedef struct CF_BRIDGED_TYPE(id) CGFont *CGFontRef;
/* A type to represent indexes in a CGFontRef. */
typedef unsigned short CGFontIndex;
/* A type to represent glyph identifiers in a CGFontRef. */
typedef CGFontIndex CGGlyph;
/* The format of a PostScript font subset. Type1 is documented in "Adobe
Type 1 Font Format"; Type3 in "PostScript Language Reference, 3rd ed."
and Type42 in "Adobe Technical Note 5012, The Type 42 Font Format
Specification". */
typedef CF_ENUM(int32_t, CGFontPostScriptFormat) {
kCGFontPostScriptFormatType1 = 1,
kCGFontPostScriptFormatType3 = 3,
kCGFontPostScriptFormatType42 = 42
};
#include <CoreGraphics/CGBase.h>
#include <CoreGraphics/CGDataProvider.h>
#include <CoreGraphics/CGGeometry.h>
#include <CoreFoundation/CFArray.h>
#include <CoreFoundation/CFData.h>
#include <CoreFoundation/CFDictionary.h>
CF_IMPLICIT_BRIDGING_ENABLED
CF_ASSUME_NONNULL_BEGIN
/* The maximum allowed value of a CGFontIndex. Always <= USHRT_MAX - 1. */
static const CGFontIndex kCGFontIndexMax = ((1 << 16) - 2);
/* A value representing an invalid CGFontIndex. Always <= USHRT_MAX. */
static const CGFontIndex kCGFontIndexInvalid = ((1 << 16) - 1);
/* The maximum allowed value of a CGGlyph. */
static const CGFontIndex kCGGlyphMax = kCGFontIndexMax;
/* Return the CFTypeID for CGFontRefs. */
CG_EXTERN CFTypeID CGFontGetTypeID(void)
CG_AVAILABLE_STARTING(10.2, 2.0);
/* Create a CGFontRef using `platformFontReference', a pointer to a
platform-specific font reference. For MacOS X, `platformFontReference'
should be a pointer to an ATSFontRef. */
CG_EXTERN CGFontRef __nullable CGFontCreateWithPlatformFont(
void * cg_nullable platformFontReference)
CG_AVAILABLE_BUT_DEPRECATED(10.0, 10.6) CG_UNAVAILABLE_EMBEDDED;
/* Return the font defined by the data provided by `provider', or NULL if
the font can't be created. */
CG_EXTERN CGFontRef cg_nullable CGFontCreateWithDataProvider(
CGDataProviderRef cg_nullable provider)
CG_AVAILABLE_STARTING(10.5, 2.0);
/* Return the font identified by `name', corresponding to the font's
PostScript name or its full name, or NULL if the font can't be
created. */
CG_EXTERN CGFontRef __nullable CGFontCreateWithFontName(
CFStringRef cg_nullable name)
CG_AVAILABLE_STARTING(10.5, 2.0);
/* Return a font based on `font' with the variation specification dictionary
`variations' applied to `font'. A variation specification dictionary
contains keys corresponding the variation axis names of the font. Each
key is a variation axis name; the value for each key is the value
specified for that particular variation axis represented as a
CFNumberRef. If a variation axis name is not specified in `variations',
then the current value from `font' is used. */
CG_EXTERN CGFontRef __nullable CGFontCreateCopyWithVariations(
CGFontRef cg_nullable font, CFDictionaryRef __nullable variations)
CG_AVAILABLE_STARTING(10.4, 2.0);
/* Equivalent to `CFRetain(font)', except it doesn't crash (as CFRetain
does) if `font' is NULL. */
CG_EXTERN CGFontRef cg_nullable CGFontRetain(CGFontRef cg_nullable font)
CG_AVAILABLE_STARTING(10.0, 2.0);
/* Equivalent to `CFRelease(font)', except it doesn't crash (as CFRelease
does) if `font' is NULL. */
CG_EXTERN void CGFontRelease(CGFontRef cg_nullable font)
CG_AVAILABLE_STARTING(10.0, 2.0);
/* Return the number of glyphs in `font'. */
CG_EXTERN size_t CGFontGetNumberOfGlyphs(CGFontRef cg_nullable font)
CG_AVAILABLE_STARTING(10.0, 2.0);
/* Return the glyph space units/em for `font'. */
CG_EXTERN int CGFontGetUnitsPerEm(CGFontRef cg_nullable font)
CG_AVAILABLE_STARTING(10.0, 2.0);
/* Return the PostScript name of `font'. */
CG_EXTERN CFStringRef __nullable CGFontCopyPostScriptName(CGFontRef cg_nullable font)
CG_AVAILABLE_STARTING(10.4, 2.0);
/* Return the "full name" of `font'. */
CG_EXTERN CFStringRef __nullable CGFontCopyFullName(CGFontRef cg_nullable font)
CG_AVAILABLE_STARTING(10.5, 2.0);
/* Return the ascent of `font'. The ascent is the maximum distance above the
baseline of glyphs in a font. The value is specified in glyph space
units. */
CG_EXTERN int CGFontGetAscent(CGFontRef cg_nullable font)
CG_AVAILABLE_STARTING(10.5, 2.0);
/* Return the descent of `font'. The descent is the maximum distance below
the baseline of glyphs in a font. The value is specified in glyph space
units. */
CG_EXTERN int CGFontGetDescent(CGFontRef cg_nullable font)
CG_AVAILABLE_STARTING(10.5, 2.0);
/* Return the leading of `font'. The leading is the spacing between
consecutive lines of text in a font. The value is specified in glyph
space units. */
CG_EXTERN int CGFontGetLeading(CGFontRef cg_nullable font)
CG_AVAILABLE_STARTING(10.5, 2.0);
/* Return the cap height of `font'. The cap height is the distance above the
baseline of the top of flat capital letters of glyphs in a font. The
value is specified in glyph space units. */
CG_EXTERN int CGFontGetCapHeight(CGFontRef cg_nullable font)
CG_AVAILABLE_STARTING(10.5, 2.0);
/* Return the x-height of `font'. The x-height is the distance above the
baseline of the top of flat, non-ascending lowercase letters (such as
"x") of glyphs in a font. The value is specified in glyph space units. */
CG_EXTERN int CGFontGetXHeight(CGFontRef cg_nullable font)
CG_AVAILABLE_STARTING(10.5, 2.0);
/* Return the font bounding box of `font'. The font bounding box is the
union of all of the bounding boxes for all the glyphs in a font. The
value is specified in glyph space units. */
CG_EXTERN CGRect CGFontGetFontBBox(CGFontRef cg_nullable font)
CG_AVAILABLE_STARTING(10.5, 2.0);
/* Return the italic angle of `font', measured in degrees counter-clockwise
from the vertical. */
CG_EXTERN CGFloat CGFontGetItalicAngle(CGFontRef cg_nullable font)
CG_AVAILABLE_STARTING(10.5, 2.0);
/* Return the thickness of the dominant vertical stems of glyphs in `font'.
The value is specified in glyph space units. */
CG_EXTERN CGFloat CGFontGetStemV(CGFontRef cg_nullable font)
CG_AVAILABLE_STARTING(10.5, 2.0);
/* Return an array of the variation axis dictionaries for `font'. Each
variation axis dictionary contains values for the variation axis keys
listed below. This function returns NULL if `font' doesn't support
variations. */
CG_EXTERN CFArrayRef __nullable CGFontCopyVariationAxes(CGFontRef cg_nullable font)
CG_AVAILABLE_STARTING(10.4, 2.0);
/* Return the variation specification dictionary from `font'. This
dictionary contains keys corresponding the variation axis names of the
font. Each key is a variation axis name; the value for each key is the
value specified for that particular variation axis represented as a
CFNumberRef. This function returns NULL if `font' doesn't support
variations. */
CG_EXTERN CFDictionaryRef __nullable CGFontCopyVariations(CGFontRef cg_nullable font)
CG_AVAILABLE_STARTING(10.4, 2.0);
/* Get the advance of each glyph in `glyphs', an array of `count' glyphs,
and return it in the corresponding entry of `advances', an array of
`count' integers. The advances are specified in glyph space. Returns
false if advances can't be retrieved for any reason; true otherwise. */
CG_EXTERN bool CGFontGetGlyphAdvances(CGFontRef cg_nullable font,
const CGGlyph * glyphs, size_t count, int * advances)
CG_AVAILABLE_STARTING(10.0, 2.0);
/* Get the bounding box of each glyph in `glyphs', an array of `count'
glyphs, and return it in the corresponding entry of `bboxes', an array of
`count' rectangles. The bounding boxes are specified in glyph space.
Returns false if bounding boxes can't be retrieved for any reason; true
otherwise. */
CG_EXTERN bool CGFontGetGlyphBBoxes(CGFontRef cg_nullable font,
const CGGlyph * glyphs, size_t count, CGRect * bboxes)
CG_AVAILABLE_STARTING(10.5, 2.0);
/* Return the glyph associated with `name' in `font'. If `name' isn't found
in the font, return 0. */
CG_EXTERN CGGlyph CGFontGetGlyphWithGlyphName(
CGFontRef cg_nullable font, CFStringRef cg_nullable name)
CG_AVAILABLE_STARTING(10.5, 2.0);
/* Return the glyph name of `glyph' in `font', or NULL if `glyph' does not
appear in `font'. */
CG_EXTERN CFStringRef __nullable CGFontCopyGlyphNameForGlyph(
CGFontRef cg_nullable font, CGGlyph glyph)
CG_AVAILABLE_STARTING(10.5, 2.0);
/* Return true if a subset in the PostScript format `format' can be created
for `font'; false otherwise. */
CG_EXTERN bool CGFontCanCreatePostScriptSubset(CGFontRef cg_nullable font,
CGFontPostScriptFormat format)
CG_AVAILABLE_STARTING(10.4, 2.0);
/* Create a subset of `font' named `subsetName' in the PostScript format
`format'. The subset will contain the glyphs specified by `glyphs', an
array of `count' CGGlyphs. If non-NULL, `encoding' specifies the default
encoding for the subset. */
CG_EXTERN CFDataRef __nullable CGFontCreatePostScriptSubset(
CGFontRef cg_nullable font, CFStringRef cg_nullable subsetName,
CGFontPostScriptFormat format, const CGGlyph * __nullable glyphs,
size_t count, const CGGlyph encoding[CG_NULLABLE_ARRAY 256])
CG_AVAILABLE_STARTING(10.4, 2.0);
/* Return a PostScript encoding of `font' containing glyphs in
`encoding'. */
CG_EXTERN CFDataRef __nullable CGFontCreatePostScriptEncoding(
CGFontRef cg_nullable font, const CGGlyph encoding[CG_NULLABLE_ARRAY 256])
CG_AVAILABLE_STARTING(10.4, 2.0);
/* Return an array of font table tags in `font'. Each entry in the array is
a four-byte value representing a single TrueType or OpenType font table
tag. */
CG_EXTERN CFArrayRef __nullable CGFontCopyTableTags(CGFontRef cg_nullable font)
CG_AVAILABLE_STARTING(10.5, 2.0);
/* Return the table in `font' corresponding to `tag', or NULL if no such
table exists. */
CG_EXTERN CFDataRef __nullable CGFontCopyTableForTag(
CGFontRef cg_nullable font, uint32_t tag)
CG_AVAILABLE_STARTING(10.5, 2.0);
/*** Keys for the font variation axis dictionary. ***/
/* The key used to obtain the variation axis name from a variation axis
dictionary. The value obtained with this key is a CFStringRef specifying
the name of the variation axis. */
CG_EXTERN const CFStringRef kCGFontVariationAxisName
CG_AVAILABLE_STARTING(10.4, 2.0);
/* The key used to obtain the minimum variation axis value from a variation
axis dictionary. The value obtained with this key is a CFNumberRef
specifying the minimum value of the variation axis. */
CG_EXTERN const CFStringRef kCGFontVariationAxisMinValue
CG_AVAILABLE_STARTING(10.4, 2.0);
/* The key used to obtain the maximum variation axis value from a variation
axis dictionary. The value obtained with this key is a CFNumberRef
specifying the maximum value of the variation axis. */
CG_EXTERN const CFStringRef kCGFontVariationAxisMaxValue
CG_AVAILABLE_STARTING(10.4, 2.0);
/* The key used to obtain the default variation axis value from a variation
axis dictionary. The value obtained with this key is a CFNumberRef
specifying the default value of the variation axis. */
CG_EXTERN const CFStringRef kCGFontVariationAxisDefaultValue
CG_AVAILABLE_STARTING(10.4, 2.0);
/* Obsolete; don't use these. */
typedef CF_ENUM (int32_t, CGGlyphDeprecatedEnum) {
CGGlyphMin __CG_DEPRECATED_ENUMERATOR,
CGGlyphMax __CG_DEPRECATED_ENUMERATOR
};
CF_ASSUME_NONNULL_END
CF_IMPLICIT_BRIDGING_DISABLED
#endif /* CGFONT_H_ */
|
0 | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/CoreGraphics.framework | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/CoreGraphics.framework/Headers/CGPattern.h | /* CoreGraphics - CGPattern.h
Copyright (c) 2000-2011 Apple Inc.
All rights reserved. */
#ifndef CGPATTERN_H_
#define CGPATTERN_H_
#include <CoreFoundation/CFBase.h>
typedef struct CF_BRIDGED_TYPE(id) CGPattern *CGPatternRef;
#include <CoreGraphics/CGBase.h>
#include <CoreGraphics/CGContext.h>
#include <CoreFoundation/CFAvailability.h>
#include <stdint.h>
CF_IMPLICIT_BRIDGING_ENABLED
CF_ASSUME_NONNULL_BEGIN
/* kCGPatternTilingNoDistortion: The pattern cell is not distorted when
painted, however the spacing between pattern cells may vary by as much as
1 device pixel.
kCGPatternTilingConstantSpacingMinimalDistortion: Pattern cells are
spaced consistently, however the pattern cell may be distorted by as much
as 1 device pixel when the pattern is painted.
kCGPatternTilingConstantSpacing: Pattern cells are spaced consistently as
with kCGPatternTilingConstantSpacingMinimalDistortion, however the
pattern cell may be distorted additionally to permit a more efficient
implementation. */
typedef CF_ENUM (int32_t, CGPatternTiling) {
kCGPatternTilingNoDistortion,
kCGPatternTilingConstantSpacingMinimalDistortion,
kCGPatternTilingConstantSpacing
};
/* The drawing of the pattern is delegated to the callbacks. The callbacks
may be called one or many times to draw the pattern.
`version' is the version number of the structure passed in as a
parameter to the CGPattern creation functions. The structure defined
below is version 0.
`drawPattern' should draw the pattern in the context `c'. `info' is the
parameter originally passed to the CGPattern creation functions.
`releaseInfo' is called when the pattern is deallocated. */
typedef void (*CGPatternDrawPatternCallback)(void * __nullable info,
CGContextRef cg_nullable context);
typedef void (*CGPatternReleaseInfoCallback)(void * __nullable info);
struct CGPatternCallbacks {
unsigned int version;
CGPatternDrawPatternCallback __nullable drawPattern;
CGPatternReleaseInfoCallback __nullable releaseInfo;
};
typedef struct CGPatternCallbacks CGPatternCallbacks;
/* Return the CFTypeID for CGPatternRefs. */
CG_EXTERN CFTypeID CGPatternGetTypeID(void)
CG_AVAILABLE_STARTING(10.2, 2.0);
/* Create a pattern. */
CG_EXTERN CGPatternRef __nullable CGPatternCreate(void * __nullable info,
CGRect bounds, CGAffineTransform matrix, CGFloat xStep, CGFloat yStep,
CGPatternTiling tiling, bool isColored,
const CGPatternCallbacks * cg_nullable callbacks)
CG_AVAILABLE_STARTING(10.0, 2.0);
/* Equivalent to `CFRetain(pattern)', except it doesn't crash (as CF does)
if `pattern' is NULL. */
CG_EXTERN CGPatternRef cg_nullable CGPatternRetain(CGPatternRef cg_nullable pattern)
CG_AVAILABLE_STARTING(10.0, 2.0);
/* Equivalent to `CFRelease(pattern)', except it doesn't crash (as CF does)
if `pattern' is NULL. */
CG_EXTERN void CGPatternRelease(CGPatternRef cg_nullable pattern)
CG_AVAILABLE_STARTING(10.0, 2.0);
CF_ASSUME_NONNULL_END
CF_IMPLICIT_BRIDGING_DISABLED
#endif /* CGPATTERN_H_ */
|
0 | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/CoreGraphics.framework | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/CoreGraphics.framework/Headers/CGColor.h | /* CoreGraphics - CGColor.h
* Copyright (c) 2003-2008 Apple Inc.
* All rights reserved. */
#ifndef CGCOLOR_H_
#define CGCOLOR_H_
#include <CoreFoundation/CFBase.h>
#include <CoreFoundation/CFAvailability.h>
#include <stdint.h>
typedef struct CF_BRIDGED_TYPE(id) CGColor *CGColorRef;
#include <CoreGraphics/CGBase.h>
#include <CoreGraphics/CGColorSpace.h>
#include <CoreGraphics/CGPattern.h>
CF_IMPLICIT_BRIDGING_ENABLED
CF_ASSUME_NONNULL_BEGIN
/* Create a color in the color space `space' with color components
(including alpha) specified by `components'. `space' may be any color
space except a pattern color space. */
CG_EXTERN CGColorRef __nullable CGColorCreate(CGColorSpaceRef cg_nullable space,
const CGFloat * cg_nullable components)
CG_AVAILABLE_STARTING(10.3, 2.0);
/* Create a color in the "Generic" gray color space. */
CG_EXTERN CGColorRef CGColorCreateGenericGray(CGFloat gray, CGFloat alpha)
CG_AVAILABLE_STARTING(10.5, 13.0);
/* Create a color in the "Generic" RGB color space. */
CG_EXTERN CGColorRef CGColorCreateGenericRGB(CGFloat red, CGFloat green,
CGFloat blue, CGFloat alpha) CG_AVAILABLE_STARTING(10.5, 13.0);
/* Create a color in the "Generic" CMYK color space. */
CG_EXTERN CGColorRef CGColorCreateGenericCMYK(CGFloat cyan, CGFloat magenta,
CGFloat yellow, CGFloat black, CGFloat alpha) CG_AVAILABLE_STARTING(10.5, 13.0);
/* Create a color in the "Generic Gray Gamma 2.2 color space. */
CG_EXTERN CGColorRef CGColorCreateGenericGrayGamma2_2(CGFloat gray, CGFloat alpha) CG_AVAILABLE_STARTING(10.15, 13.0);
/* Create a color in sRGB color space. */
CG_EXTERN CGColorRef CGColorCreateSRGB(CGFloat red, CGFloat green,
CGFloat blue, CGFloat alpha) CG_AVAILABLE_STARTING(10.15, 13.0);
/* Return a constant color. As `CGColorGetConstantColor' is not a "Copy" or
"Create" function, it does not necessarily return a new reference each
time it's called. As a consequence, you should not release the returned
value. However, colors returned from `CGColorGetConstantColor' can be
retained and released in a properly nested fashion, just like any other
CF type. */
CG_EXTERN CGColorRef __nullable CGColorGetConstantColor(CFStringRef cg_nullable colorName)
CG_AVAILABLE_STARTING(10.5, 14.0);
/* Create a color in color space `space' with pattern `pattern' and
components `components'. `space' must be a pattern color space. */
CG_EXTERN CGColorRef __nullable CGColorCreateWithPattern(CGColorSpaceRef cg_nullable space,
CGPatternRef cg_nullable pattern, const CGFloat * cg_nullable components)
CG_AVAILABLE_STARTING(10.3, 2.0);
/* Create a copy of `color'. */
CG_EXTERN CGColorRef __nullable CGColorCreateCopy(CGColorRef cg_nullable color)
CG_AVAILABLE_STARTING(10.3, 2.0);
/* Create a copy of `color' with alpha set to `alpha'. */
CG_EXTERN CGColorRef __nullable CGColorCreateCopyWithAlpha(CGColorRef cg_nullable color,
CGFloat alpha) CG_AVAILABLE_STARTING(10.3, 2.0);
/* Create a copy of `color' by matching existing color to destination color space. */
CG_EXTERN CGColorRef __nullable CGColorCreateCopyByMatchingToColorSpace(cg_nullable CGColorSpaceRef,
CGColorRenderingIntent intent, CGColorRef cg_nullable color, __nullable CFDictionaryRef options)
CG_AVAILABLE_STARTING(10.11, 9.0);
/* Equivalent to `CFRetain(color)', except it doesn't crash (as CFRetain
does) if `color' is NULL. */
CG_EXTERN CGColorRef cg_nullable CGColorRetain(CGColorRef cg_nullable color)
CG_AVAILABLE_STARTING(10.3, 2.0);
/* Equivalent to `CFRelease(color)', except it doesn't crash (as CFRelease
does) if `color' is NULL. */
CG_EXTERN void CGColorRelease(CGColorRef cg_nullable color)
CG_AVAILABLE_STARTING(10.3, 2.0);
/* Return true if `color1' is equal to `color2'; false otherwise. */
CG_EXTERN bool CGColorEqualToColor(CGColorRef cg_nullable color1, CGColorRef cg_nullable color2)
CG_AVAILABLE_STARTING(10.3, 2.0);
/* Return the number of color components (including alpha) associated with
`color'. */
CG_EXTERN size_t CGColorGetNumberOfComponents(CGColorRef cg_nullable color)
CG_AVAILABLE_STARTING(10.3, 2.0);
/* Return the color components (including alpha) associated with `color'. */
CG_EXTERN const CGFloat * __nullable CGColorGetComponents(CGColorRef cg_nullable color)
CG_AVAILABLE_STARTING(10.3, 2.0);
/* Return the alpha component associated with `color'. */
CG_EXTERN CGFloat CGColorGetAlpha(CGColorRef cg_nullable color)
CG_AVAILABLE_STARTING(10.3, 2.0);
/* Return the color space associated with `color'. */
CG_EXTERN CGColorSpaceRef __nullable CGColorGetColorSpace(CGColorRef cg_nullable color)
CG_AVAILABLE_STARTING(10.3, 2.0);
/* Return the pattern associated with `color', if it's a color in a pattern
color space; NULL otherwise. */
CG_EXTERN CGPatternRef __nullable CGColorGetPattern(CGColorRef cg_nullable color)
CG_AVAILABLE_STARTING(10.3, 2.0);
/* Return the CFTypeID for CGColors. */
CG_EXTERN CFTypeID CGColorGetTypeID(void)
CG_AVAILABLE_STARTING(10.3, 2.0);
/*** Names of colors for use with `CGColorGetConstantColor'. ***/
/* Colors in the "Generic" gray color space. */
CG_EXTERN const CFStringRef kCGColorWhite
CG_AVAILABLE_STARTING(10.5, 14.0);
CG_EXTERN const CFStringRef kCGColorBlack
CG_AVAILABLE_STARTING(10.5, 14.0);
CG_EXTERN const CFStringRef kCGColorClear
CG_AVAILABLE_STARTING(10.5, 14.0);
CF_ASSUME_NONNULL_END
CF_IMPLICIT_BRIDGING_DISABLED
#endif /* CGCOLOR_H_ */
|
0 | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/CoreGraphics.framework | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/CoreGraphics.framework/Headers/CGError.h | /* CoreGraphics - CGError.h
Copyright (c) 2000-2011 Apple Inc.
All rights reserved. */
#ifndef CGERROR_H_
#define CGERROR_H_
#include <CoreGraphics/CGBase.h>
#include <stdint.h>
#include <CoreFoundation/CFAvailability.h>
/* Types used for errors and error handlers. */
typedef CF_ENUM (int32_t, CGError) {
kCGErrorSuccess = 0,
kCGErrorFailure = 1000,
kCGErrorIllegalArgument = 1001,
kCGErrorInvalidConnection = 1002,
kCGErrorInvalidContext = 1003,
kCGErrorCannotComplete = 1004,
kCGErrorNotImplemented = 1006,
kCGErrorRangeCheck = 1007,
kCGErrorTypeCheck = 1008,
kCGErrorInvalidOperation = 1010,
kCGErrorNoneAvailable = 1011,
};
typedef void (*CGErrorCallback)(void);
/* Set a callback for easier detection of error conditions
causing CoreGraphics to raise an error.
Pass NULL to reset the callback.*/
CG_EXTERN void CGErrorSetCallback(CGErrorCallback callback);
#endif /* CGERROR_H_ */
|
0 | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/CoreGraphics.framework | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/CoreGraphics.framework/Headers/CGDirectDisplayMetal.h | /* CoreGraphics - CGDirectDisplayMetal.h
Copyright (c) 2000-2015 Apple Inc.
All rights reserved. */
#ifndef CGDIRECTDISPLAYMETAL_H_
#define CGDIRECTDISPLAYMETAL_H_
#ifdef __cplusplus
extern "C" {
#endif
/* This file only makes sense to Objective C clients */
#if defined(__OBJC__)
#import <CoreGraphics/CGDirectDisplay.h>
@protocol MTLDevice;
#ifndef NS_RETURNS_RETAINED
# if __has_feature(attribute_ns_returns_retained)
# define NS_RETURNS_RETAINED __attribute__((ns_returns_retained))
# else
# define NS_RETURNS_RETAINED
# endif
#endif
/* Return the Metal device for the GPU currently being used to drive a given display */
/* Note: On systems with automatic graphics switching enabled, this value can change at
almost any time. */
CG_EXTERN id<MTLDevice> __nullable CGDirectDisplayCopyCurrentMetalDevice(CGDirectDisplayID display) NS_RETURNS_RETAINED CG_AVAILABLE_STARTING(10.11);
#endif /* __OBJC__ */
#ifdef __cplusplus
} /* extern "C" */
#endif
#endif /* CGDIRECTDISPLAYMETAL_H_ */
|
0 | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/CoreGraphics.framework | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/CoreGraphics.framework/Headers/CGAffineTransform.h | /* CoreGraphics - CGAffineTransform.h
Copyright (c) 1998-2011 Apple Inc.
All rights reserved. */
#ifndef CGAFFINETRANSFORM_H_
#define CGAFFINETRANSFORM_H_
typedef struct CGAffineTransform CGAffineTransform;
#include <CoreGraphics/CGBase.h>
#include <CoreGraphics/CGGeometry.h>
CF_IMPLICIT_BRIDGING_ENABLED
struct CGAffineTransform {
CGFloat a, b, c, d;
CGFloat tx, ty;
};
/* The identity transform: [ 1 0 0 1 0 0 ]. */
CG_EXTERN const CGAffineTransform CGAffineTransformIdentity
CG_AVAILABLE_STARTING(10.0, 2.0);
/* Return the transform [ a b c d tx ty ]. */
CG_EXTERN CGAffineTransform CGAffineTransformMake(CGFloat a, CGFloat b,
CGFloat c, CGFloat d, CGFloat tx, CGFloat ty)
CG_AVAILABLE_STARTING(10.0, 2.0);
/* Return a transform which translates by `(tx, ty)':
t' = [ 1 0 0 1 tx ty ] */
CG_EXTERN CGAffineTransform CGAffineTransformMakeTranslation(CGFloat tx,
CGFloat ty) CG_AVAILABLE_STARTING(10.0, 2.0);
/* Return a transform which scales by `(sx, sy)':
t' = [ sx 0 0 sy 0 0 ] */
CG_EXTERN CGAffineTransform CGAffineTransformMakeScale(CGFloat sx, CGFloat sy)
CG_AVAILABLE_STARTING(10.0, 2.0);
/* Return a transform which rotates by `angle' radians:
t' = [ cos(angle) sin(angle) -sin(angle) cos(angle) 0 0 ] */
CG_EXTERN CGAffineTransform CGAffineTransformMakeRotation(CGFloat angle)
CG_AVAILABLE_STARTING(10.0, 2.0);
/* Return true if `t' is the identity transform, false otherwise. */
CG_EXTERN bool CGAffineTransformIsIdentity(CGAffineTransform t)
CG_AVAILABLE_STARTING(10.4, 2.0);
/* Translate `t' by `(tx, ty)' and return the result:
t' = [ 1 0 0 1 tx ty ] * t */
CG_EXTERN CGAffineTransform CGAffineTransformTranslate(CGAffineTransform t,
CGFloat tx, CGFloat ty) CG_AVAILABLE_STARTING(10.0, 2.0);
/* Scale `t' by `(sx, sy)' and return the result:
t' = [ sx 0 0 sy 0 0 ] * t */
CG_EXTERN CGAffineTransform CGAffineTransformScale(CGAffineTransform t,
CGFloat sx, CGFloat sy) CG_AVAILABLE_STARTING(10.0, 2.0);
/* Rotate `t' by `angle' radians and return the result:
t' = [ cos(angle) sin(angle) -sin(angle) cos(angle) 0 0 ] * t */
CG_EXTERN CGAffineTransform CGAffineTransformRotate(CGAffineTransform t,
CGFloat angle) CG_AVAILABLE_STARTING(10.0, 2.0);
/* Invert `t' and return the result. If `t' has zero determinant, then `t'
is returned unchanged. */
CG_EXTERN CGAffineTransform CGAffineTransformInvert(CGAffineTransform t)
CG_AVAILABLE_STARTING(10.0, 2.0);
/* Concatenate `t2' to `t1' and return the result:
t' = t1 * t2 */
CG_EXTERN CGAffineTransform CGAffineTransformConcat(CGAffineTransform t1,
CGAffineTransform t2) CG_AVAILABLE_STARTING(10.0, 2.0);
/* Return true if `t1' and `t2' are equal, false otherwise. */
CG_EXTERN bool CGAffineTransformEqualToTransform(CGAffineTransform t1,
CGAffineTransform t2) CG_AVAILABLE_STARTING(10.4, 2.0);
/* Transform `point' by `t' and return the result:
p' = p * t
where p = [ x y 1 ]. */
CG_EXTERN CGPoint CGPointApplyAffineTransform(CGPoint point,
CGAffineTransform t) CG_AVAILABLE_STARTING(10.0, 2.0);
/* Transform `size' by `t' and return the result:
s' = s * t
where s = [ width height 0 ]. */
CG_EXTERN CGSize CGSizeApplyAffineTransform(CGSize size, CGAffineTransform t)
CG_AVAILABLE_STARTING(10.0, 2.0);
/* Transform `rect' by `t' and return the result. Since affine transforms do
not preserve rectangles in general, this function returns the smallest
rectangle which contains the transformed corner points of `rect'. If `t'
consists solely of scales, flips and translations, then the returned
rectangle coincides with the rectangle constructed from the four
transformed corners. */
CG_EXTERN CGRect CGRectApplyAffineTransform(CGRect rect, CGAffineTransform t)
CG_AVAILABLE_STARTING(10.4, 2.0);
/*** Definitions of inline functions. ***/
CG_INLINE CGAffineTransform
__CGAffineTransformMake(CGFloat a, CGFloat b, CGFloat c, CGFloat d,
CGFloat tx, CGFloat ty)
{
CGAffineTransform t;
t.a = a; t.b = b; t.c = c; t.d = d; t.tx = tx; t.ty = ty;
return t;
}
#define CGAffineTransformMake __CGAffineTransformMake
CG_INLINE CGPoint
__CGPointApplyAffineTransform(CGPoint point, CGAffineTransform t)
{
CGPoint p;
p.x = (CGFloat)((double)t.a * point.x + (double)t.c * point.y + t.tx);
p.y = (CGFloat)((double)t.b * point.x + (double)t.d * point.y + t.ty);
return p;
}
#define CGPointApplyAffineTransform __CGPointApplyAffineTransform
CG_INLINE CGSize
__CGSizeApplyAffineTransform(CGSize size, CGAffineTransform t)
{
CGSize s;
s.width = (CGFloat)((double)t.a * size.width + (double)t.c * size.height);
s.height = (CGFloat)((double)t.b * size.width + (double)t.d * size.height);
return s;
}
#define CGSizeApplyAffineTransform __CGSizeApplyAffineTransform
CF_IMPLICIT_BRIDGING_DISABLED
#endif /* CGAFFINETRANSFORM_H_ */
|
0 | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/CoreGraphics.framework | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/CoreGraphics.framework/Headers/CGPDFDocument.h | /* CoreGraphics - CGPDFDocument.h
Copyright (c) 2000-2011 Apple Inc.
All rights reserved. */
#ifndef CGPDFDOCUMENT_H_
#define CGPDFDOCUMENT_H_
#include <CoreFoundation/CFBase.h>
#include <CoreFoundation/CFAvailability.h>
#include <stdint.h>
typedef struct CF_BRIDGED_TYPE(id) CGPDFDocument *CGPDFDocumentRef;
#include <CoreGraphics/CGDataProvider.h>
#include <CoreGraphics/CGGeometry.h>
#include <CoreGraphics/CGPDFPage.h>
#include <CoreFoundation/CFURL.h>
CF_IMPLICIT_BRIDGING_ENABLED
CF_ASSUME_NONNULL_BEGIN
// To get access permissions from a CGPDFDocument, call CGPDFDocumentGetAccessPermissions. Setting permissions
// can only be done using the kCGPDFContextAccessPermissions property in the auxiliary info dictionary passed
// in to CGPDFContextCreate.
//
// Some PDF access permissions are non-strict supersets of other permissions. Granting access to a superset
// permission also grants access to permission(s) it is a superset of. These permissions are as follows:
//
// * Granting kCGPDFAllowsHighQualityPrinting also grants kCGPDFAllowsLowQualityPrinting
// * Granting kCGPDFAllowsDocumentChanges also grants kCGPDFAllowsCommenting and kCGPDFAllowsFormFieldEntry
// * Granting kCGPDFAllowsContentCopying also grants kCGPDFAllowsContentAccessibility
// * Granting kCGPDFAllowsCommenting also grants kCGPDFAllowsFormFieldEntry
//
// These relationships don't come from the PDF spec. There is nothing in the spec that says you always get
// low-quality printing if you've already got high-quality printing. They are just two different bits with
// no explicit dependencies. However, in practice, the software that most people use to edit PDF permissions
// only allows creation of PDFs that follow these conventions.
//
// In the interest of consistency with how these bits are used in practice, kCGPDFContextAccessPermissions
// enforces the superset model of PDF permissions. For example, if you try to grant high-quality printing but
// not low-quality printing, the low-quality bit will get turned on anyway. This does not apply to how permissions
// are read, however. It's very likely that there exist PDFs that don't follow these conventions. For that reason,
// when checking permissions, always check for the narrowest one that applies. For example, if you're interested
// in form field entry, always test for kCGPDFAllowsFormFieldEntry specifically. You can't assume that you have it
// just because you also have kCGPDFAllowsCommenting or kCGPDFAllowsDocumentChanges.
typedef CF_OPTIONS(uint32_t, CGPDFAccessPermissions) {
kCGPDFAllowsLowQualityPrinting = (1 << 0), // Print at up to 150 DPI
kCGPDFAllowsHighQualityPrinting = (1 << 1), // Print at any DPI
kCGPDFAllowsDocumentChanges = (1 << 2), // Modify the document contents except for page management
kCGPDFAllowsDocumentAssembly = (1 << 3), // Page management: insert, delete, and rotate pages
kCGPDFAllowsContentCopying = (1 << 4), // Extract content (text, images, etc.)
kCGPDFAllowsContentAccessibility = (1 << 5), // Extract content, but only for the purpose of accessibility
kCGPDFAllowsCommenting = (1 << 6), // Create or modify annotations, including form field entries
kCGPDFAllowsFormFieldEntry = (1 << 7) // Modify form field entries
};
/* CFDictionary keys for use with CGPDFDocumentGetOutline and CGPDFContextSetOutline. */
// Outlines don't contain a single root node, however we have to represent outlines as trees with a single root.
// The root CFDictionary will only have one key (kCGPDFOutlineChildren), and it is not considered part of the
// outline itself. All CFDictionaries below the root must have at least two keys: kCGPDFOutlineTitle and
// kCGPDFOutlineDestination. If they have any children, they must have kCGPDFOutlineChildren as well. Finally,
// kCGPDFOutlineDestinationRect can optionally be present to associate an area of the destination page.
/* Key: kCGPDFOutlineTitle */
/* Value: CFString */
CG_EXTERN const CFStringRef kCGPDFOutlineTitle
CG_AVAILABLE_STARTING(10.13, 11.0);
/* Key: kCGPDFOutlineChildren */
/* Value: CFArray of CFDictionaries */
CG_EXTERN const CFStringRef kCGPDFOutlineChildren
CG_AVAILABLE_STARTING(10.13, 11.0);
/* Key: kCGPDFOutlineDestination */
/* Value: CFNumber (for a one-indexed page number) or CFURL */
CG_EXTERN const CFStringRef kCGPDFOutlineDestination
CG_AVAILABLE_STARTING(10.13, 11.0);
/* Key: kCGPDFOutlineDestinationRect */
/* Value: CFDictionary from CGRectCreateDictionaryRepresentation. Only valid when the destination is a page number. */
CG_EXTERN const CFStringRef kCGPDFOutlineDestinationRect
CG_AVAILABLE_STARTING(10.13, 11.0);
/* Create a PDF document, using `provider' to obtain the document's data. */
CG_EXTERN CGPDFDocumentRef __nullable CGPDFDocumentCreateWithProvider(
CGDataProviderRef cg_nullable provider)
CG_AVAILABLE_STARTING(10.0, 2.0);
/* Create a PDF document from `url'. */
CG_EXTERN CGPDFDocumentRef __nullable CGPDFDocumentCreateWithURL(
CFURLRef cg_nullable url)
CG_AVAILABLE_STARTING(10.0, 2.0);
/* Equivalent to `CFRetain(document)', except it doesn't crash (as CFRetain
does) if `document' is NULL. */
CG_EXTERN CGPDFDocumentRef cg_nullable CGPDFDocumentRetain(
CGPDFDocumentRef cg_nullable document)
CG_AVAILABLE_STARTING(10.0, 2.0);
/* Equivalent to `CFRelease(document)', except it doesn't crash (as
CFRelease does) if `document' is NULL. */
CG_EXTERN void CGPDFDocumentRelease(CGPDFDocumentRef cg_nullable document)
CG_AVAILABLE_STARTING(10.0, 2.0);
/* Return the major and minor version numbers of `document'. */
CG_EXTERN void CGPDFDocumentGetVersion(CGPDFDocumentRef cg_nullable document,
int * majorVersion, int * minorVersion)
CG_AVAILABLE_STARTING(10.3, 2.0);
/* Return true if the PDF file associated with `document' is encrypted;
false otherwise. If the PDF file is encrypted, then a password must be
supplied before certain operations are enabled; different passwords may
enable different operations. */
CG_EXTERN bool CGPDFDocumentIsEncrypted(CGPDFDocumentRef cg_nullable document)
CG_AVAILABLE_STARTING(10.2, 2.0);
/* Use `password' to decrypt `document' and grant permission for certain
operations. Returns true if `password' is a valid password; false
otherwise. */
CG_EXTERN bool CGPDFDocumentUnlockWithPassword(
CGPDFDocumentRef cg_nullable document, const char * password)
CG_AVAILABLE_STARTING(10.2, 2.0);
/* Return true if `document' is unlocked; false otherwise. A document is
unlocked if it isn't encrypted, or if it is encrypted and a valid
password was specified with `CGPDFDocumentUnlockWithPassword'. */
CG_EXTERN bool CGPDFDocumentIsUnlocked(CGPDFDocumentRef cg_nullable document)
CG_AVAILABLE_STARTING(10.2, 2.0);
/* Return true if `document' allows printing; false otherwise. Typically,
this function returns false only if the document is encrypted and the
document's current password doesn't grant permission to perform
printing. */
CG_EXTERN bool CGPDFDocumentAllowsPrinting(CGPDFDocumentRef cg_nullable document)
CG_AVAILABLE_STARTING(10.2, 2.0);
/* Return true if `document' allows copying; false otherwise. Typically,
this function returns false only if the document is encrypted and the
document's current password doesn't grant permission to perform
copying. */
CG_EXTERN bool CGPDFDocumentAllowsCopying(CGPDFDocumentRef cg_nullable document)
CG_AVAILABLE_STARTING(10.2, 2.0);
/* Return the number of pages in `document'. */
CG_EXTERN size_t CGPDFDocumentGetNumberOfPages(
CGPDFDocumentRef cg_nullable document)
CG_AVAILABLE_STARTING(10.0, 2.0);
/* Return the page corresponding to `pageNumber', or NULL if no such page
exists in the document. Pages are numbered starting at 1. */
CG_EXTERN CGPDFPageRef __nullable CGPDFDocumentGetPage(
CGPDFDocumentRef cg_nullable document, size_t pageNumber)
CG_AVAILABLE_STARTING(10.3, 2.0);
/* Return the document catalog of `document'. */
CG_EXTERN CGPDFDictionaryRef __nullable CGPDFDocumentGetCatalog(
CGPDFDocumentRef cg_nullable document)
CG_AVAILABLE_STARTING(10.3, 2.0);
/* Return the info dictionary of `document'. */
CG_EXTERN CGPDFDictionaryRef __nullable CGPDFDocumentGetInfo(
CGPDFDocumentRef cg_nullable document)
CG_AVAILABLE_STARTING(10.4, 2.0);
/* Return the "file identifier" array of `document'. */
CG_EXTERN CGPDFArrayRef __nullable CGPDFDocumentGetID(
CGPDFDocumentRef cg_nullable document)
CG_AVAILABLE_STARTING(10.4, 2.0);
/* Return the CFTypeID for CGPDFDocumentRefs. */
CG_EXTERN CFTypeID CGPDFDocumentGetTypeID(void)
CG_AVAILABLE_STARTING(10.2, 2.0);
/* Return the document outline in the form of a CFDictionary tree containing the kCGPDFOutline keys. */
CG_EXTERN __nullable CFDictionaryRef CGPDFDocumentGetOutline(CGPDFDocumentRef document)
CG_AVAILABLE_STARTING(10.13, 11.0);
/* Return the document access permissions. */
CG_EXTERN CGPDFAccessPermissions CGPDFDocumentGetAccessPermissions(CGPDFDocumentRef document)
CG_AVAILABLE_STARTING(10.13, 11.0);
/* The following functions are deprecated in favor of the CGPDFPage API. */
/* DEPRECATED; return the media box of page number `page' in `document'.
CGRectNull is returned if cannot find `page' in `document'. */
CG_EXTERN CGRect CGPDFDocumentGetMediaBox(CGPDFDocumentRef cg_nullable document,
int page)
CG_AVAILABLE_BUT_DEPRECATED(10.0, 10.5) CG_UNAVAILABLE_EMBEDDED;
/* DEPRECATED; return the crop box of page number `page' in `document'.
CGRectNull is returned if cannot find `page' in `document'. */
CG_EXTERN CGRect CGPDFDocumentGetCropBox(CGPDFDocumentRef cg_nullable document,
int page)
CG_AVAILABLE_BUT_DEPRECATED(10.0, 10.5) CG_UNAVAILABLE_EMBEDDED;
/* DEPRECATED; return the bleed box of page number `page' in `document'.
CGRectNull is returned if cannot find `page' in `document'. */
CG_EXTERN CGRect CGPDFDocumentGetBleedBox(CGPDFDocumentRef cg_nullable document,
int page)
CG_AVAILABLE_BUT_DEPRECATED(10.0, 10.5) CG_UNAVAILABLE_EMBEDDED;
/* DEPRECATED; return the trim box of page number `page' in `document'.
CGRectNull is returned if cannot find `page' in `document'. */
CG_EXTERN CGRect CGPDFDocumentGetTrimBox(CGPDFDocumentRef cg_nullable document,
int page)
CG_AVAILABLE_BUT_DEPRECATED(10.0, 10.5) CG_UNAVAILABLE_EMBEDDED;
/* DEPRECATED; return the art box of page number `page' in `document'.
CGRectNull is returned if cannot find `page' in `document'. */
CG_EXTERN CGRect CGPDFDocumentGetArtBox(CGPDFDocumentRef cg_nullable document,
int page)
CG_AVAILABLE_BUT_DEPRECATED(10.0, 10.5) CG_UNAVAILABLE_EMBEDDED;
/* DEPRECATED; return the rotation angle (in degrees) of page number `page'
in `document'. 0 if if cannot find `page' in `document'.*/
CG_EXTERN int CGPDFDocumentGetRotationAngle(CGPDFDocumentRef cg_nullable document,
int page)
CG_AVAILABLE_BUT_DEPRECATED(10.0, 10.5) CG_UNAVAILABLE_EMBEDDED;
CF_ASSUME_NONNULL_END
CF_IMPLICIT_BRIDGING_DISABLED
#endif /* CGPDFDOCUMENT_H_ */
|
0 | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/CoreGraphics.framework | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/CoreGraphics.framework/Headers/CGEventTypes.h | /* CoreGraphics - CGEventTypes.h
Copyright (c) 2004-2008 Apple Inc.
All rights reserved. */
#ifndef CGEVENTTYPES_H_
#define CGEVENTTYPES_H_
#include <CoreFoundation/CFBase.h>
#include <CoreFoundation/CFAvailability.h>
#include <stdint.h>
#include <CoreGraphics/CGBase.h>
#include <CoreGraphics/CGRemoteOperation.h>
#include <IOKit/hidsystem/IOLLEvent.h>
CF_ASSUME_NONNULL_BEGIN
/* An opaque type that represents a low-level hardware event.
Low-level hardware events of this type are referred to as Quartz events.
A typical event in Mac OS X originates when the user manipulates an input
device such as a mouse or a keyboard. The device driver associated with
that device, through the I/O Kit, creates a low-level event, puts it in
the window server’s event queue, and notifies the window server. The
window server creates a Quartz event, annotates the event, and dispatches
the event to the appropriate run-loop port of the target process. There
the event is picked up by the Carbon Event Manager and forwarded to the
event-handling mechanism appropriate to the application environment. You
can use event taps to gain access to Quartz events at several different
steps in this process.
This opaque type is derived from `CFType' and inherits the properties
that all Core Foundation types have in common. */
typedef struct CF_BRIDGED_TYPE(id) __CGEvent *CGEventRef;
/* Constants that specify buttons on a one, two, or three-button mouse. */
typedef CF_ENUM(uint32_t, CGMouseButton) {
kCGMouseButtonLeft = 0,
kCGMouseButtonRight = 1,
kCGMouseButtonCenter = 2
};
/* Constants that specify the unit of measurement for a scrolling event. */
typedef CF_ENUM(uint32_t, CGScrollEventUnit) {
kCGScrollEventUnitPixel = 0,
kCGScrollEventUnitLine = 1,
};
/* Constants that specify momentum scroll phases. */
typedef CF_ENUM(uint32_t, CGMomentumScrollPhase) {
kCGMomentumScrollPhaseNone = 0,
kCGMomentumScrollPhaseBegin = 1,
kCGMomentumScrollPhaseContinue = 2,
kCGMomentumScrollPhaseEnd = 3
};
/* Constants that specify scroll phases. */
typedef CF_ENUM(uint32_t, CGScrollPhase) {
kCGScrollPhaseBegan = 1,
kCGScrollPhaseChanged = 2,
kCGScrollPhaseEnded = 4,
kCGScrollPhaseCancelled = 8,
kCGScrollPhaseMayBegin = 128
};
/* Constants that specify gesture phases. */
typedef CF_ENUM(uint32_t, CGGesturePhase) {
kCGGesturePhaseNone = 0,
kCGGesturePhaseBegan = 1,
kCGGesturePhaseChanged = 2,
kCGGesturePhaseEnded = 4,
kCGGesturePhaseCancelled = 8,
kCGGesturePhaseMayBegin = 128
};
/* Constants that indicate the modifier key state at the time an event is
created, as well as other event-related states.
Any bits not specified are reserved for future use. */
typedef CF_OPTIONS(uint64_t, CGEventFlags) { /* Flags for events */
/* Device-independent modifier key bits. */
kCGEventFlagMaskAlphaShift = NX_ALPHASHIFTMASK,
kCGEventFlagMaskShift = NX_SHIFTMASK,
kCGEventFlagMaskControl = NX_CONTROLMASK,
kCGEventFlagMaskAlternate = NX_ALTERNATEMASK,
kCGEventFlagMaskCommand = NX_COMMANDMASK,
/* Special key identifiers. */
kCGEventFlagMaskHelp = NX_HELPMASK,
kCGEventFlagMaskSecondaryFn = NX_SECONDARYFNMASK,
/* Identifies key events from numeric keypad area on extended keyboards. */
kCGEventFlagMaskNumericPad = NX_NUMERICPADMASK,
/* Indicates if mouse/pen movement events are not being coalesced */
kCGEventFlagMaskNonCoalesced = NX_NONCOALSESCEDMASK
};
/* Constants that specify the different types of input events. */
typedef CF_ENUM(uint32_t, CGEventType) {
/* The null event. */
kCGEventNull = NX_NULLEVENT,
/* Mouse events. */
kCGEventLeftMouseDown = NX_LMOUSEDOWN,
kCGEventLeftMouseUp = NX_LMOUSEUP,
kCGEventRightMouseDown = NX_RMOUSEDOWN,
kCGEventRightMouseUp = NX_RMOUSEUP,
kCGEventMouseMoved = NX_MOUSEMOVED,
kCGEventLeftMouseDragged = NX_LMOUSEDRAGGED,
kCGEventRightMouseDragged = NX_RMOUSEDRAGGED,
/* Keyboard events. */
kCGEventKeyDown = NX_KEYDOWN,
kCGEventKeyUp = NX_KEYUP,
kCGEventFlagsChanged = NX_FLAGSCHANGED,
/* Specialized control devices. */
kCGEventScrollWheel = NX_SCROLLWHEELMOVED,
kCGEventTabletPointer = NX_TABLETPOINTER,
kCGEventTabletProximity = NX_TABLETPROXIMITY,
kCGEventOtherMouseDown = NX_OMOUSEDOWN,
kCGEventOtherMouseUp = NX_OMOUSEUP,
kCGEventOtherMouseDragged = NX_OMOUSEDRAGGED,
/* Out of band event types. These are delivered to the event tap callback
to notify it of unusual conditions that disable the event tap. */
kCGEventTapDisabledByTimeout = 0xFFFFFFFE,
kCGEventTapDisabledByUserInput = 0xFFFFFFFF
};
/* Event timestamp; roughly, nanoseconds since startup. */
typedef uint64_t CGEventTimestamp;
/* Constants used as keys to access specialized fields in low-level events. */
typedef CF_ENUM(uint32_t, CGEventField) {
/* Key to access an integer field that contains the mouse button event
number. Matching mouse-down and mouse-up events will have the same
event number. */
kCGMouseEventNumber = 0,
/* Key to access an integer field that contains the mouse button click
state. A click state of 1 represents a single click. A click state of 2
represents a double-click. A click state of 3 represents a
triple-click. */
kCGMouseEventClickState = 1,
/* Key to access a double field that contains the mouse button pressure.
The pressure value may range from 0 to 1, with 0 representing the mouse
being up. This value is commonly set by tablet pens mimicking a
mouse. */
kCGMouseEventPressure = 2,
/* Key to access an integer field that contains the mouse button
number. */
kCGMouseEventButtonNumber = 3,
/* Key to access an integer field that contains the horizontal mouse delta
since the last mouse movement event. */
kCGMouseEventDeltaX = 4,
/* Key to access an integer field that contains the vertical mouse delta
since the last mouse movement event. */
kCGMouseEventDeltaY = 5,
/* Key to access an integer field. The value is non-zero if the event
should be ignored by the Inkwell subsystem. */
kCGMouseEventInstantMouser = 6,
/* Key to access an integer field that encodes the mouse event subtype as
a `kCFNumberIntType'. */
kCGMouseEventSubtype = 7,
/* Key to access an integer field, non-zero when this is an autorepeat of
a key-down, and zero otherwise. */
kCGKeyboardEventAutorepeat = 8,
/* Key to access an integer field that contains the virtual keycode of the
key-down or key-up event. */
kCGKeyboardEventKeycode = 9,
/* Key to access an integer field that contains the keyboard type
identifier. */
kCGKeyboardEventKeyboardType = 10,
/* Key to access an integer field that contains scrolling data. This field
typically contains the change in vertical position since the last
scrolling event from a Mighty Mouse scroller or a single-wheel mouse
scroller. */
kCGScrollWheelEventDeltaAxis1 = 11,
/* Key to access an integer field that contains scrolling data. This field
typically contains the change in horizontal position since the last
scrolling event from a Mighty Mouse scroller. */
kCGScrollWheelEventDeltaAxis2 = 12,
/* This field is not used. */
kCGScrollWheelEventDeltaAxis3 = 13,
/* Key to access a field that contains scrolling data. The scrolling data
represents a line-based or pixel-based change in vertical position
since the last scrolling event from a Mighty Mouse scroller or a
single-wheel mouse scroller. The scrolling data uses a fixed-point
16.16 signed integer format. If this key is passed to
`CGEventGetDoubleValueField', the fixed-point value is converted to a
double value. */
kCGScrollWheelEventFixedPtDeltaAxis1 = 93,
/* Key to access a field that contains scrolling data. The scrolling data
represents a line-based or pixel-based change in horizontal position
since the last scrolling event from a Mighty Mouse scroller. The
scrolling data uses a fixed-point 16.16 signed integer format. If this
key is passed to `CGEventGetDoubleValueField', the fixed-point value is
converted to a double value. */
kCGScrollWheelEventFixedPtDeltaAxis2 = 94,
/* This field is not used. */
kCGScrollWheelEventFixedPtDeltaAxis3 = 95,
/* Key to access an integer field that contains pixel-based scrolling
data. The scrolling data represents the change in vertical position
since the last scrolling event from a Mighty Mouse scroller or a
single-wheel mouse scroller. */
kCGScrollWheelEventPointDeltaAxis1 = 96,
/* Key to access an integer field that contains pixel-based scrolling
data. The scrolling data represents the change in horizontal position
since the last scrolling event from a Mighty Mouse scroller. */
kCGScrollWheelEventPointDeltaAxis2 = 97,
/* This field is not used. */
kCGScrollWheelEventPointDeltaAxis3 = 98,
/* */
kCGScrollWheelEventScrollPhase = 99,
/* rdar://11259169 */
kCGScrollWheelEventScrollCount = 100,
kCGScrollWheelEventMomentumPhase = 123,
/* Key to access an integer field that indicates whether the event should
be ignored by the Inkwell subsystem. If the value is non-zero, the
event should be ignored. */
kCGScrollWheelEventInstantMouser = 14,
/* Key to access an integer field that contains the absolute X coordinate
in tablet space at full tablet resolution. */
kCGTabletEventPointX = 15,
/* Key to access an integer field that contains the absolute Y coordinate
in tablet space at full tablet resolution. */
kCGTabletEventPointY = 16,
/* Key to access an integer field that contains the absolute Z coordinate
in tablet space at full tablet resolution. */
kCGTabletEventPointZ = 17,
/* Key to access an integer field that contains the tablet button state.
Bit 0 is the first button, and a set bit represents a closed or pressed
button. Up to 16 buttons are supported. */
kCGTabletEventPointButtons = 18,
/* Key to access a double field that contains the tablet pen pressure. A
value of 0.0 represents no pressure, and 1.0 represents maximum
pressure. */
kCGTabletEventPointPressure = 19,
/* Key to access a double field that contains the horizontal tablet pen
tilt. A value of 0 represents no tilt, and 1 represents maximum tilt. */
kCGTabletEventTiltX = 20,
/* Key to access a double field that contains the vertical tablet pen
tilt. A value of 0 represents no tilt, and 1 represents maximum tilt. */
kCGTabletEventTiltY = 21,
/* Key to access a double field that contains the tablet pen rotation. */
kCGTabletEventRotation = 22,
/* Key to access a double field that contains the tangential pressure on
the device. A value of 0.0 represents no pressure, and 1.0 represents
maximum pressure. */
kCGTabletEventTangentialPressure = 23,
/* Key to access an integer field that contains the system-assigned unique
device ID. */
kCGTabletEventDeviceID = 24,
/* Key to access an integer field that contains a vendor-specified value. */
kCGTabletEventVendor1 = 25,
/* Key to access an integer field that contains a vendor-specified value. */
kCGTabletEventVendor2 = 26,
/* Key to access an integer field that contains a vendor-specified value. */
kCGTabletEventVendor3 = 27,
/* Key to access an integer field that contains the vendor-defined ID,
typically the USB vendor ID. */
kCGTabletProximityEventVendorID = 28,
/* Key to access an integer field that contains the vendor-defined tablet
ID, typically the USB product ID. */
kCGTabletProximityEventTabletID = 29,
/* Key to access an integer field that contains the vendor-defined ID of
the pointing device. */
kCGTabletProximityEventPointerID = 30,
/* Key to access an integer field that contains the system-assigned device
ID. */
kCGTabletProximityEventDeviceID = 31,
/* Key to access an integer field that contains the system-assigned unique
tablet ID. */
kCGTabletProximityEventSystemTabletID = 32,
/* Key to access an integer field that contains the vendor-assigned
pointer type. */
kCGTabletProximityEventVendorPointerType = 33,
/* Key to access an integer field that contains the vendor-defined pointer
serial number. */
kCGTabletProximityEventVendorPointerSerialNumber = 34,
/* Key to access an integer field that contains the vendor-defined unique
ID. */
kCGTabletProximityEventVendorUniqueID = 35,
/* Key to access an integer field that contains the device capabilities
mask. */
kCGTabletProximityEventCapabilityMask = 36,
/* Key to access an integer field that contains the pointer type. */
kCGTabletProximityEventPointerType = 37,
/* Key to access an integer field that indicates whether the pen is in
proximity to the tablet. The value is non-zero if the pen is in
proximity to the tablet and zero when leaving the tablet. */
kCGTabletProximityEventEnterProximity = 38,
/* Key to access a field that contains the event target process serial
number. The value is a 64-bit value. */
kCGEventTargetProcessSerialNumber = 39,
/* Key to access a field that contains the event target Unix process ID. */
kCGEventTargetUnixProcessID = 40,
/* Key to access a field that contains the event source Unix process ID. */
kCGEventSourceUnixProcessID = 41,
/* Key to access a field that contains the event source user-supplied
data, up to 64 bits. */
kCGEventSourceUserData = 42,
/* Key to access a field that contains the event source Unix effective
UID. */
kCGEventSourceUserID = 43,
/* Key to access a field that contains the event source Unix effective
GID. */
kCGEventSourceGroupID = 44,
/* Key to access a field that contains the event source state ID used to
create this event. */
kCGEventSourceStateID = 45,
/* Key to access an integer field that indicates whether a scrolling event
contains continuous, pixel-based scrolling data. The value is non-zero
when the scrolling data is pixel-based and zero when the scrolling data
is line-based. */
kCGScrollWheelEventIsContinuous = 88,
/* Added in 10.5; made public in 10.7 */
kCGMouseEventWindowUnderMousePointer = 91,
kCGMouseEventWindowUnderMousePointerThatCanHandleThisEvent = 92,
/* Unaccelerated pointer movement */
kCGEventUnacceleratedPointerMovementX = 170,
kCGEventUnacceleratedPointerMovementY = 171
};
/* Constants used with the `kCGMouseEventSubtype' event field. */
typedef CF_ENUM(uint32_t, CGEventMouseSubtype) {
kCGEventMouseSubtypeDefault = 0,
kCGEventMouseSubtypeTabletPoint = 1,
kCGEventMouseSubtypeTabletProximity = 2
};
/* Constants that specify possible tapping points for events. */
typedef CF_ENUM(uint32_t, CGEventTapLocation) {
kCGHIDEventTap = 0,
kCGSessionEventTap,
kCGAnnotatedSessionEventTap
};
/* Constants that specify where a new event tap is inserted into the list of
active event taps. */
typedef CF_ENUM(uint32_t, CGEventTapPlacement) {
kCGHeadInsertEventTap = 0,
kCGTailAppendEventTap
};
/* Constants that specify whether a new event tap is an active filter or a
passive listener. */
typedef CF_ENUM(uint32_t, CGEventTapOptions) {
kCGEventTapOptionDefault = 0x00000000,
kCGEventTapOptionListenOnly = 0x00000001
};
/* A mask that identifies the set of Quartz events to be observed in an
event tap. */
typedef uint64_t CGEventMask;
/* Generate an event mask for a single type of event. */
#define CGEventMaskBit(eventType) ((CGEventMask)1 << (eventType))
/* An event mask that represents all event types. */
#define kCGEventMaskForAllEvents (~(CGEventMask)0)
/* An opaque type that represents state within the client application that’s
associated with an event tap. */
typedef struct __CGEventTapProxy *CGEventTapProxy;
/* A client-supplied callback function that’s invoked whenever an associated
event tap receives a Quartz event.
The callback is passed a proxy for the tap, the event type, the incoming
event, and the user-defined data specified when the event tap was
created. The function should return the (possibly modified) passed-in
event, a newly constructed event, or NULL if the event is to be deleted.
The event passed to the callback is retained by the calling code, and is
released after the callback returns and the data is passed back to the
event system. If a different event is returned by the callback function,
then that event will be released by the calling code along with the
original event, after the event data has been passed back to the event
system. */
typedef CGEventRef __nullable (*CGEventTapCallBack)(CGEventTapProxy proxy,
CGEventType type, CGEventRef event, void * __nullable userInfo);
/* When an event tap is installed or released, a notification is posted. See
notify(3) and notify.h for details. */
#define kCGNotifyEventTapAdded "com.apple.coregraphics.eventTapAdded"
#define kCGNotifyEventTapRemoved "com.apple.coregraphics.eventTapRemoved"
/* The structure used to report information about event taps. */
struct __CGEventTapInformation {
uint32_t eventTapID;
CGEventTapLocation tapPoint; /* HID, session, annotated session */
CGEventTapOptions options; /* Listener, filter */
CGEventMask eventsOfInterest; /* Mask of events being tapped */
pid_t tappingProcess; /* Process that is tapping events */
pid_t processBeingTapped; /* Zero if not a per-process tap */
bool enabled; /* True if tap is enabled */
float minUsecLatency; /* Minimum latency in microseconds */
float avgUsecLatency; /* Average latency in microseconds */
float maxUsecLatency; /* Maximum latency in microseconds */
};
typedef struct __CGEventTapInformation CGEventTapInformation;
/* An opaque type that represents the source of a Quartz event. */
typedef struct CF_BRIDGED_TYPE(id) __CGEventSource *CGEventSourceRef;
/* Constants that specify the possible source states of an event source. */
typedef CF_ENUM(int32_t, CGEventSourceStateID) {
kCGEventSourceStatePrivate = -1,
kCGEventSourceStateCombinedSessionState = 0,
kCGEventSourceStateHIDSystemState = 1
};
/* A code that represents the type of keyboard used with a specified event
source. */
typedef uint32_t CGEventSourceKeyboardType;
/* A constant specifying any input event type */
#define kCGAnyInputEventType ((CGEventType)(~0))
CF_ASSUME_NONNULL_END
#endif /* CGEVENTTYPES_H_ */
|
0 | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/CoreGraphics.framework | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/CoreGraphics.framework/Headers/CGWindowLevel.h | /* CoreGraphics - CGWindowLevel.h
Copyright (c) 2000-2008 Apple Inc.
All rights reserved. */
#ifndef CGWINDOWLEVEL_H_
#define CGWINDOWLEVEL_H_
#include <CoreFoundation/CFAvailability.h>
#include <CoreGraphics/CGBase.h>
#include <stdint.h>
/* Windows may be assigned to a particular level. When assigned to a level,
the window is ordered relative to all other windows in that level.
Windows with a higher level are sorted in front of windows with a lower
level.
A common set of window levels is defined here for use within higher level
frameworks. The levels are accessed via a key and function, so that
levels may be changed or adjusted in future releases without breaking
binary compatability. */
typedef CF_ENUM (int32_t, CGWindowLevelKey) {
kCGBaseWindowLevelKey = 0,
kCGMinimumWindowLevelKey,
kCGDesktopWindowLevelKey,
kCGBackstopMenuLevelKey,
kCGNormalWindowLevelKey,
kCGFloatingWindowLevelKey,
kCGTornOffMenuWindowLevelKey,
kCGDockWindowLevelKey,
kCGMainMenuWindowLevelKey,
kCGStatusWindowLevelKey,
kCGModalPanelWindowLevelKey,
kCGPopUpMenuWindowLevelKey,
kCGDraggingWindowLevelKey,
kCGScreenSaverWindowLevelKey,
kCGMaximumWindowLevelKey,
kCGOverlayWindowLevelKey,
kCGHelpWindowLevelKey,
kCGUtilityWindowLevelKey,
kCGDesktopIconWindowLevelKey,
kCGCursorWindowLevelKey,
kCGAssistiveTechHighWindowLevelKey,
kCGNumberOfWindowLevelKeys /* Must be last. */
};
typedef int32_t CGWindowLevel;
/* Return the window level that corresponds to one of the standard window
types. */
CG_EXTERN CGWindowLevel CGWindowLevelForKey(CGWindowLevelKey key)
CG_AVAILABLE_STARTING(10.0);
/* The number of window levels reserved by Apple for internal use. */
#define kCGNumReservedWindowLevels (16)
#define kCGNumReservedBaseWindowLevels (5)
/* Definitions of older constant values. */
#define kCGBaseWindowLevel ((CGWindowLevel)INT32_MIN)
#define kCGMinimumWindowLevel ((CGWindowLevel)(kCGBaseWindowLevel + kCGNumReservedBaseWindowLevels))
#define kCGMaximumWindowLevel ((CGWindowLevel)(INT32_MAX - kCGNumReservedWindowLevels))
#define kCGDesktopWindowLevel ((CGWindowLevel)(kCGMinimumWindowLevel + 20))
#define kCGDesktopIconWindowLevel ((CGWindowLevel)(kCGDesktopWindowLevel + 20))
#define kCGBackstopMenuLevel ((CGWindowLevel)-20)
#define kCGNormalWindowLevel ((CGWindowLevel)0)
#define kCGFloatingWindowLevel ((CGWindowLevel)3)
#define kCGTornOffMenuWindowLevel ((CGWindowLevel)3)
#define kCGModalPanelWindowLevel ((CGWindowLevel)8)
#define kCGUtilityWindowLevel ((CGWindowLevel)19)
#define kCGDockWindowLevel ((CGWindowLevel)20)
#define kCGMainMenuWindowLevel ((CGWindowLevel)24)
#define kCGStatusWindowLevel ((CGWindowLevel)25)
#define kCGPopUpMenuWindowLevel ((CGWindowLevel)101)
#define kCGOverlayWindowLevel ((CGWindowLevel)102)
#define kCGHelpWindowLevel ((CGWindowLevel)200)
#define kCGDraggingWindowLevel ((CGWindowLevel)500)
#define kCGScreenSaverWindowLevel ((CGWindowLevel)1000)
#define kCGAssistiveTechHighWindowLevel ((CGWindowLevel)1500)
#define kCGCursorWindowLevel ((CGWindowLevel)(kCGMaximumWindowLevel - 1))
#endif /* CGWINDOWLEVEL_H_ */
|
0 | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/CoreGraphics.framework | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/CoreGraphics.framework/Headers/CGShading.h | /* CoreGraphics - CGShading.h
Copyright (c) 2001-2011 Apple Inc.
All rights reserved. */
#ifndef CGSHADING_H_
#define CGSHADING_H_
#include <CoreFoundation/CFBase.h>
#include <CoreFoundation/CFAvailability.h>
#include <stdint.h>
typedef struct CF_BRIDGED_TYPE(id) CGShading *CGShadingRef;
#include <CoreGraphics/CGBase.h>
#include <CoreGraphics/CGColorSpace.h>
#include <CoreGraphics/CGFunction.h>
#include <CoreGraphics/CGGeometry.h>
#include <CoreFoundation/CFBase.h>
CF_IMPLICIT_BRIDGING_ENABLED
CF_ASSUME_NONNULL_BEGIN
/* Return the CFTypeID for CGShadingRefs. */
CG_EXTERN CFTypeID CGShadingGetTypeID(void)
CG_AVAILABLE_STARTING(10.2, 2.0);
/* Create a shading defining a color blend which varies along a linear axis
between two endpoints and extends indefinitely perpendicular to that
axis. The shading may optionally extend beyond either endpoint by
continuing the boundary colors indefinitely. The color values are
specified in the color space `space'. The starting point of the axis is
`start' and the ending point of the axis is `end', both specified in the
shading's target coordinate space. The shading function, specified by
`function', is a 1-in, N-out function, where N is one more (for alpha)
than the number of color components in the shading's color space. The
input value 0 corresponds to the color at the starting point of the
shading; the input value 1 corresponds to the color at the ending point
of the shading. If `extendStart' is true, then the shading will extend
beyond the starting point of the axis. If `extendEnd' is true, then the
shading will extend beyond the ending point of the axis. */
CG_EXTERN CGShadingRef __nullable CGShadingCreateAxial(
CGColorSpaceRef cg_nullable space, CGPoint start, CGPoint end,
CGFunctionRef cg_nullable function, bool extendStart, bool extendEnd)
CG_AVAILABLE_STARTING(10.2, 2.0);
/* Create a shading defining a color blend which varies between two circles.
The shading may optionally extend beyond either circle by continuing the
boundary colors. The color values are specified in the color space
`space'. The starting circle has radius `startRadius' and is centered at
`start', specified in the shading's target coordinate space. The ending
circle has radius `endRadius' and is centered at `end', specified in the
shading's target coordinate space. The shading function, specified by
`function', is a 1-in, N-out function, where N is one more (for alpha)
than the number of color components in the shading's color space. The
input value 0 corresponds to the color of the starting circle; the input
value 1 corresponds to the color of the ending circle. If `extendStart'
is true, then the shading will extend beyond the starting circle. If
`extendEnd' is true, then the shading will extend beyond the ending
circle. */
CG_EXTERN CGShadingRef __nullable CGShadingCreateRadial(
CGColorSpaceRef cg_nullable space,
CGPoint start, CGFloat startRadius, CGPoint end, CGFloat endRadius,
CGFunctionRef cg_nullable function, bool extendStart, bool extendEnd)
CG_AVAILABLE_STARTING(10.2, 2.0);
/* Equivalent to `CFRetain(shading)', except it doesn't crash (as CFRetain
does) if `shading' is NULL. */
CG_EXTERN CGShadingRef cg_nullable CGShadingRetain(CGShadingRef cg_nullable shading)
CG_AVAILABLE_STARTING(10.2, 2.0);
/* Equivalent to `CFRelease(shading)', except it doesn't crash (as CFRelease
does) if `shading' is NULL. */
CG_EXTERN void CGShadingRelease(CGShadingRef cg_nullable shading)
CG_AVAILABLE_STARTING(10.2, 2.0);
CF_ASSUME_NONNULL_END
CF_IMPLICIT_BRIDGING_DISABLED
#endif /* CGSHADING_H_ */
|
0 | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/CoreGraphics.framework | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/CoreGraphics.framework/Headers/CGGradient.h | /* CoreGraphics - CGGradient.h
Copyright (c) 2006-2011 Apple Inc.
All rights reserved. */
#ifndef CGGRADIENT_H_
#define CGGRADIENT_H_
#include <CoreFoundation/CFBase.h>
#include <CoreFoundation/CFAvailability.h>
#include <stdint.h>
typedef struct CF_BRIDGED_TYPE(id) CGGradient *CGGradientRef;
typedef CF_OPTIONS (uint32_t, CGGradientDrawingOptions) {
kCGGradientDrawsBeforeStartLocation = (1 << 0),
kCGGradientDrawsAfterEndLocation = (1 << 1)
};
#include <CoreGraphics/CGBase.h>
#include <CoreGraphics/CGColorSpace.h>
#include <CoreGraphics/CGContext.h>
CF_IMPLICIT_BRIDGING_ENABLED
CF_ASSUME_NONNULL_BEGIN
/* A CGGradient defines a transition between colors. The transition is
defined over a range from 0 to 1 inclusive. A gradient specifies a color
at location 0, one at location 1, and possibly additional colors assigned
to locations between 0 and 1.
A CGGradient has a color space. When a gradient is created, all colors
specified are converted to that color space, and interpolation of colors
occurs using the components of that color space. See the documentation of
each creation function for more details. */
/* Return the CFTypeID for CGGradients. */
CG_EXTERN CFTypeID CGGradientGetTypeID(void)
CG_AVAILABLE_STARTING(10.5, 2.0);
/* Creates a gradient by pairing the color components provided in
`components' with locations provided in `locations'. If `locations' is
NULL, the first color in `colors' will be at location 0, the last color
in `colors' will be at location 1, and intervening colors will be at
equal intervals in between. Otherwise, each location in `locations'
should be a CGFloat between 0 and 1. Each set of color components should
specify a color in the color space `space' (which may not be a pattern or
indexed color space). The number of locations is specified by `count';
the number of color components is the product of `count' and the number
of color components of `space'. If no color is provided for 0 or 1, the
gradient will use the color provided at the locations closest to 0 and 1
for those values. */
CG_EXTERN CGGradientRef __nullable CGGradientCreateWithColorComponents(
CGColorSpaceRef cg_nullable space, const CGFloat * cg_nullable components,
const CGFloat * __nullable locations, size_t count)
CG_AVAILABLE_STARTING(10.5, 2.0);
/* Creates a gradient by pairing the colors provided in `colors' with the
locations provided in `locations'. `colors' should be a non-empty array
of CGColor objects. The colors may be in any color space other than a
pattern or indexed color space. If `space' is non-NULL, each color will
be converted to that color space and the gradient will drawn in that
space; otherwise, each color will be converted to and drawn in the
"Generic" RGB color space. If `space' is specified, it may not be a
pattern or indexed color space. If `locations' is NULL, the first color
in `colors' will be at location 0, the last color in `colors' will be at
location 1, and intervening colors will be at equal intervals in between.
Otherwise, each location in `locations' should be a CGFloat between 0 and
1; the array of locations should should contain the same number of items
as `colors'. If no color is provided for 0 or 1, the gradient will use
the color provided at the locations closest to 0 and 1 for those
values. */
CG_EXTERN CGGradientRef __nullable CGGradientCreateWithColors(
CGColorSpaceRef __nullable space, CFArrayRef cg_nullable colors,
const CGFloat * __nullable locations)
CG_AVAILABLE_STARTING(10.5, 2.0);
/* Equivalent to `CFRetain' except that it doesn't crash (as `CFRetain'
does) if `gradient' is NULL. */
CG_EXTERN CGGradientRef cg_nullable CGGradientRetain(
CGGradientRef cg_nullable gradient)
CG_AVAILABLE_STARTING(10.5, 2.0);
/* Equivalent to `CFRelease' except that it doesn't crash (as `CFRelease'
does) if `gradient' is NULL. */
CG_EXTERN void CGGradientRelease(CGGradientRef cg_nullable gradient)
CG_AVAILABLE_STARTING(10.5, 2.0);
CF_ASSUME_NONNULL_END
CF_IMPLICIT_BRIDGING_DISABLED
#endif /* CGGRADIENT_H_ */
|
0 | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/CoreGraphics.framework | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/CoreGraphics.framework/Headers/CGColorConversionInfo.h | /* CoreGraphics - CGColorConversionInfo.h
Copyright (c) 2016 Apple Inc.
All rights reserved. */
#ifndef CGCOLORCONVERSIONINFO_H_
#define CGCOLORCONVERSIONINFO_H_
#include <CoreGraphics/CGBase.h>
#include <CoreFoundation/CFAvailability.h>
#include <CoreGraphics/CGColorSpace.h>
typedef const struct CF_BRIDGED_TYPE(id) CGColorConversionInfo* CGColorConversionInfoRef;
CF_IMPLICIT_BRIDGING_ENABLED
CF_ASSUME_NONNULL_BEGIN
CG_EXTERN CFTypeID CGColorConversionInfoGetTypeID(void);
typedef CF_ENUM (uint32_t, CGColorConversionInfoTransformType) {
kCGColorConversionTransformFromSpace = 0,
kCGColorConversionTransformToSpace,
kCGColorConversionTransformApplySpace
};
/* Create CGColorConversionInfoRef for converting color from `src' color space to `dst' color space
* using kCGRenderingIntentDefault rendering intent.
* Requirements: CG color spaces must be calibrated (no Device{Gray,RGB,CMYK}, Indexed or DeviceN are allowed).
*/
CG_EXTERN CGColorConversionInfoRef __nullable CGColorConversionInfoCreate(cg_nullable CGColorSpaceRef src, cg_nullable CGColorSpaceRef dst)
CG_AVAILABLE_STARTING(10.12, 10.0);
CG_EXTERN CGColorConversionInfoRef __nullable CGColorConversionInfoCreateWithOptions(__nonnull CGColorSpaceRef src, __nonnull CGColorSpaceRef dst, CFDictionaryRef __nullable options)
CG_AVAILABLE_STARTING(10.14.6, 13);
/* Create CGColorConversionInfoRef from a list of CG color spaces, transform types and rendering intents.
* ColorSpaces are iterated from first to last. The list of triples:
* {CGColorSpaceRef, CGColorConversionInfoTransformType, CGColorRenderingIntent} must be terminated with NULL
* Requirements: CG color spaces must be calibrated (no Device{Gray,RGB,CMYK}, Indexed or DeviceN are allowed).
*/
CG_EXTERN CGColorConversionInfoRef __nullable CGColorConversionInfoCreateFromList
(CFDictionaryRef __nullable options, cg_nullable CGColorSpaceRef, CGColorConversionInfoTransformType, CGColorRenderingIntent, ...)
CG_AVAILABLE_STARTING(10.12, 10.0);
CG_EXTERN CGColorConversionInfoRef __nullable CGColorConversionInfoCreateFromListWithArguments
(CFDictionaryRef __nullable options, cg_nullable CGColorSpaceRef, CGColorConversionInfoTransformType, CGColorRenderingIntent, va_list)
CG_AVAILABLE_STARTING(10.13, 11.0);
/* CFBooleanRef which can be used as option to create CGColorConversionInfoRef, when Black Point Compensation is desired */
CG_EXTERN const CFStringRef kCGColorConversionBlackPointCompensation CG_AVAILABLE_STARTING(10.12, 10.0);
CG_EXTERN const CFStringRef kCGColorConversionTRCSize CG_AVAILABLE_STARTING(10.13, 11.0);
CF_ASSUME_NONNULL_END
CF_IMPLICIT_BRIDGING_DISABLED
#endif /* CGCOLORCONVERSIONINFO_H_ */
|
0 | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/CoreGraphics.framework | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/CoreGraphics.framework/Headers/CGPSConverter.h | /* CoreGraphics - CGPSConverter.h
Copyright (c) 2003-2013 Apple Inc.
All rights reserved. */
#ifndef CGPSCONVERTER_H_
#define CGPSCONVERTER_H_
#include <CoreFoundation/CFBase.h>
#include <CoreFoundation/CFAvailability.h>
#include <stdint.h>
typedef struct CF_BRIDGED_TYPE(id) CGPSConverter *CGPSConverterRef;
#include <CoreGraphics/CGBase.h>
#include <CoreGraphics/CGDataConsumer.h>
#include <CoreGraphics/CGDataProvider.h>
#include <CoreFoundation/CFDictionary.h>
#include <CoreFoundation/CFString.h>
CF_IMPLICIT_BRIDGING_ENABLED
CF_ASSUME_NONNULL_BEGIN
/* CGPSConverter callbacks.
`version' is the version number of the structure passed in as a parameter
to the converter creation functions. The structure defined below is
version 0.
`beginDocument', if non-NULL, is called at the beginning of the
conversion of the PostScript document.
`endDocument', if non-NULL, is called at the end of conversion of the
PostScript document.
`beginPage', if non-NULL, is called at the start of the conversion of
each page in the PostScript document.
`endPage', if non-NULL, is called at the end of the conversion of each
page in the PostScript document.
`noteProgress', if non-NULL, is called periodically during the conversion
to indicate that conversion is proceeding.
`noteMessage', if non-NULL, is called to pass any messages that might
result during the conversion.
`releaseInfo', if non-NULL, is called when the converter is
deallocated. */
typedef void (*CGPSConverterBeginDocumentCallback)(void * __nullable info);
typedef void (*CGPSConverterEndDocumentCallback)(void * __nullable info,
bool success);
typedef void (*CGPSConverterBeginPageCallback)(void * __nullable info,
size_t pageNumber,
CFDictionaryRef pageInfo);
typedef void (*CGPSConverterEndPageCallback)(void * __nullable info,
size_t pageNumber,
CFDictionaryRef pageInfo);
typedef void (*CGPSConverterProgressCallback)(void * __nullable info);
typedef void (*CGPSConverterMessageCallback)(void * __nullable info,
CFStringRef message);
typedef void (*CGPSConverterReleaseInfoCallback)(void * __nullable info);
struct CGPSConverterCallbacks {
unsigned int version;
CGPSConverterBeginDocumentCallback __nullable beginDocument;
CGPSConverterEndDocumentCallback __nullable endDocument;
CGPSConverterBeginPageCallback __nullable beginPage;
CGPSConverterEndPageCallback __nullable endPage;
CGPSConverterProgressCallback __nullable noteProgress;
CGPSConverterMessageCallback __nullable noteMessage;
CGPSConverterReleaseInfoCallback __nullable releaseInfo;
};
typedef struct CGPSConverterCallbacks CGPSConverterCallbacks;
/* Create a CGPSConverter, using `callbacks' to populate its callback table.
Each callback will be supplied the `info' value when called. */
CG_EXTERN CGPSConverterRef __nullable CGPSConverterCreate(void * __nullable info,
const CGPSConverterCallbacks * callbacks,
CFDictionaryRef __nullable options)
CG_AVAILABLE_STARTING(10.3);
/* Use `converter' to convert PostScript data to PDF data. The PostScript
data is supplied by `provider'; the resulting PDF is written to
`consumer'. Returns true if the conversion succeeded; false otherwise. */
CG_EXTERN bool CGPSConverterConvert(CGPSConverterRef converter,
CGDataProviderRef provider, CGDataConsumerRef consumer,
CFDictionaryRef __nullable options)
CG_AVAILABLE_STARTING(10.3);
/* Tell the `converter' to abort conversion at the next possible
opportunity. */
CG_EXTERN bool CGPSConverterAbort(CGPSConverterRef converter)
CG_AVAILABLE_STARTING(10.3);
/* Return true if `converter' is currently converting data. */
CG_EXTERN bool CGPSConverterIsConverting(CGPSConverterRef converter)
CG_AVAILABLE_STARTING(10.3);
/* Return the CFTypeID of the CGPSConverter class. */
CG_EXTERN CFTypeID CGPSConverterGetTypeID(void)
CG_AVAILABLE_STARTING(10.3);
CF_ASSUME_NONNULL_END
CF_IMPLICIT_BRIDGING_DISABLED
#endif /* CGPSCONVERTER_H_ */
|
0 | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/CoreGraphics.framework | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/CoreGraphics.framework/Headers/CGDisplayStream.h | /* CoreGraphics - CGDisplayStream.h
Copyright (c) 2011-2013 Apple Inc.
All rights reserved. */
#ifndef CGDISPLAYSTREAM_H_
#define CGDISPLAYSTREAM_H_
#include <CoreFoundation/CoreFoundation.h>
#include <CoreFoundation/CFAvailability.h>
#include <stdint.h>
#include <dispatch/dispatch.h>
#include <CoreGraphics/CGDirectDisplay.h>
CF_IMPLICIT_BRIDGING_ENABLED
CF_ASSUME_NONNULL_BEGIN
#ifdef __BLOCKS__
/*!
@typedef CGDisplayStreamRef
@abstract An opaque reference to a CGDisplayStream object
@discussion A CGDisplayStream provides a streaming API for capturing display updates in a realtime manner. It can also provide
scaling and color space conversion services, as well as allow capturing sub regions of the display. Callbacks can be targetted
at either a traditional CFRunLoop, or at a dispatch queue.
*/
typedef struct CF_BRIDGED_TYPE(id) CGDisplayStream *CGDisplayStreamRef;
/*!
@typedef CGDisplayStreamUpdateRef
@abstract An opaque reference to a single frame's extra metadata that describes useful frame delta information
@discussion A CGDisplayStreamUpdate encapsulates information about what portions of a frame have changed relative to
a previously delivered frame. This includes regions that were changed in any way, which ones were actually redrawn, and which
regions were merely copied from one place to another. A routine is provided to merge two update refs together in cases
where apps need to coalesce the values because they decided to skip processing for one or more frames.
*/
typedef const struct CF_BRIDGED_TYPE(id) CGDisplayStreamUpdate *CGDisplayStreamUpdateRef;
/*!
@enum CGDisplayStreamUpdateRectType
@abstract Used to select which array of rectangles to be returned by CGDisplayUpdateGetRects
@const kCGDisplayStreamUpdateRefreshedRects The rectangles that were refreshed on the display, not counting moved rectangles
@const kCGDisplayStreamUpdateMovedRects The rectangles that were simply moved from one part of the display to another
@const kCGDisplayStreamUpdateDirtyRects The union of both refreshed and moved rects
@const kCGDisplayStreamUpdateReducedDirtyRects A possibly simplified (but overstated) array of dirty rectangles
*/
typedef CF_ENUM(int32_t, CGDisplayStreamUpdateRectType) {
kCGDisplayStreamUpdateRefreshedRects,
kCGDisplayStreamUpdateMovedRects,
kCGDisplayStreamUpdateDirtyRects,
kCGDisplayStreamUpdateReducedDirtyRects,
};
/*!
@enum CGDisplayStreamFrameStatus
@abstract Provides information about incoming frame updates
@const kCGDisplayStreamFrameStatusFrameComplete A new frame has been generated by the Window Server for a particular display at time displayTime
@const kCGDisplayStreamFrameStatusFrameIdle The Window Server did not generate a new frame for displayTime
@const kCGDisplayStreamFrameStatusFrameBlank As of displayTime, the display has gone blank
@const kCGDisplayStreamFrameStatusStopped The display stream has stopped and no more calls will be made to the handler until the stream is started.
*/
typedef CF_ENUM(int32_t, CGDisplayStreamFrameStatus){
kCGDisplayStreamFrameStatusFrameComplete,
kCGDisplayStreamFrameStatusFrameIdle,
kCGDisplayStreamFrameStatusFrameBlank,
kCGDisplayStreamFrameStatusStopped,
};
/*
@callback CGDisplayStreamFrameAvailableHandler
@abstract The block prototype used for new frame delivery by CGDisplayStream objects
@discussion For each frame that is generated by the WindowServer for a particular display, the user provided block is invoked and provides the user with an IOSurfaceRef
that contains the pixel data for the new frame, as well as a CGDisplayStreamUpdateRef that contains all of the metadata associated with that IOSurface.
@param frameSurface The IOSurfaceRef for the current frame. May be NULL in some cases. If you intend to hold on to the IOSurface beyond the lifetime of
the handler call, you must CFRetain() the IOSurface until you are done with it *and* you must call IOSurfaceIncrementUseCount() to let the CGDisplayStream know
that the frame is not ready for re-use. Once you are finished using the IOSurfaceRef you must then call IOSurfaceDecrementUseCount(). If you are maintaing
any kind of external cache of information about the IOSurface (such as a GL texture object), you must keep a CFRetain() on the IOSurface to prevent it from going
away until you remove it from your cache. You can not depend on the set of IOSurfaces being used by the display stream as being static, so you should implement
some kind of age-out behavior for your cache for IOSurfaces that have not been re-used in a while.
@param displayTime The mach_absolute_time() of when the corresponding frame was to be displayed by the WindowServer
@param updateRef The CGDisplayStreamUpdateRef for the current frame. Note: If you want to keep the CGDisplayStreamUpdateRef around beyond the lifetime
of the handler, you must CFRetain() it, as it will be CFRelease()'d by the CGDisplayStream after the handler returns. The updateRef will be NULL in cases
when status is not kCGDisplayStreamFrameStatusFrameComplete.
*/
typedef void (^CGDisplayStreamFrameAvailableHandler)(CGDisplayStreamFrameStatus status, uint64_t displayTime,
IOSurfaceRef __nullable frameSurface,
CGDisplayStreamUpdateRef __nullable updateRef);
/*!
@function CGDisplayStreamUpdateGetTypeID
@abstract Returns the CF "class" ID for CGDisplayStreamUpdate
@result The CFTypeID of the CGDisplayStreamUpdate class.
*/
CG_EXTERN CFTypeID CGDisplayStreamUpdateGetTypeID(void)
CG_AVAILABLE_STARTING(10.8);
/*!
@function CGDisplayStreamUpdateGetRects
@abstract Returns a pointer to an array of CGRect structs that describe what parts of the frame have changed relative
to the previously delivered frame. This rectangle list encapsulates both the update rectangles and movement rectangles.
@param updateRef The CGDisplayStreamUpdateRef
@param rectCount A pointer to where the count of the number of rectangles in the array is to be returned. Must not be NULL.
@result A pointer to the array of CGRectangles. This array should not be freed by the caller.
*/
CG_EXTERN const CGRect * __nullable CGDisplayStreamUpdateGetRects(CGDisplayStreamUpdateRef __nullable updateRef,
CGDisplayStreamUpdateRectType rectType, size_t * rectCount)
CG_AVAILABLE_STARTING(10.8);
/*!
@function CGDisplayStreamUpdateCreateMerged
@abstract Merge two CGDisplayUpdateRefs into a new one.
@discussion In cases where the client wishes to drop certain frame updates, this function may be used to merge two
CGDisplayUpdateRefs together. The core bit of functionality here is generating a new set of refresh/move/dirty
rectangle arrays that properly represent the union of the deltas between the two frames. Note that the ordering of
the two refs is important.
@param firstUpdate The first update (in a temporal sense)
@param secondUpdate The second update (in a temporal sense)
@result The new CGDisplayStreamUpdateRef
*/
CG_EXTERN CGDisplayStreamUpdateRef __nullable CGDisplayStreamUpdateCreateMergedUpdate(
CGDisplayStreamUpdateRef __nullable firstUpdate,
CGDisplayStreamUpdateRef __nullable secondUpdate)
CG_AVAILABLE_STARTING(10.8);
/*!
@function CGDisplayStreamUpdateGetMovedRectsDelta
@abstract Return the movement dx and dy values for a single update
@param updateRef The CGDisplayStreamUpdateRef
@param dx A pointer to a CGFloat to store the x component of the movement delta
@param dy A pointer to a CGFloat to store the y component of the movement delta
@discussion The delta values describe the offset from the moved rectangles back to the source location.
*/
CG_EXTERN void CGDisplayStreamUpdateGetMovedRectsDelta(CGDisplayStreamUpdateRef __nullable updateRef,
CGFloat * dx, CGFloat * dy)
CG_AVAILABLE_STARTING(10.8);
/*!
@function CGDisplayStreamGetDropCount
@abstract Return how many frames (if any) have been dropped since the last call to the handler.
@param updateRef The CGDisplayStreamUpdateRef
@result The number of dropped frames
@discussion This call is primarily useful for performance measurement to determine if the client is keeping up with
all WindowServer updates.
*/
CG_EXTERN size_t CGDisplayStreamUpdateGetDropCount(CGDisplayStreamUpdateRef __nullable updateRef)
CG_AVAILABLE_STARTING(10.8);
/* Optional CGDisplayStream Properties */
/*!
@const kCGDisplayStreamSourceRect
@discussion This may be used to request a subregion of the display to be provided as the source of the display stream. Use
CGRectCreateDictionaryRepresentation to convert from a CGRect to the value used here. Note: The coordinate system for the
source rectangle is specified in display logical coordinates and not in pixels, in order to match the normal convention on
HiDPI displays.
*/
CG_EXTERN const CFStringRef kCGDisplayStreamSourceRect CG_AVAILABLE_STARTING(10.8); /* Source rectangle to capture - defaults to entire display */
/*!
@const kCGDisplayStreamDestinationRect
@discussion This may be used to request where within the destination buffer the display updates should be placed. Use
CGRectCreateDictionaryRepresentation to convert from a CGRect to the value used here. Note: The coordinate system for
the destination rectangle is always specified in output pixels to match the fact that the output buffer size is also
specified in terms of pixels.
*/
CG_EXTERN const CFStringRef kCGDisplayStreamDestinationRect CG_AVAILABLE_STARTING(10.8); /* Destination rectangle - defaults to entire buffer */
/*!
@const kCGDisplayStreamPreserveAspectRatio
@discussion Enable/disable the work the Window Server will do to preserve the display aspect ratio. By default the Window Server will
assume that it should preserve the original aspect ratio of the source display rect. If the aspect ratio of the source display and
the display stream destination rect are not the same, black borders will be inserted at the top/bottom or right/left sides of the destination
in order to preserve the source aspect ratio.
*/
CG_EXTERN const CFStringRef kCGDisplayStreamPreserveAspectRatio CG_AVAILABLE_STARTING(10.8); /* CFBoolean - defaults to true */
/*!
@const kCGDisplayStreamColorSpace
@discussion Set the desired CGColorSpace of the output frames. By default the color space will be that of the display.
*/
CG_EXTERN const CFStringRef kCGDisplayStreamColorSpace CG_AVAILABLE_STARTING(10.8); /* Desired output color space (CGColorSpaceRef) - defaults to display color space */
/*!
@const kCGDisplayStreamMinimumFrameTime
@discussion Request that the delta between frame updates be at least as much specified by this value.
*/
CG_EXTERN const CFStringRef kCGDisplayStreamMinimumFrameTime CG_AVAILABLE_STARTING(10.8); /* CFNumber in seconds, defaults to zero. */
/*!
@const kCGDisplayStreamShowCursor
@discussion Controls whether the cursor is embedded within the provided buffers or not.
*/
CG_EXTERN const CFStringRef kCGDisplayStreamShowCursor CG_AVAILABLE_STARTING(10.8); /* CFBoolean - defaults to false */
/*!
@const kCGDisplayStreamQueueDepth
@discussion Controls how many frames deep the frame queue will be. Defaults to N.
*/
CG_EXTERN const CFStringRef kCGDisplayStreamQueueDepth CG_AVAILABLE_STARTING(10.8); /* Queue depth in frames. Defaults to 3. */
/*!
@const kCGDisplayStreamYCbCrMatrix
@discussion When outputting frames in 420v or 420f format, this key may be used to control which YCbCr matrix is used
The value should be one of the three kCGDisplayStreamYCbCrMatrix values specified below.
*/
CG_EXTERN const CFStringRef kCGDisplayStreamYCbCrMatrix CG_AVAILABLE_STARTING(10.8);
/* Supported YCbCr matrices. Note that these strings have identical values to the equivalent CoreVideo strings. */
CG_EXTERN const CFStringRef kCGDisplayStreamYCbCrMatrix_ITU_R_709_2 CG_AVAILABLE_STARTING(10.8);
CG_EXTERN const CFStringRef kCGDisplayStreamYCbCrMatrix_ITU_R_601_4 CG_AVAILABLE_STARTING(10.8);
CG_EXTERN const CFStringRef kCGDisplayStreamYCbCrMatrix_SMPTE_240M_1995 CG_AVAILABLE_STARTING(10.8);
/*!
@function CGDisplayStreamGetTypeID
@abstract Returns the CF "class" ID for CGDisplayStream
@result The CFTypeID of the CGDisplayStream class.
*/
CG_EXTERN CFTypeID CGDisplayStreamGetTypeID(void)
CG_AVAILABLE_STARTING(10.8);
/*!
@function CGDisplayStreamCreate
@abstract Creates a new CGDisplayStream intended to be used with a CFRunLoop
@discussion This function creates a new CGDisplayStream that is to be used to get a stream of frame updates
from a particular display.
@param display The CGDirectDisplayID to use as the source for generated frames
@param outputWidth The output width (in pixels, not points) of the frames to be generated. Must not be zero.
@param outputHeight The output height (in pixels, not points) of the frames to be generated. Must not be zero.
@param pixelFormat The desired CoreVideo/CoreMedia-style pixel format of the output IOSurfaces. The currently
supported values are:
'BGRA' Packed Little Endian ARGB8888
'l10r' Packed Little Endian ARGB2101010
'420v' 2-plane "video" range YCbCr 4:2:0
'420f' 2-plane "full" range YCbCr 4:2:0
@param properties Any optional properties of the CGDisplayStream
@param handler A block that will be called for frame deliver.
@result The new CGDisplayStream object.
*/
CG_EXTERN CGDisplayStreamRef __nullable CGDisplayStreamCreate(CGDirectDisplayID display,
size_t outputWidth, size_t outputHeight, int32_t pixelFormat, CFDictionaryRef __nullable properties,
CGDisplayStreamFrameAvailableHandler __nullable handler)
CG_AVAILABLE_STARTING(10.8);
/*!
@function CGDisplayStreamCreateWithDispatchQueue
@abstract Creates a new CGDisplayStream intended to be serviced by a block handler
@discussion This function creates a new CGDisplayStream that is to be used to get a stream of frame updates
from a particular display.
@param display The CGDirectDisplayID to use as the source for generated frames
@param outputWidth The output width (in pixels, not points) of the frames to be generated. Must not be zero.
@param outputHeight The output height (in pixels, not points) of the frames to be generated. Must not be zero.
@param pixelFormat The desired CoreVideo/CoreMedia-style pixel format of the output IOSurfaces
@param properties Any optional properties of the CGDisplayStream
@param queue The dispatch_queue_t that will be used to invoke the callback handler.
@param handler A block that will be called for frame deliver.
@result The new CGDisplayStream object.
*/
CG_EXTERN CGDisplayStreamRef __nullable CGDisplayStreamCreateWithDispatchQueue(CGDirectDisplayID display,
size_t outputWidth, size_t outputHeight, int32_t pixelFormat, CFDictionaryRef __nullable properties,
dispatch_queue_t queue, CGDisplayStreamFrameAvailableHandler __nullable handler)
CG_AVAILABLE_STARTING(10.8);
/*!
@function CGDisplayStreamStart
@abstract Begin delivering frame updates to the handler block.
@param displayStream to be started
@result kCGErrorSuccess If the display stream was started, otherwise an error.
*/
CG_EXTERN CGError CGDisplayStreamStart(CGDisplayStreamRef cg_nullable displayStream)
CG_AVAILABLE_STARTING(10.8);
/*!
@function CGDisplayStreamStop
@abstract End delivery of frame updates to the handler block.
@param displayStream to be stopped
@result kCGErrorSuccess If the display stream was stopped, otherwise an error.
@discussion After this call returns, the CGDisplayStream callback function will eventually be called with a
status of kCGDisplayStreamFrameStatusStopped. After that point it is safe to release the CGDisplayStream.
It is safe to call this function from within the handler block, but the previous caveat still applies.
*/
CG_EXTERN CGError CGDisplayStreamStop(CGDisplayStreamRef cg_nullable displayStream)
CG_AVAILABLE_STARTING(10.8);
/*!
@function CGDisplayStreamGetRunLoopSource
@abstract Return the singleton CFRunLoopSourceRef for a CGDisplayStream.
@param displayStream The CGDisplayStream object
@result The CFRunLoopSource for this displayStream. Note: This function will return NULL if the
display stream was created via CGDisplayStreamCreateWithDispatchQueue().
*/
CG_EXTERN CFRunLoopSourceRef __nullable CGDisplayStreamGetRunLoopSource(CGDisplayStreamRef cg_nullable displayStream)
CG_AVAILABLE_STARTING(10.8);
#endif /* __BLOCKS__ */
CF_ASSUME_NONNULL_END
CF_IMPLICIT_BRIDGING_DISABLED
#endif /* CGDISPLAYSTREAM_H_ */
|
0 | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/CoreGraphics.framework | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/CoreGraphics.framework/Headers/CGDataProvider.h | /* CoreGraphics - CGDataProvider.h
Copyright (c) 1999-2011 Apple Inc.
All rights reserved. */
#ifndef CGDATAPROVIDER_H_
#define CGDATAPROVIDER_H_
#include <CoreFoundation/CFBase.h>
#include <CoreFoundation/CFAvailability.h>
#include <stdint.h>
typedef struct CF_BRIDGED_TYPE(id) CGDataProvider *CGDataProviderRef;
#include <CoreGraphics/CGBase.h>
#include <CoreFoundation/CFURL.h>
#include <sys/types.h>
CF_IMPLICIT_BRIDGING_ENABLED
CF_ASSUME_NONNULL_BEGIN
/* This callback is called to copy `count' bytes from the sequential data
stream to `buffer'. */
typedef size_t (*CGDataProviderGetBytesCallback)(void * __nullable info,
void * buffer, size_t count);
/* This callback is called to skip `count' bytes forward in the sequential
data stream. It should return the number of bytes that were actually
skipped. */
typedef off_t (*CGDataProviderSkipForwardCallback)(void * __nullable info,
off_t count);
/* This callback is called to rewind to the beginning of sequential data
stream. */
typedef void (*CGDataProviderRewindCallback)(void * __nullable info);
/* This callback is called to release the `info' pointer when the data
provider is freed. */
typedef void (*CGDataProviderReleaseInfoCallback)(void * __nullable info);
/* Callbacks for sequentially accessing data.
`version' is the version of this structure. It should be set to 0.
`getBytes' is called to copy `count' bytes from the sequential data
stream to `buffer'. It should return the number of bytes copied, or 0
if there's no more data.
`skipForward' is called to skip ahead in the sequential data stream by
`count' bytes.
`rewind' is called to rewind the sequential data stream to the beginning
of the data.
`releaseInfo', if non-NULL, is called to release the `info' pointer when
the provider is freed. */
struct CGDataProviderSequentialCallbacks {
unsigned int version;
CGDataProviderGetBytesCallback __nullable getBytes;
CGDataProviderSkipForwardCallback __nullable skipForward;
CGDataProviderRewindCallback __nullable rewind;
CGDataProviderReleaseInfoCallback __nullable releaseInfo;
};
typedef struct CGDataProviderSequentialCallbacks
CGDataProviderSequentialCallbacks;
/* This callback is called to get a pointer to the entire block of data. */
typedef const void * __nullable(*CGDataProviderGetBytePointerCallback)(
void * __nullable info);
/* This callback is called to release the pointer to entire block of
data. */
typedef void (*CGDataProviderReleaseBytePointerCallback)(
void * __nullable info, const void * pointer);
/* This callback is called to copy `count' bytes at byte offset `position'
into `buffer'. */
typedef size_t (*CGDataProviderGetBytesAtPositionCallback)(
void * __nullable info, void * buffer, off_t pos, size_t cnt);
/* Callbacks for directly accessing data.
`version' is the version of this structure. It should be set to 0.
`getBytePointer', if non-NULL, is called to return a pointer to the
provider's entire block of data. This callback may be called multiple
times in proper sequence with `releaseBytePointer'. Data block does not
need to be available until this callback is invoked.
`releaseBytePointer', if non-NULL, is called to release a pointer to the
provider's entire block of data. This callback may be called multiple
times in proper sequence with `getBytePointer'. If possible, data should
be purged with this callback and refilled with `getBytePointer'.
`getBytesAtPosition', if non-NULL, is called to copy `count' bytes at
offset `position' from the provider's data to `buffer'. It should
return the number of bytes copied, or 0 if there's no more data.
`releaseInfo', if non-NULL, is called to release the `info' pointer when
the provider is freed.
At least one of `getBytePointer' or `getBytesAtPosition' must be
non-NULL.
If both `getBytePointer' are present `getBytesAtPosition', the latter one
may be ignored. */
struct CGDataProviderDirectCallbacks {
unsigned int version;
CGDataProviderGetBytePointerCallback __nullable getBytePointer;
CGDataProviderReleaseBytePointerCallback __nullable releaseBytePointer;
CGDataProviderGetBytesAtPositionCallback __nullable getBytesAtPosition;
CGDataProviderReleaseInfoCallback __nullable releaseInfo;
};
typedef struct CGDataProviderDirectCallbacks CGDataProviderDirectCallbacks;
/* Return the CFTypeID for CGDataProviderRefs. */
CG_EXTERN CFTypeID CGDataProviderGetTypeID(void)
CG_AVAILABLE_STARTING(10.2, 2.0);
/* Create a sequential-access data provider using `callbacks' to provide the
data. `info' is passed to each of the callback functions. */
CG_EXTERN CGDataProviderRef __nullable CGDataProviderCreateSequential(
void * __nullable info,
const CGDataProviderSequentialCallbacks * cg_nullable callbacks)
CG_AVAILABLE_STARTING(10.5, 2.0);
/* Create a direct-access data provider using `callbacks' to supply `size'
bytes of data. `info' is passed to each of the callback functions.
The underlying data must not change for the life of the data provider. */
CG_EXTERN CGDataProviderRef __nullable CGDataProviderCreateDirect(
void * __nullable info, off_t size,
const CGDataProviderDirectCallbacks * cg_nullable callbacks)
CG_AVAILABLE_STARTING(10.5, 2.0);
/* The callback used by `CGDataProviderCreateWithData'. */
typedef void (*CGDataProviderReleaseDataCallback)(void * __nullable info,
const void * data, size_t size);
/* Create a direct-access data provider using `data', an array of `size'
bytes. `releaseData' is called when the data provider is freed, and is
passed `info' as its first argument. */
CG_EXTERN CGDataProviderRef __nullable CGDataProviderCreateWithData(
void * __nullable info, const void * cg_nullable data, size_t size,
CGDataProviderReleaseDataCallback cg_nullable releaseData)
CG_AVAILABLE_STARTING(10.0, 2.0);
/* Create a direct-access data provider which reads from `data'. */
CG_EXTERN CGDataProviderRef __nullable CGDataProviderCreateWithCFData(
CFDataRef cg_nullable data)
CG_AVAILABLE_STARTING(10.4, 2.0);
/* Create a data provider reading from `url'. */
CG_EXTERN CGDataProviderRef __nullable CGDataProviderCreateWithURL(
CFURLRef cg_nullable url)
CG_AVAILABLE_STARTING(10.0, 2.0);
/* Create a data provider reading from `filename'. */
CG_EXTERN CGDataProviderRef __nullable CGDataProviderCreateWithFilename(
const char * cg_nullable filename)
CG_AVAILABLE_STARTING(10.0, 2.0);
/* Equivalent to `CFRetain(provider)', but doesn't crash (as CFRetain does)
if `provider' is NULL. */
CG_EXTERN CGDataProviderRef __nullable CGDataProviderRetain(
CGDataProviderRef cg_nullable provider)
CG_AVAILABLE_STARTING(10.0, 2.0);
/* Equivalent to `CFRelease(provider)', but doesn't crash (as CFRelease
does) if `provider' is NULL. */
CG_EXTERN void CGDataProviderRelease(CGDataProviderRef cg_nullable provider)
CG_AVAILABLE_STARTING(10.0, 2.0);
/* Return a copy of the data specified by provider. Returns NULL if a
complete copy of the data can't be obtained (for example, if the
underlying data is too large to fit in memory). */
CG_EXTERN CFDataRef __nullable CGDataProviderCopyData(
CGDataProviderRef cg_nullable provider)
CG_AVAILABLE_STARTING(10.3, 2.0);
CG_EXTERN void* __nullable CGDataProviderGetInfo(CGDataProviderRef cg_nullable provider)
CG_AVAILABLE_STARTING(10.13, 11.0);
CF_ASSUME_NONNULL_END
CF_IMPLICIT_BRIDGING_DISABLED
#endif /* CGDATAPROVIDER_H_ */
|
0 | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/CoreGraphics.framework | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/CoreGraphics.framework/Modules/module.modulemap | framework module CoreGraphics [extern_c] [system] {
umbrella header "CoreGraphics.h"
export *
module * { export * }
}
|
0 | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/IOSurface.framework/IOSurface.tbd | --- !tapi-tbd
tbd-version: 4
targets: [ x86_64-macos, x86_64-maccatalyst, arm64-macos, arm64-maccatalyst,
arm64e-macos, arm64e-maccatalyst ]
uuids:
- target: x86_64-macos
value: B84E21C0-6ECD-3D5B-900B-D4A9D8E1A420
- target: x86_64-maccatalyst
value: B84E21C0-6ECD-3D5B-900B-D4A9D8E1A420
- target: arm64-macos
value: 00000000-0000-0000-0000-000000000000
- target: arm64-maccatalyst
value: 00000000-0000-0000-0000-000000000000
- target: arm64e-macos
value: A39769AB-0374-365D-8DD2-21502E2BD0C7
- target: arm64e-maccatalyst
value: A39769AB-0374-365D-8DD2-21502E2BD0C7
install-name: '/System/Library/Frameworks/IOSurface.framework/Versions/A/IOSurface'
exports:
- targets: [ x86_64-macos, arm64e-macos, x86_64-maccatalyst, arm64e-maccatalyst,
arm64-macos, arm64-maccatalyst ]
symbols: [ _IOSurfaceAlignProperty, _IOSurfaceAllowsPixelSizeCasting,
_IOSurfaceBindAccel, _IOSurfaceBindAccelOnPlane, _IOSurfaceCopyAllValues,
_IOSurfaceCopyDataValueBytes, _IOSurfaceCopyValue, _IOSurfaceCreate,
_IOSurfaceCreateMachPort, _IOSurfaceCreateMachPortWithOptions,
_IOSurfaceCreateWiringAssertion, _IOSurfaceCreateXPCObject,
_IOSurfaceDecrementUseCount, _IOSurfaceFlushProcessorCaches,
_IOSurfaceGetAddressFormatOfPlane, _IOSurfaceGetAllocSize,
_IOSurfaceGetBaseAddress, _IOSurfaceGetBaseAddressOfCompressedTileDataRegionOfPlane,
_IOSurfaceGetBaseAddressOfCompressedTileHeaderRegionOfPlane,
_IOSurfaceGetBaseAddressOfPlane, _IOSurfaceGetBitDepthOfComponentOfPlane,
_IOSurfaceGetBitOffsetOfComponentOfPlane, _IOSurfaceGetBulkAttachments,
_IOSurfaceGetBytesPerCompressedTileHeaderOfPlane, _IOSurfaceGetBytesPerElement,
_IOSurfaceGetBytesPerElementOfPlane, _IOSurfaceGetBytesPerRow,
_IOSurfaceGetBytesPerRowOfCompressedTileHeaderGroupsOfPlane,
_IOSurfaceGetBytesPerRowOfPlane, _IOSurfaceGetBytesPerRowOfTileDataOfPlane,
_IOSurfaceGetBytesPerTileDataOfPlane, _IOSurfaceGetCacheMode,
_IOSurfaceGetCompressedTileDataRegionMemoryUsedOfPlane, _IOSurfaceGetCompressedTileHeightOfPlane,
_IOSurfaceGetCompressedTileWidthOfPlane, _IOSurfaceGetCompressionFootprintOfPlane,
_IOSurfaceGetCompressionTypeOfPlane, _IOSurfaceGetDetachModeCode,
_IOSurfaceGetElementHeight, _IOSurfaceGetElementHeightOfPlane,
_IOSurfaceGetElementWidth, _IOSurfaceGetElementWidthOfPlane,
_IOSurfaceGetExtendedPixelsOfPlane, _IOSurfaceGetGraphicsCommPageAddress,
_IOSurfaceGetHTPCPredictionSelectorOfPlane, _IOSurfaceGetHTPCVerticalHeaderGroupingModeOfPlane,
_IOSurfaceGetHeight, _IOSurfaceGetHeightInCompressedTilesOfPlane,
_IOSurfaceGetHeightOfPlane, _IOSurfaceGetHorizontalPixelOffsetWithinCompressedTileArrayOfPlane,
_IOSurfaceGetID, _IOSurfaceGetIndexedTimestamp, _IOSurfaceGetNameOfComponentOfPlane,
_IOSurfaceGetNumberOfComponentsOfPlane, _IOSurfaceGetOffsetOfPlane,
_IOSurfaceGetPixelFormat, _IOSurfaceGetPlaneCount, _IOSurfaceGetPropertyAlignment,
_IOSurfaceGetPropertyMaximum, _IOSurfaceGetProtectionOptions,
_IOSurfaceGetRangeOfComponentOfPlane, _IOSurfaceGetRegistryID,
_IOSurfaceGetSeed, _IOSurfaceGetSeedOfPlane, _IOSurfaceGetSizeOfPlane,
_IOSurfaceGetSubsampling, _IOSurfaceGetTileFormat, _IOSurfaceGetTraceID,
_IOSurfaceGetTypeID, _IOSurfaceGetTypeOfComponentOfPlane,
_IOSurfaceGetUseCount, _IOSurfaceGetVerticalPixelOffsetWithinCompressedTileArrayOfPlane,
_IOSurfaceGetWidth, _IOSurfaceGetWidthInCompressedTilesOfPlane,
_IOSurfaceGetWidthOfPlane, _IOSurfaceGetYCbCrMatrix, _IOSurfaceIncrementUseCount,
_IOSurfaceInitDetachModeCode, _IOSurfaceIsDisplayable, _IOSurfaceIsInUse,
_IOSurfaceIsSysMemOnly, _IOSurfaceIsTiled, _IOSurfaceLock,
_IOSurfaceLockPlane, _IOSurfaceLog, _IOSurfaceLookup, _IOSurfaceLookupFromMachPort,
_IOSurfaceLookupFromXPCObject, _IOSurfaceNeedsBindAccel, _IOSurfaceNeedsBindAccelOnPlane,
_IOSurfaceNotifierCreate, _IOSurfaceNotifierGetMachPort, _IOSurfaceNotifierGetRunLoopSource,
_IOSurfaceNotifierGetTypeID, _IOSurfaceNotifierInvalidate,
_IOSurfaceNotifierSetDispatchQueue, _IOSurfacePrefetchPages,
_IOSurfacePropertyAllocSizeKey, _IOSurfacePropertyKeyAllocSize,
_IOSurfacePropertyKeyBytesPerElement, _IOSurfacePropertyKeyBytesPerRow,
_IOSurfacePropertyKeyCacheMode, _IOSurfacePropertyKeyElementHeight,
_IOSurfacePropertyKeyElementWidth, _IOSurfacePropertyKeyHeight,
_IOSurfacePropertyKeyOffset, _IOSurfacePropertyKeyPixelFormat,
_IOSurfacePropertyKeyPixelSizeCastingAllowed, _IOSurfacePropertyKeyPlaneBase,
_IOSurfacePropertyKeyPlaneBytesPerElement, _IOSurfacePropertyKeyPlaneBytesPerRow,
_IOSurfacePropertyKeyPlaneElementHeight, _IOSurfacePropertyKeyPlaneElementWidth,
_IOSurfacePropertyKeyPlaneHeight, _IOSurfacePropertyKeyPlaneInfo,
_IOSurfacePropertyKeyPlaneOffset, _IOSurfacePropertyKeyPlaneSize,
_IOSurfacePropertyKeyPlaneWidth, _IOSurfacePropertyKeyProtectionOptions,
_IOSurfacePropertyKeyWidth, _IOSurfaceRemoteServerOptionDebugLogBlock,
_IOSurfaceRemoteServerOptionDebugLogQueue, _IOSurfaceRemoveAllValues,
_IOSurfaceRemoveValue, _IOSurfaceSetBulkAttachments, _IOSurfaceSetBulkAttachments2,
_IOSurfaceSetCompressedTileDataRegionMemoryUsedOfPlane, _IOSurfaceSetDetachModeCode,
_IOSurfaceSetIndexedTimestamp, _IOSurfaceSetOwnership, _IOSurfaceSetOwnershipIdentity,
_IOSurfaceSetPurgeable, _IOSurfaceSetTiled, _IOSurfaceSetTimestamp,
_IOSurfaceSetValue, _IOSurfaceSetValues, _IOSurfaceSetYCbCrMatrix,
_IOSurfaceSharedEventAddEventListener, _IOSurfaceSharedEventAddListener,
_IOSurfaceSharedEventNotifyEventListener, _IOSurfaceSharedEventNotifyListener,
_IOSurfaceSharedEventRemoveEventListener, _IOSurfaceSharedEventRemoveListener,
_IOSurfaceSignalEvent, _IOSurfaceSupportsProtectionOptions,
_IOSurfaceUnlock, _IOSurfaceUnlockPlane, _IOSurfaceWiringAssertionGetTypeID,
_IOSurfaceWrapClientImage, _IOSurfaceWrapClientMemory, _kIOFenceAllowTearing,
_kIOSurfaceAddressFormat, _kIOSurfaceAllocSize, _kIOSurfaceAllocateFromSuperbuffer,
_kIOSurfaceBufferTileFormat, _kIOSurfaceBufferTileMode, _kIOSurfaceBytesPerElement,
_kIOSurfaceBytesPerRow, _kIOSurfaceCacheMode, _kIOSurfaceChromaLocationBottomField,
_kIOSurfaceChromaLocationTopField, _kIOSurfaceChromaLocation_Bottom,
_kIOSurfaceChromaLocation_BottomLeft, _kIOSurfaceChromaLocation_Center,
_kIOSurfaceChromaLocation_DV420, _kIOSurfaceChromaLocation_Left,
_kIOSurfaceChromaLocation_Top, _kIOSurfaceChromaLocation_TopLeft,
_kIOSurfaceChromaSubsampling, _kIOSurfaceChromaSubsampling_411,
_kIOSurfaceChromaSubsampling_420, _kIOSurfaceChromaSubsampling_422,
_kIOSurfaceClassName, _kIOSurfaceCleanAperture, _kIOSurfaceCleanApertureHeight,
_kIOSurfaceCleanApertureHorizontalOffset, _kIOSurfaceCleanApertureVerticalOffset,
_kIOSurfaceCleanApertureWidth, _kIOSurfaceClientAddress, _kIOSurfaceClientAddressOffset,
_kIOSurfaceClientAddressRanges, _kIOSurfaceClientDirection,
_kIOSurfaceColorPrimaries, _kIOSurfaceColorPrimaries_DCI_P3,
_kIOSurfaceColorPrimaries_EBU_3213, _kIOSurfaceColorPrimaries_ITU_R_2020,
_kIOSurfaceColorPrimaries_ITU_R_709_2, _kIOSurfaceColorPrimaries_JEDEC_P22,
_kIOSurfaceColorPrimaries_P3_D65, _kIOSurfaceColorPrimaries_SMPTE_C,
_kIOSurfaceColorSpace, _kIOSurfaceCoreSurfaceLegacy, _kIOSurfaceCreationProperties,
_kIOSurfaceDecoderTimes, _kIOSurfaceDisplayDitherCbThresholds,
_kIOSurfaceDisplayDitherCrThresholds, _kIOSurfaceDisplayDitherThresholds,
_kIOSurfaceDisplayDitherYThresholds, _kIOSurfaceDisplayTimes,
_kIOSurfaceEDRFactor, _kIOSurfaceElementHeight, _kIOSurfaceElementWidth,
_kIOSurfaceEncoderTimes, _kIOSurfaceFieldCount, _kIOSurfaceFieldDetail,
_kIOSurfaceFieldDetail_SpatialFirstLineEarly, _kIOSurfaceFieldDetail_SpatialFirstLineLate,
_kIOSurfaceFieldDetail_TemporalBottomFirst, _kIOSurfaceFieldDetail_TemporalTopFirst,
_kIOSurfaceGPUTimes, _kIOSurfaceGammaLevel, _kIOSurfaceHDRImageStatisticsInfoFiltered,
_kIOSurfaceHDRImageStatisticsInfoRaw, _kIOSurfaceHDRImageStatisticsInfoTransferFunction,
_kIOSurfaceHDRImageStatisticsInfo_Average, _kIOSurfaceHDRImageStatisticsInfo_Maximum,
_kIOSurfaceHDRImageStatisticsInfo_Minimum, _kIOSurfaceHeight,
_kIOSurfaceICCProfile, _kIOSurfaceIsDisplayable, _kIOSurfaceIsGlobal,
_kIOSurfaceIsPrivate, _kIOSurfaceMapCacheAttribute, _kIOSurfaceMemoryRegion,
_kIOSurfaceName, _kIOSurfaceNonPurgeable, _kIOSurfaceOffset,
_kIOSurfacePixelAspectRatio, _kIOSurfacePixelAspectRatioHorizontalSpacing,
_kIOSurfacePixelAspectRatioVerticalSpacing, _kIOSurfacePixelCastingAllowed,
_kIOSurfacePixelFormat, _kIOSurfacePixelSizeCastingAllowed,
_kIOSurfacePlaneBase, _kIOSurfacePlaneBitsPerElement, _kIOSurfacePlaneBytesPerCompressedTileHeader,
_kIOSurfacePlaneBytesPerElement, _kIOSurfacePlaneBytesPerRow,
_kIOSurfacePlaneBytesPerRowOfCompressedTileHeaderGroups, _kIOSurfacePlaneBytesPerRowOfTileData,
_kIOSurfacePlaneBytesPerTileData, _kIOSurfacePlaneComponentBitDepths,
_kIOSurfacePlaneComponentBitOffsets, _kIOSurfacePlaneComponentNames,
_kIOSurfacePlaneComponentRanges, _kIOSurfacePlaneComponentTypes,
_kIOSurfacePlaneCompressedTileDataRegionOffset, _kIOSurfacePlaneCompressedTileHeaderRegionOffset,
_kIOSurfacePlaneCompressedTileHeight, _kIOSurfacePlaneCompressedTileWidth,
_kIOSurfacePlaneCompressionFootprint, _kIOSurfacePlaneCompressionType,
_kIOSurfacePlaneElementHeight, _kIOSurfacePlaneElementWidth,
_kIOSurfacePlaneExtendedPixelsOnBottom, _kIOSurfacePlaneExtendedPixelsOnLeft,
_kIOSurfacePlaneExtendedPixelsOnRight, _kIOSurfacePlaneExtendedPixelsOnTop,
_kIOSurfacePlaneHTPCPredictionSelector, _kIOSurfacePlaneHTPCVerticalHeaderGroupingMode,
_kIOSurfacePlaneHeight, _kIOSurfacePlaneHeightInCompressedTiles,
_kIOSurfacePlaneHorizontalPixelOffsetWithinCompressedTileArray,
_kIOSurfacePlaneInfo, _kIOSurfacePlaneOffset, _kIOSurfacePlaneSize,
_kIOSurfacePlaneVerticalPixelOffsetWithinCompressedTileArray,
_kIOSurfacePlaneWidth, _kIOSurfacePlaneWidthInCompressedTiles,
_kIOSurfacePreallocPages, _kIOSurfacePrefetchPages, _kIOSurfaceProtectionOptions,
_kIOSurfacePurgeWhenNotInUse, _kIOSurfaceRemoteServiceName,
_kIOSurfaceScalerTimes, _kIOSurfaceSubsampling, _kIOSurfaceSuperbuffer,
_kIOSurfaceSysMemOnly, _kIOSurfaceTimingInfo, _kIOSurfaceTouchEventTimes,
_kIOSurfaceTransferFunction, _kIOSurfaceTransferFunction_ARIB_STD_B67_HLG,
_kIOSurfaceTransferFunction_ITU_R_2100_HLG, _kIOSurfaceTransferFunction_ITU_R_709_2,
_kIOSurfaceTransferFunction_Linear, _kIOSurfaceTransferFunction_SMPTE_240M_1995,
_kIOSurfaceTransferFunction_SMPTE_ST_2084_PQ, _kIOSurfaceTransferFunction_SMPTE_ST_428_1,
_kIOSurfaceTransferFunction_UseGamma, _kIOSurfaceTransferFunction_aYCC,
_kIOSurfaceTransferFunction_sRGB, _kIOSurfaceType, _kIOSurfaceUseReserve,
_kIOSurfaceWidth, _kIOSurfaceYCbCrMatrix, _kIOSurfaceYCbCrMatrix_ITU_R_601_4_String,
_kIOSurfaceYCbCrMatrix_ITU_R_709_2_String, _kIOSurfaceYCbCrMatrix_SMPTE_240M_1995_String ]
objc-classes: [ IOSurface, IOSurfaceDebugDescription, IOSurfaceRemoteServer,
IOSurfaceSharedEvent, IOSurfaceSharedEventListener, IOSurfaceWiringAssertion ]
objc-ivars: [ IOSurfaceSharedEvent._eventPort, IOSurfaceSharedEvent._globalTraceObjectID,
IOSurfaceSharedEventListener._dispatchQueue, IOSurfaceSharedEventListener._notificationPort ]
- targets: [ x86_64-macos, arm64e-macos, arm64-macos ]
symbols: [ _IOSurfaceCopyGPUPolicies, _IOSurfaceCreateChildSurface, _IOSurfaceGetParentID,
_IOSurfaceSetImageOriginAndExtents ]
...
|
0 | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/IOSurface.framework | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/IOSurface.framework/Headers/IOSurfaceRef.h | /*
* IOSurfaceRef.h
* IOSurface
*
* Copyright 2006-2017 Apple Inc. All rights reserved.
*
*/
#ifndef IOSURFACE_REF_H
#define IOSURFACE_REF_H 1
#include <IOSurface/IOSurfaceBase.h>
#include <IOSurface/IOSurfaceTypes.h>
typedef struct CF_BRIDGED_TYPE(id) CF_BRIDGED_MUTABLE_TYPE(IOSurface) __IOSurface *IOSurfaceRef IOSFC_SWIFT_NAME(IOSurfaceRef);
__BEGIN_DECLS
CF_IMPLICIT_BRIDGING_ENABLED
CF_ASSUME_NONNULL_BEGIN
/* The following list of properties are used with the CFDictionary passed to IOSurfaceCreate(). */
/* kIOSurfaceAllocSize - CFNumber of the total allocation size of the buffer including all planes.
Defaults to BufferHeight * BytesPerRow if not specified. Must be specified for
dimensionless buffers. */
extern const CFStringRef kIOSurfaceAllocSize API_AVAILABLE(macos(10.6), ios(11.0), watchos(4.0), tvos(11.0));
/* kIOSurfaceWidth - CFNumber for the width of the IOSurface buffer in pixels. Required for planar IOSurfaces. */
extern const CFStringRef kIOSurfaceWidth API_AVAILABLE(macos(10.6), ios(11.0), watchos(4.0), tvos(11.0));
/* kIOSurfaceHeight - CFNumber for the height of the IOSurface buffer in pixels. Required for planar IOSurfaces. */
extern const CFStringRef kIOSurfaceHeight API_AVAILABLE(macos(10.6), ios(11.0), watchos(4.0), tvos(11.0));
/* kIOSurfaceBytesPerRow - CFNumber for the bytes per row of the buffer. If not specified, IOSurface will first calculate
the number full elements required on each row (by rounding up), multiplied by the bytes per element
for this buffer. That value will then be appropriately aligned. */
extern const CFStringRef kIOSurfaceBytesPerRow API_AVAILABLE(macos(10.6), ios(11.0), watchos(4.0), tvos(11.0));
/* Optional properties for non-planar two dimensional images */
/* kIOSurfaceBytesPerElement - CFNumber for the total number of bytes in an element. Default to 1. */
extern const CFStringRef kIOSurfaceBytesPerElement API_AVAILABLE(macos(10.6), ios(11.0), watchos(4.0), tvos(11.0));
/* kIOSurfaceElementWidth - CFNumber for how many pixels wide each element is. Defaults to 1. */
extern const CFStringRef kIOSurfaceElementWidth API_AVAILABLE(macos(10.6), ios(11.0), watchos(4.0), tvos(11.0));
/* kIOSurfaceElementHeight - CFNumber for how many pixels high each element is. Defaults to 1. */
extern const CFStringRef kIOSurfaceElementHeight API_AVAILABLE(macos(10.6), ios(11.0), watchos(4.0), tvos(11.0));
/* kIOSurfaceOffset - CFNumber for the starting offset into the buffer. Defaults to 0. */
extern const CFStringRef kIOSurfaceOffset API_AVAILABLE(macos(10.6), ios(11.0), watchos(4.0), tvos(11.0));
/* Properties for planar surface buffers */
/* kIOSurfacePlaneInfo - CFArray describing each image plane in the buffer as a CFDictionary. The CFArray must have at least one entry. */
extern const CFStringRef kIOSurfacePlaneInfo API_AVAILABLE(macos(10.6), ios(11.0), watchos(4.0), tvos(11.0));
/* kIOSurfacePlaneWidth - CFNumber for the width of this plane in pixels. Required for image planes. */
extern const CFStringRef kIOSurfacePlaneWidth API_AVAILABLE(macos(10.6), ios(11.0), watchos(4.0), tvos(11.0));
/* kIOSurfacePlaneHeight - CFNumber for the height of this plane in pixels. Required for image planes. */
extern const CFStringRef kIOSurfacePlaneHeight API_AVAILABLE(macos(10.6), ios(11.0), watchos(4.0), tvos(11.0));
/* kIOSurfacePlaneBytesPerRow - CFNumber for the bytes per row of this plane. If not specified, IOSurface will first calculate
the number full elements required on each row (by rounding up), multiplied by the bytes per element
for this plane. That value will then be appropriately aligned. */
extern const CFStringRef kIOSurfacePlaneBytesPerRow API_AVAILABLE(macos(10.6), ios(11.0), watchos(4.0), tvos(11.0));
/* kIOSurfacePlaneOffset - CFNumber for the offset into the buffer for this plane. If not specified then IOSurface
will lay out each plane sequentially based on the previous plane's allocation size. */
extern const CFStringRef kIOSurfacePlaneOffset API_AVAILABLE(macos(10.6), ios(11.0), watchos(4.0), tvos(11.0));
/* kIOSurfacePlaneSize - CFNumber for the total data size of this plane. Defaults to plane height * plane bytes per row if not specified. */
extern const CFStringRef kIOSurfacePlaneSize API_AVAILABLE(macos(10.6), ios(11.0), watchos(4.0), tvos(11.0));
/* Optional properties for planar surface buffers */
/* kIOSurfacePlaneBase - CFNumber for the base offset into the buffer for this plane. Optional, defaults to the plane offset */
extern const CFStringRef kIOSurfacePlaneBase API_AVAILABLE(macos(10.6), ios(11.0), watchos(4.0), tvos(11.0));
/* kIOSurfacePlaneBitsPerElement - CFNumber for the bits per element of this plane. Optional, default is 1.
For use in cases where kIOSurfacePlaneBytesPerElement doesn't allow sufficient precision. */
extern const CFStringRef kIOSurfacePlaneBitsPerElement API_AVAILABLE(macos(10.13), ios(11.0), watchos(4.0), tvos(11.0));
/* kIOSurfacePlaneBytesPerElement - CFNumber for the bytes per element of this plane. Optional, default is 1. */
extern const CFStringRef kIOSurfacePlaneBytesPerElement API_AVAILABLE(macos(10.6), ios(11.0), watchos(4.0), tvos(11.0));
/* kIOSurfacePlaneElementWidth - CFNumber for the element width of this plane. Optional, default is 1. */
extern const CFStringRef kIOSurfacePlaneElementWidth API_AVAILABLE(macos(10.6), ios(11.0), watchos(4.0), tvos(11.0));
/* kIOSurfacePlaneElementHeight - CFNumber for the element height of this plane. Optional, default is 1. */
extern const CFStringRef kIOSurfacePlaneElementHeight API_AVAILABLE(macos(10.6), ios(11.0), watchos(4.0), tvos(11.0));
/* Optional properties global to the entire IOSurface */
/* kIOSurfaceCacheMode - CFNumber for the CPU cache mode to be used for the allocation. Default is kIOMapDefaultCache. */
extern const CFStringRef kIOSurfaceCacheMode API_AVAILABLE(macos(10.6), ios(11.0), watchos(4.0), tvos(11.0));
/* kIOSurfaceIsGlobal - CFBoolean If true, the IOSurface may be looked up by any task in the system by its ID. */
extern const CFStringRef kIOSurfaceIsGlobal API_DEPRECATED("Global surfaces are insecure",macos(10.6,10.11), ios(11.0,11.0), watchos(4.0,4.0), tvos(11.0,11.0));
/* kIOSurfacePixelFormat - CFNumber A 32-bit unsigned integer that stores the traditional Mac OS X buffer format */
extern const CFStringRef kIOSurfacePixelFormat API_AVAILABLE(macos(10.6), ios(11.0), watchos(4.0), tvos(11.0));
/* kIOSurfacePixelSizeCastingAllowed - If false the creator promises that there will be no pixel size casting when used on the GPU. Default is true. */
extern const CFStringRef kIOSurfacePixelSizeCastingAllowed API_AVAILABLE(macos(10.12), ios(11.0), watchos(4.0), tvos(11.0));
/* kIOSurfacePlaneComponentBitDepths - CFArray[CFNumber] for bit depth of each component in this plane. */
extern const CFStringRef kIOSurfacePlaneComponentBitDepths API_AVAILABLE(macos(10.13), ios(11.0), watchos(4.0), tvos(11.0));
/* kIOSurfacePlaneComponentBitOffsets - CFArray[CFNumber] for bit offset of each component in this plane, (low bit zero, high bit 7). For example 'BGRA' would be {0, 8, 16, 24} */
extern const CFStringRef kIOSurfacePlaneComponentBitOffsets API_AVAILABLE(macos(10.13), ios(11.0), watchos(4.0), tvos(11.0));
typedef CF_ENUM(int32_t, IOSurfaceComponentName) {
kIOSurfaceComponentNameUnknown = 0,
kIOSurfaceComponentNameAlpha = 1,
kIOSurfaceComponentNameRed = 2,
kIOSurfaceComponentNameGreen = 3,
kIOSurfaceComponentNameBlue = 4,
kIOSurfaceComponentNameLuma = 5,
kIOSurfaceComponentNameChromaRed = 6,
kIOSurfaceComponentNameChromaBlue = 7,
};
/* kIOSurfacePlaneComponentNames - CFArray[CFNumber] for IOSurfaceComponentName of each component in this plane.
For example 'BGRA' would be {4, 3, 2, 1} */
extern const CFStringRef kIOSurfacePlaneComponentNames API_AVAILABLE(macos(10.13), ios(11.0), watchos(4.0), tvos(11.0));
typedef CF_ENUM(int32_t, IOSurfaceComponentType) {
kIOSurfaceComponentTypeUnknown = 0,
kIOSurfaceComponentTypeUnsignedInteger = 1,
kIOSurfaceComponentTypeSignedInteger = 2,
kIOSurfaceComponentTypeFloat = 3,
kIOSurfaceComponentTypeSignedNormalized = 4,
};
/* kIOSurfacePlaneComponentTypes - CFArray[CFNumber] for IOSurfaceComponentType of each component in this plane. */
extern const CFStringRef kIOSurfacePlaneComponentTypes API_AVAILABLE(macos(10.13), ios(11.0), watchos(4.0), tvos(11.0));
typedef CF_ENUM(int32_t, IOSurfaceComponentRange) {
kIOSurfaceComponentRangeUnknown = 0,
kIOSurfaceComponentRangeFullRange = 1,
kIOSurfaceComponentRangeVideoRange = 2,
kIOSurfaceComponentRangeWideRange = 3,
};
/* kIOSurfacePlaneComponentRanges - CFArray[CFNumber] for IOSurfaceComponentRange of each component in this plane. */
extern const CFStringRef kIOSurfacePlaneComponentRanges API_AVAILABLE(macos(10.13), ios(11.0), watchos(4.0), tvos(11.0));
typedef CF_ENUM(int32_t, IOSurfaceSubsampling) {
kIOSurfaceSubsamplingUnknown = 0,
kIOSurfaceSubsamplingNone = 1, // Includes "4:4:4"
kIOSurfaceSubsampling422 = 2, // Chroma downsampled by 2x1
kIOSurfaceSubsampling420 = 3, // Chroma downsampled by 2x2
kIOSurfaceSubsampling411 = 4, // Chroma downsampled by 4x1
};
/* kIOSurfaceSubsampling - CFNumber(IOSurfaceSubsampling) describing the chroma subsampling. */
extern const CFStringRef kIOSurfaceSubsampling API_AVAILABLE(macos(10.13), ios(11.0), watchos(4.0), tvos(11.0));
CFTypeID IOSurfaceGetTypeID(void)
API_AVAILABLE(macos(10.6), ios(11.0), watchos(4.0), tvos(11.0));
/* Create a brand new IOSurface object */
IOSurfaceRef _Nullable IOSurfaceCreate(CFDictionaryRef properties)
API_AVAILABLE(macos(10.6), ios(11.0), watchos(4.0), tvos(11.0));
/* Perform an atomic lookup and retain of a IOSurface by its IOSurfaceID.
Note: Performing multiple lookups of the same IOSurface will *NOT* return
the same IOSurfaceRef. If you need to compare two IOSurface objects
for equality, you must either do so by comparing their IOSurfaceIDs, or by
using CFEqual(). */
IOSurfaceRef _Nullable IOSurfaceLookup(IOSurfaceID csid) CF_RETURNS_RETAINED
API_AVAILABLE(macos(10.6), ios(11.0), watchos(4.0), tvos(11.0));
/* Retrieve the unique IOSurfaceID value for a IOSurface */
IOSurfaceID IOSurfaceGetID(IOSurfaceRef buffer)
API_AVAILABLE(macos(10.6), ios(11.0), watchos(4.0), tvos(11.0));
/* "Lock" or "Unlock" a IOSurface for reading or writing.
The term "lock" is used loosely in this context, and is simply used along with the
"unlock" information to put a bound on CPU access to the raw IOSurface data.
If the seed parameter is non-NULL, IOSurfaceLock() will store the buffer's
internal modification seed value at the time you made the lock call. You can compare
this value to a value returned previously to determine of the contents of the buffer
has been changed since the last lock.
In the case of IOSurfaceUnlock(), the seed value returned will be the internal
seed value at the time of the unlock. If you locked the buffer for writing, this value
will be incremented as the unlock is performed and the new value will be returned.
See the kIOSurfaceLock enums for more information.
Note: Locking and unlocking a IOSurface is not a particularly cheap operation,
so care should be taken to avoid the calls whenever possible. The seed values are
particularly useful for keeping a cache of the buffer contents.
*/
kern_return_t IOSurfaceLock(IOSurfaceRef buffer, IOSurfaceLockOptions options, uint32_t * _Nullable seed)
API_AVAILABLE(macos(10.6), ios(11.0), watchos(4.0), tvos(11.0));
kern_return_t IOSurfaceUnlock(IOSurfaceRef buffer, IOSurfaceLockOptions options, uint32_t * _Nullable seed)
API_AVAILABLE(macos(10.6), ios(11.0), watchos(4.0), tvos(11.0));
/* These routines are all fairly self explanatory. 0 is returned if buffer is invalid or NULL */
size_t IOSurfaceGetAllocSize(IOSurfaceRef buffer)
API_AVAILABLE(macos(10.6), ios(11.0), watchos(4.0), tvos(11.0));
size_t IOSurfaceGetWidth(IOSurfaceRef buffer)
API_AVAILABLE(macos(10.6), ios(11.0), watchos(4.0), tvos(11.0));
size_t IOSurfaceGetHeight(IOSurfaceRef buffer)
API_AVAILABLE(macos(10.6), ios(11.0), watchos(4.0), tvos(11.0));
size_t IOSurfaceGetBytesPerElement(IOSurfaceRef buffer)
API_AVAILABLE(macos(10.6), ios(11.0), watchos(4.0), tvos(11.0));
size_t IOSurfaceGetBytesPerRow(IOSurfaceRef buffer)
API_AVAILABLE(macos(10.6), ios(11.0), watchos(4.0), tvos(11.0));
void *IOSurfaceGetBaseAddress(IOSurfaceRef buffer)
API_AVAILABLE(macos(10.6), ios(11.0), watchos(4.0), tvos(11.0));
size_t IOSurfaceGetElementWidth(IOSurfaceRef buffer)
API_AVAILABLE(macos(10.6), ios(11.0), watchos(4.0), tvos(11.0));
size_t IOSurfaceGetElementHeight(IOSurfaceRef buffer)
API_AVAILABLE(macos(10.6), ios(11.0), watchos(4.0), tvos(11.0));
OSType IOSurfaceGetPixelFormat(IOSurfaceRef buffer)
API_AVAILABLE(macos(10.6), ios(11.0), watchos(4.0), tvos(11.0));
/* This will return the current seed value of the buffer and is a cheap call to make to see
if the contents of the buffer have changed since the last lock/unlock. */
uint32_t IOSurfaceGetSeed(IOSurfaceRef buffer)
API_AVAILABLE(macos(10.6), ios(11.0), watchos(4.0), tvos(11.0));
/* Return the number of planes in this buffer. May be 0. Returns 0 for an invalid or NULL buffer pointer. */
size_t IOSurfaceGetPlaneCount(IOSurfaceRef buffer)
API_AVAILABLE(macos(10.6), ios(11.0), watchos(4.0), tvos(11.0));
/* These routines return information about a particular plane of a IOSurface.
If the planeIndex is greater than or equal to the plane count of the IOSurface, zero
is returned.... with one exception. If this IOSurface has zero planes and a planeIndex
of zero is passed in, the routines function just like the non-planar APIs. This is to allow
higher level code to treat planar and non-planar buffers is a more uniform fashion. */
size_t IOSurfaceGetWidthOfPlane(IOSurfaceRef buffer, size_t planeIndex)
API_AVAILABLE(macos(10.6), ios(11.0), watchos(4.0), tvos(11.0));
size_t IOSurfaceGetHeightOfPlane(IOSurfaceRef buffer, size_t planeIndex)
API_AVAILABLE(macos(10.6), ios(11.0), watchos(4.0), tvos(11.0));
size_t IOSurfaceGetBytesPerElementOfPlane(IOSurfaceRef buffer, size_t planeIndex)
API_AVAILABLE(macos(10.6), ios(11.0), watchos(4.0), tvos(11.0));
size_t IOSurfaceGetBytesPerRowOfPlane(IOSurfaceRef buffer, size_t planeIndex)
API_AVAILABLE(macos(10.6), ios(11.0), watchos(4.0), tvos(11.0));
void *IOSurfaceGetBaseAddressOfPlane(IOSurfaceRef buffer, size_t planeIndex)
API_AVAILABLE(macos(10.6), ios(11.0), watchos(4.0), tvos(11.0));
size_t IOSurfaceGetElementWidthOfPlane(IOSurfaceRef buffer, size_t planeIndex)
API_AVAILABLE(macos(10.6), ios(11.0), watchos(4.0), tvos(11.0));
size_t IOSurfaceGetElementHeightOfPlane(IOSurfaceRef buffer, size_t planeIndex)
API_AVAILABLE(macos(10.6), ios(11.0), watchos(4.0), tvos(11.0));
/* These routines return information about a particular component of a particular plane of a IOSurface.
For non-planar IOSurfaces, pass zero for planeIndex. */
size_t IOSurfaceGetNumberOfComponentsOfPlane(IOSurfaceRef buffer, size_t planeIndex)
API_AVAILABLE(macos(10.13), ios(11.0), watchos(4.0), tvos(11.0));
IOSurfaceComponentName IOSurfaceGetNameOfComponentOfPlane(IOSurfaceRef buffer, size_t planeIndex, size_t componentIndex)
API_AVAILABLE(macos(10.13), ios(11.0), watchos(4.0), tvos(11.0));
IOSurfaceComponentType IOSurfaceGetTypeOfComponentOfPlane(IOSurfaceRef buffer, size_t planeIndex, size_t componentIndex)
API_AVAILABLE(macos(10.13), ios(11.0), watchos(4.0), tvos(11.0));
IOSurfaceComponentRange IOSurfaceGetRangeOfComponentOfPlane(IOSurfaceRef buffer, size_t planeIndex, size_t componentIndex)
API_AVAILABLE(macos(10.13), ios(11.0), watchos(4.0), tvos(11.0));
size_t IOSurfaceGetBitDepthOfComponentOfPlane(IOSurfaceRef buffer, size_t planeIndex, size_t componentIndex)
API_AVAILABLE(macos(10.13), ios(11.0), watchos(4.0), tvos(11.0));
size_t IOSurfaceGetBitOffsetOfComponentOfPlane(IOSurfaceRef buffer, size_t planeIndex, size_t componentIndex)
API_AVAILABLE(macos(10.13), ios(11.0), watchos(4.0), tvos(11.0));
IOSurfaceSubsampling IOSurfaceGetSubsampling(IOSurfaceRef buffer)
API_AVAILABLE(macos(10.13), ios(11.0), watchos(4.0), tvos(11.0));
/* Common IOSurface keys for well-known IOSurface Values */
/* kIOSurfaceColorSpace defines the RGB (or other) color space for the data stored in the IOSurface. It
is expected that this is a serialized CGColorSpaceRef, provided by the CoreGraphics CGColorSpaceRef
serialization APIs (CGColorSpaceCopyPropertyList). */
extern const CFStringRef kIOSurfaceColorSpace API_AVAILABLE(macos(10.6), ios(11.0), watchos(4.0), tvos(11.0));
/* CFData representation of the ICC Profile, generally via CGColorSpaceCopyICCData */
extern const CFStringRef kIOSurfaceICCProfile API_AVAILABLE(macos(10.6), ios(11.0), watchos(4.0), tvos(11.0));
/* These calls let you attach CF property list types to a IOSurface buffer. These calls are
expensive (they essentially must serialize the data into the kernel) and thus should be avoided whenever
possible. Note: These functions can not be used to change the underlying surface properties. */
void IOSurfaceSetValue(IOSurfaceRef buffer, CFStringRef key, CFTypeRef value)
API_AVAILABLE(macos(10.6), ios(11.0), watchos(4.0), tvos(11.0));
CFTypeRef _Nullable IOSurfaceCopyValue(IOSurfaceRef buffer, CFStringRef key)
API_AVAILABLE(macos(10.6), ios(11.0), watchos(4.0), tvos(11.0));
void IOSurfaceRemoveValue(IOSurfaceRef buffer, CFStringRef key)
API_AVAILABLE(macos(10.6), ios(11.0), watchos(4.0), tvos(11.0));
/* Bulk setters and getters for setting, retrieving or removing the entire
set of values at once .*/
void IOSurfaceSetValues(IOSurfaceRef buffer, CFDictionaryRef keysAndValues)
API_AVAILABLE(macos(10.6), ios(11.0), watchos(4.0), tvos(11.0));
CFDictionaryRef _Nullable IOSurfaceCopyAllValues(IOSurfaceRef buffer)
API_AVAILABLE(macos(10.6), ios(11.0), watchos(4.0), tvos(11.0));
void IOSurfaceRemoveAllValues(IOSurfaceRef buffer)
API_AVAILABLE(macos(10.6), ios(11.0), watchos(4.0), tvos(11.0));
/* This call lets you get a mach_port_t that holds a reference to the IOSurface. This is useful
if you need to atomically or securely pass an IOSurface to another task without making the surface global to
the entire system. The returned port must be deallocated with mach_port_deallocate or the equivalent.
Note: Any live mach ports created from an IOSurfaceRef implicity increase the IOSurface's global use
count by one until the port is deleted. */
mach_port_t IOSurfaceCreateMachPort(IOSurfaceRef buffer)
API_AVAILABLE(macos(10.6), ios(11.0), watchos(4.0), tvos(11.0));
/* This call lets you take a mach_port_t created via IOSurfaceCreatePort() and recreate an IOSurfaceRef from it.
Note: This call does NOT destroy the port. */
IOSurfaceRef _Nullable IOSurfaceLookupFromMachPort(mach_port_t port) CF_RETURNS_RETAINED
API_AVAILABLE(macos(10.6), ios(11.0), watchos(4.0), tvos(11.0));
/*
IOSurfaceGetPropertyMaximum() will return the maximum of a given property that is guaranteed to be
compatible with all of the current devices (GPUs, etc.) in the system. The most important ones being:
kIOSurfaceBytesPerRow
kIOSurfaceWidth
kIOSurfaceHeight
kIOSurfacePlaneBytesPerRow
kIOSurfacePlaneWidth
kIOSurfacePlaneHeight
For the width and height properties, the maximum values are the largest that are guaranteed to work
for both reading and writing. In OpenGL terms this translates into the largest size that will work
for both textures and render targets.
This function returns 0 for properties that have no predefined limit or where the concept of a limit
would be considered invalid (such as kIOSurfacePixelFormat).
*/
size_t IOSurfaceGetPropertyMaximum(CFStringRef property)
API_AVAILABLE(macos(10.6), ios(11.0), watchos(4.0), tvos(11.0));
/*
If a property has a particular alignment requirement, then IOSurfaceGetPropertyAlignment() will return it.
If the property has no alignment requirement then 1 will be returned. The following properties
should always be aligned if you choose calculate them yourself:
kIOSurfaceBytesPerRow
kIOSurfaceOffset
kIOSurfacePlaneBase
kIOSurfacePlaneOffset
kIOSurfacePlaneBytesPerRow
*/
size_t IOSurfaceGetPropertyAlignment(CFStringRef property)
API_AVAILABLE(macos(10.6), ios(11.0), watchos(4.0), tvos(11.0));
/* This is a convenience function to automatically align property values. For properties with no alignment
requirements, the original value will be returned. */
size_t IOSurfaceAlignProperty(CFStringRef property, size_t value)
API_AVAILABLE(macos(10.6), ios(11.0), watchos(4.0), tvos(11.0));
/* There are cases where it is useful to know whether or not an IOSurface buffer is considered to be "in use"
by other users of the same IOSurface. In particular, CoreVideo and other APIs make use of the IOSurface
use count facility to know when it is safe to recycle an IOSurface backed CVPixelBuffer object. This is
particularly important when IOSurface objects are being shared across process boundaries and the normal
mechanisms one might use would not be viable.
The IOSurface use count is similar in concept to any other reference counting scheme. When the global use
count of an IOSurface goes to zero, it is no longer considered "in use". When it is anything other than
zero, then the IOSurface is still "in use" by someone and therefore anyone attempting to maintain a pool
of IOSurfaces to be recycled should not reclaim that IOSurface.
Note that IOSurface maintains both a per-process and an internal system wide usage count. In the current
implementation, when the per-process usage count goes from zero to one, the system wide usage count is
incremented by one. When the per-process usage count drops back to zero (either via explicit decrement
calls or the process terminates), the global usage count is decremented by one.
IOSurfaceGetUseCount() returns the local per-process usage count for an IOSurface. This call is only
provided for logging/debugging purposes and should never be used to determine whether an IOSurface is
considered to be "in use". IOSurfaceIsInUse() is the only call that should be used for that purpose. */
/* Increment the per-process usage count for an IOSurface */
void IOSurfaceIncrementUseCount(IOSurfaceRef buffer)
API_AVAILABLE(macos(10.6), ios(11.0), watchos(4.0), tvos(11.0));
/* Decrement the per-process usage count for an IOSurface */
void IOSurfaceDecrementUseCount(IOSurfaceRef buffer)
API_AVAILABLE(macos(10.6), ios(11.0), watchos(4.0), tvos(11.0));
/* Return the per-process usage count for an IOSurface */
int32_t IOSurfaceGetUseCount(IOSurfaceRef buffer)
API_AVAILABLE(macos(10.6), ios(11.0), watchos(4.0), tvos(11.0));
/* Returns true of an IOSurface is in use by any process in the system, otherwise false. */
Boolean IOSurfaceIsInUse(IOSurfaceRef buffer)
API_AVAILABLE(macos(10.6), ios(11.0), watchos(4.0), tvos(11.0));
/* Rerturns true if this IOSurface allows pixel size casting */
Boolean IOSurfaceAllowsPixelSizeCasting(IOSurfaceRef buffer)
API_AVAILABLE(macos(10.12), ios(11.0), watchos(4.0), tvos(11.0));
// This acts pretty much exactly like the Mach vm_purgeable object stuff does.
// Note: Higher level OpenGL and/or Metal based purgeability APIs should not be used for
// texture objects backed by IOSurfaces since they will essentially be ignored.
// You should assume that if you mark an IOSurface as Purgeable/Empty and mark it
// NonVolatile and it comes back with the old state being Empty that any texture
// objects bound to the IOSurface now have undefined content in them.
//
// If oldState is non-NULL, it will return the previous state of the IOSurface.
//
// kIOSurfacePurgeableNonVolatile - The IOSurface was not volatile and the contents are still valid
// kIOSurfacePurgeableVolatile - The IOSurface was volatile, but the contents were not discarded
// kIOSurfacePurgeableEmpty - The IOSurface was empty and the contents have been discarded.
// kIOSurfacePurgeableKeepCurrent - Don't change the current status, just return what the state is now.
kern_return_t IOSurfaceSetPurgeable(IOSurfaceRef buffer, uint32_t newState, uint32_t * __nullable oldState)
API_AVAILABLE(macos(10.12), ios(11.0), watchos(4.0), tvos(11.0));
__END_DECLS
CF_ASSUME_NONNULL_END
CF_IMPLICIT_BRIDGING_DISABLED
#endif
|
0 | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/IOSurface.framework | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/IOSurface.framework/Headers/IOSurfaceObjC.h | /*
* IOSurfaceObjC.h
* IOSurface Objective C Interface
*
* Copyright 2017 Apple Inc. All rights reserved.
*
*/
#ifndef IOSURFACE_OBJC_H
#define IOSURFACE_OBJC_H 1
#if defined(__OBJC__)
#import <IOSurface/IOSurfaceTypes.h>
#import <Foundation/Foundation.h>
NS_ASSUME_NONNULL_BEGIN
#if !defined(NS_STRING_ENUM)
#define NS_STRING_ENUM
#endif
typedef NSString *IOSurfacePropertyKey NS_STRING_ENUM;
/* The following list of properties are used with the CFDictionary passed to IOSurfaceCreate(). */
/* IOSurfacePropertyKeyAllocSize - NSNumber of the total allocation size of the buffer including all planes.
Defaults to BufferHeight * BytesPerRow if not specified. Must be specified for
dimensionless buffers. */
extern IOSurfacePropertyKey IOSurfacePropertyKeyAllocSize API_AVAILABLE(macos(10.14), ios(12.0), watchos(5.0), tvos(12.0));
/* IOSurfacePropertyKeyWidth - NSNumber for the width of the IOSurface buffer in pixels. Required for planar IOSurfaces. */
extern IOSurfacePropertyKey IOSurfacePropertyKeyWidth API_AVAILABLE(macos(10.12), ios(11.0), watchos(4.0), tvos(11.0));
/* IOSurfacePropertyKeyHeight - NSNumber for the height of the IOSurface buffer in pixels. Required for planar IOSurfaces. */
extern IOSurfacePropertyKey IOSurfacePropertyKeyHeight API_AVAILABLE(macos(10.12), ios(11.0), watchos(4.0), tvos(11.0));
/* IOSurfacePropertyKeyBytesPerRow - NSNumber for the bytes per row of the buffer. If not specified, IOSurface will first calculate
the number full elements required on each row (by rounding up), multiplied by the bytes per element for this surface.
That value will then be appropriately aligned. */
extern IOSurfacePropertyKey IOSurfacePropertyKeyBytesPerRow API_AVAILABLE(macos(10.12), ios(11.0), watchos(4.0), tvos(11.0));
/* Optional properties for non-planar two dimensional images */
/* IOSurfacePropertyKeyBytesPerElement - NSNumber for the total number of bytes in an element. Default to 1. */
extern IOSurfacePropertyKey IOSurfacePropertyKeyBytesPerElement API_AVAILABLE(macos(10.12), ios(11.0), watchos(4.0), tvos(11.0));
/* IOSurfacePropertyKeyElementWidth - NSNumber for how many pixels wide each element is. Defaults to 1. */
extern IOSurfacePropertyKey IOSurfacePropertyKeyElementWidth API_AVAILABLE(macos(10.12), ios(11.0), watchos(4.0), tvos(11.0));
/* IOSurfacePropertyKeyElementHeight - NSNumber for how many pixels high each element is. Defaults to 1. */
extern IOSurfacePropertyKey IOSurfacePropertyKeyElementHeight API_AVAILABLE(macos(10.12), ios(11.0), watchos(4.0), tvos(11.0));
/* IOSurfacePropertyKeyOffset - NSNumber for the starting offset into the buffer. Defaults to 0. */
extern IOSurfacePropertyKey IOSurfacePropertyKeyOffset API_AVAILABLE(macos(10.12), ios(11.0), watchos(4.0), tvos(11.0));
/* Properties for planar surface buffers */
/* IOSurfacePropertyKeyPlaneInfo - NSArray describing each image plane in the buffer as a CFDictionary. The CFArray must have at least one entry. */
extern IOSurfacePropertyKey IOSurfacePropertyKeyPlaneInfo API_AVAILABLE(macos(10.12), ios(11.0), watchos(4.0), tvos(11.0));
/* IOSurfacePropertyKeyPlaneWidth - NSNumber for the width of this plane in pixels. Required for image planes. */
extern IOSurfacePropertyKey IOSurfacePropertyKeyPlaneWidth API_AVAILABLE(macos(10.12), ios(11.0), watchos(4.0), tvos(11.0));
/* IOSurfacePropertyKeyPlaneHeight - NSNumber for the height of this plane in pixels. Required for image planes. */
extern IOSurfacePropertyKey IOSurfacePropertyKeyPlaneHeight API_AVAILABLE(macos(10.12), ios(11.0), watchos(4.0), tvos(11.0));
/* IOSurfacePropertyKeyPlaneBytesPerRow - NSNumber for the bytes per row of this plane. If not specified, IOSurface will first calculate
the number full elements required on each row (by rounding up), multiplied by the bytes per element for this plane.
That value will then be appropriately aligned. */
extern IOSurfacePropertyKey IOSurfacePropertyKeyPlaneBytesPerRow API_AVAILABLE(macos(10.12), ios(11.0), watchos(4.0), tvos(11.0));
/* IOSurfacePropertyKeyPlaneOffset - NSNumber for the offset into the buffer for this plane. If not specified then IOSurface
will lay out each plane sequentially based on the previous plane's allocation size. */
extern IOSurfacePropertyKey IOSurfacePropertyKeyPlaneOffset API_AVAILABLE(macos(10.12), ios(11.0), watchos(4.0), tvos(11.0));
/* IOSurfacePropertyKeyPlaneSize - NSNumber for the total data size of this plane. Defaults to plane height * plane bytes per row if not specified. */
extern IOSurfacePropertyKey IOSurfacePropertyKeyPlaneSize API_AVAILABLE(macos(10.12), ios(11.0), watchos(4.0), tvos(11.0));
/* Optional properties for planar surface buffers */
/* IOSurfacePropertyKeyPlaneBase - NSNumber for the base offset into the buffer for this plane. Optional, defaults to the plane offset */
extern IOSurfacePropertyKey IOSurfacePropertyKeyPlaneBase API_AVAILABLE(macos(10.12), ios(11.0), watchos(4.0), tvos(11.0));
/* IOSurfacePropertyKeyPlaneBytesPerElement - NSNumber for the bytes per element of this plane. Optional, default is 1. */
extern IOSurfacePropertyKey IOSurfacePropertyKeyPlaneBytesPerElement API_AVAILABLE(macos(10.12), ios(11.0), watchos(4.0), tvos(11.0));
/* IOSurfacePropertyKeyPlaneElementWidth - NSNumber for the element width of this plane. Optional, default is 1. */
extern IOSurfacePropertyKey IOSurfacePropertyKeyPlaneElementWidth API_AVAILABLE(macos(10.12), ios(11.0), watchos(4.0), tvos(11.0));
/* IOSurfacePropertyKeyPlaneElementHeight - NSNumber for the element height of this plane. Optional, default is 1. */
extern IOSurfacePropertyKey IOSurfacePropertyKeyPlaneElementHeight API_AVAILABLE(macos(10.12), ios(11.0), watchos(4.0), tvos(11.0));
/* Optional properties global to the entire IOSurface */
/* IOSurfacePropertyKeyCacheMode - NSNumber for the CPU cache mode to be used for the allocation. Default is kIOMapDefaultCache. */
extern IOSurfacePropertyKey IOSurfacePropertyKeyCacheMode API_AVAILABLE(macos(10.12), ios(11.0), watchos(4.0), tvos(11.0));
/* IOSurfacePropertyKeyPixelFormat - NSNumber A 32-bit unsigned integer that stores the traditional Mac OS X buffer format */
extern IOSurfacePropertyKey IOSurfacePropertyKeyPixelFormat API_AVAILABLE(macos(10.12), ios(11.0), watchos(4.0), tvos(11.0));
/* IOSurfacePropertyKeyPixelSizeCastingAllowed - If false the creator promises that there will be no pixel size casting when used on the GPU. Default is true. */
extern IOSurfacePropertyKey IOSurfacePropertyKeyPixelSizeCastingAllowed API_AVAILABLE(macos(10.12), ios(11.0), watchos(4.0), tvos(11.0));
// Note: IOSurface objects are "toll free bridged" to IOSurfaceRef objects
API_AVAILABLE(macos(10.12), ios(11.0), watchos(4.0), tvos(11.0))
@interface IOSurface : NSObject <NSSecureCoding>
{
@package
void * _impl;
}
/* Create a new IOSurface */
- (nullable instancetype)initWithProperties:(NSDictionary <IOSurfacePropertyKey, id> *)properties;
/* "Lock" or "Unlock" a IOSurface for reading or writing.
The term "lock" is used loosely in this context, and is simply used along with the
"unlock" information to put a bound on CPU access to the raw IOSurface data.
If the seed parameter is non-NULL, IOSurfaceLock() will store the buffer's
internal modification seed value at the time you made the lock call. You can compare
this value to a value returned previously to determine of the contents of the buffer
has been changed since the last lock.
In the case of IOSurfaceUnlock(), the seed value returned will be the internal
seed value at the time of the unlock. If you locked the buffer for writing, this value
will be incremented as the unlock is performed and the new value will be returned.
See the IOSurfacePropertyKeyLock enums for more information.
Note: Locking and unlocking a IOSurface is not a particularly cheap operation,
so care should be taken to avoid the calls whenever possible. The seed values are
particularly useful for keeping a cache of the buffer contents.
*/
- (kern_return_t)lockWithOptions:(IOSurfaceLockOptions)options seed:(nullable uint32_t *)seed;
- (kern_return_t)unlockWithOptions:(IOSurfaceLockOptions)options seed:(nullable uint32_t *)seed;
/* The total allocation size of the IOSurface */
@property (readonly) NSInteger allocationSize;
/* Basic surface layout information */
@property (readonly) NSInteger width;
@property (readonly) NSInteger height;
@property (readonly) void *baseAddress NS_RETURNS_INNER_POINTER;
@property (readonly) OSType pixelFormat;
/* Note: These properties may not return well-defined values for planar surfaces */
@property (readonly) NSInteger bytesPerRow;
@property (readonly) NSInteger bytesPerElement;
@property (readonly) NSInteger elementWidth;
@property (readonly) NSInteger elementHeight;
/* This will return the current seed value of the buffer and is a cheap property to read to see
if the contents of the buffer have changed since the last lock/unlock. */
@property (readonly) uint32_t seed;
/* Return the number of planes in this buffer. Will be 0 if the surface is non-planar */
@property (readonly) NSUInteger planeCount;
/* These properties return information about a particular plane of a IOSurface. They will
raise if called on non-planar surfaces or if the index value is not less than the number
of planes. */
- (NSInteger)widthOfPlaneAtIndex:(NSUInteger)planeIndex;
- (NSInteger)heightOfPlaneAtIndex:(NSUInteger)planeIndex;
- (NSInteger)bytesPerRowOfPlaneAtIndex:(NSUInteger)planeIndex;
- (NSInteger)bytesPerElementOfPlaneAtIndex:(NSUInteger)planeIndex;
- (NSInteger)elementWidthOfPlaneAtIndex:(NSUInteger)planeIndex;
- (NSInteger)elementHeightOfPlaneAtIndex:(NSUInteger)planeIndex;
- (void *)baseAddressOfPlaneAtIndex:(NSUInteger)planeIndex NS_RETURNS_INNER_POINTER;
/* These calls let you attach property list types to a IOSurface buffer. These calls are
expensive (they essentially must serialize the data into the kernel) and thus should be avoided whenever
possible. Note: These functions can not be used to change the underlying surface properties. */
- (void)setAttachment:(id)anObject forKey:(NSString *)key;
- (nullable id)attachmentForKey:(NSString *)key;
- (void)removeAttachmentForKey:(NSString *)key;
- (void)setAllAttachments:(NSDictionary<NSString *, id> *)dict;
- (nullable NSDictionary<NSString *, id> *)allAttachments;
- (void)removeAllAttachments;
/* There are cases where it is useful to know whether or not an IOSurface buffer is considered to be "in use"
by other users of the same IOSurface. In particular, CoreVideo and other APIs make use of the IOSurface
use count facility to know when it is safe to recycle an IOSurface backed CVPixelBuffer object. This is
particularly important when IOSurface objects are being shared across process boundaries and the normal
mechanisms one might use would not be viable.
The IOSurface use count is similar in concept to any other reference counting scheme. When the global use
count of an IOSurface goes to zero, it is no longer considered "in use". When it is anything other than
zero, then the IOSurface is still "in use" by someone and therefore anyone attempting to maintain a pool
of IOSurfaces to be recycled should not reclaim that IOSurface.
Note that IOSurface maintains both a per-process and an internal system wide usage count. In the current
implementation, when the per-process usage count goes from zero to one, the system wide usage count is
incremented by one. When the per-process usage count drops back to zero (either via explicit decrement
calls or the process terminates), the global usage count is decremented by one. */
@property (readonly, getter = isInUse) BOOL inUse;
- (void)incrementUseCount;
- (void)decrementUseCount;
/* The localUseCount property returns the local per-process usage count for an IOSurface. This call is only
provided for logging/debugging purposes and should never be used to determine whether an IOSurface is
considered to be "in use". The isInUse property is the only call that should be used for that purpose. */
@property (readonly ) int32_t localUseCount;
/* This property returns YES if it is legal to choose an OpenGL or Metal pixel format with a bytes per pixel
value that is different than the bytesPerElement value(s) of this IOSurface. Returns NO if the bytes per pixel
value must be an exact match. */
@property (readonly) BOOL allowsPixelSizeCasting;
/* See comments in IOSurfaceAPI.h */
- (kern_return_t)setPurgeable:(IOSurfacePurgeabilityState)newState oldState:(IOSurfacePurgeabilityState * __nullable)oldState
API_AVAILABLE(macos(10.13), ios(11.0), watchos(4.0), tvos(11.0));
@end
// This key was misnamed.
extern IOSurfacePropertyKey IOSurfacePropertyAllocSizeKey
API_DEPRECATED_WITH_REPLACEMENT("IOSurfacePropertyKeyAllocSize",macos(10.12,10.14),ios(11.0,12.0),watchos(4.0,5.0),tvos(11.0,12.0));
NS_ASSUME_NONNULL_END
#endif
#endif
|
0 | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/IOSurface.framework | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/IOSurface.framework/Headers/IOSurface.h | /*
* IOSurface.h
* IOSurface
*
* Copyright 2006-2017 Apple Inc. All rights reserved.
*
*/
#ifndef IOSURFACE_H
#define IOSURFACE_H 1
#include <IOSurface/IOSurfaceBase.h>
#include <IOSurface/IOSurfaceAPI.h>
#endif
|
0 | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/IOSurface.framework | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/IOSurface.framework/Headers/IOSurfaceBase.h | /*
* IOSurfaceBase.h
* IOSurface
*
* Copyright 2006-2017 Apple Inc. All rights reserved.
*
*/
#ifndef IOSURFACE_BASE_H
#define IOSURFACE_BASE_H
#include <sys/cdefs.h>
#include <Availability.h>
#include <TargetConditionals.h>
#if defined(IOSFC_BUILDING_IOSFC)
# define IOSFC_DEPRECATED_MSG(s)
# define IOSFC_IOS_DEPRECATED_MSG(s)
#else /* !defined(IOSFC_BUILDING_IOSFC) */
# define IOSFC_DEPRECATED_MSG(s) DEPRECATED_MSG_ATTRIBUTE(s)
#if TARGET_OS_IPHONE
# define IOSFC_IOS_DEPRECATED_MSG(s) DEPRECATED_MSG_ATTRIBUTE(s)
#else
# define IOSFC_IOS_DEPRECATED_MSG(s)
#endif
#endif /* !defined(IOSFC_BUILDING_IOSFC) */
#if __has_feature(objc_class_property)
#define IOSFC_SWIFT_NAME(name) __attribute__((swift_name(#name)))
#else
#define IOSFC_SWIFT_NAME(name)
#endif
#include <mach/kern_return.h>
#include <CoreFoundation/CoreFoundation.h>
#if TARGET_OS_OSX
#include <xpc/xpc.h>
#endif
#endif
|
0 | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/IOSurface.framework | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/IOSurface.framework/Headers/IOSurfaceTypes.h | /*
* IOSurfaceTypes.h
* IOSurface
*
* Copyright 2006-2017 Apple Inc. All rights reserved.
*
*/
#ifndef IOSURFACE_TYPES_H
#define IOSURFACE_TYPES_H
#include <IOSurface/IOSurfaceBase.h>
typedef uint32_t IOSurfaceID;
typedef CF_OPTIONS(uint32_t, IOSurfaceLockOptions)
{
// If you are not going to modify the data while you hold the lock, you should set this flag to avoid invalidating
// any existing caches of the buffer contents. This flag should be passed both to the lock and unlock functions.
// Non-symmetrical usage of this flag will result in undefined behavior.
kIOSurfaceLockReadOnly = 0x00000001,
// If you want to detect/avoid a potentially expensive paging operation (such as readback from a GPU to system memory)
// when you lock the buffer, you may include this flag. If locking the buffer requires a readback, the lock will
// fail with an error return of kIOReturnCannotLock.
kIOSurfaceLockAvoidSync = 0x00000002,
};
typedef CF_OPTIONS(uint32_t, IOSurfacePurgeabilityState)
{
kIOSurfacePurgeableNonVolatile = 0, // Mark the IOSurface as non-volatile
kIOSurfacePurgeableVolatile = 1, // Mark the IOSurface as volatile (contents may be thrown away)
kIOSurfacePurgeableEmpty = 2, // Throw away the contents of the IOSurface immediately
kIOSurfacePurgeableKeepCurrent = 3, // Keep the current setting (useful for returning current status info)
};
/*
** Note: Write-combined memory is optimized for resources that the CPU writes into, but never reads.
** On some implementations, writes may bypass caches, which avoids cache pollution. Read actions may perform very poorly.
** Applications should investigate changing the cache mode only if writing to normally cached buffers is known to cause
** performance issues due to cache pollution, as write-combined memory can have surprising performance pitfalls.
*/
enum {
kIOSurfaceDefaultCache = 0,
kIOSurfaceInhibitCache = 1,
kIOSurfaceWriteThruCache = 2,
kIOSurfaceCopybackCache = 3,
kIOSurfaceWriteCombineCache = 4,
kIOSurfaceCopybackInnerCache = 5
};
// IOSurface Memory mapping options (used with kIOSurfaceCacheMode or IOSurfacePropertyKeyCacheMode)
enum {
kIOSurfaceMapCacheShift = 8,
kIOSurfaceMapDefaultCache = kIOSurfaceDefaultCache << kIOSurfaceMapCacheShift,
kIOSurfaceMapInhibitCache = kIOSurfaceInhibitCache << kIOSurfaceMapCacheShift,
kIOSurfaceMapWriteThruCache = kIOSurfaceWriteThruCache << kIOSurfaceMapCacheShift,
kIOSurfaceMapCopybackCache = kIOSurfaceCopybackCache << kIOSurfaceMapCacheShift,
kIOSurfaceMapWriteCombineCache = kIOSurfaceWriteCombineCache << kIOSurfaceMapCacheShift,
kIOSurfaceMapCopybackInnerCache = kIOSurfaceCopybackInnerCache << kIOSurfaceMapCacheShift,
};
/* IOSurface APIs that return a kern_return_t will return either kIOSurfaceSuccess or an internal error code for failures */
#define kIOSurfaceSuccess KERN_SUCCESS // OK
#endif
|
0 | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/IOSurface.framework | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/IOSurface.framework/Headers/IOSurfaceAPI.h | /*
* IOSurfaceAPI.h
* IOSurface
*
* Copyright 2006-2017 Apple Inc. All rights reserved.
*
*/
#ifndef IOSURFACE_API_H
#define IOSURFACE_API_H 1
/* For legacy reasons, IOSurfaceAPI.h must also include <IOKit/IOKitLib.h> and <xpc/xpc.h> */
#include <xpc/xpc.h>
#include <IOKit/IOKitLib.h>
#include <IOSurface/IOSurfaceBase.h>
#include <IOSurface/IOSurfaceTypes.h>
#include <IOSurface/IOSurfaceRef.h>
__BEGIN_DECLS
CF_IMPLICIT_BRIDGING_ENABLED
CF_ASSUME_NONNULL_BEGIN
/* This call lets you get an xpc_object_t that holds a reference to the IOSurface.
Note: Any live XPC objects created from an IOSurfaceRef implicity increase the IOSurface's global use
count by one until the object is destroyed. */
xpc_object_t IOSurfaceCreateXPCObject(IOSurfaceRef aSurface) XPC_RETURNS_RETAINED API_AVAILABLE(macos(10.7), ios(11.0), watchos(4.0), tvos(11.0));
/* This call lets you take an xpc_object_t created via IOSurfaceCreatePort() and recreate an IOSurfaceRef from it. */
IOSurfaceRef _Nullable IOSurfaceLookupFromXPCObject(xpc_object_t xobj) CF_RETURNS_RETAINED API_AVAILABLE(macos(10.7), ios(11.0), watchos(4.0), tvos(11.0));
__END_DECLS
CF_ASSUME_NONNULL_END
CF_IMPLICIT_BRIDGING_DISABLED
#endif
|
0 | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/IOSurface.framework | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/IOSurface.framework/Modules/module.modulemap | framework module IOSurface [system] {
umbrella "Headers"
module * { export * }
module ObjC {
requires objc
header "IOSurfaceObjC.h"
export *
}
}
|
0 | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/CoreAudio.framework/CoreAudio.tbd | --- !tapi-tbd
tbd-version: 4
targets: [ x86_64-macos, x86_64-maccatalyst, arm64-macos, arm64-maccatalyst,
arm64e-macos, arm64e-maccatalyst ]
uuids:
- target: x86_64-macos
value: 00DFEF2A-6488-3DEC-BDAE-43E53896313F
- target: x86_64-maccatalyst
value: 00DFEF2A-6488-3DEC-BDAE-43E53896313F
- target: arm64-macos
value: 00000000-0000-0000-0000-000000000000
- target: arm64-maccatalyst
value: 00000000-0000-0000-0000-000000000000
- target: arm64e-macos
value: C0709F8B-6901-3D85-923C-2CE633EC7E2C
- target: arm64e-maccatalyst
value: C0709F8B-6901-3D85-923C-2CE633EC7E2C
install-name: '/System/Library/Frameworks/CoreAudio.framework/Versions/A/CoreAudio'
exports:
- targets: [ x86_64-macos, arm64e-macos, x86_64-maccatalyst, arm64e-maccatalyst,
arm64-macos, arm64-maccatalyst ]
symbols: [ _AudioConvertHostTimeToNanos, _AudioConvertNanosToHostTime,
_AudioDeviceAddIOProc, _AudioDeviceAddPropertyListener, _AudioDeviceCreateIOProcID,
_AudioDeviceCreateIOProcIDWithBlock, _AudioDeviceCreateIOProcIDWithClockedBlock,
_AudioDeviceCreateIOProcIDWithClockedProc, _AudioDeviceDestroyIOProcID,
_AudioDeviceDuck, _AudioDeviceEnterMode, _AudioDeviceExitMode,
_AudioDeviceGetCurrentTime, _AudioDeviceGetNearestStartTime,
_AudioDeviceGetProperty, _AudioDeviceGetPropertyInfo, _AudioDeviceRead,
_AudioDeviceRemoveIOProc, _AudioDeviceRemovePropertyListener,
_AudioDeviceRun, _AudioDeviceSetProperty, _AudioDeviceStart,
_AudioDeviceStartAtTime, _AudioDeviceStop, _AudioDeviceTranslateTime,
_AudioDeviceWrite, _AudioDriverPlugInClose, _AudioDriverPlugInDeviceGetProperty,
_AudioDriverPlugInDeviceGetPropertyInfo, _AudioDriverPlugInDeviceSetProperty,
_AudioDriverPlugInOpen, _AudioDriverPlugInStreamGetProperty,
_AudioDriverPlugInStreamGetPropertyInfo, _AudioDriverPlugInStreamSetProperty,
_AudioGetCurrentHostTime, _AudioGetHostClockFrequency, _AudioGetHostClockMinimumTimeDelta,
_AudioHardwareAddPropertyListener, _AudioHardwareAddRunLoopSource,
_AudioHardwareBeMaster, _AudioHardwareCreateAggregateDevice,
_AudioHardwareCreateProcessTap, _AudioHardwareDestroyAggregateDevice,
_AudioHardwareDestroyProcessTap, _AudioHardwareGetProperty,
_AudioHardwareGetPropertyInfo, _AudioHardwareReloadServerSettings,
_AudioHardwareRemovePropertyListener, _AudioHardwareRemoveRunLoopSource,
_AudioHardwareSetProperty, _AudioHardwareStartServer, _AudioHardwareUnload,
_AudioObjectAddPropertyListener, _AudioObjectAddPropertyListenerBlock,
_AudioObjectAddPropertyListenerInternal, _AudioObjectExists,
_AudioObjectGetPropertyData, _AudioObjectGetPropertyDataSize,
_AudioObjectHasProperty, _AudioObjectIsOnListenerThread, _AudioObjectIsPropertySettable,
_AudioObjectRemovePropertyListener, _AudioObjectRemovePropertyListenerBlock,
_AudioObjectSetPropertyData, _AudioObjectShow, _AudioServerPlugInMain,
_AudioServerPlugInRegisterRemote, _AudioStreamAddPropertyListener,
_AudioStreamGetProperty, _AudioStreamGetPropertyInfo, _AudioStreamRemovePropertyListener,
_AudioStreamSetProperty, __ZN4AMCP11Null_DriverC1ERNS_14System_ContextE,
__ZN4AMCP11Null_DriverC2ERNS_14System_ContextE, __ZN4AMCP11Null_DriverD0Ev,
__ZN4AMCP11Null_DriverD1Ev, __ZN4AMCP11Null_DriverD2Ev, __ZN4AMCP13Feature_Flags11run_new_halEv,
__ZN4AMCP13Feature_Flags12host_asp_oopEv, __ZN4AMCP13Feature_Flags14run_hybrid_halEv,
__ZN4AMCP13Feature_Flags15set_run_new_halEb, __ZN4AMCP13Feature_Flags16set_host_asp_oopEb,
__ZN4AMCP13Feature_Flags17event_link_oop_ioEv, __ZN4AMCP13Feature_Flags18set_run_hybrid_halEb,
__ZN4AMCP13Feature_Flags19collect_io_perfdataEv, __ZN4AMCP13Feature_Flags20internal_drivers_oopEv,
__ZN4AMCP13Feature_Flags21set_event_link_oop_ioEb, __ZN4AMCP13Feature_Flags22allow_mcp_and_hal_coexEv,
__ZN4AMCP13Feature_Flags23set_collect_io_perfdataEb, __ZN4AMCP13Feature_Flags24set_internal_drivers_oopEb,
__ZN4AMCP13Feature_Flags26set_allow_mcp_and_hal_coexEb, __ZN4AMCP13Level_Control16set_scalar_valueEf,
__ZN4AMCP13Level_Control17set_decibel_valueEf, __ZN4AMCP13Level_Control25set_scalar_value_and_waitEf,
__ZN4AMCP13Level_Control26set_decibel_value_and_waitEf, __ZN4AMCP13Level_ControlC1ERKNS_6DeviceEjjj,
__ZN4AMCP13Level_ControlC1ERNS_14System_ContextEj, __ZN4AMCP13Level_ControlC2ERKNS_6DeviceEjjj,
__ZN4AMCP13Level_ControlC2ERNS_14System_ContextEj, __ZN4AMCP13Level_ControlD0Ev,
__ZN4AMCP13Level_ControlD1Ev, __ZN4AMCP13Level_ControlD2Ev,
__ZN4AMCP14Implementation20generate_type_markerERKSt9type_info,
__ZN4AMCP14Slider_Control18set_value_and_waitEj, __ZN4AMCP14Slider_Control9set_valueEj,
__ZN4AMCP14Slider_ControlC1ERKNS_6DeviceEjjj, __ZN4AMCP14Slider_ControlC1ERNS_14System_ContextEj,
__ZN4AMCP14Slider_ControlC2ERKNS_6DeviceEjjj, __ZN4AMCP14Slider_ControlC2ERNS_14System_ContextEj,
__ZN4AMCP14Slider_ControlD0Ev, __ZN4AMCP14Slider_ControlD1Ev,
__ZN4AMCP14Slider_ControlD2Ev, __ZN4AMCP14System_Context20System_Context_StateD1Ev,
__ZN4AMCP14System_Context20System_Context_StateD2Ev, __ZN4AMCP14System_ContextC1ENS0_15Load_No_DriversE,
__ZN4AMCP14System_ContextC1ENS0_16Load_All_DriversE, __ZN4AMCP14System_ContextC1ENS0_21Load_Null_Driver_OnlyE,
__ZN4AMCP14System_ContextC1ENS0_26Load_Null_And_Meta_DriversE,
__ZN4AMCP14System_ContextC1ENS0_28Load_AudioServerPlugIns_OnlyE,
__ZN4AMCP14System_ContextC1ENS0_30Load_Multi_Client_Drivers_OnlyE,
__ZN4AMCP14System_ContextC1ERKNSt3__16vectorIN10applesauce2CF9StringRefENS1_9allocatorIS5_EEEESA_,
__ZN4AMCP14System_ContextC2ENS0_15Load_No_DriversE, __ZN4AMCP14System_ContextC2ENS0_16Load_All_DriversE,
__ZN4AMCP14System_ContextC2ENS0_21Load_Null_Driver_OnlyE,
__ZN4AMCP14System_ContextC2ENS0_26Load_Null_And_Meta_DriversE,
__ZN4AMCP14System_ContextC2ENS0_28Load_AudioServerPlugIns_OnlyE,
__ZN4AMCP14System_ContextC2ENS0_30Load_Multi_Client_Drivers_OnlyE,
__ZN4AMCP14System_ContextC2ERKNSt3__16vectorIN10applesauce2CF9StringRefENS1_9allocatorIS5_EEEESA_,
__ZN4AMCP14System_ContextD1Ev, __ZN4AMCP14System_ContextD2Ev,
__ZN4AMCP15Boolean_Control18set_value_and_waitEb, __ZN4AMCP15Boolean_Control9set_valueEb,
__ZN4AMCP15Boolean_ControlC1ERKNS_6DeviceEjjj, __ZN4AMCP15Boolean_ControlC1ERNS_14System_ContextEj,
__ZN4AMCP15Boolean_ControlC2ERKNS_6DeviceEjjj, __ZN4AMCP15Boolean_ControlC2ERNS_14System_ContextEj,
__ZN4AMCP15Boolean_ControlD0Ev, __ZN4AMCP15Boolean_ControlD1Ev,
__ZN4AMCP15Boolean_ControlD2Ev, __ZN4AMCP16Selector_Control15set_multi_valueERKNSt3__16vectorIjNS1_9allocatorIjEEEE,
__ZN4AMCP16Selector_Control18set_value_and_waitEj, __ZN4AMCP16Selector_Control24set_multi_value_and_waitERKNSt3__16vectorIjNS1_9allocatorIjEEEE,
__ZN4AMCP16Selector_Control9set_valueEj, __ZN4AMCP16Selector_ControlC1ERKNS_6DeviceEjjj,
__ZN4AMCP16Selector_ControlC1ERNS_14System_ContextEj, __ZN4AMCP16Selector_ControlC2ERKNS_6DeviceEjjj,
__ZN4AMCP16Selector_ControlC2ERNS_14System_ContextEj, __ZN4AMCP16Selector_ControlD0Ev,
__ZN4AMCP16Selector_ControlD1Ev, __ZN4AMCP16Selector_ControlD2Ev,
__ZN4AMCP18Stereo_Pan_Control18set_value_and_waitEf, __ZN4AMCP18Stereo_Pan_Control9set_valueEf,
__ZN4AMCP18Stereo_Pan_ControlC1ERKNS_6DeviceEjjj, __ZN4AMCP18Stereo_Pan_ControlC1ERNS_14System_ContextEj,
__ZN4AMCP18Stereo_Pan_ControlC2ERKNS_6DeviceEjjj, __ZN4AMCP18Stereo_Pan_ControlC2ERNS_14System_ContextEj,
__ZN4AMCP18Stereo_Pan_ControlD0Ev, __ZN4AMCP18Stereo_Pan_ControlD1Ev,
__ZN4AMCP18Stereo_Pan_ControlD2Ev, __ZN4AMCP19get_property_traitsEj,
__ZN4AMCP20add_available_formatERNSt3__16vectorINS0_5tupleIJN2CA14ValueRangeListENS3_17StreamDescriptionEEEENS0_9allocatorIS6_EEEERKNS3_23RangedStreamDescriptionE,
__ZN4AMCP23Null_Object_Description12create_clockERKN10applesauce2CF9StringRefES5_jj,
__ZN4AMCP23Null_Object_Description13create_deviceERKN10applesauce2CF9StringRefES5_jjjj,
__ZN4AMCP23Null_Object_Description13create_streamERKN10applesauce2CF9StringRefENS_9DirectionEjjRKN2CA17StreamDescriptionERKNSt3__16vectorINSB_5tupleIJNS7_14ValueRangeListES8_EEENSB_9allocatorISF_EEEE,
__ZN4AMCP23Null_Object_Description18attach_stream_listERKN10applesauce2CF13DictionaryRefENS_9DirectionERKNS2_8ArrayRefE,
__ZN4AMCP23Null_Object_Description19attach_control_listERKN10applesauce2CF13DictionaryRefERKNS2_8ArrayRefE,
__ZN4AMCP23Null_Object_Description20create_level_controlEjjjbRKN2CA10ValueRangeEf,
__ZN4AMCP23Null_Object_Description21create_slider_controlEjjjbRKNSt3__15tupleIJjjEEEj,
__ZN4AMCP23Null_Object_Description22create_boolean_controlEjjjbb,
__ZN4AMCP23Null_Object_Description23create_selector_controlEjjjbRKNSt3__16vectorINS1_5tupleIJjjN10applesauce2CF9StringRefEEEENS1_9allocatorIS7_EEEEj,
__ZN4AMCP23Null_Object_Description25create_stereo_pan_controlEjjjbRKNSt3__15tupleIJjjEEEf,
__ZN4AMCP23Null_Object_Description29create_multi_selector_controlEjjjbRKNSt3__16vectorINS1_5tupleIJjjN10applesauce2CF9StringRefEEEENS1_9allocatorIS7_EEEENS2_IjNS8_IjEEEE,
__ZN4AMCP23Null_Object_Description6createERKNS_6ObjectE, __ZN4AMCP24make_string_for_class_idEj,
__ZN4AMCP25graph_description_to_jsonERKNS_17Graph_DescriptionE,
__ZN4AMCP26is_stock_property_selectorEj, __ZN4AMCP26is_stock_property_selectorEjj,
__ZN4AMCP26make_available_format_listERKNSt3__16vectorIN2CA17StreamDescriptionENS0_9allocatorIS3_EEEE,
__ZN4AMCP26make_available_format_listERKNSt3__16vectorIN2CA23RangedStreamDescriptionENS0_9allocatorIS3_EEEE,
__ZN4AMCP27get_stock_class_traits_listEv, __ZN4AMCP27graph_description_from_jsonERKNSt3__112basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEE,
__ZN4AMCP28get_box_property_traits_listEv, __ZN4AMCP29get_property_traits_for_classEj,
__ZN4AMCP29is_required_property_selectorEj, __ZN4AMCP30get_clock_property_traits_listEv,
__ZN4AMCP30is_invariant_property_selectorEj, __ZN4AMCP30make_string_for_transport_typeEj,
__ZN4AMCP31get_device_property_traits_listEv, __ZN4AMCP31get_driver_property_traits_listEv,
__ZN4AMCP31get_object_property_traits_listEv, __ZN4AMCP31get_stream_property_traits_listEv,
__ZN4AMCP31get_system_property_traits_listEv, __ZN4AMCP32get_control_property_traits_listEv,
__ZN4AMCP33modify_graph_destroy_list_to_jsonERKNS_25Modify_Graph_Destroy_ListE,
__ZN4AMCP33property_selector_may_be_settableEj, __ZN4AMCP34extended_graph_description_to_jsonERKNS_26Extended_Graph_DescriptionE,
__ZN4AMCP36extended_graph_description_from_jsonERKNSt3__112basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEE,
__ZN4AMCP36get_property_traits_for_hal_selectorEj, __ZN4AMCP38get_level_control_property_traits_listEv,
__ZN4AMCP39get_slider_control_property_traits_listEv, __ZN4AMCP3Box12set_acquiredEb,
__ZN4AMCP3BoxC1ERNS_14System_ContextEN10applesauce2CF9StringRefE,
__ZN4AMCP3BoxC1ERNS_14System_ContextEj, __ZN4AMCP3BoxC2ERNS_14System_ContextEN10applesauce2CF9StringRefE,
__ZN4AMCP3BoxC2ERNS_14System_ContextEj, __ZN4AMCP3BoxD0Ev,
__ZN4AMCP3BoxD1Ev, __ZN4AMCP3BoxD2Ev, __ZN4AMCP3HAL25get_hal_type_code_for_mcpENS_18Property_Type_CodeE,
__ZN4AMCP3HAL31hal_property_value_is_object_idEj, __ZN4AMCP3HAL32get_hal_property_value_type_codeEj,
__ZN4AMCP3HAL34translate_hal_value_to_mcp_by_typeERKN10applesauce2CF7DataRefENS0_22HAL_Property_Type_CodeENS_18Property_Type_CodeE,
__ZN4AMCP3HAL34translate_mcp_value_to_hal_by_typeERKNS_5ThingENS_18Property_Type_CodeENS0_22HAL_Property_Type_CodeE,
__ZN4AMCP3HAL35type_code_from_custom_property_typeEj, __ZN4AMCP3HAL36get_hal_property_qualifier_type_codeEj,
__ZN4AMCP3HAL39translate_hal_control_address_to_deviceEjjjRK26AudioObjectPropertyAddress,
__ZN4AMCP40get_boolean_control_property_traits_listEv, __ZN4AMCP41get_selector_control_property_traits_listEv,
__ZN4AMCP43get_stereo_pan_control_property_traits_listEv,
__ZN4AMCP4Node19get_latency_handlerEv, __ZN4AMCP4Node19set_latency_handlerERKNSt3__18functionIFxvEEE,
__ZN4AMCP4Node21get_client_io_handlerEv, __ZN4AMCP4Node21get_end_cycle_handlerEv,
__ZN4AMCP4Node21get_tail_time_handlerEv, __ZN4AMCP4Node21set_client_io_handlerERKNSt3__18functionIFvjRKNS_15Proc_Cycle_InfoEmPNS_11Proc_StreamEmS7_EEE,
__ZN4AMCP4Node21set_end_cycle_handlerERKNSt3__18functionIFvjEEE,
__ZN4AMCP4Node21set_end_cycle_handlerERKNSt3__18functionIFvjRKNS_15Proc_Cycle_InfoEEEE,
__ZN4AMCP4Node21set_tail_time_handlerERKNSt3__18functionIFxvEEE,
__ZN4AMCP4Node23get_begin_cycle_handlerEv, __ZN4AMCP4Node23get_io_overload_handlerEv,
__ZN4AMCP4Node23set_begin_cycle_handlerERKNSt3__18functionIFvjEEE,
__ZN4AMCP4Node23set_begin_cycle_handlerERKNSt3__18functionIFvjRKNS_15Proc_Cycle_InfoEEEE,
__ZN4AMCP4Node23set_io_overload_handlerERKNSt3__18functionIFvjEEE,
__ZN4AMCP4Node26get_end_processing_handlerEv, __ZN4AMCP4Node26set_end_processing_handlerERKNSt3__18functionIFvjEEE,
__ZN4AMCP4Node27get_io_thread_error_handlerEv, __ZN4AMCP4Node27get_register_client_handlerEv,
__ZN4AMCP4Node27set_io_thread_error_handlerERKNSt3__18functionIFvvEEE,
__ZN4AMCP4Node27set_register_client_handlerERKNSt3__18functionIFvjEEE,
__ZN4AMCP4Node28get_begin_processing_handlerEv, __ZN4AMCP4Node28set_begin_processing_handlerERKNSt3__18functionIFvjEEE,
__ZN4AMCP4Node29get_unregister_client_handlerEv, __ZN4AMCP4Node29set_unregister_client_handlerERKNSt3__18functionIFvjEEE,
__ZN4AMCP4Node31get_connections_changed_handlerEv, __ZN4AMCP4Node31set_connections_changed_handlerERKNSt3__18functionIFvmmEEE,
__ZN4AMCP4Node53get_expected_output_samples_for_input_samples_handlerEv,
__ZN4AMCP4Node53get_required_input_samples_for_output_samples_handlerEv,
__ZN4AMCP4Node53set_expected_output_samples_for_input_samples_handlerERKNSt3__18functionIFyyRyEEE,
__ZN4AMCP4Node53set_required_input_samples_for_output_samples_handlerERKNSt3__18functionIFyyEEE,
__ZN4AMCP4NodeC1ERNS_14System_ContextEN10applesauce2CF9StringRefE,
__ZN4AMCP4NodeC1ERNS_14System_ContextEj, __ZN4AMCP4NodeC2ERNS_14System_ContextEN10applesauce2CF9StringRefE,
__ZN4AMCP4NodeC2ERNS_14System_ContextEj, __ZN4AMCP4NodeD0Ev,
__ZN4AMCP4NodeD1Ev, __ZN4AMCP4NodeD2Ev, __ZN4AMCP52create_device_node_uid_from_device_uid_and_directionERKN10applesauce2CF9StringRefENS_9DirectionE,
__ZN4AMCP5ClockC1ERNS_14System_ContextEN10applesauce2CF9StringRefE,
__ZN4AMCP5ClockC1ERNS_14System_ContextENSt3__110shared_ptrINS_4Core4CoreEEE,
__ZN4AMCP5ClockC1ERNS_14System_ContextEj, __ZN4AMCP5ClockC2ERNS_14System_ContextEN10applesauce2CF9StringRefE,
__ZN4AMCP5ClockC2ERNS_14System_ContextENSt3__110shared_ptrINS_4Core4CoreEEE,
__ZN4AMCP5ClockC2ERNS_14System_ContextEj, __ZN4AMCP5ClockD0Ev,
__ZN4AMCP5ClockD1Ev, __ZN4AMCP5ClockD2Ev, __ZN4AMCP6DeviceC1ERNS_14System_ContextEN10applesauce2CF9StringRefE,
__ZN4AMCP6DeviceC1ERNS_14System_ContextEj, __ZN4AMCP6DeviceC2ERNS_14System_ContextEN10applesauce2CF9StringRefE,
__ZN4AMCP6DeviceC2ERNS_14System_ContextEj, __ZN4AMCP6DeviceD0Ev,
__ZN4AMCP6DeviceD1Ev, __ZN4AMCP6DeviceD2Ev, __ZN4AMCP6DriverC1ERNS_14System_ContextEN10applesauce2CF9StringRefE,
__ZN4AMCP6DriverC1ERNS_14System_ContextEj, __ZN4AMCP6DriverC2ERNS_14System_ContextEN10applesauce2CF9StringRefE,
__ZN4AMCP6DriverC2ERNS_14System_ContextEj, __ZN4AMCP6DriverD0Ev,
__ZN4AMCP6DriverD1Ev, __ZN4AMCP6DriverD2Ev, __ZN4AMCP6Object25constructed_correct_classEj,
__ZN4AMCP6ObjectC1ERNS_14System_ContextERKNSt3__110shared_ptrINS_4Core4CoreEEE,
__ZN4AMCP6ObjectC1ERNS_14System_ContextEj, __ZN4AMCP6ObjectC2ERNS_14System_ContextERKNSt3__110shared_ptrINS_4Core4CoreEEE,
__ZN4AMCP6ObjectC2ERNS_14System_ContextEj, __ZN4AMCP6ObjectD0Ev,
__ZN4AMCP6ObjectD1Ev, __ZN4AMCP6ObjectD2Ev, __ZN4AMCP6Stream20make_string_for_asbdERKN2CA17StreamDescriptionEbb,
__ZN4AMCP6StreamC1ERNS_14System_ContextEj, __ZN4AMCP6StreamC2ERNS_14System_ContextEj,
__ZN4AMCP6StreamD0Ev, __ZN4AMCP6StreamD1Ev, __ZN4AMCP6StreamD2Ev,
__ZN4AMCP6System11get_node_idERKN10applesauce2CF9StringRefE,
__ZN4AMCP6System12modify_graphERKNS_17Graph_DescriptionERKNS_25Modify_Graph_Destroy_ListE,
__ZN4AMCP6System18get_wires_for_nodeEj, __ZN4AMCP6System18node_uid_is_uniqueERKN10applesauce2CF9StringRefE,
__ZN4AMCP6System18update_power_stateENS_11Power_StateE, __ZN4AMCP6System19set_volume_for_wireERKNS_15Wire_IdentifierEfN2CA9TimeStampE,
__ZN4AMCP6System22Config_Change_Observer5resetEv, __ZN4AMCP6System22Config_Change_ObserverC1ERNS_14System_ContextEy,
__ZN4AMCP6System22Config_Change_ObserverC1ERNS_14System_ContextEyb,
__ZN4AMCP6System22Config_Change_ObserverC2ERNS_14System_ContextEy,
__ZN4AMCP6System22Config_Change_ObserverC2ERNS_14System_ContextEyb,
__ZN4AMCP6System22Config_Change_ObserverD1Ev, __ZN4AMCP6System22Config_Change_ObserverD2Ev,
__ZN4AMCP6System24set_volume_ramp_for_wireERKNS_15Wire_IdentifierEfN2CA9TimeStampES5_,
__ZN4AMCP6System26All_Control_Value_Observer5resetEv, __ZN4AMCP6System26All_Control_Value_ObserverC1ERNS_14System_ContextEy,
__ZN4AMCP6System26All_Control_Value_ObserverC2ERNS_14System_ContextEy,
__ZN4AMCP6System26All_Control_Value_ObserverD1Ev, __ZN4AMCP6System26All_Control_Value_ObserverD2Ev,
__ZN4AMCP6System30get_wire_connection_propertiesERKNS_15Wire_IdentifierE,
__ZN4AMCP6System33create_all_control_value_observerERKNSt3__18functionIFvjEEE,
__ZN4AMCP6System9get_wiresEv, __ZN4AMCP6SystemC1ERNS_14System_ContextE,
__ZN4AMCP6SystemC2ERNS_14System_ContextE, __ZN4AMCP6SystemD0Ev,
__ZN4AMCP6SystemD1Ev, __ZN4AMCP6SystemD2Ev, __ZN4AMCP7Address21make_string_for_scopeEj,
__ZN4AMCP7Control14Value_Observer5resetEv, __ZN4AMCP7Control14Value_ObserverC1ERNS_14System_ContextEy,
__ZN4AMCP7Control14Value_ObserverC2ERNS_14System_ContextEy,
__ZN4AMCP7Control14Value_ObserverD1Ev, __ZN4AMCP7Control14Value_ObserverD2Ev,
__ZN4AMCP7Control21create_value_observerERKNSt3__18functionIFvjEEE,
__ZN4AMCP7ControlC1ERKNS_6DeviceEjjjj, __ZN4AMCP7ControlC1ERNS_14System_ContextEj,
__ZN4AMCP7ControlC2ERKNS_6DeviceEjjjj, __ZN4AMCP7ControlC2ERNS_14System_ContextEj,
__ZN4AMCP7ControlD0Ev, __ZN4AMCP7ControlD1Ev, __ZN4AMCP7ControlD2Ev,
__ZN4AMCP8DSP_Node14get_io_handlerEv, __ZN4AMCP8DSP_Node14set_io_handlerERKNSt3__18functionIFvjRKNS_15Proc_Cycle_InfoEmPNS_11Proc_StreamEmS7_EEE,
__ZN4AMCP8DSP_Node19get_latency_handlerEv, __ZN4AMCP8DSP_Node19set_latency_handlerERKNSt3__18functionIFxvEEE,
__ZN4AMCP8DSP_Node21get_end_cycle_handlerEv, __ZN4AMCP8DSP_Node21get_tail_time_handlerEv,
__ZN4AMCP8DSP_Node21set_end_cycle_handlerERKNSt3__18functionIFvjEEE,
__ZN4AMCP8DSP_Node21set_end_cycle_handlerERKNSt3__18functionIFvjRKNS_15Proc_Cycle_InfoEEEE,
__ZN4AMCP8DSP_Node21set_tail_time_handlerERKNSt3__18functionIFxvEEE,
__ZN4AMCP8DSP_Node23get_begin_cycle_handlerEv, __ZN4AMCP8DSP_Node23set_begin_cycle_handlerERKNSt3__18functionIFvjEEE,
__ZN4AMCP8DSP_Node23set_begin_cycle_handlerERKNSt3__18functionIFvjRKNS_15Proc_Cycle_InfoEEEE,
__ZN4AMCP8DSP_Node26get_end_processing_handlerEv, __ZN4AMCP8DSP_Node26set_end_processing_handlerERKNSt3__18functionIFvjEEE,
__ZN4AMCP8DSP_Node27get_register_client_handlerEv, __ZN4AMCP8DSP_Node27set_register_client_handlerERKNSt3__18functionIFvjEEE,
__ZN4AMCP8DSP_Node28get_begin_processing_handlerEv, __ZN4AMCP8DSP_Node28set_begin_processing_handlerERKNSt3__18functionIFvjEEE,
__ZN4AMCP8DSP_Node29get_unregister_client_handlerEv, __ZN4AMCP8DSP_Node29set_unregister_client_handlerERKNSt3__18functionIFvjEEE,
__ZN4AMCP8DSP_Node53get_expected_output_samples_for_input_samples_handlerEv,
__ZN4AMCP8DSP_Node53get_required_input_samples_for_output_samples_handlerEv,
__ZN4AMCP8DSP_Node53set_expected_output_samples_for_input_samples_handlerERKNSt3__18functionIFyyRyEEE,
__ZN4AMCP8DSP_Node53set_required_input_samples_for_output_samples_handlerERKNSt3__18functionIFyyEEE,
__ZN4AMCP8DSP_NodeC1ERNS_14System_ContextEN10applesauce2CF9StringRefE,
__ZN4AMCP8DSP_NodeC1ERNS_14System_ContextEj, __ZN4AMCP8DSP_NodeC2ERNS_14System_ContextEN10applesauce2CF9StringRefE,
__ZN4AMCP8DSP_NodeC2ERNS_14System_ContextEj, __ZN4AMCP8DSP_NodeD0Ev,
__ZN4AMCP8DSP_NodeD1Ev, __ZN4AMCP8DSP_NodeD2Ev, __ZN4AMCP9IOContext12stop_runningEv,
__ZN4AMCP9IOContext13start_at_timeEy, __ZN4AMCP9IOContext13start_runningEb,
__ZN4AMCP9IOContext13start_runningEv, __ZN4AMCP9IOContext15stop_prewarmingEv,
__ZN4AMCP9IOContext16start_prewarmingEb, __ZN4AMCP9IOContext16start_prewarmingEv,
__ZN4AMCP9IOContext18set_io_cycle_usageEf, __ZN4AMCP9IOContext21get_client_io_handlerEv,
__ZN4AMCP9IOContext21set_buffer_frame_sizeEj, __ZN4AMCP9IOContext21set_client_io_handlerERKNSt3__18functionIFvjRKNS_15Proc_Cycle_InfoEmPNS_11Proc_StreamEmS7_EEE,
__ZN4AMCP9IOContext23get_io_overload_handlerEv, __ZN4AMCP9IOContext23get_os_workgroup_handleEv,
__ZN4AMCP9IOContext23set_io_overload_handlerERKNSt3__18functionIFvjEEE,
__ZN4AMCP9IOContext23set_os_workgroup_handleERKN5caulk4mach21os_workgroup_intervalE,
__ZN4AMCP9IOContext25can_play_during_dark_wakeEv, __ZN4AMCP9IOContext26get_end_processing_handlerEv,
__ZN4AMCP9IOContext26set_end_processing_handlerERKNSt3__18functionIFvjEEE,
__ZN4AMCP9IOContext27get_io_thread_error_handlerEv, __ZN4AMCP9IOContext27set_io_thread_error_handlerERKNSt3__18functionIFvvEEE,
__ZN4AMCP9IOContext29set_can_play_during_dark_wakeEb, __ZN4AMCP9IOContext33can_play_during_notification_wakeEv,
__ZN4AMCP9IOContext33handle_overload_with_catchup_modeEb,
__ZN4AMCP9IOContext37get_should_resume_after_config_changeEv,
__ZN4AMCP9IOContext37set_can_play_during_notification_wakeEb,
__ZN4AMCP9IOContext37set_should_resume_after_config_changeEb,
__ZN4AMCP9IOContextC1ERNS_14System_ContextEN10applesauce2CF9StringRefE,
__ZN4AMCP9IOContextC1ERNS_14System_ContextEj, __ZN4AMCP9IOContextC2ERNS_14System_ContextEN10applesauce2CF9StringRefE,
__ZN4AMCP9IOContextC2ERNS_14System_ContextEj, __ZN4AMCP9IOContextD0Ev,
__ZN4AMCP9IOContextD1Ev, __ZN4AMCP9IOContextD2Ev, __ZNK4AMCP11Null_Driver14create_objectsERKN10applesauce2CF8ArrayRefE,
__ZNK4AMCP11Null_Driver15destroy_objectsERKNSt3__16vectorIjNS1_9allocatorIjEEEE,
__ZNK4AMCP13Level_Control16get_scalar_valueEv, __ZNK4AMCP13Level_Control17get_decibel_rangeEv,
__ZNK4AMCP13Level_Control17get_decibel_valueEv, __ZNK4AMCP13Level_Control31convert_decibel_value_to_scalarEf,
__ZNK4AMCP13Level_Control32convert_scalar_value_to_decibelsEf,
__ZNK4AMCP14Slider_Control9get_rangeEv, __ZNK4AMCP14Slider_Control9get_valueEv,
__ZNK4AMCP15Boolean_Control9get_valueEv, __ZNK4AMCP16Selector_Control13get_item_listEv,
__ZNK4AMCP16Selector_Control14is_multi_valueEv, __ZNK4AMCP16Selector_Control15get_multi_valueEv,
__ZNK4AMCP16Selector_Control9get_valueEv, __ZNK4AMCP18Stereo_Pan_Control12get_channelsEv,
__ZNK4AMCP18Stereo_Pan_Control9get_valueEv, __ZNK4AMCP3Box11get_box_uidEv,
__ZNK4AMCP3Box12is_protectedEv, __ZNK4AMCP3Box14get_clock_listEv,
__ZNK4AMCP3Box15get_device_listEv, __ZNK4AMCP3Box18get_transport_typeEv,
__ZNK4AMCP3Box21get_acquisition_errorEv, __ZNK4AMCP3Box8acquiredEv,
__ZNK4AMCP3Box8has_midiEv, __ZNK4AMCP3Box9has_audioEv, __ZNK4AMCP3Box9has_videoEv,
__ZNK4AMCP4Node12is_connectedEv, __ZNK4AMCP4Node14translate_timeEN2CA9TimeStampE,
__ZNK4AMCP4Node15get_descriptionEv, __ZNK4AMCP4Node16get_current_timeEv,
__ZNK4AMCP4Node7get_uidEv, __ZNK4AMCP4Node8get_typeEv, __ZNK4AMCP4Node9get_clockEv,
__ZNK4AMCP5Clock13get_model_uidERKN10applesauce2CF9StringRefE,
__ZNK4AMCP5Clock13get_model_uidEv, __ZNK4AMCP5Clock14get_device_uidEv,
__ZNK4AMCP5Clock15get_sample_rateEv, __ZNK4AMCP5Clock15set_sample_rateEd,
__ZNK4AMCP5Clock16get_clock_domainEv, __ZNK4AMCP5Clock17get_input_latencyEv,
__ZNK4AMCP5Clock18get_output_latencyEv, __ZNK4AMCP5Clock18get_transport_typeEv,
__ZNK4AMCP5Clock24set_sample_rate_and_waitEd, __ZNK4AMCP5Clock30get_available_sample_rate_listEv,
__ZNK4AMCP5Clock9is_hiddenEv, __ZNK4AMCP6Device10get_streamENS_9DirectionEj,
__ZNK4AMCP6Device14count_channelsEj, __ZNK4AMCP6Device15get_stream_listEj,
__ZNK4AMCP6Device18get_channel_layoutEj, __ZNK4AMCP6Device18get_channel_layoutEjRKN2CA13ChannelLayoutE,
__ZNK4AMCP6Device21wants_display_routingEb, __ZNK4AMCP6Device21wants_display_routingEv,
__ZNK4AMCP6Device23get_input_safety_offsetEv, __ZNK4AMCP6Device24get_output_safety_offsetEv,
__ZNK4AMCP6Device27can_be_default_input_deviceEv, __ZNK4AMCP6Device28can_be_default_output_deviceEv,
__ZNK4AMCP6Device35can_be_default_system_output_deviceEv,
__ZNK4AMCP6Driver12get_box_listEv, __ZNK4AMCP6Driver13get_bundle_idEv,
__ZNK4AMCP6Driver14get_clock_listEv, __ZNK4AMCP6Driver15get_device_listEv,
__ZNK4AMCP6Object11get_controlEjjj, __ZNK4AMCP6Object11get_creatorEv,
__ZNK4AMCP6Object12get_class_idEv, __ZNK4AMCP6Object12has_propertyERKNS_7AddressE,
__ZNK4AMCP6Object14get_model_nameERKN10applesauce2CF9StringRefE,
__ZNK4AMCP6Object14get_model_nameEv, __ZNK4AMCP6Object16get_control_listEj,
__ZNK4AMCP6Object16get_element_nameERKNS_7AddressE, __ZNK4AMCP6Object16get_element_nameERKNS_7AddressERKN10applesauce2CF9StringRefE,
__ZNK4AMCP6Object17get_serial_numberERKN10applesauce2CF9StringRefE,
__ZNK4AMCP6Object17get_serial_numberEv, __ZNK4AMCP6Object18get_property_valueERKNS_7AddressE,
__ZNK4AMCP6Object18get_property_valueERKNS_7AddressERKNS_5ThingE,
__ZNK4AMCP6Object18get_stock_class_idEv, __ZNK4AMCP6Object18set_property_valueERKNS_7AddressERKNS_5ThingE,
__ZNK4AMCP6Object20get_firmware_versionERKN10applesauce2CF9StringRefE,
__ZNK4AMCP6Object20get_firmware_versionEv, __ZNK4AMCP6Object20get_localized_stringERKN10applesauce2CF9StringRefES5_S5_S5_,
__ZNK4AMCP6Object20is_property_settableERKNS_7AddressE, __ZNK4AMCP6Object21get_configuration_appERKN10applesauce2CF9StringRefE,
__ZNK4AMCP6Object21get_configuration_appEv, __ZNK4AMCP6Object21get_manufacturer_nameERKN10applesauce2CF9StringRefE,
__ZNK4AMCP6Object21get_manufacturer_nameEv, __ZNK4AMCP6Object21get_owned_object_listEv,
__ZNK4AMCP6Object22get_property_type_hintERKNS_7AddressE,
__ZNK4AMCP6Object23get_element_number_nameERKNS_7AddressE,
__ZNK4AMCP6Object23get_element_number_nameERKNS_7AddressERKN10applesauce2CF9StringRefE,
__ZNK4AMCP6Object23get_resource_bundle_urlERKN10applesauce2CF6URLRefE,
__ZNK4AMCP6Object23get_resource_bundle_urlEv, __ZNK4AMCP6Object25get_element_category_nameERKNS_7AddressE,
__ZNK4AMCP6Object25get_element_category_nameERKNS_7AddressERKN10applesauce2CF9StringRefE,
__ZNK4AMCP6Object27set_property_value_and_waitERKNS_7AddressERKNS_5ThingE,
__ZNK4AMCP6Object33get_property_value_with_qualifierERKNS_7AddressERKNS_5ThingE,
__ZNK4AMCP6Object33get_property_value_with_qualifierERKNS_7AddressERKNS_5ThingES6_,
__ZNK4AMCP6Object33set_property_value_with_qualifierERKNS_7AddressERKNS_5ThingES6_,
__ZNK4AMCP6Object42set_property_value_with_qualifier_and_waitERKNS_7AddressERKNS_5ThingES6_,
__ZNK4AMCP6Object7expiredEv, __ZNK4AMCP6Object8get_iconERKN10applesauce2CF6URLRefE,
__ZNK4AMCP6Object8get_iconEv, __ZNK4AMCP6Object8get_nameERKN10applesauce2CF9StringRefE,
__ZNK4AMCP6Object8get_nameEv, __ZNK4AMCP6Object9get_ownerEv,
__ZNK4AMCP6Stream11get_latencyEv, __ZNK4AMCP6Stream13get_directionEv,
__ZNK4AMCP6Stream13is_tap_streamEv, __ZNK4AMCP6Stream17get_terminal_typeEv,
__ZNK4AMCP6Stream18get_current_formatEv, __ZNK4AMCP6Stream18set_current_formatERKN2CA17StreamDescriptionE,
__ZNK4AMCP6Stream20get_starting_channelEv, __ZNK4AMCP6Stream25get_available_format_listEv,
__ZNK4AMCP6Stream27set_current_format_and_waitERKN2CA17StreamDescriptionE,
__ZNK4AMCP6System12get_box_listEv, __ZNK4AMCP6System13get_node_listEv,
__ZNK4AMCP6System14get_clock_listEv, __ZNK4AMCP6System15get_device_listEv,
__ZNK4AMCP6System15get_driver_listEv, __ZNK4AMCP6System19get_io_context_listEv,
__ZNK4AMCP6System31wait_for_notification_quiesenceEd, __ZNK4AMCP6System32create_ioc_graph_update_observerERKNSt3__14pairINS1_8functionIFNS2_INS_17Graph_DescriptionENS_25Modify_Graph_Destroy_ListEEEvEEENS3_IFvRKS4_EEEEE,
__ZNK4AMCP6System33create_end_config_change_observerERKNSt3__18functionIFvjRKNS1_5tupleIJNS1_6vectorIjNS1_9allocatorIjEEEES7_N5boost9container8flat_mapIjNS3_IJNSA_INS_7AddressENS_5ThingENSB_15Is_Exact_BeforeENS9_13new_allocatorINS1_4pairISB_SC_EEEEEESI_SI_EEENS1_4lessIjEENSE_INSF_IjSJ_EEEEEEEEEEEE,
__ZNK4AMCP6System33create_end_config_change_observerERKNSt3__18functionIFvjbRKNS1_5tupleIJNS1_6vectorIjNS1_9allocatorIjEEEES7_N5boost9container8flat_mapIjNS3_IJNSA_INS_7AddressENS_5ThingENSB_15Is_Exact_BeforeENS9_13new_allocatorINS1_4pairISB_SC_EEEEEESI_SI_EEENS1_4lessIjEENSE_INSF_IjSJ_EEEEEEEEEEEE,
__ZNK4AMCP6System35create_begin_config_change_observerERKNSt3__18functionIFvjEEE,
__ZNK4AMCP6System35create_begin_config_change_observerERKNSt3__18functionIFvjbRKNS1_5tupleIJNS1_6vectorIjNS1_9allocatorIjEEEES7_N5boost9container8flat_mapIjNS3_IJNSA_INS_7AddressENS_5ThingENSB_15Is_Exact_BeforeENS9_13new_allocatorINS1_4pairISB_SC_EEEEEESI_SI_EEENS1_4lessIjEENSE_INSF_IjSJ_EEEEEEEEEEEE,
__ZNK4AMCP6System35execute_task_against_config_changesERKNSt3__18functionIFvvEEE,
__ZNK4AMCP6System38find_devices_to_stop_for_config_changeEj,
__ZNK4AMCP6System40create_continuing_config_change_observerERKNSt3__18functionIFvjbRKNS1_5tupleIJNS1_6vectorIjNS1_9allocatorIjEEEES7_N5boost9container8flat_mapIjNS3_IJNSA_INS_7AddressENS_5ThingENSB_15Is_Exact_BeforeENS9_13new_allocatorINS1_4pairISB_SC_EEEEEESI_SI_EEENS1_4lessIjEENSE_INSF_IjSJ_EEEEEEEEEEEE,
__ZNK4AMCP6System41execute_task_against_config_changes_asyncERKNSt3__18functionIFvvEEE,
__ZNK4AMCP7Control11get_elementEv, __ZNK4AMCP7Control12is_read_onlyEv,
__ZNK4AMCP7Control9get_scopeEv, __ZNK4AMCP9IOContext11get_latencyEv,
__ZNK4AMCP9IOContext12stop_runningEv, __ZNK4AMCP9IOContext13get_tail_timeEv,
__ZNK4AMCP9IOContext13start_runningEb, __ZNK4AMCP9IOContext13start_runningEv,
__ZNK4AMCP9IOContext15stop_prewarmingEv, __ZNK4AMCP9IOContext16start_prewarmingEb,
__ZNK4AMCP9IOContext16start_prewarmingEv, __ZNK4AMCP9IOContext18get_io_cycle_usageEv,
__ZNK4AMCP9IOContext19get_transport_stateEv, __ZNK4AMCP9IOContext21get_buffer_frame_sizeEv,
__ZNK4AMCP9IOContext22get_actual_sample_rateEv, __ZNK4AMCP9IOContext33get_min_and_max_buffer_frame_sizeEv,
__ZNK4AMCP9IOContext38will_handle_overload_with_catchup_modeEv,
__ZTIN4AMCP11Null_DriverE, __ZTIN4AMCP13Level_ControlE, __ZTIN4AMCP14Slider_ControlE,
__ZTIN4AMCP15Boolean_ControlE, __ZTIN4AMCP16Selector_ControlE,
__ZTIN4AMCP18Stereo_Pan_ControlE, __ZTIN4AMCP3BoxE, __ZTIN4AMCP4NodeE,
__ZTIN4AMCP5ClockE, __ZTIN4AMCP6DeviceE, __ZTIN4AMCP6DriverE,
__ZTIN4AMCP6ObjectE, __ZTIN4AMCP6StreamE, __ZTIN4AMCP6SystemE,
__ZTIN4AMCP7ControlE, __ZTIN4AMCP8DSP_NodeE, __ZTIN4AMCP9IOContextE,
__ZTSN4AMCP11Null_DriverE, __ZTSN4AMCP13Level_ControlE, __ZTSN4AMCP14Slider_ControlE,
__ZTSN4AMCP15Boolean_ControlE, __ZTSN4AMCP16Selector_ControlE,
__ZTSN4AMCP18Stereo_Pan_ControlE, __ZTSN4AMCP3BoxE, __ZTSN4AMCP4NodeE,
__ZTSN4AMCP5ClockE, __ZTSN4AMCP6DeviceE, __ZTSN4AMCP6DriverE,
__ZTSN4AMCP6ObjectE, __ZTSN4AMCP6StreamE, __ZTSN4AMCP6SystemE,
__ZTSN4AMCP7ControlE, __ZTSN4AMCP8DSP_NodeE, __ZTSN4AMCP9IOContextE,
__ZTVN4AMCP11Null_DriverE, __ZTVN4AMCP13Level_ControlE, __ZTVN4AMCP14Slider_ControlE,
__ZTVN4AMCP15Boolean_ControlE, __ZTVN4AMCP16Selector_ControlE,
__ZTVN4AMCP18Stereo_Pan_ControlE, __ZTVN4AMCP3BoxE, __ZTVN4AMCP4NodeE,
__ZTVN4AMCP5ClockE, __ZTVN4AMCP6DeviceE, __ZTVN4AMCP6DriverE,
__ZTVN4AMCP6ObjectE, __ZTVN4AMCP6StreamE, __ZTVN4AMCP6SystemE,
__ZTVN4AMCP7ControlE, __ZTVN4AMCP8DSP_NodeE, __ZTVN4AMCP9IOContextE ]
objc-classes: [ CAActiveDeviceStreamsForProcess, CAProcessDevicePair, CATapDescription ]
...
|
0 | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/CoreAudio.framework | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/CoreAudio.framework/Headers/CoreAudio.h | /*==================================================================================================
File: CoreAudio/CoreAudio.h
Contains: umbrella header for the CoreAudio APIs
Copyright: (c) 1985-2010 by Apple, Inc., all rights reserved.
Bugs?: For bug reports, consult the following page on
the World Wide Web:
http://developer.apple.com/bugreporter/
==================================================================================================*/
#if !defined(CoreAudio_CoreAudio_h)
#define CoreAudio_CoreAudio_h
#include <CoreAudioTypes/CoreAudioTypes.h>
#include <CoreAudio/AudioHardware.h>
#include <CoreAudio/HostTime.h>
#endif
|
0 | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/CoreAudio.framework | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/CoreAudio.framework/Headers/AudioHardwareDeprecated.h | /*==================================================================================================
File: CoreAudio/AudioHardwareDeprecated.h
Copyright: (c) 1985-2011 by Apple, Inc., all rights reserved.
Bugs?: For bug reports, consult the following page on
the World Wide Web:
http://developer.apple.com/bugreporter/
==================================================================================================*/
#if !defined(CoreAudio_AudioHardwareDeprecated_h)
#define CoreAudio_AudioHardwareDeprecated_h
//==================================================================================================
// Includes
#include <Availability.h>
#include <CoreAudioTypes/CoreAudioTypes.h>
#include <CoreFoundation/CoreFoundation.h>
//==================================================================================================
CF_ASSUME_NONNULL_BEGIN
#if defined(__cplusplus)
extern "C"
{
#endif
//==================================================================================================
#pragma mark -
#pragma mark Property Support Constants
/*!
@enum Property Address Constants
@abstract The valid values for the scope in a property address.
@constant kAudioDevicePropertyScopeInput
The AudioObjectPropertyScope for properties that apply to the input side of
an object.
@constant kAudioDevicePropertyScopeOutput
The AudioObjectPropertyScope for properties that apply to the output side of
an object.
@constant kAudioDevicePropertyScopePlayThrough
The AudioObjectPropertyScope for properties that apply to the play through
side of an object.
*/
CF_ENUM(AudioObjectPropertyScope)
{
kAudioDevicePropertyScopeInput = kAudioObjectPropertyScopeInput,
kAudioDevicePropertyScopeOutput = kAudioObjectPropertyScopeOutput,
kAudioDevicePropertyScopePlayThrough = kAudioObjectPropertyScopePlayThrough
};
/*!
@enum Property Wildcard Constants
@abstract Constants that are used as wildcards in an AudioObjectPropertyAddress.
@discussion Wildcards match any and all values for there associated type. They are
especially useful for registering listener procs to receive notifications and
for querying an AudioObject's list of AudioControls.
@constant kAudioPropertyWildcardPropertyID
A synonym for kAudioObjectPropertySelectorWildcard.
@constant kAudioPropertyWildcardSection
The wildcard value for the isInput argument of AudioDeviceGetPropertyInfo(),
AudioDeviceGetProperty(), and AudioDeviceSetProperty().
@constant kAudioPropertyWildcardChannel
A synonym for kAudioObjectPropertyElementWildcard.
*/
CF_ENUM(AudioObjectPropertySelector)
{
kAudioPropertyWildcardPropertyID = kAudioObjectPropertySelectorWildcard
};
CF_ENUM(unsigned char)
{
kAudioPropertyWildcardSection = 0xFF
};
CF_ENUM(AudioObjectPropertyElement)
{
kAudioPropertyWildcardChannel = kAudioObjectPropertyElementWildcard
};
//==================================================================================================
#pragma mark -
#pragma mark AudioControl Constants
/*!
@enum AudioBooleanControl Subclass IDs
@abstract The four char codes that identify the various standard subclasses of
AudioBooleanControl.
@constant kAudioISubOwnerClassID
An AudioBooleanControl where true means that the AudioDevice that
ultimately owns the control also owns any iSub attached to the CPU.
*/
CF_ENUM(AudioClassID)
{
kAudioISubOwnerControlClassID = 'atch'
};
//==================================================================================================
#pragma mark AudioControl Properties
/*!
@enum AudioLevelControl Properties
@abstract AudioObjectPropertySelector values that apply to all AudioLevelControls.
@discussion AudioLevelControl is a subclass of AudioControl and has only the single scope,
kAudioObjectPropertyScopeGlobal, and only a main element.
@constant kAudioLevelControlPropertyDecibelsToScalarTransferFunction
A UInt32 whose value indicates the transfer function the HAL uses to convert
between decibel values and scalar values.
*/
CF_ENUM(AudioObjectPropertySelector)
{
kAudioLevelControlPropertyDecibelsToScalarTransferFunction = 'lctf'
};
/*!
@enum Values for kAudioLevelControlPropertyDecibelsToScalarTransferFunction
@abstract The following constants are the only supported values for a volume control's
transfer function.
@discussion The transfer function implemented in the volume control works by raising the
scalar value to an exponent to map it into the decibel range. The constants
in this enum express the exponent used in the name as a quotient. For example,
kAudioLevelControlTranferFunction3Over4 represents the exponent 0.75.
*/
typedef CF_ENUM(UInt32, AudioLevelControlTransferFunction)
{
kAudioLevelControlTranferFunctionLinear = 0,
kAudioLevelControlTranferFunction1Over3 = 1,
kAudioLevelControlTranferFunction1Over2 = 2,
kAudioLevelControlTranferFunction3Over4 = 3,
kAudioLevelControlTranferFunction3Over2 = 4,
kAudioLevelControlTranferFunction2Over1 = 5,
kAudioLevelControlTranferFunction3Over1 = 6,
kAudioLevelControlTranferFunction4Over1 = 7,
kAudioLevelControlTranferFunction5Over1 = 8,
kAudioLevelControlTranferFunction6Over1 = 9,
kAudioLevelControlTranferFunction7Over1 = 10,
kAudioLevelControlTranferFunction8Over1 = 11,
kAudioLevelControlTranferFunction9Over1 = 12,
kAudioLevelControlTranferFunction10Over1 = 13,
kAudioLevelControlTranferFunction11Over1 = 14,
kAudioLevelControlTranferFunction12Over1 = 15
};
//==================================================================================================
#pragma mark -
#pragma mark AudioSystemObject Types
/*!
@typedef AudioHardwarePropertyID
@abstract An AudioHardwarePropertyID is a integer that identifies a specific piece of
information about the AudioSystemObject.
*/
typedef AudioObjectPropertySelector AudioHardwarePropertyID;
/*!
@typedef AudioHardwarePropertyListenerProc
@abstract Clients register an AudioHardwarePropertyListenerProc with the AudioSystemObject
in order to receive notifications when the properties of the object change.
@discussion Note that the same functionality is provided by AudioObjectPropertyListenerProc.
@param inPropertyID
The AudioHardwarePropertyID of the property that changed.
@param inClientData
A pointer to client data established when the listener proc was registered
with the AudioSystemObject.
@result The return value is currently unused and should always be 0.
*/
typedef OSStatus
(*AudioHardwarePropertyListenerProc)( AudioHardwarePropertyID inPropertyID,
void* __nullable inClientData);
//==================================================================================================
#pragma mark AudioSystemObject Constants
/*!
@defined kAudioHardwareRunLoopMode
@discussion The name of the run loop mode to which only HAL run loop sources and sources
added via AudioHardwareAddRunLoopSource() belong. This is the mode in which to
task a run loop in order to ensure that just HAL related events are handled.
*/
#define kAudioHardwareRunLoopMode "com.apple.audio.CoreAudio"
//==================================================================================================
#pragma mark AudioSystemObject Properties
/*!
@enum AudioSystemObject Properties
@abstract AudioObjectPropertySelector values that apply to the AudioSystemObject.
@discussion The AudioSystemObject has one scope, kAudioObjectPropertyScopeGlobal, and only a
main element.
@constant kAudioHardwarePropertyRunLoop
The CFRunLoopRef the HAL is currently attaching all of its system
notification handlers to. In 10.6 and later, the HAL will use the process's
run loop (as defined by CFRunLoopGetMain()) for this task. Whereas in
previous releases, the HAL created and managed its own thread for the task.
Clients can set this property to tell the HAL to use a thread of the
client's choosing. If the value for this property is set to NULL, the HAL
will return to its pre-10.6 behavior of creating and managing its own
thread for notifications. The caller is responsible for releasing the
returned CFObject.
@constant kAudioHardwarePropertyDeviceForUID
Using an AudioValueTranslation structure, this property translates the input
CFStringRef containing a UID into the AudioDeviceID that refers to the
AudioDevice with that UID. This property will return kAudioDeviceUnknown if
the given UID does not match any currently available AudioDevice.
@constant kAudioHardwarePropertyPlugInForBundleID
Using an AudioValueTranslation structure, this property translates the input
CFString containing a bundle ID into the AudioObjectID of the AudioPlugIn
that corresponds to it. This property will return kAudioObjectUnkown if the
given bundle ID doesn't match any AudioPlugIns.
@constant kAudioHardwarePropertyProcessIsMaster
The deprecated synonym for kAudioHardwarePropertyProcessIsMain
*/
CF_ENUM(AudioObjectPropertySelector)
{
kAudioHardwarePropertyRunLoop = 'rnlp',
kAudioHardwarePropertyDeviceForUID = 'duid',
kAudioHardwarePropertyPlugInForBundleID = 'pibi',
kAudioHardwarePropertyProcessIsMaster API_DEPRECATED_WITH_REPLACEMENT("kAudioHardwarePropertyProcessIsMain", macos(10.0, 12.0), ios(2.0, 15.0), watchos(1.0, 8.0), tvos(9.0, 15.0)) = 'mast'
};
/*!
@enum AudioSystemObject Properties Implemented via AudioControl objects
@abstract AudioObjectPropertySelector values for AudioSystemObject properties that are
implemented by AudioControl objects.
@discussion These properties are also accessible by locating the AudioControl object
attached to the AudioSystemObject and using that object to access the properties
of the control.
@constant kAudioHardwarePropertyBootChimeVolumeScalar
A Float32 that represents the value of the boot chime volume control. The
range is between 0.0 and 1.0 (inclusive). This property is implemented by an
AudioControl object that is a subclass of AudioBootChimeVolumeControl.
@constant kAudioHardwarePropertyBootChimeVolumeDecibels
A Float32 that represents the value of the boot chime volume control in dB.
This property is implemented by an AudioControl object that is a subclass
of AudioBootChimeVolumeControl.
@constant kAudioHardwarePropertyBootChimeVolumeRangeDecibels
An AudioValueRange that contains the minimum and maximum dB values the
boot chime control can have. This property is implemented by an AudioControl
object that is a subclass of AudioBootChimeVolumeControl.
@constant kAudioHardwarePropertyBootChimeVolumeScalarToDecibels
A Float32 that on input contains a scalar volume value for the boot chime
and on exit contains the equivalent dB value. This property is implemented
by an AudioControl object that is a subclass of AudioBootChimeVolumeControl.
@constant kAudioHardwarePropertyBootChimeVolumeDecibelsToScalar
A Float32 that on input contains a dB volume value for the boot chime and on
exit contains the equivalent scalar value. This property is implemented by
an AudioControl object that is a subclass of AudioBootChimeVolumeControl.
@constant kAudioHardwarePropertyBootChimeVolumeDecibelsToScalarTransferFunction
A UInt32 whose value indicates the transfer function the HAL uses to convert
between decibel values and scalar values. This property is implemented by an
AudioControl object that is a subclass of AudioBootChimeVolumeControl.
*/
CF_ENUM(AudioObjectPropertySelector)
{
kAudioHardwarePropertyBootChimeVolumeScalar = 'bbvs',
kAudioHardwarePropertyBootChimeVolumeDecibels = 'bbvd',
kAudioHardwarePropertyBootChimeVolumeRangeDecibels = 'bbd#',
kAudioHardwarePropertyBootChimeVolumeScalarToDecibels = 'bv2d',
kAudioHardwarePropertyBootChimeVolumeDecibelsToScalar = 'bd2v',
kAudioHardwarePropertyBootChimeVolumeDecibelsToScalarTransferFunction = 'bvtf'
};
//==================================================================================================
#pragma mark AudioSystemObject Functions
/*!
@functiongroup AudioSystemObject
*/
/*!
@function AudioHardwareAddRunLoopSource
@abstract Add the given CFRunLoopSource to the the HAL's notification CFRunLoop.
@discussion The CFRunLoop the HAL uses for notifications is specified by
kAudioHardwarePropertyRunLoop. If kAudioHardwarePropertyRunLoop changes,
CFRunLoopSources added with this function will automatically be transferred to
the new CFRunLoop.
Usage of the HAL's notification run loop is deprecated. Please use libdispatch
instead.
@param inRunLoopSource
The CFRunLoopSource to add.
@result An OSStatus indicating success or failure.
*/
extern OSStatus
AudioHardwareAddRunLoopSource(CFRunLoopSourceRef inRunLoopSource) __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_3, __MAC_10_7, __IPHONE_2_0, __IPHONE_4_1);
/*!
@function AudioHardwareRemoveRunLoopSource
@abstract Remove the given CFRunLoopSource from the the HAL's notification CFRunLoop.
@discussion The CFRunLoop the HAL uses for notifications is specified by
kAudioHardwarePropertyRunLoop.
Usage of the HAL's notification run loop is deprecated. Please use libdispatch
instead.
@param inRunLoopSource
The CFRunLoopSource to remove.
@result An OSStatus indicating success or failure.
*/
extern OSStatus
AudioHardwareRemoveRunLoopSource(CFRunLoopSourceRef inRunLoopSource) __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_3, __MAC_10_7, __IPHONE_2_0, __IPHONE_4_1);
/*!
@function AudioHardwareGetPropertyInfo
@abstract Retrieve information about the given property.
@discussion Note that the same functionality is provided by the functions
AudioObjectHasProperty(), AudioObjectIsPropertySettable(), and
AudioObjectGetPropertyDataSize().
@param inPropertyID
The AudioHardwarePropertyID of the property to query.
@param outSize
A pointer to a UInt32 that receives the size of the property data in bytes
on exit. This can be NULL if the size information is not being requested.
@param outWritable
A pointer to a Boolean that receives indication of whether or not the given
property can be set. This can be NULL if the writability is not being
requested.
@result An OSStatus indicating success or failure.
*/
extern OSStatus
AudioHardwareGetPropertyInfo( AudioHardwarePropertyID inPropertyID,
UInt32* __nullable outSize,
Boolean* __nullable outWritable) __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_6, __IPHONE_2_0, __IPHONE_2_0);
/*!
@function AudioHardwareGetProperty
@abstract Queries an the AudioSystemObject to get the data of the given property and
places it in the provided buffer.
@discussion Note that the same functionality is provided by the function
AudioObjectGetPropertyData().
@param inPropertyID
The AudioHardwarePropertyID of the property to query.
@param ioPropertyDataSize
A UInt32 which on entry indicates the size of the buffer pointed to by
outData and on exit indicates how much of the buffer was used.
@param outPropertyData
The buffer into which the AudioSystemObject will put the data for the given
property.
@result An OSStatus indicating success or failure.
*/
extern OSStatus
AudioHardwareGetProperty( AudioHardwarePropertyID inPropertyID,
UInt32* ioPropertyDataSize,
void* outPropertyData) __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_6, __IPHONE_2_0, __IPHONE_2_0);
/*!
@function AudioHardwareSetProperty
@abstract Tells the AudioSystemObject to change the value of the given property using the
provided data.
@discussion Note that the value of the property should not be considered changed until the
HAL has called the listeners as many properties values are changed
asynchronously. Also note that the same functionality is provided by the
function AudioObjectGetPropertyData().
@param inPropertyID
The AudioHardwarePropertyID of the property to change.
@param inPropertyDataSize
A UInt32 indicating the size of the buffer pointed to by inData.
@param inPropertyData
The buffer containing the data to be used to change the property's value.
@result An OSStatus indicating success or failure.
*/
extern OSStatus
AudioHardwareSetProperty( AudioHardwarePropertyID inPropertyID,
UInt32 inPropertyDataSize,
const void* inPropertyData) __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_6, __IPHONE_2_0, __IPHONE_2_0);
/*!
@function AudioHardwareAddPropertyListener
@abstract Registers the given AudioHardwarePropertyListenerProc to receive notifications
when the given property changes.
@discussion Note that the same functionality is provided by AudioObjectAddPropertyListener
in conjunction with AudioObjectPropertyListenerProc.
@param inPropertyID
The AudioHardwarePropertyID of the property to listen to.
@param inProc
AudioHardwarePropertyListenerProc to call.
@param inClientData
A pointer to client data that is passed to the listener when it is called.
@result An OSStatus indicating success or failure.
*/
extern OSStatus
AudioHardwareAddPropertyListener( AudioHardwarePropertyID inPropertyID,
AudioHardwarePropertyListenerProc inProc,
void* __nullable inClientData) __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_6, __IPHONE_2_0, __IPHONE_2_0);
/*!
@function AudioHardwareRemovePropertyListener
@abstract Unregisters the given AudioHardwarePropertyListenerProc from receive
notifications when the given property changes.
@discussion Note that the same functionality is provided by
AudioObjectRemovePropertyListener in conjunction with
AudioObjectPropertyListenerProc.
@param inPropertyID
The AudioHardwarePropertyID of the property to stop listening to.
@param inProc
AudioHardwarePropertyListenerProc to unregister.
@result An OSStatus indicating success or failure.
*/
extern OSStatus
AudioHardwareRemovePropertyListener( AudioHardwarePropertyID inPropertyID,
AudioHardwarePropertyListenerProc inProc) __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_6, __IPHONE_2_0, __IPHONE_2_0);
//==================================================================================================
#pragma mark -
#pragma mark AudioDevice Types
/*!
@typedef AudioDeviceID
@abstract AudioDevice is the base class for all objects that represent an audio device.
@discussion AudioDevice is a subclass of AudioObject. AudioDevices normally contain
AudioStreams and AudioControls, but may contain other things depending on the
kind of AudioDevice (e.g. aggregate devices contain other AudioDevices).
*/
typedef AudioObjectID AudioDeviceID;
/*!
@typedef AudioDevicePropertyID
@abstract An AudioDevicePropertyID is an integer that identifies a specific piece of
information about the object.
*/
typedef AudioObjectPropertySelector AudioDevicePropertyID;
/*!
@typedef AudioDevicePropertyListenerProc
@abstract Clients register an AudioDevicePropertyListenerProc with the AudioDevice object
in order to receive notifications when the properties of the object change.
@discussion Note that the same functionality is provided by AudioObjectPropertyListenerProc.
@param inDevice
The AudioDevice whose property has changed.
@param inChannel
The channel of the property that changed where 0 is the main channel.
@param isInput
Which section of the AudioDevice changed.
@param inPropertyID
The AudioDevicePropertyID of the property that changed.
@param inClientData
A pointer to client data established when the listener proc was registered
with the object.
@result The return value is currently unused and should always be 0.
*/
typedef OSStatus
(*AudioDevicePropertyListenerProc)( AudioDeviceID inDevice,
UInt32 inChannel,
Boolean isInput,
AudioDevicePropertyID inPropertyID,
void* __nullable inClientData);
//==================================================================================================
#pragma mark AudioDevice Constants
/*!
@enum AudioDevice Class Constants
@abstract Various constants related to AudioDevices.
@constant kAudioDeviceUnknown
The AudioObjectID for a nonexistent AudioObject.
*/
CF_ENUM(AudioObjectID)
{
kAudioDeviceUnknown = kAudioObjectUnknown
};
/*!
@enum Transport Type IDs
@abstract Commonly used values for kAudioDevicePropertyTransportType and
kAudioTransportManagerPropertyTransportType
@constant kAudioDeviceTransportTypeAutoAggregate
The transport type ID for automatically generated aggregate devices.
*/
CF_ENUM(UInt32)
{
kAudioDeviceTransportTypeAutoAggregate = 'fgrp'
};
//==================================================================================================
#pragma mark AudioDevice Properties
/*!
@enum AudioDevice Properties Implemented via AudioControl objects
@abstract AudioObjectPropertySelector values for AudioDevice properties that are
implemented by AudioControl objects.
@discussion These properties are also accessible by locating the AudioControl object
attached to the AudioDevice and using that object to access the properties of
the control.
@constant kAudioDevicePropertyVolumeDecibelsToScalarTransferFunction
A UInt32 whose value indicates the transfer function the HAL uses to convert
between decibel values and scalar values. This property is implemented by an
AudioControl object that is a subclass of AudioVolumeControl.
@constant kAudioDevicePropertyPlayThruVolumeDecibelsToScalarTransferFunction
A UInt32 whose value indicates the transfer function the HAL uses to convert
between decibel values and scalar values. This property is implemented by an
AudioControl object that is a subclass of AudioVolumeControl. Further, the
control that implements this property is only available through
kAudioDevicePropertyScopePlayThrough.
@constant kAudioDevicePropertyDriverShouldOwniSub
A UInt32 where a value of 0 means that the AudioDevice should not claim
ownership of any attached iSub and a value of 1 means that it should. Note
that this property is only available for built-in devices and for USB Audio
devices that use the standard class compliant driver. This property is
implemented by an AudioControl object that is a subclass of
AudioISubOwnerControl.
@constant kAudioDevicePropertySubVolumeDecibelsToScalarTransferFunction
A UInt32 whose value indicates the transfer function the HAL uses to convert
between decibel values and scalar values. This property is implemented by an
AudioControl object that is a subclass of AudioLFEVolumeControl.
*/
CF_ENUM(AudioObjectPropertySelector)
{
kAudioDevicePropertyVolumeDecibelsToScalarTransferFunction = 'vctf',
kAudioDevicePropertyPlayThruVolumeDecibelsToScalarTransferFunction = 'mvtf',
kAudioDevicePropertyDriverShouldOwniSub = 'isub',
kAudioDevicePropertySubVolumeDecibelsToScalarTransferFunction = 'svtf'
};
/*!
@enum AudioDevice Properties That Ought To Some Day Be Deprecated
@abstract AudioObjectPropertySelector values whose functionality is better provided by
other selectors.
@discussion These selectors are still provided for backward compatibility. The description
of the property will indicate in parentheses the better selectors to use and
why.
@constant kAudioDevicePropertyDeviceName
A C-string that contains the human readable name of the AudioDevice.
(kAudioObjectPropertyName: CFStrings are better for localization.)
@constant kAudioDevicePropertyDeviceNameCFString
A CFStringRef that contains the human readable name of the AudioDevice. The
caller is responsible for releasing the returned CFObject.
(kAudioObjectPropertyName: This is just another name for the inherited
selector.)
@constant kAudioDevicePropertyDeviceManufacturer
A C-string that contains the human readable name of the manufacturer of the
AudioDevice.
(kAudioObjectPropertyManufacturer: CFStrings are better for localization.)
@constant kAudioDevicePropertyDeviceManufacturerCFString
A CFString that contains the human readable name of the manufacturer of the
AudioDevice. The caller is responsible for releasing the returned CFObject.
(kAudioObjectPropertyManufacturer: This is just another name for the
inherited selector.)
@constant kAudioDevicePropertyRegisterBufferList
This property allows clients to register a fully populated AudioBufferList
that matches the topology described by
kAudioDevicePropertyStreamConfiguration for doing input using
AudioDeviceRead(). The AudioBufferList will be registered with the call the
AudioDeviceSetProperty() and will be unregistered with the call to
AudioDeviceGetProperty(). If this property isn't implemented by the
AudioDevice, it implies that the AudioDevice also doesn't support
AudioDeviceRead().
(Aggregate devices make AudioDeviceRead() obsolete for the most part.)
@constant kAudioDevicePropertyBufferSize
A UInt32 containing the size in bytes of the IO buffer for the AudioStream
containing the element.
(kAudioDevicePropertyBufferFrameSize: with multiple AudioStreams and the
requirement that all streams' buffers represent the same amount of time, it
doesn't make sense to set the buffer size in bytes since it will be
different for each stream.)
@constant kAudioDevicePropertyBufferSizeRange
An AudioValueRange specifying the minimum and maximum bytes size for the
IO buffer for the AudioStream containing the given element.
(kAudioDevicePropertyBufferFrameSizeRange: see
kAudioDevicePropertyBufferSize.)
@constant kAudioDevicePropertyChannelName
A C-string that contains a human readable name for the given element in the
given scope. The caller is responsible for releasing the returned CFObject.
(kAudioObjectPropertyElementName: CFStrings are better for
localization.)
@constant kAudioDevicePropertyChannelNameCFString
A CFString that contains a human readable name for the given element in the
given scope. The caller is responsible for releasing the returned CFObject.
(kAudioObjectPropertyElementName: This is just another name for the
inherited selector.)
@constant kAudioDevicePropertyChannelCategoryName
A C-string that contains a human readable name for the category of the given
element in the given scope. The caller is responsible for releasing the
returned CFObject.
(kAudioObjectPropertyElementCategoryName: CFStrings are better for
localization.)
@constant kAudioDevicePropertyChannelCategoryNameCFString
A CFString that contains a human readable name for the category of the given
element in the given scope. The caller is responsible for releasing the
returned CFObject.
(kAudioObjectPropertyElementCategoryName: This is just another name for the
inherited selector.)
@constant kAudioDevicePropertyChannelNumberName
A C-string that contains a human readable name for the number of the given
element in the given scope. The caller is responsible for releasing the
returned CFObject.
(kAudioObjectPropertyElementNumberName: CFStrings are better for
localization.)
@constant kAudioDevicePropertyChannelNumberNameCFString
A CFString that contains a human readable name for the number of the given
element in the given scope. The caller is responsible for releasing the
returned CFObject.
(kAudioObjectPropertyElementNumberName: This is just another name for the
inherited selector.)
@constant kAudioDevicePropertySupportsMixing
A UInt32 where a value of 1 means the AudioDevice supports mixing and a
value of 0 means that it doesn't and that all IO is performed in each
AudioStream's current physical format. This property is changed indirectly
by changing to a format that doesn't support mixing, such as AC-3. (The HAL
now vends its format information with a flag indicating the mixability in
order to better support devices with streams that are both mixable and non-
mixable.)
@constant kAudioDevicePropertyStreamFormat
An AudioStreamBasicDescription that describes the current data format for
the AudioStream that contains the channel referred to by the element number.
(kAudioStreamPropertyVirtualFormat: Managing format information is
inherently an operation on AudioStreams, rather than AudioDevices. It is
confusing for the client to work with formats at the AudioDevice level and
has been shown to lead to programming mistakes by clients when working with
devices that have multiple streams.)
@constant kAudioDevicePropertyStreamFormats
An array of AudioStreamBasicDescriptions that describe the available data
formats for the AudioStream that contains the channel referred to by the
element number.
(kAudioStreamPropertyAvailableVirtualFormats: Managing format information is
inherently an operation on AudioStreams, rather than AudioDevices. It is
confusing for the client to work with formats at the AudioDevice level and
has been shown to lead to programming mistakes by clients when working with
devices that have multiple streams.)
@constant kAudioDevicePropertyStreamFormatSupported
An AudioStreamBasicDescription is passed in to query whether or not the
format is supported. A kAudioDeviceUnsupportedFormatError will be returned
if the format is not supported and kAudioHardwareNoError will be returned if
it is supported. AudioStreamBasicDescription fields set to 0 will be ignored
in the query, but otherwise values must match exactly.
(kAudioStreamPropertyAvailableVirtualFormats: The proper and most robust way
to find a format that the AudioStream can support is to get the list of
available formats and look through that rather than using this property.)
@constant kAudioDevicePropertyStreamFormatMatch
An AudioStreamBasicDescription is passed in and the AudioStream will modify
it to describe the best match, in the AudioDevice's opinion, for the given
format.
(kAudioStreamPropertyAvailableVirtualFormats: The proper and most robust way
to find a format that the AudioStream can support is to get the list of
available formats and look through that rather than using this property.)
@constant kAudioDevicePropertyDataSourceNameForID
This property translates the given data source item ID into a human readable
name using an AudioValueTranslation structure. The input data is the UInt32
holding the item ID to be translated and the output data is a buffer to hold
the name as a null terminated C-string.
(kAudioDevicePropertyDataSourceNameForIDCFString: CFStrings are better for
localization.)
@constant kAudioDevicePropertyClockSourceNameForID
This property translates the given clock source item ID into a human
readable name using an AudioValueTranslation structure. The input data is
the UInt32 holding the item ID to be translated and the output data is a
buffer to hold the name as a null terminated C-string.
(kAudioDevicePropertyClockSourceNameForIDCFString: CFStrings are better for
localization.)
@constant kAudioDevicePropertyPlayThruDestinationNameForID
This property translates the given play through destination item ID into a
human readable name using an AudioValueTranslation structure. The input data
is the UInt32 holding the item ID to be translated and the output data is a
buffer to hold the name as a null terminated C-string.
(kAudioDevicePropertyPlayThruDestinationNameForIDCFString: CFStrings are
better for localization.)
@constant kAudioDevicePropertyChannelNominalLineLevelNameForID
This property translates the given nominal line level item ID into a human
readable name using an AudioValueTranslation structure. The input data is
the UInt32 holding the item ID to be translated and the output data is a
buffer to hold the name as a null terminated C-string.
(kAudioDevicePropertyChannelNominalLineLevelNameForIDCFString: CFStrings are
better for localization.)
@constant kAudioDevicePropertyHighPassFilterSettingNameForID
This property translates the given high pass filter setting item ID into a
human readable name using an AudioValueTranslation structure. The input data
is the UInt32 holding the item ID to be translated and the output data is a
buffer to hold the name as a null terminated C-string.
(kAudioDevicePropertyHighPassFilterSettingNameForIDCFString: CFStrings are
better for localization.)
*/
CF_ENUM(AudioObjectPropertySelector)
{
kAudioDevicePropertyDeviceName = 'name',
kAudioDevicePropertyDeviceNameCFString = kAudioObjectPropertyName,
kAudioDevicePropertyDeviceManufacturer = 'makr',
kAudioDevicePropertyDeviceManufacturerCFString = kAudioObjectPropertyManufacturer,
kAudioDevicePropertyRegisterBufferList = 'rbuf',
kAudioDevicePropertyBufferSize = 'bsiz',
kAudioDevicePropertyBufferSizeRange = 'bsz#',
kAudioDevicePropertyChannelName = 'chnm',
kAudioDevicePropertyChannelNameCFString = kAudioObjectPropertyElementName,
kAudioDevicePropertyChannelCategoryName = 'ccnm',
kAudioDevicePropertyChannelCategoryNameCFString = kAudioObjectPropertyElementCategoryName,
kAudioDevicePropertyChannelNumberName = 'cnnm',
kAudioDevicePropertyChannelNumberNameCFString = kAudioObjectPropertyElementNumberName,
kAudioDevicePropertySupportsMixing = 'mix?',
kAudioDevicePropertyStreamFormat = 'sfmt',
kAudioDevicePropertyStreamFormats = 'sfm#',
kAudioDevicePropertyStreamFormatSupported = 'sfm?',
kAudioDevicePropertyStreamFormatMatch = 'sfmm',
kAudioDevicePropertyDataSourceNameForID = 'sscn',
kAudioDevicePropertyClockSourceNameForID = 'cscn',
kAudioDevicePropertyPlayThruDestinationNameForID = 'mddn',
kAudioDevicePropertyChannelNominalLineLevelNameForID = 'cnlv',
kAudioDevicePropertyHighPassFilterSettingNameForID = 'chip'
};
//==================================================================================================
#pragma mark AudioDevice Functions
/*!
@functiongroup AudioDevice
*/
/*!
@function AudioDeviceAddIOProc
@abstract Registers the given AudioDeviceIOProc with the AudioDevice.
@discussion A client may have multiple IOProcs for a given device, but the device is free to
only accept as many as it can handle. Note that it is not recommended for
clients to have more than a single IOProc registered at a time as this can be
wasteful of system resources. Rather, it is recommended that the client do any
necessary mixing itself so that only one IOProc is necessary.
This routine has been deprecated in favor of AudioDeviceCreateIOProcID().
@param inDevice
The AudioDevice to register the IOProc with.
@param inProc
The AudioDeviceIOProc to register.
@param inClientData
A pointer to client data that is passed back to the IOProc when it is
called.
@result An OSStatus indicating success or failure.
*/
extern OSStatus
AudioDeviceAddIOProc( AudioDeviceID inDevice,
AudioDeviceIOProc inProc,
void* __nullable inClientData) __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_5, __IPHONE_2_0, __IPHONE_2_0);
/*!
@function AudioDeviceRemoveIOProc
@abstract Unregisters the given AudioDeviceIOProc from the AudioDevice.
This routine has been deprecated in favor of AudioDeviceDestroyIOProcID().
@param inDevice
The AudioDevice to unregister the IOProc from.
@param inProc
The AudioDeviceIOProc to unregister.
@result An OSStatus indicating success or failure.
*/
extern OSStatus
AudioDeviceRemoveIOProc( AudioDeviceID inDevice,
AudioDeviceIOProc inProc) __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_5, __IPHONE_2_0, __IPHONE_2_0);
/*!
@function AudioDeviceRead
@abstract Read some data from an AudioDevice starting at the given time.
@discussion With the advent of aggregate devices, the need for AudioDeviceRead has gone
away. Consequently, this function is now deprecated.
@param inDevice
The AudioDevice to read from.
@param inStartTime
An AudioTimeStamp indicating the time from which to read the data. In
general, the valid range of time (in frames) is from the current time minus
the maximum IO buffer size to the current time minus the safety offset.
@param outData
An AudioBufferList that must be the same size and shape as that returned by
kAudioDevicePropertyStreamConfiguration. Further, the AudioBufferList must
have been previously registered with the device via
kAudioDevicePropertyRegisterBufferList. On exit, the mDataSize fields will
be updated with the amount of data read.
@result An OSStatus indicating success or failure.
kAudioHardwareUnsupportedOperationError will be returned if the AudioDevice does
not support direct reading.
*/
extern OSStatus
AudioDeviceRead( AudioDeviceID inDevice,
const AudioTimeStamp* inStartTime,
AudioBufferList* outData) __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_1, __MAC_10_5, __IPHONE_2_0, __IPHONE_2_0);
/*!
@function AudioDeviceGetPropertyInfo
@abstract Retrieve information about the given property of an AudioDevice.
@discussion Note that the same functionality is provided by the functions
AudioObjectHasProperty(), AudioObjectIsPropertySettable(), and
AudioObjectGetPropertyDataSize().
@param inDevice
The AudioDevice to query.
@param inChannel
The channel of the property to query where 0 is the main channel.
@param isInput
Which section of the AudioDevice to query.
@param inPropertyID
The AudioDevicePropertyID of the property to query.
@param outSize
A pointer to a UInt32 that receives the size of the property data in bytes
on exit. This can be NULL if the size information is not being requested.
@param outWritable
A pointer to a Boolean that receives indication of whether or not the given
property can be set. This can be NULL if the writability is not being
requested.
@result An OSStatus indicating success or failure.
*/
extern OSStatus
AudioDeviceGetPropertyInfo( AudioDeviceID inDevice,
UInt32 inChannel,
Boolean isInput,
AudioDevicePropertyID inPropertyID,
UInt32* __nullable outSize,
Boolean* __nullable outWritable) __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_6, __IPHONE_2_0, __IPHONE_2_0);
/*!
@function AudioDeviceGetProperty
@abstract Queries an the AudioDevice object to get the data of the given property and
places it in the provided buffer.
@discussion Note that the same functionality is provided by the function
AudioObjectGetPropertyData().
@param inDevice
The AudioDevice to query.
@param inChannel
The channel of the property to query where 0 is the main channel.
@param isInput
Which section of the AudioDevice to query.
@param inPropertyID
The AudioDevicePropertyID of the property to query.
@param ioPropertyDataSize
A UInt32 which on entry indicates the size of the buffer pointed to by
outData and on exit indicates how much of the buffer was used.
@param outPropertyData
The buffer into which the object will put the data for the given property.
@result An OSStatus indicating success or failure.
*/
extern OSStatus
AudioDeviceGetProperty( AudioDeviceID inDevice,
UInt32 inChannel,
Boolean isInput,
AudioDevicePropertyID inPropertyID,
UInt32* ioPropertyDataSize,
void* outPropertyData) __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_6, __IPHONE_2_0, __IPHONE_2_0);
/*!
@function AudioDeviceSetProperty
@abstract Tells the AudioDevice object to change the value of the given property using the
provided data.
@discussion Note that the value of the property should not be considered changed until the
HAL has called the listeners as many properties values are changed
asynchronously. Also note that the same functionality is provided by the
function AudioObjectSetPropertyData().
@param inDevice
The AudioDevice to change.
@param inWhen
A pointer to an AudioTimeStamp that says when to change the property's value
relative to the device's time base. NULL means execute the change
immediately.
@param inChannel
The channel of the property to change where 0 is the main channel.
@param isInput
Which section of the AudioDevice to change.
@param inPropertyID
The AudioDevicePropertyID of the property to change.
@param inPropertyDataSize
A UInt32 indicating the size of the buffer pointed to by inData.
@param inPropertyData
The buffer containing the data to be used to change the property's value.
@result An OSStatus indicating success or failure.
*/
extern OSStatus
AudioDeviceSetProperty( AudioDeviceID inDevice,
const AudioTimeStamp* __nullable inWhen,
UInt32 inChannel,
Boolean isInput,
AudioDevicePropertyID inPropertyID,
UInt32 inPropertyDataSize,
const void* inPropertyData) __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_6, __IPHONE_2_0, __IPHONE_2_0);
/*!
@function AudioDeviceAddPropertyListener
@abstract Registers the given AudioDevicePropertyListenerProc to receive notifications
when the given property changes.
@discussion Note that the same functionality is provided by AudioObjectAddPropertyListener
in conjunction with AudioObjectPropertyListenerProc.
@param inDevice
The AudioDevice with whom to register the listener.
@param inChannel
The channel of the property to listen to.
@param isInput
Which section of the AudioDevice to listen to.
@param inPropertyID
The AudioDevicePropertyID of the property to listen to.
@param inProc
AudioDevicePropertyListenerProc to call.
@param inClientData
A pointer to client data that is passed to the listener when it is called.
@result An OSStatus indicating success or failure.
*/
extern OSStatus
AudioDeviceAddPropertyListener( AudioDeviceID inDevice,
UInt32 inChannel,
Boolean isInput,
AudioDevicePropertyID inPropertyID,
AudioDevicePropertyListenerProc inProc,
void* __nullable inClientData) __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_6, __IPHONE_2_0, __IPHONE_2_0);
/*!
@function AudioDeviceRemovePropertyListener
@abstract Unregisters the given AudioDevicePropertyListenerProc from receiving
notifications when the given property changes.
@discussion Note that the same functionality is provided by
AudioObjectRemovePropertyListener in conjunction with
AudioObjectPropertyListenerProc.
@param inDevice
The AudioDevice with whom to unregister the listener.
@param inChannel
The channel of the property to unregister from.
@param isInput
Which section of the AudioDevice to unregister from.
@param inPropertyID
The AudioDevicePropertyID of the property to stop listening to.
@param inProc
AudioDevicePropertyListenerProc to unregister.
@result An OSStatus indicating success or failure.
*/
extern OSStatus
AudioDeviceRemovePropertyListener( AudioDeviceID inDevice,
UInt32 inChannel,
Boolean isInput,
AudioDevicePropertyID inPropertyID,
AudioDevicePropertyListenerProc inProc) __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_6, __IPHONE_2_0, __IPHONE_2_0);
//==================================================================================================
#pragma mark -
#pragma mark AudioAggregateDevice Constants
/*!
@defined kAudioAggregateDeviceMasterSubDeviceKey
@discussion The deprecated synonym for kAudioAggregateDeviceMainSubDeviceKey
*/
#define kAudioAggregateDeviceMasterSubDeviceKey "master"
//==================================================================================================
#pragma mark AudioAggregateDevice Properties
/*!
@enum AudioAggregateDevice Properties
@abstract AudioObjectPropertySelector values provided by the AudioAggregateDevice class.
@discussion AudioAggregateDevice is a subclass of AudioDevice and has the same scope and
element structure.
@constant kAudioAggregateDevicePropertyMasterSubDevice
The deprecated synonym for kAudioAggregateDevicePropertyMainSubDevice
*/
CF_ENUM(AudioObjectPropertySelector)
{
kAudioAggregateDevicePropertyMasterSubDevice API_DEPRECATED_WITH_REPLACEMENT("kAudioAggregateDevicePropertyMainSubDevice", macos(10.0, 12.0), ios(2.0, 15.0), watchos(1.0, 8.0), tvos(9.0, 15.0)) = kAudioAggregateDevicePropertyMainSubDevice
};
//==================================================================================================
#pragma mark -
#pragma mark AudioStream Types
/*!
@typedef AudioStreamID
@abstract AudioStream is the base class for all objects that represent a stream of data on
an audio device.
@discussion AudioStream is a subclass of AudioObject and can contain AudioControls.
*/
typedef AudioObjectID AudioStreamID;
/*!
@typedef AudioStreamPropertyListenerProc
@abstract Clients register an AudioStreamPropertyListenerProc with the AudioStream object
in order to receive notifications when the properties of the object change.
@discussion Note that the same functionality is provided by AudioObjectPropertyListenerProc.
@param inStream
The AudioStream whose property has changed.
@param inChannel
The channel of the property that changed where 0 is the main channel.
@param inPropertyID
The AudioDevicePropertyID of the property that changed.
@param inClientData
A pointer to client data established when the listener proc was registered
with the object.
@result The return value is currently unused and should always be 0.
*/
typedef OSStatus
(*AudioStreamPropertyListenerProc)( AudioStreamID inStream,
UInt32 inChannel,
AudioDevicePropertyID inPropertyID,
void* __nullable inClientData);
//==================================================================================================
#pragma mark AudioStream Constants
/*!
@enum AudioStream Class Constants
@abstract Various constants related to AudioStreams.
@constant kAudioStreamUnknown
The AudioObjectID for a nonexistent AudioObject.
*/
CF_ENUM(AudioObjectID)
{
kAudioStreamUnknown = kAudioObjectUnknown
};
//==================================================================================================
#pragma mark AudioStream Properties
/*!
@enum AudioStream Properties That Ought To Some Day Be Deprecated
@abstract AudioObjectPropertySelector values whose functionality is better provided by
other selectors.
@discussion These selectors are still provided for backward compatibility. The description
of the property will indicate in parentheses the better selectors to use and
why.
@constant kAudioStreamPropertyOwningDevice
The AudioObjectID of the AudioDevice of which this AudioStream is a part.
(kAudioObjectPropertyOwner: This is just another name for the inherited
selector.)
@constant kAudioStreamPropertyPhysicalFormats
An array of AudioStreamBasicDescriptions that describe the available data
formats for the AudioStream. The physical format refers to the data format
in which the hardware for the owning AudioDevice performs its IO
transactions.
(kAudioStreamPropertyAvailablePhysicalFormats: The new name for this
property is much clearer for readers of the API to see what is meant and the
AudioStreamRangedDescription structure provides better information.)
@constant kAudioStreamPropertyPhysicalFormatSupported
An AudioStreamBasicDescription is passed in to query whether or not the
format is supported. A kAudioDeviceUnsupportedFormatError will be returned
if the format is not supported and kAudioHardwareNoError will be returned if
it is supported. AudioStreamBasicDescription fields set to 0 will be ignored
in the query, but otherwise values must match exactly. The physical format
refers to the data format in which the hardware for the owning AudioDevice
performs its IO transactions.
(kAudioStreamPropertyAvailablePhysicalFormats: The proper and most robust
way to find a format that the AudioStream can support is to get the list of
available formats and look through that rather than using this property.)
@constant kAudioStreamPropertyPhysicalFormatMatch
An AudioStreamBasicDescription is passed in and the AudioStream will modify
it to describe the best match, in the AudioDevice's opinion, for the given
format. The physical format refers to the data format in which the hardware
for the owning AudioDevice performs its IO transactions.
(kAudioStreamPropertyAvailablePhysicalFormats: The proper and most robust
way to find a format that the AudioStream can support is to get the list of
available formats and look through that rather than using this property.)
*/
CF_ENUM(AudioObjectPropertySelector)
{
kAudioStreamPropertyOwningDevice = kAudioObjectPropertyOwner,
kAudioStreamPropertyPhysicalFormats = 'pft#',
kAudioStreamPropertyPhysicalFormatSupported = 'pft?',
kAudioStreamPropertyPhysicalFormatMatch = 'pftm'
};
//==================================================================================================
#pragma mark AudioStream Functions
/*!
@functiongroup AudioStream
*/
/*!
@function AudioStreamGetPropertyInfo
@abstract Retrieve information about the given property of an AudioStream.
@param inStream
The AudioStream to query.
@param inChannel
The channel of the property to query where 0 is the main channel.
@param inPropertyID
The AudioDevicePropertyID of the property to query.
@param outSize
A pointer to a UInt32 that receives the size of the property data in bytes
on exit. This can be NULL if the size information is not being requested.
@param outWritable
A pointer to a Boolean that receives indication of whether or not the given
property can be set. This can be NULL if the writability is not being
requested.
@result An OSStatus indicating success or failure.
*/
extern OSStatus
AudioStreamGetPropertyInfo( AudioStreamID inStream,
UInt32 inChannel,
AudioDevicePropertyID inPropertyID,
UInt32* __nullable outSize,
Boolean* __nullable outWritable) __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_1, __MAC_10_6, __IPHONE_2_0, __IPHONE_2_0);
/*!
@function AudioStreamGetProperty
@abstract Queries an the AudioStream object to get the data of the given property and
places it in the provided buffer.
@discussion Note that the same functionality is provided by the function
AudioObjectGetPropertyData().
@param inStream
The AudioStream to query.
@param inChannel
The channel of the property to query where 0 is the main channel.
@param inPropertyID
The AudioDevicePropertyID of the property to query.
@param ioPropertyDataSize
A UInt32 which on entry indicates the size of the buffer pointed to by
outData and on exit indicates how much of the buffer was used.
@param outPropertyData
The buffer into which the object will put the data for the given property.
@result An OSStatus indicating success or failure.
*/
extern OSStatus
AudioStreamGetProperty( AudioStreamID inStream,
UInt32 inChannel,
AudioDevicePropertyID inPropertyID,
UInt32* ioPropertyDataSize,
void* outPropertyData) __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_1, __MAC_10_6, __IPHONE_2_0, __IPHONE_2_0);
/*!
@function AudioStreamSetProperty
@abstract Tells the AudioStream object to change the value of the given property using the
provided data.
@discussion Note that the value of the property should not be considered changed until the
HAL has called the listeners as many properties values are changed
asynchronously. Also note that the same functionality is provided by the
function AudioObjectSetPropertyData().
@param inStream
The AudioStream to change.
@param inWhen
A pointer to an AudioTimeStamp that says when to change the property's value
relative to the device's time base. NULL means execute the change
immediately.
@param inChannel
The channel of the property to change where 0 is the main channel.
@param inPropertyID
The AudioDevicePropertyID of the property to change.
@param inPropertyDataSize
A UInt32 indicating the size of the buffer pointed to by inData.
@param inPropertyData
The buffer containing the data to be used to change the property's value.
@result An OSStatus indicating success or failure.
*/
extern OSStatus
AudioStreamSetProperty( AudioStreamID inStream,
const AudioTimeStamp* __nullable inWhen,
UInt32 inChannel,
AudioDevicePropertyID inPropertyID,
UInt32 inPropertyDataSize,
const void* inPropertyData) __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_1, __MAC_10_6, __IPHONE_2_0, __IPHONE_2_0);
/*!
@function AudioStreamAddPropertyListener
@abstract Registers the given AudioStreamPropertyListenerProc to receive notifications
when the given property changes.
@discussion Note that the same functionality is provided by AudioObjectAddPropertyListener
in conjunction with AudioObjectPropertyListenerProc.
@param inStream
The AudioStream with whom to register the listener.
@param inChannel
The channel of the property to listen to.
@param inPropertyID
The AudioDevicePropertyID of the property to listen to.
@param inProc
AudioStreamPropertyListenerProc to call.
@param inClientData
A pointer to client data that is passed to the listener when it is called.
@result An OSStatus indicating success or failure.
*/
extern OSStatus
AudioStreamAddPropertyListener( AudioStreamID inStream,
UInt32 inChannel,
AudioDevicePropertyID inPropertyID,
AudioStreamPropertyListenerProc inProc,
void* __nullable inClientData) __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_1, __MAC_10_6, __IPHONE_2_0, __IPHONE_2_0);
/*!
@function AudioStreamRemovePropertyListener
@abstract Unregisters the given AudioStreamPropertyListenerProc from receiving
notifications when the given property changes.
@discussion Note that the same functionality is provided by
AudioObjectRemovePropertyListener in conjunction with
AudioObjectPropertyListenerProc.
@param inStream
The AudioStream with whom to unregister the listener.
@param inChannel
The channel of the property to unregister from.
@param inPropertyID
The AudioDevicePropertyID of the property to stop listening to.
@param inProc
AudioStreamPropertyListenerProc to unregister.
@result An OSStatus indicating success or failure.
*/
extern OSStatus
AudioStreamRemovePropertyListener( AudioStreamID inStream,
UInt32 inChannel,
AudioDevicePropertyID inPropertyID,
AudioStreamPropertyListenerProc inProc) __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_1, __MAC_10_6, __IPHONE_2_0, __IPHONE_2_0);
//==================================================================================================
#pragma mark -
#pragma mark AudioControl Constants
/*!
@enum AudioControl Base Class IDs
@abstract The AudioClassIDs that identify the various AudioControl base classes.
@constant kAudioBootChimeVolumeControlClassID
An AudioLevelControl for the boot chime of the CPU.
*/
CF_ENUM(AudioClassID)
{
kAudioBootChimeVolumeControlClassID = 'pram'
};
//==================================================================================================
#pragma mark AudioControl Properties
/*!
@enum AudioControl Properties
@abstract AudioObjectPropertySelector values that apply to all AudioControls.
@discussion AudioControl is a subclass of AudioObject and has only the single scope,
kAudioObjectPropertyScopeGlobal, and only a main element.
@constant kAudioControlPropertyVariant
A UInt32 that identifies the specific variant of an AudioControl. This
allows the owning AudioObject to support controls that are of the same basic
class (that is, the values of kAudioObjectPropertyClass are the same) but
may control a part of the object for which the standard controls do not
control.
*/
CF_ENUM(AudioObjectPropertySelector)
{
kAudioControlPropertyVariant = 'cvar'
};
/*!
@enum AudioClockSourceControl Properties
@abstract AudioObjectPropertySelector values that apply only to AudioClockSourceControls.
@discussion These properties supplement the regular AudioSelectorControl Properties.
@constant kAudioClockSourceControlPropertyItemKind
This property returns a UInt32 that identifies the kind of clock source
the item ID refers to. The qualifier contains the ID of the item. Note that
this property is a synonym for kAudioSelectorControlPropertyItemKind.
*/
CF_ENUM(AudioObjectPropertySelector)
{
kAudioClockSourceControlPropertyItemKind = kAudioSelectorControlPropertyItemKind
};
//==================================================================================================
#if defined(__cplusplus)
}
#endif
CF_ASSUME_NONNULL_END
#endif // CoreAudio_AudioHardwareDeprecated_h
|
0 | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/CoreAudio.framework | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/CoreAudio.framework/Headers/AudioHardwareBase.h | /*==================================================================================================
File: CoreAudio/AudioHardwareBase.h
Copyright: (c) 1985-2011 by Apple, Inc., all rights reserved.
Bugs?: For bug reports, consult the following page on
the World Wide Web:
http://developer.apple.com/bugreporter/
==================================================================================================*/
#if !defined(CoreAudio_AudioHardwareBase_h)
#define CoreAudio_AudioHardwareBase_h
//==================================================================================================
#pragma mark -
#pragma mark Overview
/*!
@header AudioHardwareBase
This file defines the HAL's object model including the properties and their needed types and
constants that describe the property values.
*/
//==================================================================================================
// Includes
#include <CoreAudioTypes/CoreAudioTypes.h>
//==================================================================================================
CF_ASSUME_NONNULL_BEGIN
#if defined(__cplusplus)
extern "C"
{
#endif
//==================================================================================================
#pragma mark -
#pragma mark Basic Types
/*!
@typedef AudioObjectID
@abstract A UInt32 that provides a handle on a specific AudioObject.
*/
typedef UInt32 AudioObjectID;
/*!
@typedef AudioClassID
@abstract AudioClassIDs are used to identify the class of an AudioObject.
*/
typedef UInt32 AudioClassID;
/*!
@typedef AudioObjectPropertySelector
@abstract An AudioObjectPropertySelector is a four char code that identifies, along with
the AudioObjectPropertyScope and AudioObjectPropertyElement, a specific piece of
information about an AudioObject.
@discussion The property selector specifies the general classification of the property such
as volume, stream format, latency, etc. Note that each class has a different set
of selectors. A subclass inherits its super class's set of selectors, although
it may not implement them all.
*/
typedef UInt32 AudioObjectPropertySelector;
/*!
@typedef AudioObjectPropertyScope
@abstract An AudioObjectPropertyScope is a four char code that identifies, along with the
AudioObjectPropertySelector and AudioObjectPropertyElement, a specific piece of
information about an AudioObject.
@discussion The scope specifies the section of the object in which to look for the property,
such as input, output, global, etc. Note that each class has a different set of
scopes. A subclass inherits its superclass's set of scopes.
*/
typedef UInt32 AudioObjectPropertyScope;
/*!
@typedef AudioObjectPropertyElement
@abstract An AudioObjectPropertyElement is an integer that identifies, along with the
AudioObjectPropertySelector and AudioObjectPropertyScope, a specific piece of
information about an AudioObject.
@discussion The element selects one of possibly many items in the section of the object in
which to look for the property. Elements are number sequentially where 0
represents the main element. Elements are particular to an instance of a
class, meaning that two instances can have different numbers of elements in the
same scope. There is no inheritance of elements.
*/
typedef UInt32 AudioObjectPropertyElement;
/*!
@struct AudioObjectPropertyAddress
@abstract An AudioObjectPropertyAddress collects the three parts that identify a specific
property together in a struct for easy transmission.
@field mSelector
The AudioObjectPropertySelector for the property.
@field mScope
The AudioObjectPropertyScope for the property.
@field mElement
The AudioObjectPropertyElement for the property.
*/
struct AudioObjectPropertyAddress
{
AudioObjectPropertySelector mSelector;
AudioObjectPropertyScope mScope;
AudioObjectPropertyElement mElement;
};
typedef struct AudioObjectPropertyAddress AudioObjectPropertyAddress;
//==================================================================================================
#pragma mark Basic Constants
/*!
@enum Error Constants
@abstract The error constants unique to the HAL.
@discussion These are the error constants that are unique to the HAL. Note that the HAL's
functions can and will return other codes that are not listed here. While these
constants give a general idea of what might have gone wrong during the execution
of an API call, if an API call returns anything other than kAudioHardwareNoError
it is to be viewed as the same failure regardless of what constant is actually
returned.
@constant kAudioHardwareNoError
The function call completed successfully.
@constant kAudioHardwareNotRunningError
The function call requires that the hardware be running but it isn't.
@constant kAudioHardwareUnspecifiedError
The function call failed while doing something that doesn't provide any
error messages.
@constant kAudioHardwareUnknownPropertyError
The AudioObject doesn't know about the property at the given address.
@constant kAudioHardwareBadPropertySizeError
An improperly sized buffer was provided when accessing the data of a
property.
@constant kAudioHardwareIllegalOperationError
The requested operation couldn't be completed.
@constant kAudioHardwareBadObjectError
The AudioObjectID passed to the function doesn't map to a valid AudioObject.
@constant kAudioHardwareBadDeviceError
The AudioObjectID passed to the function doesn't map to a valid AudioDevice.
@constant kAudioHardwareBadStreamError
The AudioObjectID passed to the function doesn't map to a valid AudioStream.
@constant kAudioHardwareUnsupportedOperationError
The AudioObject doesn't support the requested operation.
@constant kAudioHardwareNotReadyError
The AudioObject isn't ready to do the requested operation.
@constant kAudioDeviceUnsupportedFormatError
The AudioStream doesn't support the requested format.
@constant kAudioDevicePermissionsError
The requested operation can't be completed because the process doesn't have
permission.
*/
CF_ENUM(OSStatus)
{
kAudioHardwareNoError = 0,
kAudioHardwareNotRunningError = 'stop',
kAudioHardwareUnspecifiedError = 'what',
kAudioHardwareUnknownPropertyError = 'who?',
kAudioHardwareBadPropertySizeError = '!siz',
kAudioHardwareIllegalOperationError = 'nope',
kAudioHardwareBadObjectError = '!obj',
kAudioHardwareBadDeviceError = '!dev',
kAudioHardwareBadStreamError = '!str',
kAudioHardwareUnsupportedOperationError = 'unop',
kAudioHardwareNotReadyError = 'nrdy',
kAudioDeviceUnsupportedFormatError = '!dat',
kAudioDevicePermissionsError = '!hog'
};
/*!
@enum Predefined AudioObjectID values
@abstract ObjectIDs that are always the same
@constant kAudioObjectUnknown
This is the sentinel value. No object will have an ID whose value is 0.
*/
CF_ENUM(AudioObjectID)
{
kAudioObjectUnknown = 0
};
/*!
@enum Property Address Constants
@abstract The valid values for the scope in a property address.
@constant kAudioObjectPropertyScopeGlobal
The AudioObjectPropertyScope for properties that apply to the object as a
whole. All objects have a global scope and for most it is their only scope.
@constant kAudioObjectPropertyScopeInput
The AudioObjectPropertyScope for properties that apply to the input side of
an object.
@constant kAudioObjectPropertyScopeOutput
The AudioObjectPropertyScope for properties that apply to the output side of
an object.
@constant kAudioObjectPropertyScopePlayThrough
The AudioObjectPropertyScope for properties that apply to the play through
side of an object.
@constant kAudioObjectPropertyElementMain
The AudioObjectPropertyElement value for properties that apply to the main
element or to the entire scope.
@constant kAudioObjectPropertyElementMaster
The deprecated synonym for kAudioObjectPropertyElementMain
*/
CF_ENUM(AudioObjectPropertyScope)
{
kAudioObjectPropertyScopeGlobal = 'glob',
kAudioObjectPropertyScopeInput = 'inpt',
kAudioObjectPropertyScopeOutput = 'outp',
kAudioObjectPropertyScopePlayThrough = 'ptru',
kAudioObjectPropertyElementMain = 0,
kAudioObjectPropertyElementMaster API_DEPRECATED_WITH_REPLACEMENT("kAudioObjectPropertyElementMain", macos(10.0, 12.0), ios(2.0, 15.0), watchos(1.0, 8.0), tvos(9.0, 15.0)) = kAudioObjectPropertyElementMain
};
/*!
@enum Wildcard Constants
@abstract Constants that are used as wildcards.
@discussion Wildcards match any and all values for their associated type. They are useful
when registering to receive notifications.
@constant kAudioObjectPropertySelectorWildcard
The wildcard value for AudioObjectPropertySelectors.
@constant kAudioObjectPropertyScopeWildcard
The wildcard value for AudioObjectPropertyScopes.
@constant kAudioObjectPropertyElementWildcard
The wildcard value for AudioObjectPropertyElements.
@constant kAudioObjectClassIDWildcard
The wildcard value for AudioClassIDs.
*/
CF_ENUM(AudioObjectPropertySelector)
{
kAudioObjectPropertySelectorWildcard = '****'
};
CF_ENUM(AudioObjectPropertyScope)
{
kAudioObjectPropertyScopeWildcard = '****'
};
CF_ENUM(AudioObjectPropertyElement)
{
kAudioObjectPropertyElementWildcard = 0xFFFFFFFF
};
CF_ENUM(AudioClassID)
{
kAudioObjectClassIDWildcard = '****'
};
//==================================================================================================
#pragma mark -
#pragma mark AudioObject Constants
/*!
@enum AudioObject Class Constants
@abstract Various constants related to the AudioObject class.
@discussion The AudioObject class is the base class for all classes.
@constant kAudioObjectClassID
The AudioClassID that identifies the AudioObject class.
*/
CF_ENUM(AudioClassID)
{
kAudioObjectClassID = 'aobj'
};
//==================================================================================================
#pragma mark AudioObject Properties
/*!
@enum AudioObject Property Selectors
@abstract AudioObjectPropertySelector values provided by objects of the AudioObject class.
@discussion The AudioObject class is the base class for all classes. As such, all classes
inherit this set of properties.
@constant kAudioObjectPropertyBaseClass
An AudioClassID that identifies the class from which the class of the
AudioObject is derived. This value must always be one of the standard
classes.
@constant kAudioObjectPropertyClass
An AudioClassID that identifies the class of the AudioObject.
@constant kAudioObjectPropertyOwner
An AudioObjectID that identifies the the AudioObject that owns the given
AudioObject. Note that all AudioObjects are owned by some other AudioObject.
The only exception is the AudioSystemObject, for which the value of this
property is kAudioObjectUnknown.
@constant kAudioObjectPropertyName
A CFString that contains the human readable name of the object. The caller
is responsible for releasing the returned CFObject.
@constant kAudioObjectPropertyModelName
A CFString that contains the human readable model name of the object. The
model name differs from kAudioObjectPropertyName in that two objects of the
same model will have the same value for this property but may have different
values for kAudioObjectPropertyName.
@constant kAudioObjectPropertyManufacturer
A CFString that contains the human readable name of the manufacturer of the
hardware the AudioObject is a part of. The caller is responsible for
releasing the returned CFObject.
@constant kAudioObjectPropertyElementName
A CFString that contains a human readable name for the given element in the
given scope. The caller is responsible for releasing the returned CFObject.
@constant kAudioObjectPropertyElementCategoryName
A CFString that contains a human readable name for the category of the given
element in the given scope. The caller is responsible for releasing the
returned CFObject.
@constant kAudioObjectPropertyElementNumberName
A CFString that contains a human readable name for the number of the given
element in the given scope. The caller is responsible for releasing the
returned CFObject.
@constant kAudioObjectPropertyOwnedObjects
An array of AudioObjectIDs that represent all the AudioObjects owned by the
given object. The qualifier is an array of AudioClassIDs. If it is
non-empty, the returned array of AudioObjectIDs will only refer to objects
whose class is in the qualifier array or whose is a subclass of one in the
qualifier array.
@constant kAudioObjectPropertyIdentify
A UInt32 where a value of one indicates that the object's hardware is
drawing attention to itself, typically by flashing or lighting up its front
panel display. A value of 0 indicates that this function is turned off. This
makes it easy for a user to associate the physical hardware with its
representation in an application. Typically, this property is only supported
by AudioDevices and AudioBoxes.
@constant kAudioObjectPropertySerialNumber
A CFString that contains the human readable serial number for the object.
This property will typically be implemented by AudioBox and AudioDevice
objects. Note that the serial number is not defined to be unique in the same
way that an AudioBox's or AudioDevice's UID property are defined. This is
purely an informational value. The caller is responsible for releasing the
returned CFObject.
@constant kAudioObjectPropertyFirmwareVersion
A CFString that contains the human readable firmware version for the object.
This property will typically be implemented by AudioBox and AudioDevice
objects. Note that this is purely an informational value. The caller is
responsible for releasing the returned CFObject.
*/
CF_ENUM(AudioObjectPropertySelector)
{
kAudioObjectPropertyBaseClass = 'bcls',
kAudioObjectPropertyClass = 'clas',
kAudioObjectPropertyOwner = 'stdv',
kAudioObjectPropertyName = 'lnam',
kAudioObjectPropertyModelName = 'lmod',
kAudioObjectPropertyManufacturer = 'lmak',
kAudioObjectPropertyElementName = 'lchn',
kAudioObjectPropertyElementCategoryName = 'lccn',
kAudioObjectPropertyElementNumberName = 'lcnn',
kAudioObjectPropertyOwnedObjects = 'ownd',
kAudioObjectPropertyIdentify = 'iden',
kAudioObjectPropertySerialNumber = 'snum',
kAudioObjectPropertyFirmwareVersion = 'fwvn'
};
//==================================================================================================
#pragma mark -
#pragma mark AudioPlugIn Constants
/*!
@enum AudioPlugIn Class Constants
@abstract Various constants related to the AudioPlugIn class.
@constant kAudioPlugInClassID
The AudioClassID that identifies the AudioPlugIn class.
*/
CF_ENUM(AudioClassID)
{
kAudioPlugInClassID = 'aplg'
};
//==================================================================================================
#pragma mark AudioPlugIn Properties
/*!
@enum AudioPlugIn Properties
@abstract AudioObjectPropertySelector values provided by the AudioPlugIn class.
@discussion The AudioPlugIn class is a subclass of the AudioObject class. The class has just
the global scope, kAudioObjectPropertyScopeGlobal, and only a main element.
@constant kAudioPlugInPropertyBundleID
A CFString that contains the bundle identifier for the AudioPlugIn. The
caller is responsible for releasing the returned CFObject.
@constant kAudioPlugInPropertyDeviceList
An array of AudioObjectIDs that represent all the AudioDevices currently
provided by the plug-in.
@constant kAudioPlugInPropertyTranslateUIDToDevice
This property fetches the AudioObjectID that corresponds to the AudioDevice
that has the given UID. The UID is passed in via the qualifier as a CFString
while the AudioObjectID for the AudioDevice is returned to the caller as the
property's data. Note that an error is not returned if the UID doesn't refer
to any AudioDevices. Rather, this property will return kAudioObjectUnknown
as the value of the property.
@constant kAudioPlugInPropertyBoxList
An array of AudioObjectIDs that represent all the AudioBox objects currently
provided by the plug-in.
@constant kAudioPlugInPropertyTranslateUIDToBox
This property fetches the AudioObjectID that corresponds to the AudioBox
that has the given UID. The UID is passed in via the qualifier as a CFString
while the AudioObjectID for the AudioBox is returned to the caller as the
property's data. Note that an error is not returned if the UID doesn't refer
to any AudioBoxes. Rather, this property will return kAudioObjectUnknown
as the value of the property.
@constant kAudioPlugInPropertyClockDeviceList
An array of AudioObjectIDs that represent all the AudioClockDevice objects
currently provided by the plug-in.
@constant kAudioPlugInPropertyTranslateUIDToClockDevice
This property fetches the AudioObjectID that corresponds to the
AudioClockDevice that has the given UID. The UID is passed in via the
qualifier as a CFString while the AudioObjectID for the AudioClockDevice is
returned to the caller as the property's data. Note that an error is not
returned if the UID doesn't refer to any AudioClockDevices. Rather, this
property will return kAudioObjectUnknown as the value of the property.
*/
CF_ENUM(AudioObjectPropertySelector)
{
kAudioPlugInPropertyBundleID = 'piid',
kAudioPlugInPropertyDeviceList = 'dev#',
kAudioPlugInPropertyTranslateUIDToDevice = 'uidd',
kAudioPlugInPropertyBoxList = 'box#',
kAudioPlugInPropertyTranslateUIDToBox = 'uidb',
kAudioPlugInPropertyClockDeviceList = 'clk#',
kAudioPlugInPropertyTranslateUIDToClockDevice = 'uidc'
};
//==================================================================================================
#pragma mark -
#pragma mark AudioTransportManager Constants
/*!
@enum AudioTransportManager Class Constants
@abstract Various constants related to the AudioTransportManager class.
@discussion The AudioTransportManager class is a subclass of the AudioPlugIn class.
Instances manage an entire transport mechanism such as AirPlay or an AVB network
of devices. AudioTransportManagers present a list of AudioEndPoints that
represent all the devices that they manage. They can combine AudioEndPoints into
an AudioEndPointDevice that can be used by the system the same as any other
AudioDevice.
@constant kAudioTransportManagerClassID
The AudioClassID that identifies the AudioTransportManager class.
*/
CF_ENUM(AudioClassID)
{
kAudioTransportManagerClassID = 'trpm'
};
//==================================================================================================
#pragma mark AudioTransportManager Properties
/*!
@enum AudioTransportManager Properties
@abstract AudioObjectPropertySelector values provided by the AudioTransportManager class.
@discussion The AudioTransportManager class is a subclass of the AudioPlugIn class. The
class has just the global scope, kAudioObjectPropertyScopeGlobal, and only a
main element.
@constant kAudioTransportManagerPropertyEndPointList
An array of AudioObjectIDs for all the AudioEndPoint objects the transport
manager is tracking.
@constant kAudioTransportManagerPropertyTranslateUIDToEndPoint
This property fetches the AudioObjectID that corresponds to the
AudioEndpoint that has the given UID. The UID is passed in via the qualifier
as a CFString while the AudioObjectID for the AudioEndpoint is returned to
the caller as the property's data. Note that an error is not returned if the
UID doesn't refer to any AudioEndpoints. Rather, this property will return
kAudioObjectUnknown as the value of the property.
@constant kAudioTransportManagerPorpertyTransportType
A UInt32 whose value indicates how the transport manager's endpoints and
endpoint devices are connected to the CPU. Constants for some of the values
for this property can be found in the enum in the AudioDevice Constants
section of this file.
*/
CF_ENUM(AudioObjectPropertySelector)
{
kAudioTransportManagerPropertyEndPointList = 'end#',
kAudioTransportManagerPropertyTranslateUIDToEndPoint = 'uide',
kAudioTransportManagerPropertyTransportType = 'tran'
};
//==================================================================================================
#pragma mark -
#pragma mark AudioBox Constants
/*!
@enum AudioBox Class Constants
@abstract Various constants related to the AudioBox class.
@constant kAudioBoxClassID
The AudioClassID that identifies the AudioBox class.
*/
CF_ENUM(AudioClassID)
{
kAudioBoxClassID = 'abox'
};
//==================================================================================================
#pragma mark AudioBox Properties
/*!
@enum AudioBox Properties
@abstract AudioObjectPropertySelector values provided by the AudioBox class.
@discussion The AudioBox class is a subclass of the AudioObject class. The class has just
the global scope, kAudioObjectPropertyScopeGlobal, and only a main element.
An AudioBox is a container for other objects (typically AudioDevice objects). An
AudioBox publishes identifying information about itself and can be enabled or
disabled. A box's contents are only available to the system when the box is
enabled.
@constant kAudioBoxPropertyBoxUID
A CFString that contains a persistent identifier for the AudioBox. An
AudioBox's UID is persistent across boots. The content of the UID string is
a black box and may contain information that is unique to a particular
instance of an AudioBox's hardware or unique to the CPU. Therefore they are
not suitable for passing between CPUs or for identifying similar models of
hardware. The caller is responsible for releasing the returned CFObject.
@constant kAudioBoxPropertyTransportType
A UInt32 whose value indicates how the AudioBox is connected to the system.
Constants for some of the values for this property can be found in the enum
in the AudioDevice Constants section of AudioHardwareBase.h
@constant kAudioBoxPropertyHasAudio
A UInt32 where a non-zero value indicates that the box supports audio.
@constant kAudioBoxPropertyHasVideo
A UInt32 where a non-zero value indicates that the box supports video.
@constant kAudioBoxPropertyHasMIDI
A UInt32 where a non-zero value indicates that the box supports MIDI.
@constant kAudioBoxPropertyIsProtected
A UInt32 where a non-zero value indicates that the box requires
authentication to use.
@constant kAudioBoxPropertyAcquired
A UInt32 where a non-zero value indicates that the box's contents are
available to the system.
@constant kAudioBoxPropertyAcquisitionFailed
An OSStatus that indicates the reason for an attempt to acquire a box
failed. Note that this property is primarily used for notifications.
@constant kAudioBoxPropertyDeviceList
An array of AudioObjectIDs that represent all the AudioDevice objects that
came out of the given AudioBox. Note that until a box is enabled, this list
will be empty.
@constant kAudioBoxPropertyClockDeviceList
An array of AudioObjectIDs that represent all the AudioClockDevice objects
that came out of the given AudioBox. Note that until a box is enabled, this
list will be empty.
*/
CF_ENUM(AudioObjectPropertySelector)
{
kAudioBoxPropertyBoxUID = 'buid',
kAudioBoxPropertyTransportType = 'tran',
kAudioBoxPropertyHasAudio = 'bhau',
kAudioBoxPropertyHasVideo = 'bhvi',
kAudioBoxPropertyHasMIDI = 'bhmi',
kAudioBoxPropertyIsProtected = 'bpro',
kAudioBoxPropertyAcquired = 'bxon',
kAudioBoxPropertyAcquisitionFailed = 'bxof',
kAudioBoxPropertyDeviceList = 'bdv#',
kAudioBoxPropertyClockDeviceList = 'bcl#'
};
//==================================================================================================
#pragma mark -
#pragma mark AudioDevice Constants
/*!
@enum AudioDevice Class Constants
@abstract Various constants related to the AudioDevice class.
@constant kAudioDeviceClassID
The AudioClassID that identifies the AudioDevice class.
*/
CF_ENUM(AudioClassID)
{
kAudioDeviceClassID = 'adev'
};
/*!
@enum Transport Type IDs
@abstract Commonly used values for kAudioDevicePropertyTransportType and
kAudioTransportManagerPropertyTransportType
@constant kAudioDeviceTransportTypeUnknown
The transport type ID returned when a device doesn't provide a transport
type.
@constant kAudioDeviceTransportTypeBuiltIn
The transport type ID for AudioDevices built into the system.
@constant kAudioDeviceTransportTypeAggregate
The transport type ID for aggregate devices.
@constant kAudioDeviceTransportTypeAutoAggregate
The transport type ID for automatically generated aggregate devices.
@constant kAudioDeviceTransportTypeVirtual
The transport type ID for AudioDevices that don't correspond to real audio
hardware.
@constant kAudioDeviceTransportTypePCI
The transport type ID for AudioDevices connected via the PCI bus.
@constant kAudioDeviceTransportTypeUSB
The transport type ID for AudioDevices connected via USB.
@constant kAudioDeviceTransportTypeFireWire
The transport type ID for AudioDevices connected via FireWire.
@constant kAudioDeviceTransportTypeBluetooth
The transport type ID for AudioDevices connected via Bluetooth.
@constant kAudioDeviceTransportTypeBluetoothLE
The transport type ID for AudioDevices connected via Bluetooth Low Energy.
@constant kAudioDeviceTransportTypeHDMI
The transport type ID for AudioDevices connected via HDMI.
@constant kAudioDeviceTransportTypeDisplayPort
The transport type ID for AudioDevices connected via DisplayPort.
@constant kAudioDeviceTransportTypeAirPlay
The transport type ID for AudioDevices connected via AirPlay.
@constant kAudioDeviceTransportTypeAVB
The transport type ID for AudioDevices connected via AVB.
@constant kAudioDeviceTransportTypeThunderbolt
The transport type ID for AudioDevices connected via Thunderbolt.
*/
CF_ENUM(UInt32)
{
kAudioDeviceTransportTypeUnknown = 0,
kAudioDeviceTransportTypeBuiltIn = 'bltn',
kAudioDeviceTransportTypeAggregate = 'grup',
kAudioDeviceTransportTypeVirtual = 'virt',
kAudioDeviceTransportTypePCI = 'pci ',
kAudioDeviceTransportTypeUSB = 'usb ',
kAudioDeviceTransportTypeFireWire = '1394',
kAudioDeviceTransportTypeBluetooth = 'blue',
kAudioDeviceTransportTypeBluetoothLE = 'blea',
kAudioDeviceTransportTypeHDMI = 'hdmi',
kAudioDeviceTransportTypeDisplayPort = 'dprt',
kAudioDeviceTransportTypeAirPlay = 'airp',
kAudioDeviceTransportTypeAVB = 'eavb',
kAudioDeviceTransportTypeThunderbolt = 'thun'
};
//==================================================================================================
#pragma mark AudioDevice Properties
/*!
@enum AudioDevice Properties
@abstract AudioObjectPropertySelector values provided by the AudioDevice class.
@discussion The AudioDevice class is a subclass of the AudioObjectClass. The class has four
scopes, kAudioObjectPropertyScopeGlobal, kAudioObjectPropertyScopeInput,
kAudioObjectPropertyScopeOutput, and kAudioObjectPropertyScopePlayThrough. The
class has a main element and an element for each channel in each stream
numbered according to the starting channel number of each stream.
@constant kAudioDevicePropertyConfigurationApplication
A CFString that contains the bundle ID for an application that provides a
GUI for configuring the AudioDevice. By default, the value of this property
is the bundle ID for Audio MIDI Setup. The caller is responsible for
releasing the returned CFObject.
@constant kAudioDevicePropertyDeviceUID
A CFString that contains a persistent identifier for the AudioDevice. An
AudioDevice's UID is persistent across boots. The content of the UID string
is a black box and may contain information that is unique to a particular
instance of an AudioDevice's hardware or unique to the CPU. Therefore they
are not suitable for passing between CPUs or for identifying similar models
of hardware. The caller is responsible for releasing the returned CFObject.
@constant kAudioDevicePropertyModelUID
A CFString that contains a persistent identifier for the model of an
AudioDevice. The identifier is unique such that the identifier from two
AudioDevices are equal if and only if the two AudioDevices are the exact
same model from the same manufacturer. Further, the identifier has to be the
same no matter on what machine the AudioDevice appears. The caller is
responsible for releasing the returned CFObject.
@constant kAudioDevicePropertyTransportType
A UInt32 whose value indicates how the AudioDevice is connected to the CPU.
Constants for some of the values for this property can be found in the enum
in the AudioDevice Constants section of this file.
@constant kAudioDevicePropertyRelatedDevices
An array of AudioDeviceIDs for devices related to the AudioDevice. For
IOAudio-based devices, AudioDevices are related if they share the same
IOAudioDevice object.
@constant kAudioDevicePropertyClockDomain
A UInt32 whose value indicates the clock domain to which this AudioDevice
belongs. AudioDevices that have the same value for this property are able to
be synchronized in hardware. However, a value of 0 indicates that the clock
domain for the device is unspecified and should be assumed to be separate
from every other device's clock domain, even if they have the value of 0 as
their clock domain as well.
@constant kAudioDevicePropertyDeviceIsAlive
A UInt32 where a value of 1 means the device is ready and available and 0
means the device is unusable and will most likely go away shortly.
@constant kAudioDevicePropertyDeviceIsRunning
A UInt32 where a value of 0 means the AudioDevice is not performing IO and
a value of 1 means that it is. Note that the device can be running even if
there are no active IOProcs such as by calling AudioDeviceStart() and
passing a NULL IOProc. Note that the notification for this property is
usually sent from the AudioDevice's IO thread.
@constant kAudioDevicePropertyDeviceCanBeDefaultDevice
A UInt32 where 1 means that the AudioDevice is a possible selection for
kAudioHardwarePropertyDefaultInputDevice or
kAudioHardwarePropertyDefaultOutputDevice depending on the scope.
@constant kAudioDevicePropertyDeviceCanBeDefaultSystemDevice
A UInt32 where 1 means that the AudioDevice is a possible selection for
kAudioHardwarePropertyDefaultSystemOutputDevice.
@constant kAudioDevicePropertyLatency
A UInt32 containing the number of frames of latency in the AudioDevice. Note
that input and output latency may differ. Further, the AudioDevice's
AudioStreams may have additional latency so they should be queried as well.
If both the device and the stream say they have latency, then the total
latency for the stream is the device latency summed with the stream latency.
@constant kAudioDevicePropertyStreams
An array of AudioStreamIDs that represent the AudioStreams of the
AudioDevice. Note that if a notification is received for this property, any
cached AudioStreamIDs for the device become invalid and need to be
re-fetched.
@constant kAudioObjectPropertyControlList
An array of AudioObjectIDs that represent the AudioControls of the
AudioDevice. Note that if a notification is received for this property, any
cached AudioObjectIDs for the device become invalid and need to be
re-fetched.
@constant kAudioDevicePropertySafetyOffset
A UInt32 whose value indicates the number for frames in ahead (for output)
or behind (for input the current hardware position that is safe to do IO.
@constant kAudioDevicePropertyNominalSampleRate
A Float64 that indicates the current nominal sample rate of the AudioDevice.
@constant kAudioDevicePropertyAvailableNominalSampleRates
An array of AudioValueRange structs that indicates the valid ranges for the
nominal sample rate of the AudioDevice.
@constant kAudioDevicePropertyIcon
A CFURLRef that indicates an image file that can be used to represent the
device visually. The caller is responsible for releasing the returned
CFObject.
@constant kAudioDevicePropertyIsHidden
A UInt32 where a non-zero value indicates that the device is not included
in the normal list of devices provided by kAudioHardwarePropertyDevices nor
can it be the default device. Hidden devices can only be discovered by
knowing their UID and using kAudioHardwarePropertyDeviceForUID.
@constant kAudioDevicePropertyPreferredChannelsForStereo
An array of two UInt32s, the first for the left channel, the second for the
right channel, that indicate the channel numbers to use for stereo IO on the
device. The value of this property can be different for input and output and
there are no restrictions on the channel numbers that can be used.
@constant kAudioDevicePropertyPreferredChannelLayout
An AudioChannelLayout that indicates how each channel of the AudioDevice
should be used.
*/
CF_ENUM(AudioObjectPropertySelector)
{
kAudioDevicePropertyConfigurationApplication = 'capp',
kAudioDevicePropertyDeviceUID = 'uid ',
kAudioDevicePropertyModelUID = 'muid',
kAudioDevicePropertyTransportType = 'tran',
kAudioDevicePropertyRelatedDevices = 'akin',
kAudioDevicePropertyClockDomain = 'clkd',
kAudioDevicePropertyDeviceIsAlive = 'livn',
kAudioDevicePropertyDeviceIsRunning = 'goin',
kAudioDevicePropertyDeviceCanBeDefaultDevice = 'dflt',
kAudioDevicePropertyDeviceCanBeDefaultSystemDevice = 'sflt',
kAudioDevicePropertyLatency = 'ltnc',
kAudioDevicePropertyStreams = 'stm#',
kAudioObjectPropertyControlList = 'ctrl',
kAudioDevicePropertySafetyOffset = 'saft',
kAudioDevicePropertyNominalSampleRate = 'nsrt',
kAudioDevicePropertyAvailableNominalSampleRates = 'nsr#',
kAudioDevicePropertyIcon = 'icon',
kAudioDevicePropertyIsHidden = 'hidn',
kAudioDevicePropertyPreferredChannelsForStereo = 'dch2',
kAudioDevicePropertyPreferredChannelLayout = 'srnd'
};
//==================================================================================================
#pragma mark -
#pragma mark AudioClockDevice Constants
/*!
@enum AudioClockDevice Class Constants
@abstract Various constants related to the AudioClockDevice class.
@constant kAudioClockDeviceClassID
The AudioClassID that identifies the AudioClockDevice class.
*/
CF_ENUM(AudioObjectPropertySelector)
{
kAudioClockDeviceClassID = 'aclk'
};
//==================================================================================================
#pragma mark AudioClockDevice Properties
/*!
@enum AudioClockDevice Properties
@abstract AudioObjectPropertySelector values provided by the AudioClockDevice class.
@discussion The AudioClockDevice class is a subclass of the AudioObject class. The class has just
the global scope, kAudioObjectPropertyScopeGlobal, and only a main element.
@constant kAudioClockDevicePropertyDeviceUID
A CFString that contains a persistent identifier for the AudioClockDevice.
An AudioClockDevice's UID is persistent across boots. The content of the UID
string is a black box and may contain information that is unique to a
particular instance of an clock's hardware or unique to the CPU. Therefore
they are not suitable for passing between CPUs or for identifying similar
models of hardware. The caller is responsible for releasing the returned
CFObject.
@constant kAudioClockDevicePropertyTransportType
A UInt32 whose value indicates how the AudioClockDevice is connected to the
CPU. Constants for some of the values for this property can be found in the
enum in the AudioDevice Constants section of this file.
@constant kAudioClockDevicePropertyClockDomain
A UInt32 whose value indicates the clock domain to which this
AudioClockDevice belongs. AudioClockDevices and AudioDevices that have the
same value for this property are able to be synchronized in hardware.
However, a value of 0 indicates that the clock domain for the device is
unspecified and should be assumed to be separate from every other device's
clock domain, even if they have the value of 0 as their clock domain as well.
@constant kAudioClockDevicePropertyDeviceIsAlive
A UInt32 where a value of 1 means the device is ready and available and 0
means the device is usable and will most likely go away shortly.
@constant kAudioClockDevicePropertyDeviceIsRunning
A UInt32 where a value of 0 means the AudioClockDevice is not providing
times and a value of 1 means that it is. Note that the notification for this
property is usually sent from the AudioClockDevice's IO thread.
@constant kAudioClockDevicePropertyLatency
A UInt32 containing the number of frames of latency in the AudioClockDevice.
@constant kAudioClockDevicePropertyControlList
An array of AudioObjectIDs that represent the AudioControls of the
AudioClockDevice. Note that if a notification is received for this property,
any cached AudioObjectIDs for the device become invalid and need to be
re-fetched.
@constant kAudioClockDevicePropertyNominalSampleRate
A Float64 that indicates the current nominal sample rate of the
AudioClockDevice.
@constant kAudioClockDevicePropertyAvailableNominalSampleRates
An array of AudioValueRange structs that indicates the valid ranges for the
nominal sample rate of the AudioClockDevice.
*/
CF_ENUM(AudioObjectPropertySelector)
{
kAudioClockDevicePropertyDeviceUID = 'cuid',
kAudioClockDevicePropertyTransportType = 'tran',
kAudioClockDevicePropertyClockDomain = 'clkd',
kAudioClockDevicePropertyDeviceIsAlive = 'livn',
kAudioClockDevicePropertyDeviceIsRunning = 'goin',
kAudioClockDevicePropertyLatency = 'ltnc',
kAudioClockDevicePropertyControlList = 'ctrl',
kAudioClockDevicePropertyNominalSampleRate = 'nsrt',
kAudioClockDevicePropertyAvailableNominalSampleRates = 'nsr#'
};
//==================================================================================================
#pragma mark -
#pragma mark AudioEndPointDevice Constants
/*!
@enum AudioEndPointDevice Class Constants
@abstract Various constants related to the AudioEndPointDevice class.
@constant kAudioEndPointDeviceClassID
The AudioClassID that identifies the AudioEndPointDevice class.
*/
CF_ENUM(AudioClassID)
{
kAudioEndPointDeviceClassID = 'edev'
};
/*!
@defined kAudioEndPointDeviceUIDKey
@discussion The key used in a CFDictionary that describes the composition of an
AudioEndPointDevice. The value for this key is a CFString that contains the UID
of the AudioEndPointDevice.
*/
#define kAudioEndPointDeviceUIDKey "uid"
/*!
@defined kAudioEndPointDeviceNameKey
@discussion The key used in a CFDictionary that describes the composition of an
AudioEndPointDevice. The value for this key is a CFString that contains the
human readable name of the AudioEndPointDevice.
*/
#define kAudioEndPointDeviceNameKey "name"
/*!
@defined kAudioEndPointDeviceEndPointListKey
@discussion The key used in a CFDictionary that describes the composition of an
AudioEndPointDevice. The value for this key is a CFArray of CFDictionaries that
describe each AudioEndPoint in the AudioEndPointDevice. The keys for this
CFDictionary are defined in the AudioEndPoint Constants section.
*/
#define kAudioEndPointDeviceEndPointListKey "endpoints"
/*!
@defined kAudioEndPointDeviceMainEndPointKey
@discussion The key used in a CFDictionary that describes the composition of an
AudioEndPointDevice. The value for this key is a CFString that contains the UID
for the AudioEndPoint that is the time source for the
AudioEndPointDevice.
*/
#define kAudioEndPointDeviceMainEndPointKey "main"
/*!
@defined kAudioEndPointDeviceMasterEndPointKey
@discussion The deprecated synonym for kAudioEndPointDeviceMainEndPointKey
*/
#define kAudioEndPointDeviceMasterEndPointKey "master"
/*!
@defined kAudioEndPointDeviceIsPrivateKey
@discussion The key used in a CFDictionary that describes the composition of an
AudioEndPointDevice. The value for this key is a CFNumber where a value of 0
means that the AudioEndPointDevice is to be published to the entire system and a
value of 1 means that the AudioEndPointDevice is private to the process that
created it. Note that a private AudioEndPointDevice is not persistent across
launches of the process that created it. Note that if this key is not present,
it implies that the AudioEndPointDevice is published to the entire system.
*/
#define kAudioEndPointDeviceIsPrivateKey "private"
//==================================================================================================
#pragma mark AudioEndPointDevice Properties
/*!
@enum AudioEndPointDevice Properties
@abstract AudioObjectPropertySelector values provided by the AudioEndPointDevice class.
@discussion AudioEndPointDevice is a subclass of AudioDevice and has the same scope and
element structure.
@constant kAudioEndPointDevicePropertyComposition
A CFDictionary that describes the composition of the AudioEndPointDevice.
The keys for this CFDicitionary are defined in the AudioEndPointDevice
Constants section. The caller is responsible for releasing the returned
CFObject.
@constant kAudioEndPointDevicePropertyEndPointList
An array of AudioObjectIDs for all the AudioEndPoints in the device.
@constant kAudioEndPointDevicePropertyIsPrivate
A pid_t where a value of 0 indicates that the device is public and a non-zero
value indicates the pid of the process that owns the device.
*/
CF_ENUM(AudioObjectPropertySelector)
{
kAudioEndPointDevicePropertyComposition = 'acom',
kAudioEndPointDevicePropertyEndPointList = 'agrp',
kAudioEndPointDevicePropertyIsPrivate = 'priv'
};
//==================================================================================================
#pragma mark -
#pragma mark AudioEndPoint Constants
/*!
@enum AudioEndPoint Class Constants
@abstract Various constants related to the AudioEndPoint class.
@discussion The AudioEndPoint class is a subclass of AudioDevice class and has the same
scope and element structure. However, AudioEndPoint objects do not implement an
IO path of their own and as such do not implement any AudioDevice properties
associated with the IO path.
@constant kAudioEndPointDeviceClassID
The AudioClassID that identifies the AudioEndPointDevice class.
*/
CF_ENUM(AudioClassID)
{
kAudioEndPointClassID = 'endp'
};
/*!
@defined kAudioEndPointUIDKey
@discussion The key used in a CFDictionary that describes the state of an AudioEndPoint in a
description dictionary for an AudioEndPointDevice. The value for this key is a
CFString that contains the UID for the AudioEndPoint.
*/
#define kAudioEndPointUIDKey "uid"
/*!
@defined kAudioEndPointNameKey
@discussion The key used in a CFDictionary that describes the state of an AudioEndPoint in a
description dictionary for an AudioEndPointDevice. The value for this key is a
CFString that contains the human readable name of the AudioEndPoint.
*/
#define kAudioEndPointNameKey "name"
/*!
@defined kAudioEndPointInputChannelsKey
@discussion The key used in a CFDictionary that describes the state of an AudioEndPoint in a
description dictionary for an AudioEndPointDevice. The value for this key is a
CFNumber that indicates the total number of input channels for the
AudioEndPoint.
*/
#define kAudioEndPointInputChannelsKey "channels-in"
/*!
@defined kAudioEndPointOutputChannelsKey
@discussion The key used in a CFDictionary that describes the state of an AudioEndPoint in a
description dictionary for an AudioEndPointDevice. The value for this key is a
CFNumber that indicates the total number of output channels for the
AudioEndPoint.
*/
#define kAudioEndPointOutputChannelsKey "channels-out"
//==================================================================================================
#pragma mark -
#pragma mark AudioStream Types
/*!
@struct AudioStreamRangedDescription
@abstract This structure allows a specific sample rate range to be associated with an
AudioStreamBasicDescription that specifies its sample rate as
kAudioStreamAnyRate.
@discussion Note that this structure is only used to describe the the available formats
for a stream. It is not used for the current format.
@field mFormat
The AudioStreamBasicDescription that describes the format of the stream.
Note that the mSampleRate field of the structure will be the same as the
the values in mSampleRateRange when only a single sample rate is supported.
It will be kAudioStreamAnyRate when there is a range with more elements.
@field mSampleRateRange
The AudioValueRange that describes the minimum and maximum sample rate for
the stream. If the mSampleRate field of mFormat is kAudioStreamAnyRate the
format supports the range of sample rates described by this structure.
Otherwise, the minimum will be the same as the maximum which will be the
same as the mSampleRate field of mFormat.
*/
struct AudioStreamRangedDescription
{
AudioStreamBasicDescription mFormat;
AudioValueRange mSampleRateRange;
};
typedef struct AudioStreamRangedDescription AudioStreamRangedDescription;
//==================================================================================================
#pragma mark AudioStream Constants
/*!
@enum AudioStream Class Constants
@abstract Various constants related to the AudioStream class.
@constant kAudioStreamClassID
The AudioClassID that identifies the AudioStream class.
*/
CF_ENUM(AudioClassID)
{
kAudioStreamClassID = 'astr'
};
/*!
@enum AudioStream Terminal Types
@abstract Various constants that describe the terminal type of an AudioStream.
@constant kAudioStreamTerminalTypeUnknown
The ID used when the terminal type for the AudioStream is non known.
@constant kAudioStreamTerminalTypeLine
The ID for a terminal type of a line level stream. Note that this applies to
both input streams and output streams
@constant kAudioStreamTerminalTypeDigitalAudioInterface
The ID for a terminal type of stream from/to a digital audio interface as
defined by ISO 60958 (aka SPDIF or AES/EBU). Note that this applies to both
input streams and output streams
@constant kAudioStreamTerminalTypeSpeaker
The ID for a terminal type of a speaker.
@constant kAudioStreamTerminalTypeHeadphones
The ID for a terminal type of headphones.
@constant kAudioStreamTerminalTypeLFESpeaker
The ID for a terminal type of a speaker for low frequency effects.
@constant kAudioStreamTerminalTypeReceiverSpeaker
The ID for a terminal type of a speaker on a telephone handset receiver.
@constant kAudioStreamTerminalTypeMicrophone
The ID for a terminal type of a microphone.
@constant kAudioStreamTerminalTypeHeadsetMicrophone
The ID for a terminal type of a microphone attached to an headset.
@constant kAudioStreamTerminalTypeReceiverMicrophone
The ID for a terminal type of a microphone on a telephone handset receiver.
@constant kAudioStreamTerminalTypeTTY
The ID for a terminal type of a device providing a TTY signal.
@constant kAudioStreamTerminalTypeHDMI
The ID for a terminal type of a stream from/to an HDMI port.
@constant kAudioStreamTerminalTypeDisplayPort
The ID for a terminal type of a stream from/to an DisplayPort port.
*/
CF_ENUM(UInt32)
{
kAudioStreamTerminalTypeUnknown = 0,
kAudioStreamTerminalTypeLine = 'line',
kAudioStreamTerminalTypeDigitalAudioInterface = 'spdf',
kAudioStreamTerminalTypeSpeaker = 'spkr',
kAudioStreamTerminalTypeHeadphones = 'hdph',
kAudioStreamTerminalTypeLFESpeaker = 'lfes',
kAudioStreamTerminalTypeReceiverSpeaker = 'rspk',
kAudioStreamTerminalTypeMicrophone = 'micr',
kAudioStreamTerminalTypeHeadsetMicrophone = 'hmic',
kAudioStreamTerminalTypeReceiverMicrophone = 'rmic',
kAudioStreamTerminalTypeTTY = 'tty_',
kAudioStreamTerminalTypeHDMI = 'hdmi',
kAudioStreamTerminalTypeDisplayPort = 'dprt'
};
//==================================================================================================
#pragma mark AudioStream Properties
/*!
@enum AudioStream Properties
@abstract AudioObjectPropertySelector values provided by the AudioStream class.
@discussion AudioStream is a subclass of AudioObject and has only the single scope,
kAudioObjectPropertyScopeGlobal. They have a main element and an element for
each channel in the stream numbered upward from 1.
@constant kAudioStreamPropertyIsActive
A UInt32 where a non-zero value indicates that the stream is enabled and
doing IO.
@constant kAudioStreamPropertyDirection
A UInt32 where a value of 0 means that this AudioStream is an output stream
and a value of 1 means that it is an input stream.
@constant kAudioStreamPropertyTerminalType
A UInt32 whose value describes the general kind of functionality attached
to the AudioStream.
@constant kAudioStreamPropertyStartingChannel
A UInt32 that specifies the first element in the owning device that
corresponds to element one of this stream.
@constant kAudioStreamPropertyLatency
A UInt32 containing the number of frames of latency in the AudioStream. Note
that the owning AudioDevice may have additional latency so it should be
queried as well. If both the device and the stream say they have latency,
then the total latency for the stream is the device latency summed with the
stream latency.
@constant kAudioStreamPropertyVirtualFormat
An AudioStreamBasicDescription that describes the current data format for
the AudioStream. The virtual format refers to the data format in which all
IOProcs for the owning AudioDevice will perform IO transactions.
@constant kAudioStreamPropertyAvailableVirtualFormats
An array of AudioStreamRangedDescriptions that describe the available data
formats for the AudioStream. The virtual format refers to the data format in
which all IOProcs for the owning AudioDevice will perform IO transactions.
@constant kAudioStreamPropertyPhysicalFormat
An AudioStreamBasicDescription that describes the current data format for
the AudioStream. The physical format refers to the data format in which the
hardware for the owning AudioDevice performs its IO transactions.
@constant kAudioStreamPropertyAvailablePhysicalFormats
An array of AudioStreamRangedDescriptions that describe the available data
formats for the AudioStream. The physical format refers to the data format
in which the hardware for the owning AudioDevice performs its IO
transactions.
*/
CF_ENUM(AudioObjectPropertySelector)
{
kAudioStreamPropertyIsActive = 'sact',
kAudioStreamPropertyDirection = 'sdir',
kAudioStreamPropertyTerminalType = 'term',
kAudioStreamPropertyStartingChannel = 'schn',
kAudioStreamPropertyLatency = kAudioDevicePropertyLatency,
kAudioStreamPropertyVirtualFormat = 'sfmt',
kAudioStreamPropertyAvailableVirtualFormats = 'sfma',
kAudioStreamPropertyPhysicalFormat = 'pft ',
kAudioStreamPropertyAvailablePhysicalFormats = 'pfta'
};
//==================================================================================================
#pragma mark -
#pragma mark AudioControl Constants
/*!
@enum AudioControl Class Constants
@abstract Various constants related to the AudioControl class.
@constant kAudioControlClassID
The AudioClassID that identifies the AudioControl class.
*/
CF_ENUM(AudioClassID)
{
kAudioControlClassID = 'actl'
};
/*!
@enum AudioControl Property Selectors
@abstract AudioObjectPropertySelector values provided by the AudioControl class.
@discussion The AudioControl class is a subclass of the AudioObject class. The class has
just the global scope, kAudioObjectPropertyScopeGlobal, and only a main
element.
@constant kAudioControlPropertyScope
An AudioServerPlugIn_PropertyScope that indicates which part of a device the
control applies to.
@constant kAudioControlPropertyElement
An AudioServerPlugIn_PropertyElement that indicates which element of the
device the control applies to.
*/
CF_ENUM(AudioObjectPropertySelector)
{
kAudioControlPropertyScope = 'cscp',
kAudioControlPropertyElement = 'celm'
};
//==================================================================================================
#pragma mark -
#pragma mark AudioSliderControl Constants
/*!
@enum AudioSliderControl Class Constants
@abstract Various constants related to the AudioSliderControl class.
@constant kAudioSliderControlClassID
The AudioClassID that identifies the AudioSliderControl class.
*/
CF_ENUM(AudioClassID)
{
kAudioSliderControlClassID = 'sldr'
};
/*!
@enum AudioSliderControl Property Selectors
@abstract AudioObjectPropertySelector values provided by the AudioSliderControl class.
@discussion The AudioSliderControl class is a subclass of the AudioControl class and has the
same scope and element structure.
@constant kAudioSliderControlPropertyValue
A UInt32 that represents the value of the slider control.
@constant kAudioSliderControlPropertyRange
An array of two UInt32s that represents the inclusive range of values the
slider control can take.
*/
CF_ENUM(AudioObjectPropertySelector)
{
kAudioSliderControlPropertyValue = 'sdrv',
kAudioSliderControlPropertyRange = 'sdrr'
};
//==================================================================================================
#pragma mark -
#pragma mark AudioLevelControl Constants
/*!
@enum AudioLevelControl Class Constants
@abstract Various constants related to the AudioLevelControl class.
@constant kAudioLevelControlClassID
The AudioClassID that identifies the LevelControl class.
@constant kAudioVolumeControlClassID
A subclass of the LevelControl class that implements a general
gain/attenuation stage.
@constant kAudioLFEVolumeControlClassID
A subclass of the LevelControl class for an LFE channel that results from
bass management. Note that LFE channels that are represented as normal audio
channels must use kAudioVolumeControlClassID to manipulate the level.
*/
CF_ENUM(AudioClassID)
{
kAudioLevelControlClassID = 'levl',
kAudioVolumeControlClassID = 'vlme',
kAudioLFEVolumeControlClassID = 'subv'
};
/*!
@enum AudioLevelControl Property Selectors
@abstract AudioObjectPropertySelector values provided by the AudioLevelControl class.
@discussion The AudioLevelControl class is a subclass of the AudioControl class and has the
same scope and element structure.
@constant kAudioLevelControlPropertyScalarValue
A Float32 that represents the value of the volume control. The range is
between 0.0 and 1.0 (inclusive). Note that the set of all Float32 values
between 0.0 and 1.0 inclusive is much larger than the set of actual values
that the hardware can select. This means that the Float32 range has a many
to one mapping with the underlying hardware values. As such, setting a
scalar value will result in the control taking on the value nearest to what
was set.
@constant kAudioLevelControlPropertyDecibelValue
A Float32 that represents the value of the volume control in dB. Note that
the set of all Float32 values in the dB range for the control is much larger
than the set of actual values that the hardware can select. This means that
the Float32 range has a many to one mapping with the underlying hardware
values. As such, setting a dB value will result in the control taking on the
value nearest to what was set.
@constant kAudioLevelControlPropertyDecibelRange
An AudioValueRange that contains the minimum and maximum dB values the
control can have.
@constant kAudioLevelControlPropertyConvertScalarToDecibels
A Float32 that on input contains a scalar volume value for the and on exit
contains the equivalent dB value.
@constant kAudioLevelControlPropertyConvertDecibelsToScalar
A Float32 that on input contains a dB volume value for the and on exit
contains the equivalent scalar value.
*/
CF_ENUM(AudioObjectPropertySelector)
{
kAudioLevelControlPropertyScalarValue = 'lcsv',
kAudioLevelControlPropertyDecibelValue = 'lcdv',
kAudioLevelControlPropertyDecibelRange = 'lcdr',
kAudioLevelControlPropertyConvertScalarToDecibels = 'lcsd',
kAudioLevelControlPropertyConvertDecibelsToScalar = 'lcds'
};
//==================================================================================================
#pragma mark -
#pragma mark AudioBooleanControl Constants
/*!
@enum AudioBooleanControl Class Constants
@abstract Various constants related to the AudioBooleanControl class.
@constant kAudioBooleanControlClassID
The AudioClassID that identifies the BooleanControl class.
@constant kAudioMuteControlClassID
A subclass of the AudioBooleanControl class where a true value means that
mute is enabled making that element inaudible.
@constant kAudioSoloControlClassID
A subclass of the AudioBooleanControl class where a true value means that
solo is enabled making just that element audible and the other elements
inaudible.
@constant kAudioJackControlClassID
A subclass of the AudioBooleanControl class where a true value means
something is plugged into that element.
@constant kAudioLFEMuteControlClassID
A subclass of the AudioBooleanControl class where true means that mute is
enabled making that LFE element inaudible. This control is for LFE channels
that result from bass management. Note that LFE channels that are
represented as normal audio channels must use an AudioMuteControl.
@constant kAudioPhantomPowerControlClassID
A subclass of the AudioBooleanControl class where true means that the
element's hardware has phantom power enabled.
@constant kAudioPhaseInvertControlClassID
A subclass of the AudioBooleanControl class where true means that the phase
of the signal on the given element is being inverted by 180 degrees.
@constant kAudioClipLightControlClassID
A subclass of the AudioBooleanControl class where true means that the signal
for the element has exceeded the sample range. Once a clip light is turned
on, it is to stay on until either the value of the control is set to false
or the current IO session stops and a new IO session starts.
@constant kAudioTalkbackControlClassID
An AudioBooleanControl where true means that the talkback channel is
enabled. This control is for talkback channels that are handled outside of
the regular IO channels. If the talkback channel is among the normal IO
channels, it will use AudioMuteControl.
@constant kAudioListenbackControlClassID
An AudioBooleanControl where true means that the listenback channel is
audible. This control is for listenback channels that are handled outside of
the regular IO channels. If the listenback channel is among the normal IO
channels, it will use AudioMuteControl.
*/
CF_ENUM(AudioClassID)
{
kAudioBooleanControlClassID = 'togl',
kAudioMuteControlClassID = 'mute',
kAudioSoloControlClassID = 'solo',
kAudioJackControlClassID = 'jack',
kAudioLFEMuteControlClassID = 'subm',
kAudioPhantomPowerControlClassID = 'phan',
kAudioPhaseInvertControlClassID = 'phsi',
kAudioClipLightControlClassID = 'clip',
kAudioTalkbackControlClassID = 'talb',
kAudioListenbackControlClassID = 'lsnb'
};
/*!
@enum AudioBooleanControl Property Selectors
@abstract AudioObjectPropertySelector values provided by the AudioBooleanControl class.
@discussion The AudioBooleanControl class is a subclass of the AudioControl class and has
the same scope and element structure.
@constant kAudioBooleanControlPropertyValue
A UInt32 where 0 means off/false and non-zero means on/true.
*/
CF_ENUM(AudioObjectPropertySelector)
{
kAudioBooleanControlPropertyValue = 'bcvl'
};
//==================================================================================================
#pragma mark -
#pragma mark AudioSelectorControl Constants
/*!
@enum AudioSelectorControl Class Constants
@abstract Various constants related to the AudioSelectorControl class.
@constant kAudioSelectorControlClassID
The AudioClassID that identifies the AudioSelectorControl class.
@constant kAudioDataSourceControlClassID
A subclass of the AudioSelectorControl class that identifies where the data
for the element is coming from.
@constant kAudioDataDestinationControlClassID
A subclass of the AudioSelectorControl class that identifies where the data
for the element is going.
@constant kAudioClockSourceControlClassID
A subclass of the AudioSelectorControl class that identifies where the
timing info for the object is coming from.
@constant kAudioLineLevelControlClassID
A subclass of the AudioSelectorControl class that identifies the nominal
line level for the element. Note that this is not a gain stage but rather
indicating the voltage standard (if any) used for the element, such as
+4dBu, -10dBV, instrument, etc.
@constant kAudioHighPassFilterControlClassID
A subclass of the AudioSelectorControl class that indicates the setting for
the high pass filter on the given element.
*/
CF_ENUM(AudioClassID)
{
kAudioSelectorControlClassID = 'slct',
kAudioDataSourceControlClassID = 'dsrc',
kAudioDataDestinationControlClassID = 'dest',
kAudioClockSourceControlClassID = 'clck',
kAudioLineLevelControlClassID = 'nlvl',
kAudioHighPassFilterControlClassID = 'hipf'
};
/*!
@enum AudioSelectorControl Property Selectors
@abstract AudioObjectPropertySelector values provided by the AudioSelectorControl class.
@discussion The AudioSelectorControl class is a subclass of the AudioControl class and has
the same scope and element structure.
@constant kAudioSelectorControlPropertyCurrentItem
An array of UInt32s that are the IDs of the items currently selected.
@constant kAudioSelectorControlPropertyAvailableItems
An array of UInt32s that represent the IDs of all the items available.
@constant kAudioSelectorControlPropertyItemName
This property translates the given item ID into a human readable name. The
qualifier contains the ID of the item to be translated and name is returned
as a CFString as the property data. The caller is responsible for releasing
the returned CFObject.
@constant kAudioSelectorControlPropertyItemKind
This property returns a UInt32 that identifies the kind of selector item the
item ID refers to. The qualifier contains the ID of the item. Note that this
property is optional for selector controls and that the meaning of the value
depends on the specific subclass being queried.
*/
CF_ENUM(AudioObjectPropertySelector)
{
kAudioSelectorControlPropertyCurrentItem = 'scci',
kAudioSelectorControlPropertyAvailableItems = 'scai',
kAudioSelectorControlPropertyItemName = 'scin',
kAudioSelectorControlPropertyItemKind = 'clkk'
};
/*!
@enum Constants for the value of the property, kAudioSelectorControlPropertyItemKind
for any selector control item
@constant kAudioSelectorControlItemKindSpacer
This ID represents an item in a selector control's range that represents a
spacer item in a pop-up menu. Items with this kind are not be selectable.
*/
CF_ENUM(UInt32)
{
kAudioSelectorControlItemKindSpacer = 'spcr'
};
/*!
@enum Constants for the value of the property, kAudioSelectorControlPropertyItemKind
for AudioClockSourceControls.
@constant kAudioClockSourceItemKindInternal
This ID represents the device's internal clock.
*/
CF_ENUM(UInt32)
{
kAudioClockSourceItemKindInternal = 'int '
};
//==================================================================================================
#pragma mark -
#pragma mark AudioStereoPanControl Constants
/*!
@enum AudioStereoPanControl Class Constants
@abstract Various constants related to the AudioStereoPanControl class.
@constant kAudioStereoPanControlClassID
The AudioClassID that identifies the StereoPanControl class.
*/
CF_ENUM(AudioClassID)
{
kAudioStereoPanControlClassID = 'span'
};
/*!
@enum AudioStereoPanControl Property Selectors
@abstract AudioObjectPropertySelector values provided by the AudioStereoPanControl class.
@discussion The AudioStereoPanControl class is a subclass of the AudioControl class and has
the same scope and element structure.
@constant kAudioStereoPanControlPropertyValue
A Float32 where 0.0 is full left, 1.0 is full right, and 0.5 is center.
@constant kAudioStereoPanControlPropertyPanningChannels
An array of two UInt32s that indicate which elements of the device the
signal is being panned between.
*/
CF_ENUM(AudioObjectPropertySelector)
{
kAudioStereoPanControlPropertyValue = 'spcv',
kAudioStereoPanControlPropertyPanningChannels = 'spcc'
};
//==================================================================================================
#if defined(__cplusplus)
}
#endif
CF_ASSUME_NONNULL_END
#endif // CoreAudio_AudioHardwareBase_h
|
0 | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/CoreAudio.framework | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/CoreAudio.framework/Headers/CoreAudioTypes.h | /*==================================================================================================
CoreAudio/CoreAudioTypes.h has moved to CoreAudioTypes/CoreAudioTypes.h
==================================================================================================*/
#include <CoreAudioTypes/CoreAudioTypes.h>
|
0 | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/CoreAudio.framework | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/CoreAudio.framework/Headers/AudioServerPlugIn.h | /*==================================================================================================
File: CoreAudio/AudioServerPlugIn.h
Copyright: (c) 1985-2011 by Apple Inc., all rights reserved.
Bugs?: For bug reports, consult the following page on
the World Wide Web:
http://developer.apple.com/bugreporter/
==================================================================================================*/
#if !defined(CoreAudio_AudioServerPlugIn_h)
#define CoreAudio_AudioServerPlugIn_h
//==================================================================================================
#pragma mark -
#pragma mark Overview
/*!
@header AudioServerPlugIn
An AudioServerPlugIn is a CFPlugIn that is loaded by the host process as a driver. The plug-in
bundle is installed in /Library/Audio/Plug-Ins/HAL. The bundle's name has the suffix ".driver".
When loading the plug-in, the host looks for factories with the plug-in type,
kAudioServerPlugInTypeUUID. The plug-in provides an object that conforms to the interface,
kAudioServerPlugInDriverInterfaceUUID.
An AudioServerPlugIn can provide the host with information that describes the conditions that
must be met to load the plug-in. This is done through plug-in bundle's info.plist in a key named
"AudioServerPlugIn_LoadingConditions". The value of this key is a dictionary whose keys describe
the loading conditions for the plug-in. Currently, the only defined key is named
"IOService Matching" whose value is an array of IOService matching dictionaries. The host will
load the plug-in if any of these matching dictionaries match an IOService.
An AudioServerPlugIn operates in its own process separate from the system daemon. First and
foremost, an AudioServerPlugIn may not make any calls to the client HAL API in the
CoreAudio.framework. This will result in undefined (but generally bad) behavior.
Further, the host process is sandboxed. As such, an AudioServerPlugIn may only read files in its
bundle in addition to the system libraries and frameworks. It may not access user documents or
write to any filesystem locations other than the system's cache and temporary directories as
derived through Apple API. The host provides a means for the plug-in to store and retrieve data
from persistent storage.
An AudioServerPlugIn may communicate with other processes on the system. However, the plug-in
must list the name of the mach services to be accessed in the plug-in bundle's info.plist in a
key named "AudioServerPlugIn_MachServices". The value of this key is an array of the names of
the mach services that need to be accessed.
An AudioServerPlugIn may create user-clients via IOServiceOpen() for standard IOKit objects
without restriction. However, if a plug-in needs to create a custom user-client, it must list
the name of the class of the user-client in the plug-in bundle's info.plist in a key named
"AudioServerPlugIn_IOKitUserClients". The value of this key is an array of the names of the
classes.
An AudioServerPlugIn may also use network resources. However, the plug-in must declare this in
its bundle's info.plist with the key named, "AudioServerPlugIn_Network". The value of this key
is a boolean and must be set to true if the key is present.
An AudioServerPlugIn provides the same property-based object model as the HAL's client
framework. The basic objects and properties are defined in <CoreAudio/AudioHardwareBase.h> and
are supplemented with properties declared here. The plug-in is responsible for defining the
AudioObjectIDs to be used as handles for the AudioObjects the plug-in provides. However, the
AudioObjectID for the one and only AudioPlugIn object must be kAudioObjectPlugInObject.
When the state of an AudioObject implemented by the plug-in changes, it notifies the host using
the host routine, PropertiesChanged(). The only exception to this is for AudioDevice objects.
AudioDevices may call the host's PropertiesChanged() routine only for state changes that don't
have any effect on IO or on the structure of the AudioDevice, such as a change to the value of a
volume control.
For changes to an AudioDevice's state that will affect IO or its structure, the change may not
be made without first making a call to the host's RequestDeviceConfigurationChange() routine.
This allows the host an opportunity to stop any outstanding IO and otherwise return the device
to its ground state. The host will inform the plug-in that it is safe to make the change by
calling the plug-in routine, PerformDeviceConfigurationChange(). It is only at this point that
the device can make the state change. When PerformDeviceConfigurationChange() returns, the host
will figure out what changed and restart any outstanding IO.
The host is in control of IO. It tells the plug-in's AudioDevice when to start and when to stop
the hardware. The host drives its timing using the timestamps provided by the AudioDevice's
implementation of GetZeroTimeStamp(). The series of timestamps provides a mapping between the
device's sample time and mach_absolute_time().
The host provides the plug-in's device access to several tap points into the system's mix engine
to allow for a variety of features, including adding processing to the signal. The host breaks
these tap points down into IO operations that the host asks the plug-in to perform at the
appropriate time. Prior to starting IO, the host will ask the plug-in which operations are to be
performed. Note that the IO operations are performed on a real time thread on a deadline. As
such the plug-in must avoid avoid blocking and return as quickly as possible.
An AudioServerPlugIn can talk to a DriverKit-based Driver Extension. To do so requires adjusting
the packaging of the CFPlugIn bundle slightly in order to carry the required entitlements. This
requires turning the AudioServerPlugIn bundle into an executable. Coding the AudioServerPlugIn
is the same as described above but there are some additional packaging changes to make:
- Add the "Load As Application" key with the value of the number 1 to the
AudioServerPlugIn's info.plist.
- Export the symbol for the plug-in's factory function using a .exp file or other mechanism.
- Set the "Mach-O Type" build setting for the target to Executable.
- Add "-e _AudioServerPlugInMain" to the "Other Linker Flags" build setting and link
against CoreAudio.framework.
- Code sign the binary such that it includes the
"com.apple.developer.driverkit.userclient-access" entitlements necessary for talking to
the Driver Extension.
*/
//==================================================================================================
#pragma mark -
#pragma mark Includes
#include <CoreAudioTypes/CoreAudioTypes.h>
#include <CoreAudio/AudioHardwareBase.h>
#include <CoreFoundation/CoreFoundation.h>
#if COREFOUNDATION_CFPLUGINCOM_SEPARATE
#include <CoreFoundation/CFPlugInCOM.h>
#endif
//==================================================================================================
CF_ASSUME_NONNULL_BEGIN
#if defined(__cplusplus)
extern "C"
{
#endif
//==================================================================================================
#pragma mark -
#pragma mark Types
/*!
@typedef AudioServerPlugInHostInterface
@abstract Forward declaration of AudioServerPlugInHostInterface.
*/
typedef struct AudioServerPlugInHostInterface AudioServerPlugInHostInterface;
/*!
@typedef AudioServerPlugInHostRef
@abstract A reference to an AudioServerPlugInHostInterface.
*/
typedef const AudioServerPlugInHostInterface* AudioServerPlugInHostRef;
/*!
@typedef AudioServerPlugInDriverInterface
@abstract Forward declaration of AudioServerPlugInDriverInterface.
*/
typedef struct AudioServerPlugInDriverInterface AudioServerPlugInDriverInterface;
/*!
@typedef AudioServerPlugInDriverRef
@abstract A reference to an AudioServerPlugInDriverInterface.
*/
typedef AudioServerPlugInDriverInterface* __nullable * AudioServerPlugInDriverRef;
/*!
@struct AudioServerPlugInCustomPropertyInfo
@abstract The AudioServerPlugInCustomPropertyInfo struct is used to describe enough about
a custom property to allow the Host to marshal the data between the Host and
its clients.
@field mSelector
The AudioObjectPropertySelector of the custom property.
@field mPropertyDataType
A UInt32 whose value indicates the data type of the data of the custom
property. Constants for this value are defined in the Basic Constants
section.
@field mQualifierDataType
A UInt32 whose value indicates the data type of the data of the custom
property. Constants for this value are defined in the Basic Constants
section.
*/
struct AudioServerPlugInCustomPropertyInfo
{
AudioObjectPropertySelector mSelector;
UInt32 mPropertyDataType;
UInt32 mQualifierDataType;
};
typedef struct AudioServerPlugInCustomPropertyInfo AudioServerPlugInCustomPropertyInfo;
/*!
@struct AudioServerPlugInClientInfo
@abstract The AudioServerPlugInClientInfo struct is used to identify a client of the Host
to the plug-in.
@field mClientID
An ID that allows for differentiating multiple clients in the same process.
This ID is passed to the plug-in during IO so that the plug-in can associate
the IO with the client easily.
@field mProcessID
The pid_t of the process that contains the client.
@field mIsNativeEndian
A Boolean indicating whether or not the client has the same endianness as
the server.
@field mBundleID
A CFStringRef that contains the bundle ID of the main bundle of the process
that contains the client. Note that the plug-in is expected to retain this
string itself if the plug-in wishes to keep it around.
*/
struct AudioServerPlugInClientInfo
{
UInt32 mClientID;
pid_t mProcessID;
Boolean mIsNativeEndian;
CFStringRef __nullable mBundleID;
};
typedef struct AudioServerPlugInClientInfo AudioServerPlugInClientInfo;
/*!
@struct AudioServerPlugInIOCycleInfo
@abstract This structure holds the common items passed to all the plug-in's IO routines to
describe an IO cycle
@field mCycleCounter
The cycle ordinal number. This number starts at 1 for the first IO cycle and
increments for each subsequent IO cycle. The count will recycle back to 1
whenever the IO thread resynchronizes with the hardware.
@field mNominalIOBufferFrameSize
The number of sample frames that will nominally be read/written in the new
IO cycle. Note that the actual IO buffers that get read/written might be a
different size depending on whether or not any drift compensation is being
applied by the Host.
@field mInputTime
The time stamp that indicates from where in the device's time line the input
data for the new IO cycle will start at.
@field mOutputTime
The time stamp that indicates from where in the device's time line the output
data for the new IO cycle will start at.
@field mMainHostTicksPerFrame
The number of host ticks per frame that the Host's clock is measuring for
the main device.
@field mDeviceHostTicksPerFrame
The number of host ticks per frame that the Host's clock is measuring for
this device. Note that this value will be equal to the main value for
clockless devices or when the device is the main device in an aggregate.
*/
struct AudioServerPlugInIOCycleInfo
{
UInt64 mIOCycleCounter;
UInt32 mNominalIOBufferFrameSize;
AudioTimeStamp mCurrentTime;
AudioTimeStamp mInputTime;
AudioTimeStamp mOutputTime;
union
{
Float64 mMainHostTicksPerFrame;
Float64 mMasterHostTicksPerFrame API_DEPRECATED_WITH_REPLACEMENT("mMainHostTicksPerFrame", macos(10.0, 12.0), ios(2.0, 15.0), watchos(1.0, 8.0), tvos(9.0, 15.0));
};
Float64 mDeviceHostTicksPerFrame;
};
typedef struct AudioServerPlugInIOCycleInfo AudioServerPlugInIOCycleInfo;
//==================================================================================================
#pragma mark -
#pragma mark Basic Constants
/*!
@defined kAudioServerPlugInTypeUUID
@abstract The UUID of the plug-in type (443ABAB8-E7B3-491A-B985-BEB9187030DB).
*/
#define kAudioServerPlugInTypeUUID CFUUIDGetConstantUUIDWithBytes(NULL, 0x44, 0x3A, 0xBA, 0xB8, 0xE7, 0xB3, 0x49, 0x1A, 0xB9, 0x85, 0xBE, 0xB9, 0x18, 0x70, 0x30, 0xDB)
/*!
@enum Predefined AudioObjectID values
@abstract ObjectIDs that are always the same
@constant kAudioObjectPlugInObject
The AudioObjectID that always refers to the one and only instance of the
AudioPlugIn for the plug-in.
*/
CF_ENUM(AudioObjectID)
{
kAudioObjectPlugInObject = 1
};
/*!
@enum Predefined client ID values
@constant kAudioServerPlugInHostClientID
No actual client will have this value as its ID. It is only used when the
Host is making a request on its own behalf.
*/
CF_ENUM(AudioObjectID)
{
kAudioServerPlugInHostClientID = 0
};
/*!
@enum Custom Property Data Types
@abstract The set of data types the Host knows how to marshal between the server and the
client. These are the only types supported for custom properties. See
AudioServerPlugInCustomPropertyInfo for more information.
@constant kAudioServerPlugInCustomPropertyDataTypeNone
This is used to declare that the property doesn't have any property or
qualifier data.
@constant kAudioServerPlugInCustomPropertyDataTypeCFString
The property/qualifier data is a CFStringRef.
@constant kAudioServerPlugInCustomPropertyDataTypeCFPropertyList
The property/qualifier data is a CFPropertyListRef.
*/
typedef UInt32 AudioServerPlugInCustomPropertyDataType;
CF_ENUM(AudioServerPlugInCustomPropertyDataType)
{
kAudioServerPlugInCustomPropertyDataTypeNone = 0,
kAudioServerPlugInCustomPropertyDataTypeCFString = 'cfst',
kAudioServerPlugInCustomPropertyDataTypeCFPropertyList = 'plst'
};
/*!
@enum IO Operation IDs
@abstract The valid values for the inOperationID argument to the various IO methods.
@constant kAudioServerPlugInIOOperationThread
This operation marks the beginning and the ending of the IO thread. Note
that DoIOOperation() will never be called with this ID.
@constant kAudioServerPlugInIOOperationCycle
This operation marks the beginning and ending of each IO cycle. Note that
DoIOOperation() will never be called with this ID.
@constant kAudioServerPlugInIOOperationReadInput
This operation transfers the input data from the device's ring buffer to the
provided buffer in the stream's native format. Note that this operation
always happens in-place in the main buffer passed to DoIOOperation(). It is
required that this operation be implemented if the AudioDevice has input
streams.
@constant kAudioServerPlugInIOOperationConvertInput
This operation converts the input data from its native format to the
canonical format.
@constant kAudioServerPlugInIOOperationProcessInput
This operation performs arbitrary signal processing on the input data in the
canonical format.
@constant kAudioServerPlugInIOOperationProcessOutput
This operation performs arbitrary signal processing on the output data in
the canonical format.
@constant kAudioServerPlugInIOOperationMixOutput
This operation mixes the output data into the device's ring buffer. Note
that if a plug-in implements this operation, no further output operations
will occur for that cycle. It is assumed that the device handles everything
from there down including preparing the data for consumption by the
hardware. Note also that this operation always happens in-place in the main
buffer passed to DoIOOperation().
@constant kAudioServerPlugInIOOperationProcessMix
This operation processes the full mix of all clients' data in the canonical
format.
@constant kAudioServerPlugInIOOperationConvertMix
This operation converts the fully mixed data from the canonical format to
the device's native format.
@constant kAudioServerPlugInIOOperationWriteMix
This operation puts the data into the device's ring buffer for consumption
of the hardware. Note that this operation always happens in-place in the
main buffer passed to DoIOOperation(). It is required that this operation be
implemented if the AudioDevice has output streams.
*/
typedef CF_ENUM(UInt32, AudioServerPlugInIOOperation)
{
kAudioServerPlugInIOOperationThread = 'thrd',
kAudioServerPlugInIOOperationCycle = 'cycl',
kAudioServerPlugInIOOperationReadInput = 'read',
kAudioServerPlugInIOOperationConvertInput = 'cinp',
kAudioServerPlugInIOOperationProcessInput = 'pinp',
kAudioServerPlugInIOOperationProcessOutput = 'pout',
kAudioServerPlugInIOOperationMixOutput = 'mixo',
kAudioServerPlugInIOOperationProcessMix = 'pmix',
kAudioServerPlugInIOOperationConvertMix = 'cmix',
kAudioServerPlugInIOOperationWriteMix = 'rite'
};
//==================================================================================================
#pragma mark -
#pragma mark AudioObject Properties
/*!
@enum AudioObject Property Selectors
@abstract AudioObjectPropertySelector values provided by objects of the AudioObject class.
@discussion The AudioObject class is the base class for all classes. As such, all classes
inherit this set of properties.
@constant kAudioObjectPropertyCustomPropertyInfoList
An array of AudioServerPlugInCustomPropertyInfo that describe the custom
properties the object has.
*/
CF_ENUM(AudioObjectPropertySelector)
{
kAudioObjectPropertyCustomPropertyInfoList = 'cust'
};
//==================================================================================================
#pragma mark -
#pragma mark AudioPlugIn Properties
/*!
@enum AudioPlugIn Class Constants
@abstract Various constants related to the AudioPlugIn class.
@constant kAudioPlugInPropertyResourceBundle
A CFString that contains a path to a resource bundle to use for localizing
strings and fetching resources like icons from the client process. The path
is relative to the path of the plug-in's bundle. The caller is responsible
for releasing the returned CFObject.
*/
CF_ENUM(AudioObjectPropertySelector)
{
kAudioPlugInPropertyResourceBundle = 'rsrc'
};
//==================================================================================================
#pragma mark -
#pragma mark Device Constants
/*!
@enum Clock Smoothing Algorithm Selectors
@abstract The valid values for kAudioDevicePropertyClockAlgorithm
@constant kAudioDeviceClockAlgorithmRaw
When this value for the clock algorithm is specified, the Host will not
apply any filtering to the time stamps returned from GetZeroTimeStamp(). The
values will be used as-is.
@constant kAudioDeviceClockAlgorithmSimpleIIR
When this value for the clock algorithm is specified, the Host applies a
simple IIR filter to the time stamp stream. This is the default algorithm
used for devices that don't implement kAudioDevicePropertyClockAlgorithm.
@constant kAudioDeviceClockAlgorithm12PtMovingWindowAverage
This clock algorithm uses a 12 point moving window average to filter the time
stamps returned from GetZeroTimeStamp().
*/
typedef CF_ENUM(UInt32, AudioDeviceClockAlgorithmSelector)
{
kAudioDeviceClockAlgorithmRaw = 'raww',
kAudioDeviceClockAlgorithmSimpleIIR = 'iirf',
kAudioDeviceClockAlgorithm12PtMovingWindowAverage = 'mavg'
};
//==================================================================================================
#pragma mark Device Properties
/*!
@enum AudioDevice Properties
@abstract AudioObjectPropertySelector values provided by the AudioDevice class.
@discussion The AudioDevice class is a subclass of the AudioObjectClass. The class has four
scopes, kAudioObjectPropertyScopeGlobal, kAudioObjectPropertyScopeInput,
kAudioObjectPropertyScopeOutput, and kAudioObjectPropertyScopePlayThrough. The
class has a main element and an element for each channel in each stream
numbered according to the starting channel number of each stream.
@constant kAudioDevicePropertyZeroTimeStampPeriod
A UInt32 whose value indicates the number of sample frames the host can
expect between successive time stamps returned from GetZeroTimeStamp(). In
other words, if GetZeroTimeStamp() returned a sample time of X, the host can
expect that the next valid time stamp that will be returned will be X plus
the value of this property.
@constant kAudioDevicePropertyClockAlgorithm
A UInt32 whose value indicates to the Host what smoothing algorithm to use
for a device's clock. The only legal values for this property are specified
in the enum below.
@constant kAudioDevicePropertyClockIsStable
A UInt32 where a non-zero value indicates that the device's clock runs at or
very near the nominal rate with only small variations. If this property is
not implemented, it is assumed that the device's clock is stable.
*/
CF_ENUM(AudioObjectPropertySelector)
{
kAudioDevicePropertyZeroTimeStampPeriod = 'ring',
kAudioDevicePropertyClockAlgorithm = 'clok',
kAudioDevicePropertyClockIsStable = 'cstb'
};
//==================================================================================================
#pragma mark -
#pragma mark AudioServerPlugInHostInterface
/*!
@interface AudioServerPlugInHostInterface
@abstract The interface that audio server plug-ins use to communicate with the Host.
*/
struct AudioServerPlugInHostInterface
{
#pragma mark Property Operations
/*!
@method PropertiesChanged
@abstract This method informs the Host when the state of an plug-in's object changes.
@discussion Note that for Device objects, this method is only used for state changes
that don't affect IO or the structure of the device.
@param inHost
The AudioServerPlugInHostRef passed to the plug-in at initialization.
@param inObjectID
The AudioObjectID of the object whose state has changed.
@param inNumberAddresses
The number of elements in the inAddresses array.
@param inAddresses
An array of AudioObjectPropertyAddresses for the changed properties.
@result An OSStatus indicating success or failure.
*/
OSStatus
(*PropertiesChanged)( AudioServerPlugInHostRef inHost,
AudioObjectID inObjectID,
UInt32 inNumberAddresses,
const AudioObjectPropertyAddress* inAddresses);
#pragma mark Storage Operations
/*!
@method CopyFromStorage
@abstract This method will fetch the data associated with the named storage key.
@param inHost
The AudioServerPlugInHostRef passed to the plug-in at initialization.
@param inKey
A CFStringRef that contains the name of the key whose data is to be
fetched. Note that the Host will make sure that the keys for one plug-in
do not collide with the keys for other plug-ins.
@param outData
The data associated with the named storage key in the form of
CFPropertyList. The caller is responsible for releasing the returned
CFObject.
@result An OSStatus indicating success or failure.
*/
OSStatus
(*CopyFromStorage)( AudioServerPlugInHostRef inHost,
CFStringRef inKey,
CFPropertyListRef __nullable * __nonnull outData);
/*!
@method WriteToStorage
@abstract This method will associate the given data with the named storage key,
replacing any existing data.
@discussion Note that any data stored this way is persists beyond the life span of the
Host including across rebooting.
@param inHost
The AudioServerPlugInHostRef passed to the plug-in at initialization.
@param inKey
A CFStringRef that contains the name of the key whose data is to be
written. Note that the Host will make sure that the keys for one plug-in
do not collide with the keys for other plug-ins.
@param inData
A CFPropertyListRef containing the data to associate with the key.
@result An OSStatus indicating success or failure.
*/
OSStatus
(*WriteToStorage)( AudioServerPlugInHostRef inHost,
CFStringRef inKey,
CFPropertyListRef inData);
/*!
@method DeleteFromStorage
@abstract This method will remove the given key and any associated data from storage.
@param inHost
The AudioServerPlugInHostRef passed to the plug-in at initialization.
@param inKey
A CFStringRef that contains the name of the key to be deleted. Note that
the Host will make sure that the keys for one plug-in do not collide
with the keys for other plug-ins.
@result An OSStatus indicating success or failure.
*/
OSStatus
(*DeleteFromStorage)( AudioServerPlugInHostRef inHost,
CFStringRef inKey);
#pragma mark Device Operations
/*!
@typedef RequestDeviceConfigurationChange
@abstract Plug-ins invoke this routine to tell the Host to initiate a configuration
change operation.
@discussion When a plug-in's device object needs to change its structure or change any
state related to IO for any reason, it must begin this operation by invoking
this Host method. The device object may not perform the state change until
the Host gives the device clearance to do so by invoking the plug-in's
PerformDeviceConfigurationChange() routine. Note that the call to
PerformDeviceConfigurationChange() may be deferred to another thread at the
discretion of the host.
The sorts of changes that must go through this mechanism are anything that
affects either the structure of the device or IO. This includes, but is not
limited to, changing stream layout, adding/removing controls, changing the
nominal sample rate of the device, changing any sample formats on any stream
on the device, changing the size of the ring buffer, changing presentation
latency, and changing the safety offset.
@param inHost
The AudioServerPlugInHostRef passed to the plug-in at initialization.
@param inDeviceObjectID
The AudioObjectID of the device making the request.
@param inChangeAction
A UInt64 indicating the action the device object wants to take. It will
be passed back to the device in the invocation of
PerformDeviceConfigurationChange(). Note that this value is purely for
the plug-in's usage. The Host does not look at this value.
@param inChangeInfo
A pointer to information about the configuration change. It will be
passed back to the device in the invocation of
PerformDeviceConfigurationChange(). Note that this value is purely for
the plug-in's usage. The Host does not look at this value.
@result An OSStatus indicating success or failure. Note that even if this method
indicates success, the Host may still abort the change later.
*/
OSStatus
(*RequestDeviceConfigurationChange)( AudioServerPlugInHostRef inHost,
AudioObjectID inDeviceObjectID,
UInt64 inChangeAction,
void* __nullable inChangeInfo);
};
//==================================================================================================
#pragma mark -
#pragma mark AudioServerPlugInDriverInterface
/*!
@interface AudioServerPlugInDriverInterface
@abstract The CFPlugIn interface for a plug-in for the Audio Server that implements a
device driver.
@discussion In CFPlugIn terms, AudioServerPlugInDriverInterface is a subclass of IUnknown.
*/
struct AudioServerPlugInDriverInterface
{
#pragma mark Inheritence
/*!
@field _reserved
@abstract A standard part of the IUnknown interface.
*/
void* __nullable _reserved;
/*!
@method QueryInterface
@abstract The IUnknown method for interface discovery.
@param inDriver
The CFPlugIn type to query.
@param inUUID
The UUID of the interface to find.
@param outInterface
The returned interface or NULL if none was found.
@result An error code indicating success of failure.
*/
HRESULT
(STDMETHODCALLTYPE *QueryInterface)( void* __nullable inDriver,
REFIID inUUID,
LPVOID __nullable * __nullable outInterface);
/*!
@method AddRef
@abstract The IUnknown method for retaining a reference to a CFPlugIn type.
@param inDriver
The CFPlugIn type to retain.
@result The resulting reference count after the new reference is added.
*/
ULONG
(STDMETHODCALLTYPE *AddRef)( void* __nullable inDriver);
/*!
@method Release
@abstract The IUnknown method for releasing a reference to a CFPlugIn type.
@param inDriver
The CFPlugIn type to release.
@result The resulting reference count after the reference has been removed.
*/
ULONG
(STDMETHODCALLTYPE *Release)( void* __nullable inDriver);
#pragma mark Basic Operations
/*!
@method Initialize
@abstract This method is called to initialize the instance of the plug-in.
@discussion As part of initialization, the plug-in should publish all the objects it
knows about at the time.
@param inDriver
The plug-in to initialize.
@param inHost
An AudioServerPlugInHostInterface struct that the plug-in is to use for
communication with the Host. The Host guarantees that the storage
pointed to by inHost will remain valid for the lifetime of the plug-in.
@result An OSStatus indicating success or failure.
*/
OSStatus
(STDMETHODCALLTYPE *Initialize)( AudioServerPlugInDriverRef __nonnull inDriver,
AudioServerPlugInHostRef inHost);
/*!
@method CreateDevice
@abstract Tells the plug-in to create a new device based on the given description.
@param inDriver
The plug-in that owns the device.
@param inDescription
A CFDictionaryRef that contains a description of the device to create.
@param inClientInfo
A pointer to an AudioServerPlugInClientInfo structure describing the
client creating the device. Note that the mClientID field will be set to
kAudioServerPlugInHostClientID since the device hasn't been created yet.
The client info is passed here to give enough context to allow for the
creation of private devices.
@param outDeviceObjectID
On successful exit, this will contain the object ID of the newly created
device.
@result An OSStatus indicating success or failure.
*/
OSStatus
(STDMETHODCALLTYPE *CreateDevice)( AudioServerPlugInDriverRef __nonnull inDriver,
CFDictionaryRef inDescription,
const AudioServerPlugInClientInfo* inClientInfo,
AudioObjectID* outDeviceObjectID);
/*!
@method DestroyDevice
@abstract Called to tell the plug-in about to destroy the given device.
@param inDriver
The plug-in that owns the device.
@param inDeviceObjectID
The ID of the device to destroy.
@result An OSStatus indicating success or failure.
*/
OSStatus
(STDMETHODCALLTYPE *DestroyDevice)( AudioServerPlugInDriverRef __nonnull inDriver,
AudioObjectID inDeviceObjectID);
/*!
@method AddDeviceClient
@abstract Called to tell the plug-in about a new client of the Host for a particular
device.
@param inDriver
The plug-in that owns the device.
@param inDeviceObjectID
The ID of the device that the client is using.
@param inClientInfo
A pointer to an AudioServerPlugInClientInfo structure describing the new
client. The plug-in should cache this data (including taking a retain on
the bundle ID) as the memory pointed is only valid for the duration of
the call.
@result An OSStatus indicating success or failure.
*/
OSStatus
(STDMETHODCALLTYPE *AddDeviceClient)( AudioServerPlugInDriverRef __nonnull inDriver,
AudioObjectID inDeviceObjectID,
const AudioServerPlugInClientInfo* inClientInfo);
/*!
@method RemoveDeviceClient
@abstract Called to tell the plug-in about a client that is no longer using the device.
@param inDriver
The plug-in that owns the device.
@param inDeviceObjectID
The ID of the device that the client is no longer using.
@param inClientInfo
A pointer to an AudioServerPlugInClientInfo structure describing the
client.
@result An OSStatus indicating success or failure.
*/
OSStatus
(STDMETHODCALLTYPE *RemoveDeviceClient)( AudioServerPlugInDriverRef __nonnull inDriver,
AudioObjectID inDeviceObjectID,
const AudioServerPlugInClientInfo* inClientInfo);
/*!
@method PerformDeviceConfigurationChange
@abstract This is called by the Host to allow the device to perform a configuration
change that had been previously requested via a call to the Host method,
RequestDeviceConfigurationChange().
@param inDriver
The plug-in that owns the device.
@param inDeviceObjectID
The ID of the device that wants to change its configuration.
@param inChangeAction
A UInt64 indicating the action the device object wants to take. This is
the same value that was passed to RequestDeviceConfigurationChange().
Note that this value is purely for the plug-in's usage. The Host does
not look at this value.
@param inChangeInfo
A pointer to information about the configuration change. This is the
same value that was passed to RequestDeviceConfigurationChange(). Note
that this value is purely for the plug-in's usage. The Host does not
look at this value.
@result An OSStatus indicating success or failure.
*/
OSStatus
(STDMETHODCALLTYPE *PerformDeviceConfigurationChange)( AudioServerPlugInDriverRef __nonnull inDriver,
AudioObjectID inDeviceObjectID,
UInt64 inChangeAction,
void* __nullable inChangeInfo);
/*!
@method AbortDeviceConfigurationChange
@abstract This is called by the Host to tell the plug-in not to perform a
configuration change that had been requested via a call to the Host method,
RequestDeviceConfigurationChange().
@param inDriver
The plug-in that owns the device.
@param inDeviceObjectID
The ID of the device that wants to change its configuration.
@param inChangeAction
A UInt64 indicating the action the device object wants to take. This is
the same value that was passed to RequestDeviceConfigurationChange().
Note that this value is purely for the plug-in's usage. The Host does
not look at this value.
@param inChangeInfo
A pointer to information about the configuration change. This is the
same value that was passed to RequestDeviceConfigurationChange(). Note
that this value is purely for the plug-in's usage. The Host does not
look at this value.
@result An OSStatus indicating success or failure.
*/
OSStatus
(STDMETHODCALLTYPE *AbortDeviceConfigurationChange)( AudioServerPlugInDriverRef __nonnull inDriver,
AudioObjectID inDeviceObjectID,
UInt64 inChangeAction,
void* __nullable inChangeInfo);
#pragma mark Property Operations
/*!
@method HasProperty
@abstract Queries an object about whether or not it has the given property.
@param inDriver
The plug-in that owns the object.
@param inObjectID
The object to query.
@param inClientProcessID
A pid_t indicating the process of the client. Note that this will often
be zero indicating that the Host is making the request.
@param inAddress
An AudioObjectPropertyAddress indicating the property being queried.
@result A Boolean indicating whether or not the object has the given property.
*/
Boolean
(STDMETHODCALLTYPE *HasProperty)( AudioServerPlugInDriverRef __nonnull inDriver,
AudioObjectID inObjectID,
pid_t inClientProcessID,
const AudioObjectPropertyAddress* inAddress);
/*!
@method IsPropertySettable
@abstract Queries an object about whether or not the given property can be set.
@param inDriver
The plug-in that owns the object.
@param inObjectID
The object to query.
@param inClientProcessID
A pid_t indicating the process of the client. Note that this will often
be zero indicating that the Host is making the request.
@param inAddress
An AudioObjectPropertyAddress indicating the property being queried.
@param outIsSettable
A Boolean indicating whether or not the property can be set.
@result An OSStatus indicating success or failure.
*/
OSStatus
(STDMETHODCALLTYPE *IsPropertySettable)( AudioServerPlugInDriverRef __nonnull inDriver,
AudioObjectID inObjectID,
pid_t inClientProcessID,
const AudioObjectPropertyAddress* inAddress,
Boolean* outIsSettable);
/*!
@method GetPropertyDataSize
@abstract Queries an object to find the size of the data for the given property.
@param inDriver
The plug-in that owns the object.
@param inObjectID
The object to query.
@param inAddress
An AudioObjectPropertyAddress indicating the property being queried.
@param inClientProcessID
A pid_t indicating the process of the client. Note that this will often
be zero indicating that the Host is making the request.
@param inQualifierDataSize
A UInt32 indicating the size of the buffer pointed to by
inQualifierData. Note that not all properties require qualification, in
which case this value will be 0.
@param inQualifierData,
A buffer of data to be used in determining the data of the property
being queried. Note that not all properties require qualification, in
which case this value will be NULL.
@param outDataSize
A UInt32 indicating how many bytes the data for the given property
occupies.
@result An OSStatus indicating success or failure.
*/
OSStatus
(STDMETHODCALLTYPE *GetPropertyDataSize)( AudioServerPlugInDriverRef __nonnull inDriver,
AudioObjectID inObjectID,
pid_t inClientProcessID,
const AudioObjectPropertyAddress* inAddress,
UInt32 inQualifierDataSize,
const void* __nullable inQualifierData,
UInt32* outDataSize);
/*!
@method GetPropertyData
@abstract Fetches the data of the given property and places it in the provided buffer.
@param inDriver
The plug-in that owns the object.
@param inObjectID
The object to query.
@param inClientProcessID
A pid_t indicating the process of the client. Note that this will often
be zero indicating that the Host is making the request.
@param inAddress
An AudioObjectPropertyAddress indicating the property being queried.
@param inQualifierDataSize
A UInt32 indicating the size of the buffer pointed to by
inQualifierData. Note that not all properties require qualification, in
which case this value will be 0.
@param inQualifierData,
A buffer of data to be used in determining the data of the property
being queried. Note that not all properties require qualification, in
which case this value will be NULL.
@param inDataSize
A UInt32 that indicates the size of the buffer pointed to by outData
@param outDataSize
A UInt32 which on exit indicates how much of the buffer pointed to by
outData was used.
@param outData
The buffer into which the data for the given property will be put.
@result An OSStatus indicating success or failure.
*/
OSStatus
(STDMETHODCALLTYPE *GetPropertyData)( AudioServerPlugInDriverRef __nonnull inDriver,
AudioObjectID inObjectID,
pid_t inClientProcessID,
const AudioObjectPropertyAddress* inAddress,
UInt32 inQualifierDataSize,
const void* __nullable inQualifierData,
UInt32 inDataSize,
UInt32* outDataSize,
void* outData);
/*!
@method SetPropertyData
@abstract Tells an object to change the value of the given property.
@discussion Note that the value of the property cannot be considered set until the
appropriate notification has been received by the Host.
@param inDriver
The plug-in that owns the object.
@param inObjectID
The object to change.
@param inClientProcessID
A pid_t indicating the process of the client. Note that this will often
be zero indicating that the Host is making the request.
@param inAddress
An AudioObjectPropertyAddress indicating the property being changed.
@param inQualifierDataSize
A UInt32 indicating the size of the buffer pointed to by
inQualifierData. Note that not all properties require qualification, in
which case this value will be 0.
@param inQualifierData,
A buffer of data to be used in determining the data of the property
being queried. Note that not all properties require qualification, in
which case this value will be NULL.
@param inDataSize
A UInt32 indicating the size of the buffer pointed to by inData.
@param inData
The buffer containing the data for the property's value.
@result An OSStatus indicating success or failure.
*/
OSStatus
(STDMETHODCALLTYPE *SetPropertyData)( AudioServerPlugInDriverRef __nonnull inDriver,
AudioObjectID inObjectID,
pid_t inClientProcessID,
const AudioObjectPropertyAddress* inAddress,
UInt32 inQualifierDataSize,
const void* __nullable inQualifierData,
UInt32 inDataSize,
const void* inData);
#pragma mark IO Operations
/*!
@method StartIO
@abstract Tells the device to start IO.
@discussion This call is expect to always succeed or fail. The hardware can take as long
as necessary in this call such that it always either succeeds (and returns
0) or fails.
@param inDriver
The plug-in that owns the device.
@param inDeviceObjectID
The device to start.
@param inClientID
The ID of the client making the request. This will have been established
with the device by a previous call to AddDeviceClient(). Note that the
device should consider IO running for as long as at least one client has
started IO.
@result An OSStatus indicating success or failure.
*/
OSStatus
(STDMETHODCALLTYPE *StartIO)( AudioServerPlugInDriverRef __nonnull inDriver,
AudioObjectID inDeviceObjectID,
UInt32 inClientID);
/*!
@method StopIO
@abstract Tells the device to stop IO.
@param inDriver
The plug-in that owns the device.
@param inDeviceObjectID
The device to stop.
@param inClientID
The ID of the client making the request. This will have been established
with the device by a previous call to AddDeviceClient().
@result An OSStatus indicating success or failure.
*/
OSStatus
(STDMETHODCALLTYPE *StopIO)( AudioServerPlugInDriverRef __nonnull inDriver,
AudioObjectID inDeviceObjectID,
UInt32 inClientID);
/*!
@method GetZeroTimeStamp
@abstract Retrieves the most recent zero time stamp for the device.
@discussion Devices that do not provide their own clock do not need to implement this call.
@param inDriver
The plug-in that owns the device.
@param inDeviceObjectID
The device whose zero time stamp is being requested.
@param inClientID
The ID of the client making the request. This will have been established
with the device by a previous call to AddDeviceClient().
@param outSampleTime
Upon return, the sample time portion of the zero time stamp.
@param outHostTime
Upon return, the host time portion of the zero time stamp.
@param outSeed
Upon return, the current seed value for the device's clock. If
successive calls return different seed values, the caller will assume
that the device's clock has established a new time line and that the
caller should resynchronize to the new state.
@result An OSStatus indicating success or failure.
*/
OSStatus
(STDMETHODCALLTYPE *GetZeroTimeStamp)( AudioServerPlugInDriverRef __nonnull inDriver,
AudioObjectID inDeviceObjectID,
UInt32 inClientID,
Float64* outSampleTime,
UInt64* outHostTime,
UInt64* outSeed);
/*!
@method WillDoIOOperation
@abstract Asks the plug-in whether or not the device will perform the given phase of
the IO cycle for a particular device.
@discussion As part of starting IO, the Host will ask the plug-in whether or not the
device in question will perform the given IO operation. This method is not
called during the IO cycle. A device is allowed to do different sets of
operations for different clients.
@param inDriver
The plug-in that owns the device.
@param inDeviceObjectID
The ID of the device.
@param inClientID
The ID of the client doing the operation. This will have been
established with the device by a previous call to AddDeviceClient().
@param inOperationID
A UInt32 that identifies the operation being asked about. Constants for
the valid values of this argument are listed in the Constants section.
@param outWillDo
Upon return, a Boolean indicating whether or not the device will perform
the given operation.
@param outWillDoInPlace
Upon return, a Boolean where true indicates that the device will perform
the requested operation entirely within the main buffer passed to the
DoIOOperation routine. If this value is false, it indicates that the
device requires that the secondary buffer be passed.
@result An OSStatus indicating success or failure.
*/
OSStatus
(STDMETHODCALLTYPE *WillDoIOOperation)( AudioServerPlugInDriverRef __nonnull inDriver,
AudioObjectID inDeviceObjectID,
UInt32 inClientID,
UInt32 inOperationID,
Boolean* outWillDo,
Boolean* outWillDoInPlace);
/*!
@method BeginIOOperation
@abstract Tells the plug-in that the Host is about to begin a phase of the IO cycle for a
particular device.
@param inDriver
The plug-in that owns the device.
@param inDeviceObjectID
The ID of the device.
@param inClientID
The ID of the client doing the operation. This will have been
established with the device by a previous call to AddDeviceClient().
@param inOperationID
A UInt32 that identifies the operation being performed. Constants for
the valid values of this argument are listed in the Constants section.
@param inIOBufferFrameSize
The number of sample frames that will be processed in this operation.
Note that for some operations, this will be different than the nominal
buffer frame size.
@param inIOCycleInfo
The basic information about the current IO cycle.
@result An OSStatus indicating success or failure.
*/
OSStatus
(STDMETHODCALLTYPE *BeginIOOperation)( AudioServerPlugInDriverRef __nonnull inDriver,
AudioObjectID inDeviceObjectID,
UInt32 inClientID,
UInt32 inOperationID,
UInt32 inIOBufferFrameSize,
const AudioServerPlugInIOCycleInfo* inIOCycleInfo);
/*!
@method DoIOOperation
@abstract Tells the device to perform an IO operation for a particular stream.
@param inDriver
The plug-in that owns the device.
@param inDeviceObjectID
The ID of the device.
@param inStreamObjectID
The ID of the stream whose data is being processed.
@param inClientID
The ID of the client doing the operation. This will have been
established with the device by a previous call to AddDeviceClient().
@param inOperationID
A UInt32 that identifies the operation being performed. Constants for
the valid values of this argument are listed in the Constants section.
@param inIOBufferFrameSize
The number of sample frames that will be processed in this operation.
Note that for some operations, this will be different than the nominal
buffer frame size.
@param inIOCycleInfo
The basic information about the current IO cycle.
@param ioMainBuffer
The primary buffer for the data for the operation. If the device
signaled through WillDoIOOperation() that the operation will be handled
in-place, this will be the only buffer passed in.
@param ioSecondaryBuffer
The secondary buffer for performing the operation. If the device
signaled through WillDoIOOperation() that the operation will not be
handled in place, the results of the operation must end up in this
buffer.
@result An OSStatus indicating success or failure.
*/
OSStatus
(STDMETHODCALLTYPE *DoIOOperation)( AudioServerPlugInDriverRef __nonnull inDriver,
AudioObjectID inDeviceObjectID,
AudioObjectID inStreamObjectID,
UInt32 inClientID,
UInt32 inOperationID,
UInt32 inIOBufferFrameSize,
const AudioServerPlugInIOCycleInfo* inIOCycleInfo,
void* __nullable ioMainBuffer,
void* __nullable ioSecondaryBuffer);
/*!
@method EndIOOperation
@abstract Tells the plug-in that the Host is about to end a phase of the IO cycle for
a particular device.
@param inDriver
The plug-in that owns the device.
@param inDeviceObjectID
The ID of the device.
@param inClientID
The ID of the client doing the operation. This will have been
established with the device by a previous call to AddDeviceClient().
@param inOperationID
A UInt32 that identifies the operation being performed. Constants for
the valid values of this argument are listed in the Constants section.
@param inIOBufferFrameSize
The number of sample frames that will be processed in this operation.
Note that for some operations, this will be different than the nominal
buffer frame size.
@param inIOCycleInfo
The basic information about the current IO cycle.
@result An OSStatus indicating success or failure.
*/
OSStatus
(STDMETHODCALLTYPE *EndIOOperation)( AudioServerPlugInDriverRef __nonnull inDriver,
AudioObjectID inDeviceObjectID,
UInt32 inClientID,
UInt32 inOperationID,
UInt32 inIOBufferFrameSize,
const AudioServerPlugInIOCycleInfo* inIOCycleInfo);
};
/*!
@defined kAudioServerPlugInDriverInterfaceUUID
@abstract The UUID of the driver interface (EEA5773D-CC43-49F1-8E00-8F96E7D23B17).
*/
#define kAudioServerPlugInDriverInterfaceUUID CFUUIDGetConstantUUIDWithBytes(NULL, 0xEE, 0xA5, 0x77, 0x3D, 0xCC, 0x43, 0x49, 0xF1, 0x8E, 0x00, 0x8F, 0x96, 0xE7, 0xD2, 0x3B, 0x17)
//==================================================================================================
#if defined(__cplusplus)
}
#endif
CF_ASSUME_NONNULL_END
#endif // CoreAudio_AudioServerPlugIn_h
|
0 | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/CoreAudio.framework | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/CoreAudio.framework/Headers/AudioDriverPlugIn.h | /*==================================================================================================
File: CoreAudio/AudioDriverPlugIn.h
Contains: API for the CFBundle an IOAudio driver can specify for the HAL to use
to provide implemenation for device specific properties.
Copyright: (c) 1985-2010 by Apple, Inc., all rights reserved.
Bugs?: For bug reports, consult the following page on
the World Wide Web:
http://developer.apple.com/bugreporter/
==================================================================================================*/
#if !defined(CoreAudio_AudioDriverPlugIn_h)
#define CoreAudio_AudioDriverPlugIn_h
//==================================================================================================
#pragma mark Overview
/*!
@header AudioDriverPlugIn
IOAudio family drivers can specify a CFBundle in order to implement device specific properties
on behalf of the HAL. The CFBundle provides routines for opening and closing the device as well
as the property management routines. The mechanism by which the driver specifies which CFBundle
to load is defined by the IOAudio driver family in IOKit. The routines described in this header
are loaded by name from the CFBundle. Note that the HAL will create an instance of a plug-in for
each device the plug-in supports that is attached to the system in each process that is using
the HAL.
*/
//==================================================================================================
#pragma mark Includes
#include <CoreAudio/AudioHardware.h>
#include <IOKit/IOKitLib.h>
//==================================================================================================
CF_ASSUME_NONNULL_BEGIN
#if defined(__cplusplus)
extern "C"
{
#endif
//==================================================================================================
#pragma mark Types
/*!
@typedef AudioDriverPlugInDevicePropertyChangedProc
@abstract A plug-in calls this routine to notify the HAL that one of its device's
properties has changed.
@discussion The HAL will notify any listeners on behalf of the plug-in. The pointer to this
routine is supplied to the plug-in when it is opened.
@param inDevice
The device whose property has changed.
@param inChannel
The channel of the device the property that has changed belongs to.
@param isInput
The section of the device the property that has changed belongs to.
@param inPropertyID
The selector of the property that has changed.
@result The return value is currently unused and should always be 0.
*/
typedef OSStatus
(*AudioDriverPlugInDevicePropertyChangedProc)( AudioDeviceID inDevice,
UInt32 inChannel,
Boolean isInput,
AudioDevicePropertyID inPropertyID);
/*!
@typedef AudioDriverPlugInStreamPropertyChangedProc
@abstract A plug-in calls this routine to notify the HAL that a property of one of the
streams of one of its devices has changed.
@discussion The HAL will notify any listeners on behalf of the plug-in. The pointer to this
routine is supplied to the plug-in when it is opened.
@param inDevice
The device whose property has changed.
@param inIOAudioStream
The stream whose property has changed.
@param inChannel
The channel of the stream the property that has changed belongs to.
@param inPropertyID
The selector of the property that has changed.
@result The return value is currently unused and should always be 0.
*/
typedef OSStatus
(*AudioDriverPlugInStreamPropertyChangedProc)( AudioDeviceID inDevice,
io_object_t inIOAudioStream,
UInt32 inChannel,
AudioDevicePropertyID inPropertyID);
/*!
@struct AudioDriverPlugInHostInfo
@abstract This structure provides the plug-in with all the info it needs with respect to
communicating with the HAL.
@field mDeviceID
The AudioDeviceID of the audio device.
@field mIOAudioDevice
The io_object_t that points to the IOAudioDevice object for the device in
the driver.
@field mIOAudioEngine
The io_object_t that points to the IOAudioEngine object for the device in
the driver.
@field mDevicePropertyChangedProc
The AudioDriverPlugInDevicePropertyChangedProc the plug-in should call when
a device property changes.
@field mStreamPropertyChangedProc
The AudioDriverPlugInStreamPropertyChangedProc the plug-in should call when
a stream property changes.
*/
struct AudioDriverPlugInHostInfo
{
AudioDeviceID mDeviceID;
io_object_t mIOAudioDevice;
io_object_t mIOAudioEngine;
AudioDriverPlugInDevicePropertyChangedProc mDevicePropertyChangedProc;
AudioDriverPlugInStreamPropertyChangedProc mStreamPropertyChangedProc;
};
typedef struct AudioDriverPlugInHostInfo AudioDriverPlugInHostInfo;
//==================================================================================================
#pragma mark Functions
/*!
@functiongroup AudioDriver Plug-In
*/
/*!
@function AudioDriverPlugInOpen
@abstract Instantiates a new instance of the driver plug-in.
@param inHostInfo
An AudioDriverPlugInHostInfo struct that tells the plug-in what device it is
being instantiated for.
@result An OSStatus indicating success or failure.
*/
extern OSStatus
AudioDriverPlugInOpen(AudioDriverPlugInHostInfo* inHostInfo);
/*!
@function AudioDriverPlugInClose
@abstract Closes an instance of the driver plug-in.
@param inDevice
The AudioDeviceID that describes the device who's plug-in instance is being
closed.
@result An OSStatus indicating success or failure.
*/
extern OSStatus
AudioDriverPlugInClose(AudioDeviceID inDevice);
/*!
@function AudioDriverPlugInDeviceGetPropertyInfo
@abstract Retrieve information about the given property of an AudioDevice.
@param inDevice
The AudioDevice to query.
@param inChannel
The channel of the property to query where 0 is the main channel.
@param isInput
Which section of the AudioDevice to query.
@param inPropertyID
The AudioDevicePropertyID of the property to query.
@param outSize
A pointer to a UInt32 that receives the size of the property data in bytes
on exit. This can be NULL if the size information is not being requested.
@param outWritable
A pointer to a Boolean that receives indication of whether or not the given
property can be set. This can be NULL if the writability is not being
requested.
@result An OSStatus indicating success or failure. Note that if the plug-in does not
implement the given property, it should return
kAudioHardwareUnknownPropertyError to ensure that the HAL handles the property
normally.
*/
extern OSStatus
AudioDriverPlugInDeviceGetPropertyInfo( AudioDeviceID inDevice,
UInt32 inChannel,
Boolean isInput,
AudioDevicePropertyID inPropertyID,
UInt32* __nullable outSize,
Boolean* __nullable outWritable);
/*!
@function AudioDriverPlugInDeviceGetProperty
@abstract Queries an the AudioDevice object to get the data of the given property and
places it in the provided buffer.
@param inDevice
The AudioDevice to query.
@param inChannel
The channel of the property to query where 0 is the main channel.
@param isInput
Which section of the AudioDevice to query.
@param inPropertyID
The AudioDevicePropertyID of the property to query.
@param ioPropertyDataSize
A UInt32 which on entry indicates the size of the buffer pointed to by
outData and on exit indicates how much of the buffer was used.
@param outPropertyData
The buffer into which the object will put the data for the given property.
@result An OSStatus indicating success or failure. Note that if the plug-in does not
implement the given property, it should return
kAudioHardwareUnknownPropertyError to ensure that the HAL handles the property
normally.
*/
extern OSStatus
AudioDriverPlugInDeviceGetProperty( AudioDeviceID inDevice,
UInt32 inChannel,
Boolean isInput,
AudioDevicePropertyID inPropertyID,
UInt32* ioPropertyDataSize,
void* outPropertyData);
/*!
@function AudioDriverPlugInDeviceSetProperty
@abstract Tells the AudioDevice object to change the value of the given property using the
provided data.
@discussion Note that the value of the property should not be considered changed until the
HAL has called the listeners as many properties values are changed
asynchronously.
@param inDevice
The AudioDevice to change.
@param inWhen
A pointer to an AudioTimeStamp that says when to change the property's value
relative to the device's time base. NULL means execute the change
immediately.
@param inChannel
The channel of the property to change where 0 is the main channel.
@param isInput
Which section of the AudioDevice to change.
@param inPropertyID
The AudioDevicePropertyID of the property to change.
@param inPropertyDataSize
A UInt32 indicating the size of the buffer pointed to by inData.
@param inPropertyData
The buffer containing the data to be used to change the property's value.
@result An OSStatus indicating success or failure. Note that if the plug-in does not
implement the given property, it should return
kAudioHardwareUnknownPropertyError to ensure that the HAL handles the property
normally.
*/
extern OSStatus
AudioDriverPlugInDeviceSetProperty( AudioDeviceID inDevice,
const AudioTimeStamp* __nullable inWhen,
UInt32 inChannel,
Boolean isInput,
AudioDevicePropertyID inPropertyID,
UInt32 inPropertyDataSize,
const void* inPropertyData);
/*!
@function AudioDriverPlugInStreamGetPropertyInfo
@abstract Retrieve information about the given property of an AudioStream.
@param inDevice
The AudioDevice who's stream is being queried.
@param inIOAudioStream
The IOAudioStream to query.
@param inChannel
The channel of the property to query where 0 is the main channel.
@param inPropertyID
The AudioDevicePropertyID of the property to query.
@param outSize
A pointer to a UInt32 that receives the size of the property data in bytes
on exit. This can be NULL if the size information is not being requested.
@param outWritable
A pointer to a Boolean that receives indication of whether or not the given
property can be set. This can be NULL if the writability is not being
requested.
@result An OSStatus indicating success or failure. Note that if the plug-in does not
implement the given property, it should return
kAudioHardwareUnknownPropertyError to ensure that the HAL handles the property
normally.
*/
extern OSStatus
AudioDriverPlugInStreamGetPropertyInfo( AudioDeviceID inDevice,
io_object_t inIOAudioStream,
UInt32 inChannel,
AudioDevicePropertyID inPropertyID,
UInt32* __nullable outSize,
Boolean* __nullable outWritable);
/*!
@function AudioDriverPlugInStreamGetProperty
@abstract Queries an the AudioStream object to get the data of the given property and
places it in the provided buffer.
@param inDevice
The AudioDevice who's stream is being queried.
@param inIOAudioStream
The IOAudioStream to query.
@param inChannel
The channel of the property to query where 0 is the main channel.
@param inPropertyID
The AudioDevicePropertyID of the property to query.
@param ioPropertyDataSize
A UInt32 which on entry indicates the size of the buffer pointed to by
outData and on exit indicates how much of the buffer was used.
@param outPropertyData
The buffer into which the object will put the data for the given property.
@result An OSStatus indicating success or failure. Note that if the plug-in does not
implement the given property, it should return
kAudioHardwareUnknownPropertyError to ensure that the HAL handles the property
normally.
*/
extern OSStatus
AudioDriverPlugInStreamGetProperty( AudioDeviceID inDevice,
io_object_t inIOAudioStream,
UInt32 inChannel,
AudioDevicePropertyID inPropertyID,
UInt32* ioPropertyDataSize,
void* outPropertyData);
/*!
@function AudioDriverPlugInStreamSetProperty
@abstract Tells the AudioStream object to change the value of the given property using the
provided data.
@discussion Note that the value of the property should not be considered changed until the
HAL has called the listeners as many properties values are changed
asynchronously.
@param inDevice
The AudioDevice who's stream is being changed.
@param inIOAudioStream
The IOAudioStream to change.
@param inWhen
A pointer to an AudioTimeStamp that says when to change the property's value
relative to the device's time base. NULL means execute the change
immediately.
@param inChannel
The channel of the property to change where 0 is the main channel.
@param inPropertyID
The AudioDevicePropertyID of the property to change.
@param inPropertyDataSize
A UInt32 indicating the size of the buffer pointed to by inData.
@param inPropertyData
The buffer containing the data to be used to change the property's value.
@result An OSStatus indicating success or failure. Note that if the plug-in does not
implement the given property, it should return
kAudioHardwareUnknownPropertyError to ensure that the HAL handles the property
normally.
*/
extern OSStatus
AudioDriverPlugInStreamSetProperty( AudioDeviceID inDevice,
io_object_t inIOAudioStream,
const AudioTimeStamp* __nullable inWhen,
UInt32 inChannel,
AudioDevicePropertyID inPropertyID,
UInt32 inPropertyDataSize,
const void* inPropertyData);
//==================================================================================================
#if defined(__cplusplus)
}
#endif
CF_ASSUME_NONNULL_END
#endif // CoreAudio_AudioDriverPlugIn_h
|
0 | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/CoreAudio.framework | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/CoreAudio.framework/Headers/AudioHardware.h | /*==================================================================================================
File: CoreAudio/AudioHardware.h
Contains: API for communicating with audio hardware.
Copyright: (c) 1985-2011 by Apple, Inc., all rights reserved.
Bugs?: For bug reports, consult the following page on
the World Wide Web:
http://developer.apple.com/bugreporter/
==================================================================================================*/
#if !defined(CoreAudio_AudioHardware_h)
#define CoreAudio_AudioHardware_h
//==================================================================================================
#pragma mark -
#pragma mark Overview
/*!
@header AudioHardware
The audio HAL provides an abstraction through which applications can access audio hardware. To
do this, the HAL provides a small set of AudioObjects that provide access to the various pieces
of the system.
AudioObjects all have a set of properties that describe and manipulate their state. A property
is accessed via an ordered triple. The first ordinate is the selector which describes the
property. The other two ordinates are the scope and element that identify the particular part of
the object in which to look for the selector. The AudioObjectPropertyAddress structure
encapsulates the property address. The value of a property is an untyped block of data whose
content depends on the specifics of the selector. Some selectors also require the use of a
qualifier when querying. The qualifier allows for additional information to be provided to be
used in the manipulation of the property. Changing the value of a property is always considered
asynchronous.
Applications use the routines AudioObjectHasProperty(), AudioObjectIsPropertySettable() and
AudioObjectGetPropertyDataSize() to find useful meta-information about the property. Apps use
AudioObjectGetPropertyData() and AudioObjectSetPropertyData() to manipulate the value of the
property. Apps use AudioObjectAddPropertyListener() and AudioObjectRemovePropertyListener() to
register/unregister a function that is to be called when a given property's value changes.
The class of an AudioObject determines the basic functionality of the object in terms of what
functions will operate on it as well as the set of properties that can be expected to be
implemented by the object. The set of available classes for objects is limited to those defined
here. There are no other classes. The set of classes is arranged in a hierarchy such that one
class inherits the properties/routines of its super class.
The base class for all AudioObjects is the class AudioObject. As such, each AudioObject will
provide basic properties such as its class, its human readable name, and the other
AudioObjects it contains. Other important classes include AudioSystemObject, AudioDevice, and
AudioStream.
The AudioObjects in the HAL are arranged in a containment hierarchy. The root of the hierarchy
is the one and only instance of the AudioSystemObject class. The properties of the
AudioSystemObject describe the process global settings such as the various default devices and
the notification run loop. The AudioSystemObject also contains all the AudioDevices that are
available.
Instances of the AudioDevice class encapsulate individual audio devices. An AudioDevice serves
as the basic unit of IO. It provides a single IO cycle, a timing source based on it, and all the
buffers synchronized to it. The IO cycle presents all the synchronized buffers to the client in
the same call out along with time stamps that specify the current time, when the input data was
acquired and when the output data will be presented.
AudioDevices contain instances of the AudioStream class. An AudioStream represents a single
buffer of data for transferring across the user/kernel boundary. As such, AudioStreams are the
gatekeepers of format information. Each has its own format and list of available formats.
AudioStreams can provide data in any format, including encoded formats and non-audio formats. If
the format is a linear PCM format, the data will always be presented as 32 bit, native endian
floating point. All conversions to and from the true physical format of the hardware is handled
by the device's driver.
Both AudioDevices and AudioStreams can contain instances of the AudioControl class or its many
subclasses. An AudioControl provides properties that describe/manipulate a particular aspect of
the object such as gain, mute, data source selection, etc. Many common controls are also
also available as properties on the AudioDevice or AudioStream.
*/
//==================================================================================================
#pragma mark -
#pragma mark Includes
#include <Availability.h>
#include <CoreAudioTypes/CoreAudioTypes.h>
#include <CoreAudio/AudioHardwareBase.h>
#include <CoreFoundation/CoreFoundation.h>
#include <dispatch/dispatch.h>
//==================================================================================================
CF_ASSUME_NONNULL_BEGIN
#if defined(__cplusplus)
extern "C"
{
#endif
//==================================================================================================
#pragma mark Basic Constants
/*!
@enum Predefined AudioObjectID values
@abstract ObjectIDs that are always the same
@constant kAudioObjectSystemObject
The AudioObjectID that always refers to the one and only instance of the
AudioSystemObject class.
*/
CF_ENUM(int)
{
kAudioObjectSystemObject = 1
};
//==================================================================================================
#pragma mark -
#pragma mark AudioObject Types
/*!
@typedef AudioObjectPropertyListenerProc
@abstract Clients register an AudioObjectPropertyListenerProc with an AudioObject in order
to receive notifications when the properties of the object change.
@discussion Listeners will be called when possibly many properties have changed.
Consequently, the implementation of a listener must go through the array of
addresses to see what exactly has changed. Note that the array of addresses will
always have at least one address in it for which the listener is signed up to
receive notifications about but may contain addresses for properties for which
the listener is not signed up to receive notifications.
@param inObjectID
The AudioObject whose properties have changed.
@param inNumberAddresses
The number of elements in the inAddresses array.
@param inAddresses
An array of AudioObjectPropertyAddresses indicating which properties
changed.
@param inClientData
A pointer to client data established when the listener proc was registered
with the AudioObject.
@result The return value is currently unused and should always be 0.
*/
typedef OSStatus
(*AudioObjectPropertyListenerProc)( AudioObjectID inObjectID,
UInt32 inNumberAddresses,
const AudioObjectPropertyAddress* inAddresses,
void* __nullable inClientData);
/*!
@typedef AudioObjectPropertyListenerBlock
@abstract Clients register an AudioObjectPropertyListenerBlock with an AudioObject in
order to receive notifications when the properties of the object change.
@discussion Listeners will be called when possibly many properties have changed.
Consequently, the implementation of a listener must go through the array of
addresses to see what exactly has changed. Note that the array of addresses will
always have at least one address in it for which the listener is signed up to
receive notifications about but may contain addresses for properties for which
the listener is not signed up to receive notifications.
@param inNumberAddresses
The number of elements in the inAddresses array.
@param inAddresses
An array of AudioObjectPropertyAddresses indicating which properties
changed.
*/
typedef void
(^AudioObjectPropertyListenerBlock)( UInt32 inNumberAddresses,
const AudioObjectPropertyAddress* inAddresses);
//==================================================================================================
#pragma mark AudioObject Properties
/*!
@enum AudioObject Property Selectors
@abstract AudioObjectPropertySelector values provided by objects of the AudioObject class.
@discussion The AudioObject class is the base class for all classes. As such, all classes
inherit this set of properties.
@constant kAudioObjectPropertyCreator
A CFString that contains the bundle ID of the plug-in that instantiated the
object. The caller is responsible for releasing the returned CFObject.
@constant kAudioObjectPropertyListenerAdded
An AudioObjectPropertyAddress indicating the address to which a new listener
was added. Note that this property is not for applications to use. Rather,
this property is for the HAL shell to notify AudioObjects implemented by an
AudioPlugIn when a listener is added.
@constant kAudioObjectPropertyListenerRemoved
An AudioObjectPropertyAddress indicating the address to which a listener was
removed. Note that this property is not for applications to use. Rather,
this property is for the HAL shell to notify AudioObjects implemented by an
AudioPlugIn when a listener is removed.
*/
CF_ENUM(AudioObjectPropertySelector)
{
kAudioObjectPropertyCreator = 'oplg',
kAudioObjectPropertyListenerAdded = 'lisa',
kAudioObjectPropertyListenerRemoved = 'lisr'
};
//==================================================================================================
#pragma mark AudioObject Functions
/*!
@functiongroup AudioObject
*/
/*!
@function AudioObjectShow
@abstract Prints to standard out a textural description of the AudioObject.
@param inObjectID
The AudioObject to show.
*/
extern void
AudioObjectShow( AudioObjectID inObjectID) __OSX_AVAILABLE_STARTING(__MAC_10_4, __IPHONE_2_0);
/*!
@function AudioObjectHasProperty
@abstract Queries an AudioObject about whether or not it has the given property.
@param inObjectID
The AudioObject to query.
@param inAddress
An AudioObjectPropertyAddress indicating which property is being queried.
@result A Boolean indicating whether or not the AudioObject has the given property.
*/
extern Boolean
AudioObjectHasProperty( AudioObjectID inObjectID,
const AudioObjectPropertyAddress* inAddress) __OSX_AVAILABLE_STARTING(__MAC_10_4, __IPHONE_2_0);
/*!
@function AudioObjectIsPropertySettable
@abstract Queries an AudioObject about whether or not the given property can be set using
AudioObjectSetPropertyData.
@param inObjectID
The AudioObject to query.
@param inAddress
An AudioObjectPropertyAddress indicating which property is being queried.
@param outIsSettable
A Boolean indicating whether or not the property can be set.
@result An OSStatus indicating success or failure.
*/
extern OSStatus
AudioObjectIsPropertySettable( AudioObjectID inObjectID,
const AudioObjectPropertyAddress* inAddress,
Boolean* outIsSettable) __OSX_AVAILABLE_STARTING(__MAC_10_4, __IPHONE_2_0);
/*!
@function AudioObjectGetPropertyDataSize
@abstract Queries an AudioObject to find the size of the data for the given property.
@param inObjectID
The AudioObject to query.
@param inAddress
An AudioObjectPropertyAddress indicating which property is being queried.
@param inQualifierDataSize
A UInt32 indicating the size of the buffer pointed to by inQualifierData.
Note that not all properties require qualification, in which case this
value will be 0.
@param inQualifierData
A buffer of data to be used in determining the data of the property being
queried. Note that not all properties require qualification, in which case
this value will be NULL.
@param outDataSize
A UInt32 indicating how many bytes the data for the given property occupies.
@result An OSStatus indicating success or failure.
*/
extern OSStatus
AudioObjectGetPropertyDataSize( AudioObjectID inObjectID,
const AudioObjectPropertyAddress* inAddress,
UInt32 inQualifierDataSize,
const void* __nullable inQualifierData,
UInt32* outDataSize) __OSX_AVAILABLE_STARTING(__MAC_10_4, __IPHONE_2_0);
/*!
@function AudioObjectGetPropertyData
@abstract Queries an AudioObject to get the data of the given property and places it in
the provided buffer.
@param inObjectID
The AudioObject to query.
@param inAddress
An AudioObjectPropertyAddress indicating which property is being queried.
@param inQualifierDataSize
A UInt32 indicating the size of the buffer pointed to by inQualifierData.
Note that not all properties require qualification, in which case this
value will be 0.
@param inQualifierData
A buffer of data to be used in determining the data of the property being
queried. Note that not all properties require qualification, in which case
this value will be NULL.
@param ioDataSize
A UInt32 which on entry indicates the size of the buffer pointed to by
outData and on exit indicates how much of the buffer was used.
@param outData
The buffer into which the AudioObject will put the data for the given
property.
@result An OSStatus indicating success or failure.
*/
extern OSStatus
AudioObjectGetPropertyData( AudioObjectID inObjectID,
const AudioObjectPropertyAddress* inAddress,
UInt32 inQualifierDataSize,
const void* __nullable inQualifierData,
UInt32* ioDataSize,
void* outData) __OSX_AVAILABLE_STARTING(__MAC_10_4, __IPHONE_2_0);
/*!
@function AudioObjectSetPropertyData
@abstract Tells an AudioObject to change the value of the given property using the
provided data.
@discussion Note that the value of the property should not be considered changed until the
HAL has called the listeners as many properties values are changed
asynchronously.
@param inObjectID
The AudioObject to change.
@param inAddress
An AudioObjectPropertyAddress indicating which property is being changed.
@param inQualifierDataSize
A UInt32 indicating the size of the buffer pointed to by inQualifierData.
Note that not all properties require qualification, in which case this
value will be 0.
@param inQualifierData
A buffer of data to be used in determining the data of the property being
queried. Note that not all properties require qualification, in which case
this value will be NULL.
@param inDataSize
A UInt32 indicating the size of the buffer pointed to by inData.
@param inData
The buffer containing the data to be used to change the property's value.
@result An OSStatus indicating success or failure.
*/
extern OSStatus
AudioObjectSetPropertyData( AudioObjectID inObjectID,
const AudioObjectPropertyAddress* inAddress,
UInt32 inQualifierDataSize,
const void* __nullable inQualifierData,
UInt32 inDataSize,
const void* inData) __OSX_AVAILABLE_STARTING(__MAC_10_4, __IPHONE_2_0);
/*!
@function AudioObjectAddPropertyListener
@abstract Registers the given AudioObjectPropertyListenerProc to receive notifications
when the given properties change.
@param inObjectID
The AudioObject to register the listener with.
@param inAddress
The AudioObjectPropertyAddresses indicating which property the listener
should be notified about.
@param inListener
The AudioObjectPropertyListenerProc to call.
@param inClientData
A pointer to client data that is passed to the listener when it is called.
@result An OSStatus indicating success or failure.
*/
extern OSStatus
AudioObjectAddPropertyListener( AudioObjectID inObjectID,
const AudioObjectPropertyAddress* inAddress,
AudioObjectPropertyListenerProc inListener,
void* __nullable inClientData) __OSX_AVAILABLE_STARTING(__MAC_10_4, __IPHONE_2_0);
/*!
@function AudioObjectRemovePropertyListener
@abstract Unregisters the given AudioObjectPropertyListenerProc from receiving
notifications when the given properties change.
@param inObjectID
The AudioObject to unregister the listener from.
@param inAddress
The AudioObjectPropertyAddress indicating from which property the listener
should be removed.
@param inListener
The AudioObjectPropertyListenerProc being removed.
@param inClientData
A pointer to client data that is passed to the listener when it is called.
@result An OSStatus indicating success or failure.
*/
extern OSStatus
AudioObjectRemovePropertyListener( AudioObjectID inObjectID,
const AudioObjectPropertyAddress* inAddress,
AudioObjectPropertyListenerProc inListener,
void* __nullable inClientData) __OSX_AVAILABLE_STARTING(__MAC_10_4, __IPHONE_2_0);
/*!
@function AudioObjectAddPropertyListenerBlock
@abstract Registers the given AudioObjectPropertyListenerBlock to receive notifications
when the given properties change.
@param inObjectID
The AudioObject to register the listener with.
@param inAddress
The AudioObjectPropertyAddresses indicating which property the listener
should be notified about.
@param inDispatchQueue
The dispatch queue on which the listener block will be dispatched. All
listener blocks will be dispatched asynchronously save for those dispatched
from the IO context (of which kAudioDevicePropertyDeviceIsRunning and
kAudioDeviceProcessorOverload are the only examples) which will be
dispatched synchronously. Note that this dispatch queue will be retained
until a matching call to AudioObjectRemovePropertyListenerBlock is made. If
this value is NULL, then the block will be directly invoked.
@param inListener
The AudioObjectPropertyListenerBlock to call. Note that this block will be
Block_copy'd and the reference maintained until a matching call to
AudioObjectRemovePropertyListenerBlock is made.
@result An OSStatus indicating success or failure.
*/
extern OSStatus
AudioObjectAddPropertyListenerBlock( AudioObjectID inObjectID,
const AudioObjectPropertyAddress* inAddress,
dispatch_queue_t __nullable inDispatchQueue,
AudioObjectPropertyListenerBlock inListener) __OSX_AVAILABLE_STARTING(__MAC_10_7, __IPHONE_7_0);
/*!
@function AudioObjectRemovePropertyListenerBlock
@abstract Unregisters the given AudioObjectPropertyListenerBlock from receiving
notifications when the given properties change.
@param inObjectID
The AudioObject to unregister the listener from.
@param inAddress
The AudioObjectPropertyAddress indicating from which property the listener
should be removed.
@param inDispatchQueue
The dispatch queue on which the listener block was being dispatched to.
@param inListener
The AudioObjectPropertyListenerBlock being removed.
@result An OSStatus indicating success or failure.
*/
extern OSStatus
AudioObjectRemovePropertyListenerBlock( AudioObjectID inObjectID,
const AudioObjectPropertyAddress* inAddress,
dispatch_queue_t __nullable inDispatchQueue,
AudioObjectPropertyListenerBlock inListener) __OSX_AVAILABLE_STARTING(__MAC_10_7, __IPHONE_7_0);
//==================================================================================================
#pragma mark -
#pragma mark AudioSystemObject Constants
/*!
@enum AudioSystemObject Class Constants
@abstract Various constants related to the AudioSystemObject class.
@discussion Note that there is only ever one instance of the AudioSystemObject class and it
is available via the AudioObjectID, kAudioObjectSystemObject.
@constant kAudioSystemObjectClassID
The AudioClassID that identifies the AudioSystemObject class.
*/
CF_ENUM(AudioClassID)
{
kAudioSystemObjectClassID = 'asys'
};
/*!
@enum Power Hints
@abstract The values for kAudioHardwarePropertyPowerHint
@discussion The system object property, kAudioHardwarePropertyPowerHint, allows a process to
to indicate how aggressive the system can be with optimizations that save power.
Note that the value of this property can be set in an application's info.plist
using the key, "AudioHardwarePowerHint". The values for this key are the strings
that correspond to the values in the enum.
@constant kAudioHardwarePowerHintNone
This is the default value and it indicates that the system will not make any
power optimizations that compromise latency or quality in order to save
power. The info.plist value is "None" or the "AudioHardwarePowerHint" entry
can be omitted entirely.
@constant kAudioHardwarePowerHintFavorSavingPower
The system will choose to save power even at the expense of latency. The
info.plist value is "Favor Saving Power"
*/
typedef CF_ENUM(UInt32, AudioHardwarePowerHint)
{
kAudioHardwarePowerHintNone = 0,
kAudioHardwarePowerHintFavorSavingPower = 1
};
//==================================================================================================
#pragma mark AudioSystemObject Properties
/*!
@enum AudioSystemObject Properties
@abstract AudioObjectPropertySelector values provided by the AudioSystemObject class.
@discussion The AudioSystemObject class is a subclass of the AudioObject class. the class
has just the global scope, kAudioObjectPropertyScopeGlobal, and only a main element.
@constant kAudioHardwarePropertyDevices
An array of the AudioObjectIDs that represent all the devices currently
available to the system.
@constant kAudioHardwarePropertyDefaultInputDevice
The AudioObjectID of the default input AudioDevice.
@constant kAudioHardwarePropertyDefaultOutputDevice
The AudioObjectID of the default output AudioDevice.
@constant kAudioHardwarePropertyDefaultSystemOutputDevice
The AudioObjectID of the output AudioDevice to use for system related sound
from the alert sound to digital call progress.
@constant kAudioHardwarePropertyTranslateUIDToDevice
This property fetches the AudioObjectID that corresponds to the AudioDevice
that has the given UID. The UID is passed in via the qualifier as a CFString
while the AudioObjectID for the AudioDevice is returned to the caller as the
property's data. Note that an error is not returned if the UID doesn't refer
to any AudioDevices. Rather, this property will return kAudioObjectUnknown
as the value of the property.
@constant kAudioHardwarePropertyMixStereoToMono
A UInt32 where a value other than 0 indicates that AudioDevices should mix
stereo signals down to mono. Note that the two channels on the device that
comprise the stereo signal are defined on the device by
kAudioDevicePropertyPreferredChannelsForStereo.
@constant kAudioHardwarePropertyPlugInList
An array of AudioObjectIDs that represent all the AudioPlugIn objects
currently provided by the system
@constant kAudioHardwarePropertyTranslateBundleIDToPlugIn
This property fetches the AudioObjectID that corresponds to the AudioPlugIn
that has the given bundle ID. The bundle ID is passed in via the qualifier
as a CFString while the AudioObjectID for the AudioPlugIn is returned to the
caller as the property's data. Note that an error is not returned if the UID
doesn't refer to any AudioPlugIns. Rather, this property will return
kAudioObjectUnknown as the value of the property.
@constant kAudioHardwarePropertyTransportManagerList
An array of the AudioObjectIDs for all the AudioTransportManager objects.
@constant kAudioHardwarePropertyTranslateBundleIDToTransportManager
This property fetches the AudioObjectID that corresponds to the
AudioTransportManager whose bundle has the given bundle ID. The bundle ID is
passed in via the qualifier as a CFString while the AudioObjectID for the
AudioTransportManager is returned to the caller as the property's data. Note
that an error is not returned if the bundle ID doesn't refer to any
AudioTransportManagers. Rather, this property will return
kAudioObjectUnknown as the value of the property.
@constant kAudioHardwarePropertyBoxList
An array of AudioObjectIDs that represent all the AudioBox objects currently
provided by the system.
@constant kAudioHardwarePropertyTranslateUIDToBox
This property fetches the AudioObjectID that corresponds to the AudioBox
that has the given UID. The UID is passed in via the qualifier as a CFString
while the AudioObjectID for the AudioBox is returned to the caller as the
property's data. Note that an error is not returned if the UID doesn't refer
to any AudioBoxes. Rather, this property will return kAudioObjectUnknown
as the value of the property.
@constant kAudioHardwarePropertyClockDeviceList
An array of AudioObjectIDs that represent all the AudioClockDevice objects
currently provided by the system.
@constant kAudioHardwarePropertyTranslateUIDToClockDevice
This property fetches the AudioObjectID that corresponds to the AudioClockDevice
that has the given UID. The UID is passed in via the qualifier as a CFString
while the AudioObjectID for the AudioClockDevice is returned to the caller
as the property's data. Note that an error is not returned if the UID doesn't
refer to any AudioClockDevice. Rather, this property will return
kAudioObjectUnknown as the value of the property.
@constant kAudioHardwarePropertyProcessIsMain
A UInt32 where 1 means that the current process contains the main instance
of the HAL. The main instance of the HAL is the only instance in which
plug-ins should save/restore their devices' settings.
@constant kAudioHardwarePropertyIsInitingOrExiting
A UInt32 whose value will be non-zero if the HAL is either in the midst of
initializing or in the midst of exiting the process.
@constant kAudioHardwarePropertyUserIDChanged
This property exists so that clients can tell the HAL when they are changing
the effective user ID of the process. The way it works is that a client will
set the value of this property and the HAL will flush all its cached per-
user preferences such as the default devices. The value of this property is
a UInt32, but its value has no currently defined meaning and clients may
pass any value when setting it to trigger the cache flush.
@constant kAudioHardwarePropertyProcessIsAudible
A UInt32 where a non-zero value indicates that the audio of the process will
be heard. A value of 0 indicates that all audio in the process will not be
heard.
@constant kAudioHardwarePropertySleepingIsAllowed
A UInt32 where 1 means that the process will allow the CPU to idle sleep
even if there is audio IO in progress. A 0 means that the CPU will not be
allowed to idle sleep. Note that this property won't affect when the CPU is
forced to sleep.
@constant kAudioHardwarePropertyUnloadingIsAllowed
A UInt32 where 1 means that this process wants the HAL to unload itself
after a period of inactivity where there are no IOProcs and no listeners
registered with any AudioObject.
@constant kAudioHardwarePropertyHogModeIsAllowed
A UInt32 where 1 means that this process wants the HAL to automatically take
hog mode and 0 means that the HAL should not automatically take hog mode on
behalf of the process. Processes that only ever use the default device are
the sort of that should set this property's value to 0.
@constant kAudioHardwarePropertyUserSessionIsActiveOrHeadless
A UInt32 where a value other than 0 indicates that the login session of the
user of the process is either an active console session or a headless
session.
@constant kAudioHardwarePropertyServiceRestarted
A UInt32 whose value has no meaning. Rather, this property exists so that
clients can be informed when the service has been reset for some reason.
When a reset happens, any state the client has, such as cached data or
added listeners, must be re-established by the client.
@constant kAudioHardwarePropertyPowerHint
A UInt32 whose values are drawn from the AudioHardwarePowerHint enum above.
Only those values are allowed. This property allows a process to indicate how
aggressive the system can be with optimizations that save power. The default
value is kAudioHardwarePowerHintNone. Note that the value of this
property can be set in an application's info.plist using the key,
"AudioHardwarePowerHint". The values for this key are the strings that
correspond to the values in the Power Hints enum.
*/
CF_ENUM(AudioObjectPropertySelector)
{
kAudioHardwarePropertyDevices = 'dev#',
kAudioHardwarePropertyDefaultInputDevice = 'dIn ',
kAudioHardwarePropertyDefaultOutputDevice = 'dOut',
kAudioHardwarePropertyDefaultSystemOutputDevice = 'sOut',
kAudioHardwarePropertyTranslateUIDToDevice = 'uidd',
kAudioHardwarePropertyMixStereoToMono = 'stmo',
kAudioHardwarePropertyPlugInList = 'plg#',
kAudioHardwarePropertyTranslateBundleIDToPlugIn = 'bidp',
kAudioHardwarePropertyTransportManagerList = 'tmg#',
kAudioHardwarePropertyTranslateBundleIDToTransportManager = 'tmbi',
kAudioHardwarePropertyBoxList = 'box#',
kAudioHardwarePropertyTranslateUIDToBox = 'uidb',
kAudioHardwarePropertyClockDeviceList = 'clk#',
kAudioHardwarePropertyTranslateUIDToClockDevice = 'uidc',
kAudioHardwarePropertyProcessIsMain = 'main',
kAudioHardwarePropertyIsInitingOrExiting = 'inot',
kAudioHardwarePropertyUserIDChanged = 'euid',
kAudioHardwarePropertyProcessIsAudible = 'pmut',
kAudioHardwarePropertySleepingIsAllowed = 'slep',
kAudioHardwarePropertyUnloadingIsAllowed = 'unld',
kAudioHardwarePropertyHogModeIsAllowed = 'hogr',
kAudioHardwarePropertyUserSessionIsActiveOrHeadless = 'user',
kAudioHardwarePropertyServiceRestarted = 'srst',
kAudioHardwarePropertyPowerHint = 'powh'
};
//==================================================================================================
#pragma mark AudioSystemObject Functions
/*!
@functiongroup AudioSystemObject
*/
/*!
@function AudioHardwareUnload
@abstract When this routine is called, all IO on all devices within a process will be
terminated and all resources capable of being released will be released. This
routine essentially returns the HAL to its uninitialized state.
@result An OSStatus indicating success or failure.
*/
extern OSStatus
AudioHardwareUnload(void) __OSX_AVAILABLE_STARTING(__MAC_10_1, __IPHONE_2_0);
/*!
@function AudioHardwareCreateAggregateDevice
@abstract This routine creates a new AudioAggregateDevice using the provided description.
@param inDescription
The CFDictionary that specifies how to build the AudioAggregateDevice. The
supported keys are described in the AudioAggregateDevice Constants section.
@param outDeviceID
The AudioObjectID of the newly created AudioAggregateDevice.
@result An OSStatus indicating success or failure.
*/
extern OSStatus
AudioHardwareCreateAggregateDevice( CFDictionaryRef inDescription,
AudioObjectID* outDeviceID) __OSX_AVAILABLE_STARTING(__MAC_10_9, __IPHONE_7_0);
/*!
@function AudioHardwareDestroyAggregateDevice
@abstract This routine destroys the given AudioAggregateDevice.
@discussion The actual destruction of the device is asynchronous and may take place after
the call to this routine has returned.
@param inDeviceID
The AudioObjectID of the AudioAggregateDevice to destroy.
@result An OSStatus indicating success or failure.
*/
extern OSStatus
AudioHardwareDestroyAggregateDevice(AudioObjectID inDeviceID) __OSX_AVAILABLE_STARTING(__MAC_10_9, __IPHONE_7_0);
//==================================================================================================
#pragma mark -
#pragma mark AudioPlugIn Properties
/*!
@enum AudioPlugIn Properties
@abstract AudioObjectPropertySelector values provided by the AudioPlugIn class.
@discussion The AudioPlugIn class is a subclass of the AudioObject class. the class has just
the global scope, kAudioObjectPropertyScopeGlobal, and only a main element.
@constant kAudioPlugInCreateAggregateDevice
This property is used to tell a plug-in to create a new
AudioAggregateDevice. Its value is only read. The qualifier data for this
property is a CFDictionary containing a description of the
AudioAggregateDevice to create. The keys for the CFDictionary are defined in
the AudioAggregateDevice Constants section. The value of the property that
gets returned is the AudioObjectID of the newly created device.
@constant kAudioPlugInDestroyAggregateDevice
This property is used to tell a plug-in to destroy an AudioAggregateDevice.
Like kAudioPlugInCreateAggregateDevice, this property is read only. The
value of the property is the AudioObjectID of the AudioAggregateDevice to
destroy.
*/
CF_ENUM(AudioObjectPropertySelector)
{
kAudioPlugInCreateAggregateDevice = 'cagg',
kAudioPlugInDestroyAggregateDevice = 'dagg'
};
//==================================================================================================
#pragma mark -
#pragma mark AudioTransportManager Properties
/*!
@enum AudioTransportManager Properties
@abstract AudioObjectPropertySelector values provided by the AudioTransportManager class.
@discussion The AudioTransportManager class is a subclass of the AudioPlugIn class. The
class has just the global scope, kAudioObjectPropertyScopeGlobal, and only a
main element.
@constant kAudioTransportManagerCreateEndPointDevice
This property is used to tell a transport manager to create a new
AudioDevice. Its value is only read. The qualifier data for this
property is a CFDictionary containing a description of the
AudioDevice to create. The standard keys for the CFDictionary are defined in
the AudioEndPointDevice Constants section. The value of the property that
gets returned is the AudioObjectID of the newly created device.
@constant kAudioTransportManagerDestroyEndPointDevice
This property is used to tell a transport manager to destroy an AudioDevice.
Like kAudioTransportManagerCreateDevice, this property is read only. The
value of the property is the AudioObjectID of the AudioAggregateDevice to
destroy.
*/
CF_ENUM(AudioObjectPropertySelector)
{
kAudioTransportManagerCreateEndPointDevice = 'cdev',
kAudioTransportManagerDestroyEndPointDevice = 'ddev'
};
//==================================================================================================
#pragma mark -
#pragma mark AudioDevice Types
/*!
@typedef AudioDeviceIOProc
@abstract An AudioDeviceIOProc is called by an AudioDevice to provide input data read from
the device and collect output data to be written to the device for the current
IO cycle.
@param inDevice
The AudioDevice doing the IO.
@param inNow
An AudioTimeStamp that indicates the IO cycle started. Note that this time
includes any scheduling latency that may have been incurred waking the
thread on which IO is being done.
@param inInputData
An AudioBufferList containing the input data for the current IO cycle. For
streams that are disabled, the AudioBuffer's mData field will be NULL but
the mDataByteSize field will still say how much data would have been there
if it was enabled. Note that the contents of this structure should never be
modified.
@param inInputTime
An AudioTimeStamp that indicates the time at which the first frame in the
data was acquired from the hardware. If the device has no input streams, the
time stamp will be zeroed out.
@param outOutputData
An AudioBufferList in which the output data for the current IO cycle is to
be placed. On entry, each AudioBuffer's mDataByteSize field indicates the
maximum amount of data that can be placed in the buffer and the buffer's
memory has been zeroed out. For formats where the number of bytes per packet
can vary (as with AC-3, for example), the client has to fill out on exit
each mDataByteSize field in each AudioBuffer with the amount of data that
was put in the buffer. Otherwise, the mDataByteSize field should not be
changed. For streams that are disabled, the AudioBuffer's mData field will
be NULL but the mDataByteSize field will still say how much data would have
been there if it was enabled. Except as noted above, the contents of this
structure should not other wise be modified.
@param inOutputTime
An AudioTimeStamp that indicates the time at which the first frame in the
data will be passed to the hardware. If the device has no output streams,
the time stamp will be zeroed out.
@param inClientData
A pointer to client data established when the AudioDeviceIOProc was
registered with the AudioDevice.
@result The return value is currently unused and should always be 0.
*/
typedef OSStatus
(*AudioDeviceIOProc)( AudioObjectID inDevice,
const AudioTimeStamp* inNow,
const AudioBufferList* inInputData,
const AudioTimeStamp* inInputTime,
AudioBufferList* outOutputData,
const AudioTimeStamp* inOutputTime,
void* __nullable inClientData);
/*!
@typedef AudioDeviceIOBlock
@abstract An AudioDeviceIOBlock is called by an AudioDevice to provide input data read
from the device and collect output data to be written to the device for the
current IO cycle.
@param inNow
An AudioTimeStamp that indicates the IO cycle started. Note that this time
includes any scheduling latency that may have been incurred waking the
thread on which IO is being done.
@param inInputData
An AudioBufferList containing the input data for the current IO cycle. For
streams that are disabled, the AudioBuffer's mData field will be NULL but
the mDataByteSize field will still say how much data would have been there
if it was enabled. Note that the contents of this structure should never be
modified.
@param inInputTime
An AudioTimeStamp that indicates the time at which the first frame in the
data was acquired from the hardware. If the device has no input streams, the
time stamp will be zeroed out.
@param outOutputData
An AudioBufferList in which the output data for the current IO cycle is to
be placed. On entry, each AudioBuffer's mDataByteSize field indicates the
maximum amount of data that can be placed in the buffer and the buffer's
memory has been zeroed out. For formats where the number of bytes per packet
can vary (as with AC-3, for example), the client has to fill out on exit
each mDataByteSize field in each AudioBuffer with the amount of data that
was put in the buffer. Otherwise, the mDataByteSize field should not be
changed. For streams that are disabled, the AudioBuffer's mData field will
be NULL but the mDataByteSize field will still say how much data would have
been there if it was enabled. Except as noted above, the contents of this
structure should not other wise be modified.
@param inOutputTime
An AudioTimeStamp that indicates the time at which the first frame in the
data will be passed to the hardware. If the device has no output streams,
the time stamp will be zeroed out.
*/
typedef void
(^AudioDeviceIOBlock)( const AudioTimeStamp* inNow,
const AudioBufferList* inInputData,
const AudioTimeStamp* inInputTime,
AudioBufferList* outOutputData,
const AudioTimeStamp* inOutputTime);
/*!
@typedef AudioDeviceIOProcID
@abstract An AudioDeviceIOProcID represents both an IOProc and the client data that goes
with it. Once created, an AudioDeviceIOProcID can be used everywhere one would
use a regular IOProc. The purpose for an AudioDeviceIOProcID is to allow a
client to register the same function pointer as an IOProc with a device multiple
times provided
*/
typedef AudioDeviceIOProc AudioDeviceIOProcID;
/*!
@struct AudioHardwareIOProcStreamUsage
@abstract This structure describes which streams a given AudioDeviceIOProc will use. It is
used in conjunction with kAudioDevicePropertyIOProcStreamUsage.
@field mIOProc
The IOProc whose stream usage is being specified.
@field mNumberStreams
The number of streams being specified.
@field mStreamIsOn
An array of UInt32's whose length is specified by mNumberStreams. Each
element of the array corresponds to a stream. A value of 0 means the stream
is not to be enabled. Any other value means the stream is to be used.
*/
struct AudioHardwareIOProcStreamUsage
{
void* mIOProc;
UInt32 mNumberStreams;
UInt32 mStreamIsOn[1];
};
typedef struct AudioHardwareIOProcStreamUsage AudioHardwareIOProcStreamUsage;
//==================================================================================================
#pragma mark AudioDevice Constants
/*!
@enum StartAtTime/GetNearestStartTime Flags
@abstract The flags that can be passed to control the behavior of AudioDeviceStartAtTime()
andAudioDeviceGetNearestStartTime().
@constant kAudioDeviceStartTimeIsInputFlag
Set to indicate that the requested time refers to an input time. Clear to
indicate that it is an output time.
@constant kAudioDeviceStartTimeDontConsultDeviceFlag
Set to indicate that the device should not be consulted when determining the
start time. Clear to indicate that the device should be consulted. This flag
cannot be set if kAudioDeviceStartTimeDontConsultHALFlag is set.
@constant kAudioDeviceStartTimeDontConsultHALFlag
Set to indicate that the HAL should not be consulted when determining the
start time. Clear to indicate that the HAL should be consulted. This flag
cannot be set if kAudioDeviceStartTimeDontConsultDeviceFlag is set.
*/
CF_ENUM(UInt32)
{
kAudioDeviceStartTimeIsInputFlag = (1 << 0),
kAudioDeviceStartTimeDontConsultDeviceFlag = (1 << 1),
kAudioDeviceStartTimeDontConsultHALFlag = (1 << 2)
};
//==================================================================================================
#pragma mark AudioDevice Properties
/*!
@enum AudioDevice Properties
@abstract AudioObjectPropertySelector values provided by the AudioDevice class.
@discussion The AudioDevice class is a subclass of the AudioObjectClass. The class has four
scopes, kAudioObjectPropertyScopeGlobal, kAudioObjectPropertyScopeInput,
kAudioObjectPropertyScopeOutput, and kAudioObjectPropertyScopePlayThrough. The
class has a main element and an element for each channel in each stream
numbered according to the starting channel number of each stream.
@constant kAudioDevicePropertyPlugIn
An OSStatus that contains any error codes generated by loading the IOAudio
driver plug-in for the AudioDevice or kAudioHardwareNoError if the plug-in
loaded successfully. This property only exists for IOAudio-based
AudioDevices whose driver has specified a plug-in to load.
@constant kAudioDevicePropertyDeviceHasChanged
The type of this property is a UInt32, but its value has no meaning. This
property exists so that clients can listen to it and be told when the
configuration of the AudioDevice has changed in ways that cannot otherwise
be conveyed through other notifications. In response to this notification,
clients should re-evaluate everything they need to know about the device,
particularly the layout and values of the controls.
@constant kAudioDevicePropertyDeviceIsRunningSomewhere
A UInt32 where 1 means that the AudioDevice is running in at least one
process on the system and 0 means that it isn't running at all.
@constant kAudioDeviceProcessorOverload
A UInt32 where the value has no meaning. This property exists so that
clients can be notified when the AudioDevice detects that an IO cycle has
run past its deadline. Note that the notification for this property is
usually sent from the AudioDevice's IO thread.
@constant kAudioDevicePropertyIOStoppedAbnormally
A UInt32 where the value has no meaning. This property exists so that
clients can be notified when IO on the device has stopped outside of the
normal mechanisms. This typically comes up when IO is stopped after
AudioDeviceStart has returned successfully but prior to the notification for
kAudioDevicePropertyIsRunning being sent.
@constant kAudioDevicePropertyHogMode
A pid_t indicating the process that currently owns exclusive access to the
AudioDevice or a value of -1 indicating that the device is currently
available to all processes. If the AudioDevice is in a non-mixable mode,
the HAL will automatically take hog mode on behalf of the first process to
start an IOProc.
Note that when setting this property, the value passed in is ignored. If
another process owns exclusive access, that remains unchanged. If the
current process owns exclusive access, it is released and made available to
all processes again. If no process has exclusive access (meaning the current
value is -1), this process gains ownership of exclusive access. On return,
the pid_t pointed to by inPropertyData will contain the new value of the
property.
@constant kAudioDevicePropertyBufferFrameSize
A UInt32 whose value indicates the number of frames in the IO buffers.
@constant kAudioDevicePropertyBufferFrameSizeRange
An AudioValueRange indicating the minimum and maximum values, inclusive, for
kAudioDevicePropertyBufferFrameSize.
@constant kAudioDevicePropertyUsesVariableBufferFrameSizes
A UInt32 that, if implemented by a device, indicates that the sizes of the
buffers passed to an IOProc will vary by a small amount. The value of this
property will indicate the largest buffer that will be passed and
kAudioDevicePropertyBufferFrameSize will indicate the smallest buffer that
will get passed to the IOProc. The usage of this property is narrowed to
only allow for devices whose buffer sizes vary by small amounts greater than
kAudioDevicePropertyBufferFrameSize. It is not intended to be a license for
devices to be able to send buffers however they please. Rather, it is
intended to allow for hardware whose natural rhythms lead to this necessity.
@constant kAudioDevicePropertyIOCycleUsage
A Float32 whose range is from 0 to 1. This value indicates how much of the
client portion of the IO cycle the process will use. The client portion of
the IO cycle is the portion of the cycle in which the device calls the
IOProcs so this property does not the apply to the duration of the entire
cycle.
@constant kAudioDevicePropertyStreamConfiguration
This property returns the stream configuration of the device in an
AudioBufferList (with the buffer pointers set to NULL) which describes the
list of streams and the number of channels in each stream. This corresponds
to what will be passed into the IOProc.
@constant kAudioDevicePropertyIOProcStreamUsage
An AudioHardwareIOProcStreamUsage structure which details the stream usage
of a given IO proc. If a stream is marked as not being used, the given
IOProc will see a corresponding NULL buffer pointer in the AudioBufferList
passed to its IO proc. Note that the number of streams detailed in the
AudioHardwareIOProcStreamUsage must include all the streams of that
direction on the device. Also, when getting the value of the property, one
must fill out the mIOProc field of the AudioHardwareIOProcStreamUsage with
the address of the of the IOProc whose stream usage is to be retrieved.
@constant kAudioDevicePropertyActualSampleRate
A Float64 that indicates the current actual sample rate of the AudioDevice
as measured by its time stamps.
@constant kAudioDevicePropertyClockDevice
A CFString that contains the UID for the AudioClockDevice that is currently
serving as the main time base of the device. The caller is responsible
for releasing the returned CFObject.
@constant kAudioDevicePropertyIOThreadOSWorkgroup
An os_workgroup_t that represents the thread workgroup the AudioDevice's
IO thread belongs to. The caller is responsible for releasing the returned
object.
@constant kAudioDevicePropertyProcessMute
A UInt32 where a non-zero value indicates that the current process's audio
will be zeroed out by the system. Note that this property does not apply to
aggregate devices, just real, physical devices.
*/
CF_ENUM(AudioObjectPropertySelector)
{
kAudioDevicePropertyPlugIn = 'plug',
kAudioDevicePropertyDeviceHasChanged = 'diff',
kAudioDevicePropertyDeviceIsRunningSomewhere = 'gone',
kAudioDeviceProcessorOverload = 'over',
kAudioDevicePropertyIOStoppedAbnormally = 'stpd',
kAudioDevicePropertyHogMode = 'oink',
kAudioDevicePropertyBufferFrameSize = 'fsiz',
kAudioDevicePropertyBufferFrameSizeRange = 'fsz#',
kAudioDevicePropertyUsesVariableBufferFrameSizes = 'vfsz',
kAudioDevicePropertyIOCycleUsage = 'ncyc',
kAudioDevicePropertyStreamConfiguration = 'slay',
kAudioDevicePropertyIOProcStreamUsage = 'suse',
kAudioDevicePropertyActualSampleRate = 'asrt',
kAudioDevicePropertyClockDevice = 'apcd',
kAudioDevicePropertyIOThreadOSWorkgroup = 'oswg',
kAudioDevicePropertyProcessMute = 'appm'
};
/*!
@enum AudioDevice Properties Implemented via AudioControl objects
@abstract AudioObjectPropertySelector values for AudioDevice properties that are
implemented by AudioControl objects.
@discussion These properties are also accessible by locating the AudioControl object
attached to the AudioDevice and using that object to access the properties of
the control.
@constant kAudioDevicePropertyJackIsConnected
A UInt32 where a value of 0 means that there isn't anything plugged into the
jack associated withe given element and scope. This property is implemented
by an AudioJackControl, a subclass of AudioBooleanControl.
@constant kAudioDevicePropertyVolumeScalar
A Float32 that represents the value of the volume control. The range is
between 0.0 and 1.0 (inclusive). Note that the set of all Float32 values
between 0.0 and 1.0 inclusive is much larger than the set of actual values
that the hardware can select. This means that the Float32 range has a many
to one mapping with the underlying hardware values. As such, setting a
scalar value will result in the control taking on the value nearest to what
was set. This property is implemented by an AudioControl object that is a
subclass of AudioVolumeControl.
@constant kAudioDevicePropertyVolumeDecibels
A Float32 that represents the value of the volume control in dB. Note that
the set of all Float32 values in the dB range for the control is much larger
than the set of actual values that the hardware can select. This means that
the Float32 range has a many to one mapping with the underlying hardware
values. As such, setting a dB value will result in the control taking on the
value nearest to what was set. This property is implemented by an
AudioControl object that is a subclass of AudioVolumeControl.
@constant kAudioDevicePropertyVolumeRangeDecibels
An AudioValueRange that contains the minimum and maximum dB values the
control can have. This property is implemented by an AudioControl object
that is a subclass of AudioVolumeControl.
@constant kAudioDevicePropertyVolumeScalarToDecibels
A Float32 that on input contains a scalar volume value for the and on exit
contains the equivalent dB value. This property is implemented by an
AudioControl object that is a subclass of AudioVolumeControl.
@constant kAudioDevicePropertyVolumeDecibelsToScalar
A Float32 that on input contains a dB volume value for the and on exit
contains the equivalent scalar value. This property is implemented by an
AudioControl object that is a subclass of AudioVolumeControl.
@constant kAudioDevicePropertyStereoPan
A Float32 where 0.0 is full left, 1.0 is full right, and 0.5 is center. This
property is implemented by an AudioControl object that is a subclass of
AudioStereoPanControl.
@constant kAudioDevicePropertyStereoPanChannels
An array of two UInt32s that indicate which elements of the owning object
the signal is being panned between. This property is implemented by an
AudioControl object that is a subclass of AudioStereoPanControl.
@constant kAudioDevicePropertyMute
A UInt32 where a value of 1 means that mute is enabled making that element
inaudible. The property is implemented by an AudioControl object that is a
subclass of AudioMuteControl.
@constant kAudioDevicePropertySolo
A UInt32 where a value of 1 means that just that element is audible and the
other elements are inaudible. The property is implemented by an AudioControl
object that is a subclass of AudioSoloControl.
@constant kAudioDevicePropertyPhantomPower
A UInt32 where a value of 1 means that the AudioDevice has enabled phantom
power for the given element. The property is implemented by an AudioControl
object that is a subclass of AudioPhantomPowerControl.
@constant kAudioDevicePropertyPhaseInvert
A UInt32 where a value of 1 means that phase of the signal for the given
element has been flipped 180 degrees. The property is implemented by an
AudioControl object that is a subclass of AudioPhaseInvertControl.
@constant kAudioDevicePropertyClipLight
A UInt32 where a value of 1 means that the signal for the element has
exceeded the sample range. Once a clip light is turned on, it is to stay on
until either the value of the control is set to false or the current IO
session stops and a new IO session starts. The property is implemented by an
AudioControl object that is a subclass of AudioClipLightControl.
@constant kAudioDevicePropertyTalkback
A UInt32 where a value of 1 means that the talkback channel is enabled. The
property is implemented by an AudioControl object that is a subclass of
AudioTalkbackControl.
@constant kAudioDevicePropertyListenback
A UInt32 where a value of 1 means that the listenback channel is enabled.
The property is implemented by an AudioControl object that is a subclass of
AudioListenbackControl.
@constant kAudioDevicePropertyDataSource
An array of UInt32s whose values are the item IDs for the currently selected
data sources. This property is implemented by an AudioControl object that is
a subclass of AudioDataSourceControl.
@constant kAudioDevicePropertyDataSources
An array of UInt32s that are represent all the IDs of all the data sources
currently available. This property is implemented by an AudioControl object
that is a subclass of AudioDataSourceControl.
@constant kAudioDevicePropertyDataSourceNameForIDCFString
This property translates the given data source item ID into a human readable
name using an AudioValueTranslation structure. The input data is the UInt32
containing the item ID to translated and the output data is a CFString. The
caller is responsible for releasing the returned CFObject. This property is
implemented by an AudioControl object that is a subclass of
AudioDataSourceControl.
@constant kAudioDevicePropertyDataSourceKindForID
This property returns a UInt32 that identifies the kind of data source
the item ID refers to using an AudioValueTranslation structure. The input
data is the UInt32 containing the item ID and the output data is the UInt32.
@constant kAudioDevicePropertyClockSource
An array of UInt32s whose values are the item IDs for the currently selected
clock sources. This property is implemented by an AudioControl object that
is a subclass of AudioClockControl.
@constant kAudioDevicePropertyClockSources
An array of UInt32s that are represent all the IDs of all the clock sources
currently available. This property is implemented by an AudioControl object
that is a subclass of AudioClockControl.
@constant kAudioDevicePropertyClockSourceNameForIDCFString
This property translates the given clock source item ID into a human
readable name using an AudioValueTranslation structure. The input data is
the UInt32 containing the item ID to translated and the output data is a
CFString. The caller is responsible for releasing the returned CFObject.
This property is implemented by an AudioControl object that is a subclass of
AudioClockControl.
@constant kAudioDevicePropertyClockSourceKindForID
This property returns a UInt32 that identifies the kind of clock source
the item ID refers to using an AudioValueTranslation structure. The input
data is the UInt32 containing the item ID and the output data is the UInt32.
@constant kAudioDevicePropertyPlayThru
A UInt32 where a value of 0 means that play through is off and a value of 1
means that it is on. This property is implemented by an AudioControl object
that is a subclass of AudioMuteControl. Further, the control that implements
this property is only available through
kAudioDevicePropertyScopePlayThrough.
@constant kAudioDevicePropertyPlayThruSolo
A UInt32 where a value of 1 means that just that play through element is
audible and the other elements are inaudible. The property is implemented by
an AudioControl object that is a subclass of AudioSoloControl. Further, the
control that implements this property is only available through
kAudioDevicePropertyScopePlayThrough.
@constant kAudioDevicePropertyPlayThruVolumeScalar
A Float32 that represents the value of the volume control. The range is
between 0.0 and 1.0 (inclusive). Note that the set of all Float32 values
between 0.0 and 1.0 inclusive is much larger than the set of actual values
that the hardware can select. This means that the Float32 range has a many
to one mapping with the underlying hardware values. As such, setting a
scalar value will result in the control taking on the value nearest to what
was set. This property is implemented by an AudioControl object that is a
subclass of AudioVolumeControl.Further, the control that implements this
property is only available through kAudioDevicePropertyScopePlayThrough.
@constant kAudioDevicePropertyPlayThruVolumeDecibels
A Float32 that represents the value of the volume control in dB. Note that
the set of all Float32 values in the dB range for the control is much larger
than the set of actual values that the hardware can select. This means that
the Float32 range has a many to one mapping with the underlying hardware
values. As such, setting a dB value will result in the control taking on the
value nearest to what was set. This property is implemented by an
AudioControl object that is a subclass of AudioVolumeControl. Further, the
control that implements this property is only available through
kAudioDevicePropertyScopePlayThrough.
@constant kAudioDevicePropertyPlayThruVolumeRangeDecibels
An AudioValueRange that contains the minimum and maximum dB values the
control can have. This property is implemented by an AudioControl object
that is a subclass of AudioVolumeControl. Further, the control that
implements this property is only available through
kAudioDevicePropertyScopePlayThrough.
@constant kAudioDevicePropertyPlayThruVolumeScalarToDecibels
A Float32 that on input contains a scalar volume value for the and on exit
contains the equivalent dB value. This property is implemented by an
AudioControl object that is a subclass of AudioVolumeControl. Further, the
control that implements this property is only available through
kAudioDevicePropertyScopePlayThrough.
@constant kAudioDevicePropertyPlayThruVolumeDecibelsToScalar
A Float32 that on input contains a dB volume value for the and on exit
contains the equivalent scalar value. This property is implemented by an
AudioControl object that is a subclass of AudioVolumeControl. Further, the
control that implements this property is only available through
kAudioDevicePropertyScopePlayThrough.
@constant kAudioDevicePropertyPlayThruStereoPan
A Float32 where 0.0 is full left, 1.0 is full right, and 0.5 is center. This
property is implemented by an AudioControl object that is a subclass of
AudioStereoPanControl. Further, the control that implements this property is
only available through kAudioDevicePropertyScopePlayThrough.
@constant kAudioDevicePropertyPlayThruStereoPanChannels
An array of two UInt32s that indicate which elements of the owning object
the signal is being panned between. This property is implemented by an
AudioControl object that is a subclass of AudioStereoPanControl. Further,
the control that implements this property is only available through
kAudioDevicePropertyScopePlayThrough.
@constant kAudioDevicePropertyPlayThruDestination
An array of UInt32s whose values are the item IDs for the currently selected
play through data destinations. This property is implemented by an
AudioControl object that is a subclass of AudioDataDestinationControl.
Further, the control that implements this property is only available through
kAudioDevicePropertyScopePlayThrough.
@constant kAudioDevicePropertyPlayThruDestinations
An array of UInt32s that are represent all the IDs of all the play through
data destinations currently available. This property is implemented by an
AudioControl object that is a subclass of AudioDataDestinationControl.
Further, the control that implements this property is only available through
kAudioDevicePropertyScopePlayThrough.
@constant kAudioDevicePropertyPlayThruDestinationNameForIDCFString
This property translates the given play through data destination item ID
into a human readable name using an AudioValueTranslation structure. The
input data is the UInt32 containing the item ID to translated and the output
data is a CFString. The caller is responsible for releasing the returned
CFObject. This property is implemented by an AudioControl object that is a
subclass of AudioDataDestinationControl. Further, the control that
implements this property is only available through
kAudioDevicePropertyScopePlayThrough.
@constant kAudioDevicePropertyChannelNominalLineLevel
An array of UInt32s whose values are the item IDs for the currently selected
nominal line levels. This property is implemented by an AudioControl object
that is a subclass of AudioLineLevelControl.
@constant kAudioDevicePropertyChannelNominalLineLevels
An array of UInt32s that represent all the IDs of all the nominal line
levels currently available. This property is implemented by an AudioControl
object that is a subclass of AudioLineLevelControl.
@constant kAudioDevicePropertyChannelNominalLineLevelNameForIDCFString
This property translates the given nominal line level item ID into a human
readable name using an AudioValueTranslation structure. The input data is
the UInt32 containing the item ID to be translated and the output data is a
CFString. The caller is responsible for releasing the returned CFObject.
This property is implemented by an AudioControl object that is a subclass of
AudioLineLevelControl.
@constant kAudioDevicePropertyHighPassFilterSetting
An array of UInt32s whose values are the item IDs for the currently selected
high pass filter setting. This property is implemented by an AudioControl
object that is a subclass of AudioHighPassFilterControl.
@constant kAudioDevicePropertyHighPassFilterSettings
An array of UInt32s that represent all the IDs of all the high pass filter
settings currently available. This property is implemented by an
AudioControl object that is a subclass of AudioHighPassFilterControl.
@constant kAudioDevicePropertyHighPassFilterSettingNameForIDCFString
This property translates the given high pass filter setting item ID into a
human readable name using an AudioValueTranslation structure. The input data
is the UInt32 containing the item ID to be translated and the output data is
a CFString. The caller is responsible for releasing the returned CFObject.
This property is implemented by an AudioControl object that is a subclass of
AudioHighPassFilterControl.
@constant kAudioDevicePropertySubVolumeScalar
A Float32 that represents the value of the LFE volume control. The range is
between 0.0 and 1.0 (inclusive). Note that the set of all Float32 values
between 0.0 and 1.0 inclusive is much larger than the set of actual values
that the hardware can select. This means that the Float32 range has a many
to one mapping with the underlying hardware values. As such, setting a
scalar value will result in the control taking on the value nearest to what
was set. This property is implemented by an AudioControl object that is a
subclass of AudioLFEVolumeControl.
@constant kAudioDevicePropertySubVolumeDecibels
A Float32 that represents the value of the LFE volume control in dB. Note
that the set of all Float32 values in the dB range for the control is much
larger than the set of actual values that the hardware can select. This
means that the Float32 range has a many to one mapping with the underlying
hardware values. As such, setting a dB value will result in the control
taking on the value nearest to what was set. This property is implemented by
an AudioControl object that is a subclass of AudioLFE VolumeControl.
@constant kAudioDevicePropertySubVolumeRangeDecibels
An AudioValueRange that contains the minimum and maximum dB values the
control can have. This property is implemented by an AudioControl object
that is a subclass of AudioLFEVolumeControl.
@constant kAudioDevicePropertySubVolumeScalarToDecibels
A Float32 that on input contains a scalar volume value for the and on exit
contains the equivalent dB value. This property is implemented by an
AudioControl object that is a subclass of AudioLFEVolumeControl.
@constant kAudioDevicePropertySubVolumeDecibelsToScalar
A Float32 that on input contains a dB volume value for the and on exit
contains the equivalent scalar value. This property is implemented by an
AudioControl object that is a subclass of AudioLFEVolumeControl.
@constant kAudioDevicePropertySubMute
A UInt32 where a value of 1 means that mute is enabled making the LFE on
that element inaudible. The property is implemented by an AudioControl
object that is a subclass of AudioLFEMuteControl.
*/
CF_ENUM(AudioObjectPropertySelector)
{
kAudioDevicePropertyJackIsConnected = 'jack',
kAudioDevicePropertyVolumeScalar = 'volm',
kAudioDevicePropertyVolumeDecibels = 'vold',
kAudioDevicePropertyVolumeRangeDecibels = 'vdb#',
kAudioDevicePropertyVolumeScalarToDecibels = 'v2db',
kAudioDevicePropertyVolumeDecibelsToScalar = 'db2v',
kAudioDevicePropertyStereoPan = 'span',
kAudioDevicePropertyStereoPanChannels = 'spn#',
kAudioDevicePropertyMute = 'mute',
kAudioDevicePropertySolo = 'solo',
kAudioDevicePropertyPhantomPower = 'phan',
kAudioDevicePropertyPhaseInvert = 'phsi',
kAudioDevicePropertyClipLight = 'clip',
kAudioDevicePropertyTalkback = 'talb',
kAudioDevicePropertyListenback = 'lsnb',
kAudioDevicePropertyDataSource = 'ssrc',
kAudioDevicePropertyDataSources = 'ssc#',
kAudioDevicePropertyDataSourceNameForIDCFString = 'lscn',
kAudioDevicePropertyDataSourceKindForID = 'ssck',
kAudioDevicePropertyClockSource = 'csrc',
kAudioDevicePropertyClockSources = 'csc#',
kAudioDevicePropertyClockSourceNameForIDCFString = 'lcsn',
kAudioDevicePropertyClockSourceKindForID = 'csck',
kAudioDevicePropertyPlayThru = 'thru',
kAudioDevicePropertyPlayThruSolo = 'thrs',
kAudioDevicePropertyPlayThruVolumeScalar = 'mvsc',
kAudioDevicePropertyPlayThruVolumeDecibels = 'mvdb',
kAudioDevicePropertyPlayThruVolumeRangeDecibels = 'mvd#',
kAudioDevicePropertyPlayThruVolumeScalarToDecibels = 'mv2d',
kAudioDevicePropertyPlayThruVolumeDecibelsToScalar = 'mv2s',
kAudioDevicePropertyPlayThruStereoPan = 'mspn',
kAudioDevicePropertyPlayThruStereoPanChannels = 'msp#',
kAudioDevicePropertyPlayThruDestination = 'mdds',
kAudioDevicePropertyPlayThruDestinations = 'mdd#',
kAudioDevicePropertyPlayThruDestinationNameForIDCFString = 'mddc',
kAudioDevicePropertyChannelNominalLineLevel = 'nlvl',
kAudioDevicePropertyChannelNominalLineLevels = 'nlv#',
kAudioDevicePropertyChannelNominalLineLevelNameForIDCFString = 'lcnl',
kAudioDevicePropertyHighPassFilterSetting = 'hipf',
kAudioDevicePropertyHighPassFilterSettings = 'hip#',
kAudioDevicePropertyHighPassFilterSettingNameForIDCFString = 'hipl',
kAudioDevicePropertySubVolumeScalar = 'svlm',
kAudioDevicePropertySubVolumeDecibels = 'svld',
kAudioDevicePropertySubVolumeRangeDecibels = 'svd#',
kAudioDevicePropertySubVolumeScalarToDecibels = 'sv2d',
kAudioDevicePropertySubVolumeDecibelsToScalar = 'sd2v',
kAudioDevicePropertySubMute = 'smut'
};
//==================================================================================================
#pragma mark AudioDevice Functions
/*!
@functiongroup AudioDevice
*/
/*!
@function AudioDeviceCreateIOProcID
@abstract Creates an AudioDeviceIOProcID from an AudioDeviceIOProc and a client data
pointer.
@discussion AudioDeviceIOProcIDs allow for the client to register the same function pointer
with a device multiple times
@param inDevice
The AudioDevice to register the IOProc with.
@param inProc
The AudioDeviceIOProc to register.
@param inClientData
A pointer to client data that is passed back to the IOProc when it is
called.
@param outIOProcID
The newly created AudioDeviceIOProcID.
@result An OSStatus indicating success or failure.
*/
extern OSStatus
AudioDeviceCreateIOProcID( AudioObjectID inDevice,
AudioDeviceIOProc inProc,
void* __nullable inClientData,
AudioDeviceIOProcID __nullable * __nonnull outIOProcID) __OSX_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_2_0);
/*!
@function AudioDeviceCreateIOProcIDWithBlock
@abstract Creates an AudioDeviceIOProcID from an AudioDeviceIOBlock
@param outIOProcID
The newly created AudioDeviceIOProcID.
@param inDevice
The AudioDevice to register the Block with.
@param inDispatchQueue
The dispatch queue on which the IOBlock will be dispatched. All
IOBlocks are dispatched synchronously. Note that this dispatch queue will be
retained until a matching call to AudioDeviceDestroyIOProcID is made. If
this value is NULL, then the IOBlock will be directly invoked.
@param inIOBlock
The AudioDeviceIOBlock to register. Note that this block will be
Block_copy'd and the reference maintained until a matching call to
AudioDeviceDestroyIOProcID is made.
@result An OSStatus indicating success or failure.
*/
extern OSStatus
AudioDeviceCreateIOProcIDWithBlock( AudioDeviceIOProcID __nullable * __nonnull outIOProcID,
AudioObjectID inDevice,
dispatch_queue_t __nullable inDispatchQueue,
AudioDeviceIOBlock inIOBlock) __OSX_AVAILABLE_STARTING(__MAC_10_7, __IPHONE_7_0);
/*!
@function AudioDeviceDestroyIOProcID
@abstract Destroys an AudioDeviceIOProcID.
@discussion AudioDeviceIOProcIDs allow for the client to register the same function pointer
with a device multiple times
@param inDevice
The AudioDevice from which the ID came.
@param inIOProcID
The AudioDeviceIOProcID to get rid of.
@result An OSStatus indicating success or failure.
*/
extern OSStatus
AudioDeviceDestroyIOProcID( AudioObjectID inDevice,
AudioDeviceIOProcID inIOProcID) __OSX_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_2_0);
/*!
@function AudioDeviceStart
@abstract Starts IO for the given AudioDeviceIOProcID.
@param inDevice
The AudioDevice to start the IOProc on.
@param inProcID
The AudioDeviceIOProcID to start. Note that this can be NULL, which starts
the hardware regardless of whether or not there are any IOProcs registered.
This is necessary if any of the AudioDevice's timing services are to be
used. A balancing call to AudioDeviceStop with a NULL IOProc is required to
stop the hardware.
@result An OSStatus indicating success or failure.
*/
extern OSStatus
AudioDeviceStart( AudioObjectID inDevice,
AudioDeviceIOProcID __nullable inProcID) __OSX_AVAILABLE_STARTING(__MAC_10_0, __IPHONE_2_0);
/*!
@function AudioDeviceStartAtTime
@abstract Starts IO for the given AudioDeviceIOProcID and aligns the IO cycle of the
AudioDevice with the given time.
@param inDevice
The AudioDevice to start the IOProc on.
@param inProcID
The AudioDeviceIOProcID to start. Note that this can be NULL, which starts
the hardware regardless of whether or not there are any IOProcs registered.
@param ioRequestedStartTime
A pointer to an AudioTimeStamp that, on entry, is the requested time to
start the IOProc. On exit, it will be the actual time the IOProc will start.
@param inFlags
A UInt32 containing flags that modify how this function behaves.
@result An OSStatus indicating success or failure.
kAudioHardwareUnsupportedOperationError will be returned if the AudioDevice does
not support starting at a specific time and inProc and ioRequestedStartTime are
not NULL.
*/
extern OSStatus
AudioDeviceStartAtTime( AudioObjectID inDevice,
AudioDeviceIOProcID __nullable inProcID,
AudioTimeStamp* ioRequestedStartTime,
UInt32 inFlags) __OSX_AVAILABLE_STARTING(__MAC_10_3, __IPHONE_2_0);
/*!
@function AudioDeviceStop
@abstract Stops IO for the given AudioDeviceIOProcID.
@param inDevice
The AudioDevice to stop the IOProc on.
@param inProcID
The AudioDeviceIOProcID to stop.
@result An OSStatus indicating success or failure.
*/
extern OSStatus
AudioDeviceStop( AudioObjectID inDevice,
AudioDeviceIOProcID __nullable inProcID) __OSX_AVAILABLE_STARTING(__MAC_10_0, __IPHONE_2_0);
/*!
@function AudioDeviceGetCurrentTime
@abstract Retrieves the current time from an AudioDevice. Note that the device has to be
running.
@param inDevice
The AudioDevice to from which to get the time.
@param outTime
An AudioTimeStamp into which the current time is put. On entry, the
mFlags field specifies which representations to provide. Because not every
device supports all time representations, on exit, the mFlags field will
indicate what values are actually valid.
@result An OSStatus indicating success or failure. kAudioHardwareNotRunningError will be
returned if the AudioDevice isn't running.
*/
extern OSStatus
AudioDeviceGetCurrentTime( AudioObjectID inDevice,
AudioTimeStamp* outTime) __OSX_AVAILABLE_STARTING(__MAC_10_0, __IPHONE_2_0);
/*!
@function AudioDeviceTranslateTime
@abstract Translates the time in the AudioDevice's time base from one representation to
another. Note that the device has to be running
@param inDevice
The AudioDevice whose time base governs the translation.
@param inTime
An AudioTimeStamp containing the time to be translated.
@param outTime
An AudioTimeStamp into which the translated time is put. On entry, the
mFlags field specifies which representations to translate the input time
into. Because not every device supports all time representations, on exit,
the mFlags field will indicate which translations were actually done.
@result An OSStatus indicating success or failure. kAudioHardwareNotRunningError will be
returned if the AudioDevice isn't running.
*/
extern OSStatus
AudioDeviceTranslateTime( AudioObjectID inDevice,
const AudioTimeStamp* inTime,
AudioTimeStamp* outTime) __OSX_AVAILABLE_STARTING(__MAC_10_0, __IPHONE_2_0);
/*!
@function AudioDeviceGetNearestStartTime
@abstract Query an AudioDevice to get a time equal to or later than the given time that is
the best time to start IO.
@discussion The time that is returned is dictated by the constraints of the device and the
system. For instance, the driver of a device that provides both audio and video
data may only allow start times that coincide with the edge of a video frame.
Also, if the device already has one or more active IOProcs, the start time will
be shifted to the beginning of the next IO cycle so as not to cause
discontinuities in the existing IOProcs. Another reason the start time may shift
is to allow for aligning the buffer accesses in an optimal fashion. Note that
the device must be running to use this function.
@param inDevice
The AudioDevice to query.
@param ioRequestedStartTime
A pointer to an AudioTimeStamp that, on entry, is the requested start time.
On exit, it will have the a time equal to or later than the requested time,
as dictated by the device's constraints.
@param inFlags
A UInt32 containing flags that modify how this function behaves.
@result An OSStatus indicating success or failure. kAudioHardwareNotRunningError will be
returned if the AudioDevice isn't running.
kAudioHardwareUnsupportedOperationError will be returned if the AudioDevice does
not support starting at a specific time.
*/
extern OSStatus
AudioDeviceGetNearestStartTime( AudioObjectID inDevice,
AudioTimeStamp* ioRequestedStartTime,
UInt32 inFlags) __OSX_AVAILABLE_STARTING(__MAC_10_3, __IPHONE_2_0);
//==================================================================================================
#pragma mark -
#pragma mark AudioAggregateDevice Constants
/*!
@enum AudioAggregateDevice Class Constants
@abstract Various constants related to the AudioAggregateDevice class.
@constant kAudioAggregateDeviceClassID
The AudioClassID that identifies the AudioAggregateDevice class.
*/
CF_ENUM(AudioClassID)
{
kAudioAggregateDeviceClassID = 'aagg'
};
/*!
@defined kAudioAggregateDeviceUIDKey
@discussion The key used in a CFDictionary that describes the composition of an
AudioAggregateDevice. The value for this key is a CFString that contains the UID
of the AudioAggregateDevice.
*/
#define kAudioAggregateDeviceUIDKey "uid"
/*!
@defined kAudioAggregateDeviceNameKey
@discussion The key used in a CFDictionary that describes the composition of an
AudioAggregateDevice. The value for this key is a CFString that contains the
human readable name of the AudioAggregateDevice.
*/
#define kAudioAggregateDeviceNameKey "name"
/*!
@defined kAudioAggregateDeviceSubDeviceListKey
@discussion The key used in a CFDictionary that describes the composition of an
AudioAggregateDevice. The value for this key is a CFArray of CFDictionaries that
describe each sub-device in the AudioAggregateDevice. The keys for this
CFDictionary are defined in the AudioSubDevice section.
*/
#define kAudioAggregateDeviceSubDeviceListKey "subdevices"
/*!
@defined kAudioAggregateDeviceMainSubDeviceKey
@discussion The key used in a CFDictionary that describes the composition of an
AudioAggregateDevice. The value for this key is a CFString that contains the
UID for the sub-device that is the time source for the
AudioAggregateDevice.
*/
#define kAudioAggregateDeviceMainSubDeviceKey "master"
/*!
@defined kAudioAggregateDeviceClockDeviceKey
@discussion The key used in a CFDictionary that describes the composition of an
AudioAggregateDevice. The value for this key is a CFString that contains the
UID for the clock device that is the time source for the
AudioAggregateDevice. If the aggregate device includes both a main audio
device and a clock device, the clock device will control the time base.
*/
#define kAudioAggregateDeviceClockDeviceKey "clock"
/*!
@defined kAudioAggregateDeviceIsPrivateKey
@discussion The key used in a CFDictionary that describes the composition of an
AudioAggregateDevice. The value for this key is a CFNumber where a value of 0
means that the AudioAggregateDevice is to be published to the entire system and
a value of 1 means that the AudioAggregateDevice is private to the process that
created it. Note that a private AudioAggregateDevice is not persistent across
launches of the process that created it. Note that if this key is not present,
it implies that the AudioAggregateDevice is published to the entire system.
*/
#define kAudioAggregateDeviceIsPrivateKey "private"
/*!
@defined kAudioAggregateDeviceIsStackedKey
@discussion The key used in a CFDictionary that describes the composition of an
AudioAggregateDevice. The value for this key is a CFNumber where a value of 0
means that the sub-devices of the AudioAggregateDevice are arranged such that
the output streams are all fed the same data.
*/
#define kAudioAggregateDeviceIsStackedKey "stacked"
//==================================================================================================
#pragma mark AudioAggregateDevice Properties
/*!
@enum AudioAggregateDevice Properties
@abstract AudioObjectPropertySelector values provided by the AudioAggregateDevice class.
@discussion AudioAggregateDevice is a subclass of AudioDevice and has the same scope and
element structure.
@constant kAudioAggregateDevicePropertyFullSubDeviceList
A CFArray of CFStrings that contain the UIDs of all the devices, active or
inactive, contained in the AudioAggregateDevice. The order of the items in
the array is significant and is used to determine the order of the streams
of the AudioAggregateDevice. The caller is responsible for releasing the
returned CFObject.
@constant kAudioAggregateDevicePropertyActiveSubDeviceList
An array of AudioObjectIDs for all the active sub-devices in the aggregate
device.
@constant kAudioAggregateDevicePropertyComposition
A CFDictionary that describes the composition of the AudioAggregateDevice.
The keys for this CFDicitionary are defined in the AudioAggregateDevice
Constants section. The caller is responsible for releasing the returned
CFObject.
@constant kAudioAggregateDevicePropertyMainSubDevice
A CFString that contains the UID for the AudioDevice that is currently
serving as the time base of the aggregate device. The caller is
responsible for releasing the returned CFObject.
@constant kAudioAggregateDevicePropertyClockDevice
A CFString that contains the UID for the AudioClockDevice that is currently
serving as the time base of the aggregate device. If the aggregate
device includes both a main audio device and a clock device, the clock
device will control the time base. Setting this property will enable
drift correction for all subdevices in the aggregate device. The caller is
responsible for releasing the returned CFObject.
*/
CF_ENUM(AudioObjectPropertySelector)
{
kAudioAggregateDevicePropertyFullSubDeviceList = 'grup',
kAudioAggregateDevicePropertyActiveSubDeviceList = 'agrp',
kAudioAggregateDevicePropertyComposition = 'acom',
kAudioAggregateDevicePropertyMainSubDevice = 'amst',
kAudioAggregateDevicePropertyClockDevice = 'apcd'
};
//==================================================================================================
#pragma mark -
#pragma mark AudioSubDevice Constants
/*!
@enum AudioSubDevice Class Constants
@abstract Various constants related to the AudioSubDevice class.
@constant kAudioSubDeviceClassID
The AudioClassID that identifies the AudioSubDevice class.
*/
CF_ENUM(AudioClassID)
{
kAudioSubDeviceClassID = 'asub'
};
/*!
@enum AudioSubDevice Clock Drift Compensation Methods
@abstract Constants that describe the range of values the property
kAudioSubDevicePropertyDriftCompensation. It is a continuous range from
kAudioSubDeviceDriftCompensationMinQuality to
kAudioSubDeviceDriftCompensationMaxQuality, with some commonly used settings
called out.
*/
CF_ENUM(UInt32)
{
kAudioSubDeviceDriftCompensationMinQuality = 0,
kAudioSubDeviceDriftCompensationLowQuality = 0x20,
kAudioSubDeviceDriftCompensationMediumQuality = 0x40,
kAudioSubDeviceDriftCompensationHighQuality = 0x60,
kAudioSubDeviceDriftCompensationMaxQuality = 0x7F
};
/*!
@defined kAudioSubDeviceUIDKey
@discussion The key used in a CFDictionary that describes the state of an AudioSubDevice.
The value for this key is a CFString that contains the UID for the
AudioSubDevice.
*/
#define kAudioSubDeviceUIDKey "uid"
/*!
@defined kAudioAggregateDeviceSubDeviceNameKey
@discussion The key used in a CFDictionary that describes the state of an AudioSubDevice.
The value for this key is a CFString that contains the human readable
name of the AudioSubDevice.
*/
#define kAudioSubDeviceNameKey "name"
/*!
@defined kAudioSubDeviceInputChannelsKey
@discussion The key used in a CFDictionary that describes the state of an AudioSubDevice.
The value for this key is a CFNumber that indicates the total number of input
channels for the AudioSubDevice.
*/
#define kAudioSubDeviceInputChannelsKey "channels-in"
/*!
@defined kAudioSubDeviceOutputChannelsKey
@discussion The key used in a CFDictionary that describes the state of an AudioSubDevice.
The value for this key is a CFNumber that indicates the total number of output
channels for the AudioSubDevice.
*/
#define kAudioSubDeviceOutputChannelsKey "channels-out"
/*!
@defined kAudioSubDeviceExtraInputLatencyKey
@discussion The key used in a CFDictionary that describes the state of an AudioSubDevice.
The value for this key is a CFNumber that indicates the total number of frames
of additional latency that will be added to the input side of the
AudioSubDevice.
*/
#define kAudioSubDeviceExtraInputLatencyKey "latency-in"
/*!
@defined kAudioSubDeviceExtraOutputLatencyKey
@discussion The key used in a CFDictionary that describes the state of an AudioSubDevice.
The value for this key is a CFNumber that indicates the total number of frames
of additional latency that will be added to the output side of the
AudioSubDevice.
*/
#define kAudioSubDeviceExtraOutputLatencyKey "latency-out"
/*!
@defined kAudioSubDeviceDriftCompensationKey
@discussion The key used in a CFDictionary that describes the state of an AudioSubDevice.
The value for this key is a CFNumber where a non-zero value indicates that drift
compensation is enabled for the AudioSubDevice
*/
#define kAudioSubDeviceDriftCompensationKey "drift"
/*!
@defined kAudioSubDeviceDriftCompensationQualityKey
@discussion The key used in a CFDictionary that describes the state of an AudioSubDevice.
The value for this key is a CFNumber that indicates the quality of the drifty
compensation for the AudioSubDevice
*/
#define kAudioSubDeviceDriftCompensationQualityKey "drift quality"
//==================================================================================================
#pragma mark AudioSubDevice Properties
/*!
@enum AudioSubDevice Properties
@abstract AudioObjectPropertySelector values provided by the AudioSubDevice class.
@discussion The AudioSubDevice class is a subclass of AudioDevice class and has the same
scope and element structure. However, AudioSubDevice objects do not implement an
IO path of their own and as such do not implement any AudioDevice properties
associated with the IO path. They also don't have any streams.
@constant kAudioSubDevicePropertyExtraLatency
A Float64 indicating the number of sample frames to add to or subtract from
the latency compensation used for this AudioSubDevice.
@constant kAudioSubDevicePropertyDriftCompensation
A UInt32 where a value of 0 indicates that no drift compensation should be
done for this AudioSubDevice and a value of 1 means that it should.
@constant kAudioSubDevicePropertyDriftCompensationQuality
A UInt32 that controls the trade-off between quality and CPU load in the
drift compensation. The range of values is from 0 to 128, where the lower
the number, the worse the quality but also the less CPU is used to do the
compensation.
*/
CF_ENUM(AudioObjectPropertySelector)
{
kAudioSubDevicePropertyExtraLatency = 'xltc',
kAudioSubDevicePropertyDriftCompensation = 'drft',
kAudioSubDevicePropertyDriftCompensationQuality = 'drfq'
};
//==================================================================================================
#if defined(__cplusplus)
}
#endif
CF_ASSUME_NONNULL_END
//==================================================================================================
#include <CoreAudio/AudioHardwareDeprecated.h>
#endif // CoreAudio_AudioHardware_h
|
Subsets and Splits
No saved queries yet
Save your SQL queries to embed, download, and access them later. Queries will appear here once saved.