avfaudio

package
v0.7.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 18, 2026 License: MIT Imports: 13 Imported by: 0

Documentation

Rendered for darwin/amd64

Overview

Package avfaudio provides purego-based Go bindings for the macOS AVFAudio framework.

Apple documentation: https://developer.apple.com/documentation/avfaudio

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AVAudioApplicationInputMuteStateChangeNotification

func AVAudioApplicationInputMuteStateChangeNotification() uintptr

@brief Notification sent to registered listeners when the application's input is muted or unmuted. Check the notification's userInfo dictionary for the mute state `AVAudioApplicationMuteStateKey` which will have a boolean value 0 for unmuted or value 1 for muted. @note this notification will only be dispatched for state changes when there is an active record session (i.e. record or playAndRecord category). Setting the `inputMuted` state while the record session is not active is allowed and will be stored, but it will not trigger a notification for the state change. When the record session subsequently goes active, the `inputMuted` state will be applied, and this notification will be dispatched with the latest input muted state.

func AVAudioApplicationMuteStateKey

func AVAudioApplicationMuteStateKey() uintptr

Keys for AVAudioApplicationInputMuteStateChangeNotification Value is NSNumber type with boolean value 0 for unmuted or value 1 for muted (samples zeroed out)

func AVAudioApplicationRequestRecordPermissionWithCompletionHandler

func AVAudioApplicationRequestRecordPermissionWithCompletionHandler(response func(bool))

@brief Checks to see if calling process has permission to record audio. The 'response' block will be called immediately if permission has already been granted or denied. Otherwise, it presents a dialog to notify the user and allow them to choose, and calls the block once the UI has been dismissed. 'granted' indicates whether permission has been granted. Note that the block may be called in a different thread context.

func AVAudioBitRateStrategy_Constant

func AVAudioBitRateStrategy_Constant() uintptr

func AVAudioBitRateStrategy_LongTermAverage

func AVAudioBitRateStrategy_LongTermAverage() uintptr

func AVAudioBitRateStrategy_Variable

func AVAudioBitRateStrategy_Variable() uintptr

func AVAudioBitRateStrategy_VariableConstrained

func AVAudioBitRateStrategy_VariableConstrained() uintptr

func AVAudioEngineConfigurationChangeNotification

func AVAudioEngineConfigurationChangeNotification() uintptr

@constant AVAudioEngineConfigurationChangeNotification @abstract A notification generated on engine configuration changes when rendering to/from an audio device. Register for this notification on your engine instances, as follows: ``` [[NSNotificationCenter defaultCenter] addObserver: myObject selector: @selector(handleInterruption:) name: AVAudioEngineConfigurationChangeNotification object: engine]; ``` When the engine's I/O unit observes a change to the audio input or output hardware's channel count or sample rate, the engine stops itself (see `AVAudioEngine(stop)`), and issues this notification. The nodes remain attached and connected with previously set formats. However, the app must reestablish connections if the connection formats need to change (e.g. in an input node chain, connections must follow the hardware sample rate, while in an output only chain, the output node supports rate conversion). Note that the engine must not be deallocated from within the client's notification handler because the callback happens on an internal dispatch queue and can deadlock while trying to synchronously teardown the engine.

func AVAudioFileTypeKey

func AVAudioFileTypeKey() uintptr

func AVAudioSequencerInfoDictionaryKeyAlbum

func AVAudioSequencerInfoDictionaryKeyAlbum() uintptr

func AVAudioSequencerInfoDictionaryKeyApproximateDurationInSeconds

func AVAudioSequencerInfoDictionaryKeyApproximateDurationInSeconds() uintptr

func AVAudioSequencerInfoDictionaryKeyArtist

func AVAudioSequencerInfoDictionaryKeyArtist() uintptr

func AVAudioSequencerInfoDictionaryKeyChannelLayout

func AVAudioSequencerInfoDictionaryKeyChannelLayout() uintptr

func AVAudioSequencerInfoDictionaryKeyComments

func AVAudioSequencerInfoDictionaryKeyComments() uintptr

func AVAudioSequencerInfoDictionaryKeyComposer

func AVAudioSequencerInfoDictionaryKeyComposer() uintptr

func AVAudioSequencerInfoDictionaryKeyCopyright

func AVAudioSequencerInfoDictionaryKeyCopyright() uintptr

func AVAudioSequencerInfoDictionaryKeyEncodingApplication

func AVAudioSequencerInfoDictionaryKeyEncodingApplication() uintptr

func AVAudioSequencerInfoDictionaryKeyGenre

func AVAudioSequencerInfoDictionaryKeyGenre() uintptr

func AVAudioSequencerInfoDictionaryKeyISRC

func AVAudioSequencerInfoDictionaryKeyISRC() uintptr

func AVAudioSequencerInfoDictionaryKeyKeySignature

func AVAudioSequencerInfoDictionaryKeyKeySignature() uintptr

func AVAudioSequencerInfoDictionaryKeyLyricist

func AVAudioSequencerInfoDictionaryKeyLyricist() uintptr

func AVAudioSequencerInfoDictionaryKeyNominalBitRate

func AVAudioSequencerInfoDictionaryKeyNominalBitRate() uintptr

func AVAudioSequencerInfoDictionaryKeyRecordedDate

func AVAudioSequencerInfoDictionaryKeyRecordedDate() uintptr

func AVAudioSequencerInfoDictionaryKeySourceBitDepth

func AVAudioSequencerInfoDictionaryKeySourceBitDepth() uintptr

func AVAudioSequencerInfoDictionaryKeySourceEncoder

func AVAudioSequencerInfoDictionaryKeySourceEncoder() uintptr

func AVAudioSequencerInfoDictionaryKeySubTitle

func AVAudioSequencerInfoDictionaryKeySubTitle() uintptr

func AVAudioSequencerInfoDictionaryKeyTempo

func AVAudioSequencerInfoDictionaryKeyTempo() uintptr

func AVAudioSequencerInfoDictionaryKeyTimeSignature

func AVAudioSequencerInfoDictionaryKeyTimeSignature() uintptr

func AVAudioSequencerInfoDictionaryKeyTitle

func AVAudioSequencerInfoDictionaryKeyTitle() uintptr

func AVAudioSequencerInfoDictionaryKeyTrackNumber

func AVAudioSequencerInfoDictionaryKeyTrackNumber() uintptr

func AVAudioSequencerInfoDictionaryKeyYear

func AVAudioSequencerInfoDictionaryKeyYear() uintptr

func AVAudioSessionInterruptionWasSuspendedKey

func AVAudioSessionInterruptionWasSuspendedKey() uintptr

Only present in begin interruption events, where the interruption is a direct result of the application being suspended by the operating sytem. Value is a boolean NSNumber, where a true value indicates that the interruption is the result of the application being suspended, rather than being interrupted by another audio session. Starting in iOS 10, the system will deactivate the audio session of most apps in response to the app process being suspended. When the app starts running again, it will receive the notification that its session has been deactivated by the system. Note that the notification is necessarily delayed in time, due to the fact that the application was suspended at the time the session was deactivated by the system and the notification can only be delivered once the app is running again.

func AVAudioSessionLocationLower

func AVAudioSessionLocationLower() *foundation.NSString

func AVAudioSessionLocationUpper

func AVAudioSessionLocationUpper() *foundation.NSString

func AVAudioSessionOrientationBack

func AVAudioSessionOrientationBack() *foundation.NSString

func AVAudioSessionOrientationBottom

func AVAudioSessionOrientationBottom() *foundation.NSString

func AVAudioSessionOrientationFront

func AVAudioSessionOrientationFront() *foundation.NSString

func AVAudioSessionOrientationLeft

func AVAudioSessionOrientationLeft() *foundation.NSString

func AVAudioSessionOrientationRight

func AVAudioSessionOrientationRight() *foundation.NSString

func AVAudioSessionOrientationTop

func AVAudioSessionOrientationTop() *foundation.NSString

func AVAudioSessionPolarPatternCardioid

func AVAudioSessionPolarPatternCardioid() *foundation.NSString

func AVAudioSessionPolarPatternOmnidirectional

func AVAudioSessionPolarPatternOmnidirectional() *foundation.NSString

func AVAudioSessionPolarPatternSubcardioid

func AVAudioSessionPolarPatternSubcardioid() *foundation.NSString

func AVAudioTimeHostTimeForSeconds

func AVAudioTimeHostTimeForSeconds(seconds float64) uint64

@method hostTimeForSeconds: @abstract Convert seconds to host time.

func AVAudioTimeSecondsForHostTime

func AVAudioTimeSecondsForHostTime(hostTime uint64) float64

@method secondsForHostTime: @abstract Convert host time to seconds.

func AVAudioUnitComponentManagerRegistrationsChangedNotification

func AVAudioUnitComponentManagerRegistrationsChangedNotification() uintptr

@constant AVAudioUnitComponentManagerRegistrationsChangedNotification @abstract A notification generated when AVAudioUnitComponentManager updates its list of components. @discussion Register for this notification on the shared AVAudioUnitComponentManager instance, as follows: ``` [[NSNotificationCenter defaultCenter] addObserver: myObject selector: @selector(registrationsChanged:) name: AVAudioUnitComponentManagerRegistrationsChangedNotification object: [AVAudioUnitComponentManager sharedAudioUnitComponentManager]]; ```

func AVAudioUnitComponentTagsDidChangeNotification

func AVAudioUnitComponentTagsDidChangeNotification() uintptr

func AVAudioUnitInstantiateWithComponentDescriptionOptionsCompletionHandler

func AVAudioUnitInstantiateWithComponentDescriptionOptionsCompletionHandler(audioComponentDescription objc.ID, options objc.ID, completionHandler func(*AVAudioUnit, unsafe.Pointer))

@method instantiateWithComponentDescription:options:completionHandler: @abstract Asynchronously create an instance of an audio unit component, wrapped in an AVAudioUnit. @param audioComponentDescription The component to instantiate. @param options Instantiation options. @param completionHandler Called in an arbitrary thread/queue context when instantiation is complete. The client should retain the provided AVAudioUnit. @discussion Components whose flags include kAudioComponentFlag_RequiresAsyncInstantiation must be instantiated asynchronously, via this method if they are to be used with AVAudioEngine. See the discussion of this flag in AudioToolbox/AudioComponent.h. The returned AVAudioUnit instance normally will be of a subclass (AVAudioUnitEffect, AVAudioUnitGenerator, AVAudioUnitMIDIInstrument, or AVAudioUnitTimeEffect), selected according to the component's type.

func AVAudioUnitManufacturerNameApple

func AVAudioUnitManufacturerNameApple() uintptr

func AVAudioUnitTypeEffect

func AVAudioUnitTypeEffect() uintptr

func AVAudioUnitTypeFormatConverter

func AVAudioUnitTypeFormatConverter() uintptr

func AVAudioUnitTypeGenerator

func AVAudioUnitTypeGenerator() uintptr

func AVAudioUnitTypeMIDIProcessor

func AVAudioUnitTypeMIDIProcessor() uintptr

func AVAudioUnitTypeMixer

func AVAudioUnitTypeMixer() uintptr

func AVAudioUnitTypeMusicDevice

func AVAudioUnitTypeMusicDevice() uintptr

func AVAudioUnitTypeMusicEffect

func AVAudioUnitTypeMusicEffect() uintptr

func AVAudioUnitTypeOfflineEffect

func AVAudioUnitTypeOfflineEffect() uintptr

func AVAudioUnitTypeOutput

func AVAudioUnitTypeOutput() uintptr

func AVAudioUnitTypePanner

func AVAudioUnitTypePanner() uintptr

func AVChannelLayoutKey

func AVChannelLayoutKey() uintptr

func AVEncoderASPFrequencyKey

func AVEncoderASPFrequencyKey() uintptr

func AVEncoderAudioQualityForVBRKey

func AVEncoderAudioQualityForVBRKey() uintptr

func AVEncoderAudioQualityKey

func AVEncoderAudioQualityKey() uintptr

func AVEncoderBitDepthHintKey

func AVEncoderBitDepthHintKey() uintptr

func AVEncoderBitRateKey

func AVEncoderBitRateKey() uintptr

func AVEncoderBitRatePerChannelKey

func AVEncoderBitRatePerChannelKey() uintptr

func AVEncoderBitRateStrategyKey

func AVEncoderBitRateStrategyKey() uintptr

func AVEncoderContentSourceKey

func AVEncoderContentSourceKey() uintptr

func AVEncoderDynamicRangeControlConfigurationKey

func AVEncoderDynamicRangeControlConfigurationKey() uintptr

func AVExtendedNoteOnEventDefaultInstrument

func AVExtendedNoteOnEventDefaultInstrument() uint

func AVFormatIDKey

func AVFormatIDKey() uintptr

func AVLinearPCMBitDepthKey

func AVLinearPCMBitDepthKey() uintptr

func AVLinearPCMIsBigEndianKey

func AVLinearPCMIsBigEndianKey() uintptr

func AVLinearPCMIsFloatKey

func AVLinearPCMIsFloatKey() uintptr

func AVLinearPCMIsNonInterleaved

func AVLinearPCMIsNonInterleaved() uintptr

func AVNumberOfChannelsKey

func AVNumberOfChannelsKey() uintptr

func AVSampleRateConverterAlgorithmKey

func AVSampleRateConverterAlgorithmKey() uintptr

func AVSampleRateConverterAlgorithm_Mastering

func AVSampleRateConverterAlgorithm_Mastering() uintptr

func AVSampleRateConverterAlgorithm_MinimumPhase

func AVSampleRateConverterAlgorithm_MinimumPhase() uintptr

func AVSampleRateConverterAlgorithm_Normal

func AVSampleRateConverterAlgorithm_Normal() uintptr

func AVSampleRateConverterAudioQualityKey

func AVSampleRateConverterAudioQualityKey() uintptr

func AVSampleRateKey

func AVSampleRateKey() uintptr

func AVSpeechSynthesisAvailableVoicesDidChangeNotification

func AVSpeechSynthesisAvailableVoicesDidChangeNotification() *foundation.NSString

func AVSpeechSynthesisIPANotationAttribute

func AVSpeechSynthesisIPANotationAttribute() uintptr

func AVSpeechSynthesisProviderVoiceUpdateSpeechVoices

func AVSpeechSynthesisProviderVoiceUpdateSpeechVoices()

@brief A call that indicates that a new voice or set of voices is available, or no longer available, for system use. @discussion Call this method to indicate to the system that there has been change in the availability of the voices your application is providing to the system.

func AVSpeechSynthesisVoiceCurrentLanguageCode

func AVSpeechSynthesisVoiceCurrentLanguageCode() *foundation.NSString

func AVSpeechSynthesisVoiceIdentifierAlex

func AVSpeechSynthesisVoiceIdentifierAlex() uintptr

func AVSpeechSynthesisVoiceSpeechVoices

func AVSpeechSynthesisVoiceSpeechVoices() *foundation.NSArray[*AVSpeechSynthesisVoice]

func AVSpeechSynthesizerRequestPersonalVoiceAuthorizationWithCompletionHandler

func AVSpeechSynthesizerRequestPersonalVoiceAuthorizationWithCompletionHandler(handler func(AVSpeechSynthesisPersonalVoiceAuthorizationStatus))

Asks the user to allow your app to use personal voices for speech synthesis Call this method before performing any other tasks associated with speech synthesis using personal voices. This method executes asynchronously, returning shortly after you call it. At some point later, the system calls the provided handler block with the results. When your app's authorization status is PersonalVoiceAuthorizationStatus.notDetermined, this method causes the system to prompt the user to grant or deny permission for your app to use personal voices. The user's response is saved so that future calls to this method do not prompt the user again.

func AVSpeechUtteranceDefaultSpeechRate

func AVSpeechUtteranceDefaultSpeechRate() uintptr

func AVSpeechUtteranceMaximumSpeechRate

func AVSpeechUtteranceMaximumSpeechRate() uintptr

func AVSpeechUtteranceMinimumSpeechRate

func AVSpeechUtteranceMinimumSpeechRate() uintptr

func SymbolAvailable

func SymbolAvailable(symbol string) bool

SymbolAvailable reports whether the named C symbol was bound when the library loaded. Calling a generated wrapper whose symbol is unavailable dereferences a nil function variable and panics.

Types

type AVAUPresetEvent

type AVAUPresetEvent struct {
	AVMusicEvent
}

Apple documentation: https://developer.apple.com/documentation/avfaudio/avaupresetevent

func AVAUPresetEventFromID

func AVAUPresetEventFromID(id objc.ID) *AVAUPresetEvent

func (*AVAUPresetEvent) Element

func (o *AVAUPresetEvent) Element() uint

@property element The element index within the scope (see AudioUnitElement). This should usually be set to 0.

func (*AVAUPresetEvent) InitWithScopeElementDictionary

func (o *AVAUPresetEvent) InitWithScopeElementDictionary(scope uint, element uint, presetDictionary *foundation.NSDictionary[objc.ID, objc.ID]) *AVAUPresetEvent

@method initWithScope:element:dictionary @abstract Initialize the event with the scope, element, and dictionary for the preset. @param scope The audio unit scope for the parameter (see AudioUnitScope). This should always be set to Global. @param element The element index within the scope (see AudioUnitElement). This should usually be set to 0. @param presetDictionary An NSDictionary containing the preset. The audio unit will expect this to be a dictionary structured as an appropriate audio unit preset. @discussion The dictionary passed to this initializer will be copied and is not editable once the event is created.

func (*AVAUPresetEvent) PresetDictionary

func (o *AVAUPresetEvent) PresetDictionary() *foundation.NSDictionary[objc.ID, objc.ID]

@property presetDictionary An NSDictionary containing the preset.

func (*AVAUPresetEvent) Scope

func (o *AVAUPresetEvent) Scope() uint

@property scope The audio unit scope for the parameter (see AudioUnitScope). This should always be set to Global.

func (*AVAUPresetEvent) SetElement

func (o *AVAUPresetEvent) SetElement(element uint)

func (*AVAUPresetEvent) SetScope

func (o *AVAUPresetEvent) SetScope(scope uint)

type AVAudio3DAngularOrientation

type AVAudio3DAngularOrientation struct {
	Yaw   float32
	Pitch float32
	Roll  float32
}

func AVAudioMake3DAngularOrientation

func AVAudioMake3DAngularOrientation(yaw float32, pitch float32, roll float32) AVAudio3DAngularOrientation

@abstract Creates and returns an AVAudio3DAngularOrientation object

type AVAudio3DMixing

type AVAudio3DMixing interface {
	RenderingAlgorithm() AVAudio3DMixingRenderingAlgorithm
	SetRenderingAlgorithm(renderingAlgorithm AVAudio3DMixingRenderingAlgorithm)
	SourceMode() AVAudio3DMixingSourceMode
	SetSourceMode(sourceMode AVAudio3DMixingSourceMode)
	PointSourceInHeadMode() AVAudio3DMixingPointSourceInHeadMode
	SetPointSourceInHeadMode(pointSourceInHeadMode AVAudio3DMixingPointSourceInHeadMode)
	Rate() float32
	SetRate(rate float32)
	ReverbBlend() float32
	SetReverbBlend(reverbBlend float32)
	Obstruction() float32
	SetObstruction(obstruction float32)
	Occlusion() float32
	SetOcclusion(occlusion float32)
	Position() AVAudio3DPoint
	SetPosition(position AVAudio3DPoint)
}

AVAudio3DMixing wraps the ObjC protocol AVAudio3DMixing.

type AVAudio3DMixingPointSourceInHeadMode

type AVAudio3DMixingPointSourceInHeadMode int64
const (
	AVAudio3DMixingPointSourceInHeadModeMono   AVAudio3DMixingPointSourceInHeadMode = 0
	AVAudio3DMixingPointSourceInHeadModeBypass AVAudio3DMixingPointSourceInHeadMode = 1
)

func (AVAudio3DMixingPointSourceInHeadMode) String

type AVAudio3DMixingRenderingAlgorithm

type AVAudio3DMixingRenderingAlgorithm int64
const (
	AVAudio3DMixingRenderingAlgorithmEqualPowerPanning AVAudio3DMixingRenderingAlgorithm = 0
	AVAudio3DMixingRenderingAlgorithmSphericalHead     AVAudio3DMixingRenderingAlgorithm = 1
	AVAudio3DMixingRenderingAlgorithmHRTF              AVAudio3DMixingRenderingAlgorithm = 2
	AVAudio3DMixingRenderingAlgorithmSoundField        AVAudio3DMixingRenderingAlgorithm = 3
	AVAudio3DMixingRenderingAlgorithmStereoPassThrough AVAudio3DMixingRenderingAlgorithm = 5
	AVAudio3DMixingRenderingAlgorithmHRTFHQ            AVAudio3DMixingRenderingAlgorithm = 6
	AVAudio3DMixingRenderingAlgorithmAuto              AVAudio3DMixingRenderingAlgorithm = 7
)

func (AVAudio3DMixingRenderingAlgorithm) String

type AVAudio3DMixingSourceMode

type AVAudio3DMixingSourceMode int64
const (
	AVAudio3DMixingSourceModeSpatializeIfMono AVAudio3DMixingSourceMode = 0
	AVAudio3DMixingSourceModeBypass           AVAudio3DMixingSourceMode = 1
	AVAudio3DMixingSourceModePointSource      AVAudio3DMixingSourceMode = 2
	AVAudio3DMixingSourceModeAmbienceBed      AVAudio3DMixingSourceMode = 3
)

func (AVAudio3DMixingSourceMode) String

func (e AVAudio3DMixingSourceMode) String() string

type AVAudio3DPoint

type AVAudio3DPoint struct {
	X float32
	Y float32
	Z float32
}

func AVAudioMake3DPoint

func AVAudioMake3DPoint(x float32, y float32, z float32) AVAudio3DPoint

@abstract Creates and returns an AVAudio3DPoint object

func AVAudioMake3DVector

func AVAudioMake3DVector(x float32, y float32, z float32) AVAudio3DPoint

@abstract Creates and returns an AVAudio3DVector object

type AVAudio3DVector

type AVAudio3DVector = AVAudio3DPoint

AVAudio3DVector is an alias for AVAudio3DPoint (C typedef AVAudio3DVector).

type AVAudio3DVectorOrientation

type AVAudio3DVectorOrientation struct {
	Forward AVAudio3DPoint
	Up      AVAudio3DPoint
}

func AVAudioMake3DVectorOrientation

func AVAudioMake3DVectorOrientation(forward AVAudio3DPoint, up AVAudio3DPoint) AVAudio3DVectorOrientation

@abstract Creates and returns an AVAudio3DVectorOrientation object

type AVAudioApplication

type AVAudioApplication struct {
	foundation.NSObject
}

Apple documentation: https://developer.apple.com/documentation/avfaudio/avaudioapplication

func AVAudioApplicationFromID

func AVAudioApplicationFromID(id objc.ID) *AVAudioApplication

func AVAudioApplicationSharedInstance

func AVAudioApplicationSharedInstance() *AVAudioApplication

Returns the singleton instance

func (*AVAudioApplication) IsInputMuted

func (o *AVAudioApplication) IsInputMuted() bool

Get the input muted state - return value is boolean 0 for unmuted or value 1 for muted (input samples zeroed out)

func (*AVAudioApplication) RecordPermission

Returns an enum indicating whether the user has granted or denied permission to record, or has not been asked

func (*AVAudioApplication) SetInputMuteStateChangeHandlerError

func (o *AVAudioApplication) SetInputMuteStateChangeHandlerError(inputMuteHandler func(bool) bool) (bool, error)

@brief Provide a block that implements your app's input (microphone) muting logic (macOS only). The block will be called whenever the input mute state changes, either due to changing the `AVAudioApplication.inputMute` property on this API, or due to a Bluetooth audio accessory gesture (certain AirPods / Beats headphones) changing the mute state. @param inputMuteHandler block that will be called upon every input mute state change. If the boolean `inputShouldBeMuted` is true, your block should mute all input/microphone samples until the next time the handler is called. Your block should return a value of YES if successful, or in exceptional cases return a NO value if the mute action was unsuccesful. Since the input mute handling logic should happen a single place, subsequent calls to this method will overwrite any previously registered block with the one provided. A nil value may be provided to cancel the block being called, e.g. at end of call lifecycle. @note This is available on macOS only - for all other platforms input muting will be handled internally. It is recommended only to perform your input muting logic within this block, and to perform your UI updates for input mute state changes within the handler for AVAudioApplicationInputMuteStateChangeNotification. This handler should be set by the process doing the call's audio I/O.

func (*AVAudioApplication) SetInputMutedError

func (o *AVAudioApplication) SetInputMutedError(muted bool) (bool, error)

@brief Set the muted/unmuted state of the application's audio input. When set true, inputs (microphone etc.) of all audio clients relating to this application will have their samples zeroed out. @note - this is per-application input muting and doesn't affect the hardware mute state.

type AVAudioApplicationMicrophoneInjectionPermission

type AVAudioApplicationMicrophoneInjectionPermission int64
const (
	AVAudioApplicationMicrophoneInjectionPermissionServiceDisabled AVAudioApplicationMicrophoneInjectionPermission = 1936876659
	AVAudioApplicationMicrophoneInjectionPermissionUndetermined    AVAudioApplicationMicrophoneInjectionPermission = 1970168948
	AVAudioApplicationMicrophoneInjectionPermissionDenied          AVAudioApplicationMicrophoneInjectionPermission = 1684369017
	AVAudioApplicationMicrophoneInjectionPermissionGranted         AVAudioApplicationMicrophoneInjectionPermission = 1735552628
)

func (AVAudioApplicationMicrophoneInjectionPermission) String

type AVAudioApplicationRecordPermission

type AVAudioApplicationRecordPermission int64
const (
	AVAudioApplicationRecordPermissionUndetermined AVAudioApplicationRecordPermission = 1970168948
	AVAudioApplicationRecordPermissionDenied       AVAudioApplicationRecordPermission = 1684369017
	AVAudioApplicationRecordPermissionGranted      AVAudioApplicationRecordPermission = 1735552628
)

func (AVAudioApplicationRecordPermission) String

type AVAudioBuffer

type AVAudioBuffer struct {
	foundation.NSObject
}

Apple documentation: https://developer.apple.com/documentation/avfaudio/avaudiobuffer

func AVAudioBufferFromID

func AVAudioBufferFromID(id objc.ID) *AVAudioBuffer

func (*AVAudioBuffer) AudioBufferList

func (o *AVAudioBuffer) AudioBufferList() *coreaudiotypes.AudioBufferList

@property audioBufferList @abstract The buffer's underlying AudioBufferList. @discussion For compatibility with lower-level CoreAudio and AudioToolbox API's, this method accesses the buffer implementation's internal AudioBufferList. The buffer list structure must not be modified, though you may modify buffer contents. The mDataByteSize fields of this AudioBufferList express the buffer's current frameLength.

func (*AVAudioBuffer) Format

func (o *AVAudioBuffer) Format() *AVAudioFormat

@property format @abstract The format of the audio in the buffer.

func (*AVAudioBuffer) MutableAudioBufferList

func (o *AVAudioBuffer) MutableAudioBufferList() *coreaudiotypes.AudioBufferList

@property mutableAudioBufferList @abstract A mutable version of the buffer's underlying AudioBufferList. @discussion Some lower-level CoreAudio and AudioToolbox API's require a mutable AudioBufferList, for example, AudioConverterConvertComplexBuffer. The mDataByteSize fields of this AudioBufferList express the buffer's current frameCapacity. If they are altered, you should modify the buffer's frameLength to match.

type AVAudioChannelLayout

type AVAudioChannelLayout struct {
	foundation.NSObject
}

Apple documentation: https://developer.apple.com/documentation/avfaudio/avaudiochannellayout

func AVAudioChannelLayoutFromID

func AVAudioChannelLayoutFromID(id objc.ID) *AVAudioChannelLayout

func AVAudioChannelLayoutLayoutWithLayout

func AVAudioChannelLayoutLayoutWithLayout(layout *coreaudiotypes.AudioChannelLayout) *AVAudioChannelLayout

@method layoutWithLayout: @abstract Create from an AudioChannelLayout

func AVAudioChannelLayoutLayoutWithLayoutTag

func AVAudioChannelLayoutLayoutWithLayoutTag(layoutTag uint) *AVAudioChannelLayout

@method layoutWithLayoutTag: @abstract Create from a layout tag.

func (*AVAudioChannelLayout) ChannelCount

func (o *AVAudioChannelLayout) ChannelCount() uint32

@property channelCount @abstract The number of channels of audio data.

func (*AVAudioChannelLayout) InitWithLayout

@method initWithLayout: @abstract Initialize from an AudioChannelLayout. @param layout The AudioChannelLayout. @discussion If the provided layout's tag is kAudioChannelLayoutTag_UseChannelDescriptions, this initializer attempts to convert it to a more specific tag.

func (*AVAudioChannelLayout) InitWithLayoutTag

func (o *AVAudioChannelLayout) InitWithLayoutTag(layoutTag uint) *AVAudioChannelLayout

@method initWithLayoutTag: @abstract Initialize from a layout tag. @param layoutTag The tag. @discussion Returns nil if the tag is either kAudioChannelLayoutTag_UseChannelDescriptions or kAudioChannelLayoutTag_UseChannelBitmap.

func (*AVAudioChannelLayout) IsEqual

func (o *AVAudioChannelLayout) IsEqual(object objc.ID) bool

@method isEqual: @abstract Determine whether another AVAudioChannelLayout is exactly equal to this layout. @param object The AVAudioChannelLayout to compare against. @discussion The underlying AudioChannelLayoutTag and AudioChannelLayout are compared for equality.

func (*AVAudioChannelLayout) Layout

@property layout @abstract The underlying AudioChannelLayout.

func (*AVAudioChannelLayout) LayoutTag

func (o *AVAudioChannelLayout) LayoutTag() uint

@property layoutTag @abstract The layout's tag.

type AVAudioCommonFormat

type AVAudioCommonFormat uint64
const (
	AVAudioOtherFormat      AVAudioCommonFormat = 0
	AVAudioPCMFormatFloat32 AVAudioCommonFormat = 1
	AVAudioPCMFormatFloat64 AVAudioCommonFormat = 2
	AVAudioPCMFormatInt16   AVAudioCommonFormat = 3
	AVAudioPCMFormatInt32   AVAudioCommonFormat = 4
)

func (AVAudioCommonFormat) String

func (e AVAudioCommonFormat) String() string

type AVAudioCompressedBuffer

type AVAudioCompressedBuffer struct {
	AVAudioBuffer
}

Apple documentation: https://developer.apple.com/documentation/avfaudio/avaudiocompressedbuffer

func AVAudioCompressedBufferFromID

func AVAudioCompressedBufferFromID(id objc.ID) *AVAudioCompressedBuffer

func (*AVAudioCompressedBuffer) ByteCapacity

func (o *AVAudioCompressedBuffer) ByteCapacity() uint32

@property byteCapacity @abstract The buffer's capacity in bytes

func (*AVAudioCompressedBuffer) ByteLength

func (o *AVAudioCompressedBuffer) ByteLength() uint32

@property byteLength @abstract The current number of valid bytes in the buffer. @discussion Can be changed as part of an operation that modifies the contents.

func (*AVAudioCompressedBuffer) Data

@property data @abstract Access the buffer's data bytes.

func (*AVAudioCompressedBuffer) InitWithFormatPacketCapacity

func (o *AVAudioCompressedBuffer) InitWithFormatPacketCapacity(format *AVAudioFormat, packetCapacity uint32) *AVAudioCompressedBuffer

@method initWithFormat:packetCapacity: @abstract Initialize a buffer that is to contain constant bytes per packet compressed audio data. @param format The format of the audio to be contained in the buffer. @param packetCapacity The capacity of the buffer in packets. @discussion This fails if the format is PCM or if the format has variable bytes per packet (format.streamDescription->mBytesPerPacket == 0).

func (*AVAudioCompressedBuffer) InitWithFormatPacketCapacityMaximumPacketSize

func (o *AVAudioCompressedBuffer) InitWithFormatPacketCapacityMaximumPacketSize(format *AVAudioFormat, packetCapacity uint32, maximumPacketSize int) *AVAudioCompressedBuffer

@method initWithFormat:packetCapacity:maximumPacketSize: @abstract Initialize a buffer that is to contain compressed audio data. @param format The format of the audio to be contained in the buffer. @param packetCapacity The capacity of the buffer in packets. @param maximumPacketSize The maximum size in bytes of a compressed packet. The maximum packet size can be obtained from the maximumOutputPacketSize property of an AVAudioConverter configured for encoding this format. @discussion An exception is raised if the format is PCM.

func (*AVAudioCompressedBuffer) MaximumPacketSize

func (o *AVAudioCompressedBuffer) MaximumPacketSize() int

@property maximumPacketSize @abstract The maximum size of a compressed packet in bytes.

func (*AVAudioCompressedBuffer) PacketCapacity

func (o *AVAudioCompressedBuffer) PacketCapacity() uint32

@property packetCapacity @abstract The number of compressed packets the buffer can contain.

func (*AVAudioCompressedBuffer) PacketCount

func (o *AVAudioCompressedBuffer) PacketCount() uint32

@property packetCount @abstract The current number of compressed packets in the buffer. @discussion You may modify the packetCount as part of an operation that modifies its contents. The packetCount must be less than or equal to the packetCapacity.

func (*AVAudioCompressedBuffer) PacketDependencies

@property packetDependencies @abstract Access the buffer's array of packet dependencies, if any. @discussion If the format doesn't employ packet dependencies, this will be nil.

func (*AVAudioCompressedBuffer) PacketDescriptions

@property packetDescriptions @abstract Access the buffer's array of packet descriptions, if any. @discussion If the format has constant bytes per packet (format.streamDescription->mBytesPerPacket != 0), then this will return nil.

func (*AVAudioCompressedBuffer) SetByteLength

func (o *AVAudioCompressedBuffer) SetByteLength(byteLength uint32)

func (*AVAudioCompressedBuffer) SetPacketCount

func (o *AVAudioCompressedBuffer) SetPacketCount(packetCount uint32)

type AVAudioConnectionPoint

type AVAudioConnectionPoint struct {
	foundation.NSObject
}

Apple documentation: https://developer.apple.com/documentation/avfaudio/avaudioconnectionpoint

func AVAudioConnectionPointFromID

func AVAudioConnectionPointFromID(id objc.ID) *AVAudioConnectionPoint

func (*AVAudioConnectionPoint) Bus

func (o *AVAudioConnectionPoint) Bus() uint

@property bus @abstract Returns the bus on the node in the connection point.

func (*AVAudioConnectionPoint) InitWithNodeBus

func (o *AVAudioConnectionPoint) InitWithNodeBus(node *AVAudioNode, bus uint) *AVAudioConnectionPoint

@method initWithNode:bus: @abstract Create a connection point object. @param node the source or destination node @param bus the output or input bus on the node @discussion If the node is nil, this method fails (returns nil).

func (*AVAudioConnectionPoint) Node

@property node @abstract Returns the node in the connection point.

type AVAudioContentSource

type AVAudioContentSource int64
const (
	AVAudioContentSource_Unspecified                   AVAudioContentSource = -1
	AVAudioContentSource_Reserved                      AVAudioContentSource = 0
	AVAudioContentSource_AppleCapture_Traditional      AVAudioContentSource = 1
	AVAudioContentSource_AppleCapture_Spatial          AVAudioContentSource = 2
	AVAudioContentSource_AppleCapture_Spatial_Enhanced AVAudioContentSource = 3
	AVAudioContentSource_AppleMusic_Traditional        AVAudioContentSource = 4
	AVAudioContentSource_AppleMusic_Spatial            AVAudioContentSource = 5
	AVAudioContentSource_AppleAV_Traditional_Offline   AVAudioContentSource = 6
	AVAudioContentSource_AppleAV_Spatial_Offline       AVAudioContentSource = 7
	AVAudioContentSource_AppleAV_Traditional_Live      AVAudioContentSource = 8
	AVAudioContentSource_AppleAV_Spatial_Live          AVAudioContentSource = 9
	AVAudioContentSource_ApplePassthrough              AVAudioContentSource = 10
	AVAudioContentSource_Capture_Traditional           AVAudioContentSource = 33
	AVAudioContentSource_Capture_Spatial               AVAudioContentSource = 34
	AVAudioContentSource_Capture_Spatial_Enhanced      AVAudioContentSource = 35
	AVAudioContentSource_Music_Traditional             AVAudioContentSource = 36
	AVAudioContentSource_Music_Spatial                 AVAudioContentSource = 37
	AVAudioContentSource_AV_Traditional_Offline        AVAudioContentSource = 38
	AVAudioContentSource_AV_Spatial_Offline            AVAudioContentSource = 39
	AVAudioContentSource_AV_Traditional_Live           AVAudioContentSource = 40
	AVAudioContentSource_AV_Spatial_Live               AVAudioContentSource = 41
	AVAudioContentSource_Passthrough                   AVAudioContentSource = 42
)

func (AVAudioContentSource) String

func (e AVAudioContentSource) String() string

type AVAudioConverter

type AVAudioConverter struct {
	foundation.NSObject
}

Apple documentation: https://developer.apple.com/documentation/avfaudio/avaudioconverter

func AVAudioConverterFromID

func AVAudioConverterFromID(id objc.ID) *AVAudioConverter

func (*AVAudioConverter) ApplicableEncodeBitRates

func (o *AVAudioConverter) ApplicableEncodeBitRates() *foundation.NSArray[*foundation.NSNumber]

@property applicableEncodeBitRates @abstract When encoding, an NSArray of NSNumber of bit rates that can be applied based on the current formats and settings. Returns nil if not encoding.

func (*AVAudioConverter) ApplicableEncodeSampleRates

func (o *AVAudioConverter) ApplicableEncodeSampleRates() *foundation.NSArray[*foundation.NSNumber]

@property applicableEncodeSampleRates @abstract When encoding, an NSArray of NSNumber of output sample rates that can be applied based on the current formats and settings. Returns nil if not encoding.

func (*AVAudioConverter) AudioSyncPacketFrequency

func (o *AVAudioConverter) AudioSyncPacketFrequency() int

@property audioSyncPacketFrequency @abstract Number of packets between consecutive sync packets. @discussion A sync packet is an independently-decodable packet that completely refreshes the decoder without needing to decode other packets. When compressing to a format which supports it (such as APAC), the audio sync packet frequency indicates the distance in packets between two sync packets, with non-sync packets between. This is useful to set when saving compressed packets to a file and efficient random access is desired. Note: Separating sync packets by at least one second of encoded audio (e.g. 75 packets) is recommended.

func (*AVAudioConverter) AvailableEncodeBitRates

func (o *AVAudioConverter) AvailableEncodeBitRates() *foundation.NSArray[*foundation.NSNumber]

@property availableEncodeBitRates @abstract When encoding, an NSArray of NSNumber of all bit rates provided by the codec. Returns nil if not encoding.

func (*AVAudioConverter) AvailableEncodeChannelLayoutTags

func (o *AVAudioConverter) AvailableEncodeChannelLayoutTags() *foundation.NSArray[*foundation.NSNumber]

@property availableEncodeChannelLayoutTags @abstract When encoding, an NSArray of NSNumber of all output channel layout tags provided by the codec. Returns nil if not encoding.

func (*AVAudioConverter) AvailableEncodeSampleRates

func (o *AVAudioConverter) AvailableEncodeSampleRates() *foundation.NSArray[*foundation.NSNumber]

@property availableEncodeSampleRates @abstract When encoding, an NSArray of NSNumber of all output sample rates provided by the codec. Returns nil if not encoding.

func (*AVAudioConverter) BitRate

func (o *AVAudioConverter) BitRate() int

@property bitRate @abstract bitRate in bits per second. Only applies when encoding.

func (*AVAudioConverter) BitRateStrategy

func (o *AVAudioConverter) BitRateStrategy() *foundation.NSString

@property bitRateStrategy @abstract When encoding, an AVEncoderBitRateStrategyKey value constant as defined in AVAudioSettings.h. Returns nil if not encoding.

func (*AVAudioConverter) ChannelMap

@property channelMap @abstract An array of integers indicating from which input to derive each output. @discussion The array has size equal to the number of output channels. Each element's value is the input channel number, starting with zero, that is to be copied to that output. A negative value means that the output channel will have no source and will be silent. Setting a channel map overrides channel mapping due to any channel layouts in the input and output formats that may have been supplied.

func (*AVAudioConverter) ContentSource

func (o *AVAudioConverter) ContentSource() AVAudioContentSource

@property contentSource @abstract Index to select a pre-defined content source type that describes the content type and how it was generated. Note: This is only supported when compressing audio to formats which support it.

func (*AVAudioConverter) ConvertToBufferErrorWithInputFromBlock

func (o *AVAudioConverter) ConvertToBufferErrorWithInputFromBlock(outputBuffer *AVAudioBuffer, outError unsafe.Pointer, inputBlock objc.Block) AVAudioConverterOutputStatus

@method convertToBuffer:error:withInputFromBlock: @abstract Perform any supported conversion. @param inputBlock A block which will be called to get input data as needed. See description for AVAudioConverterInputBlock. @param outputBuffer The output buffer. @param outError An error if the conversion fails. @return An AVAudioConverterOutputStatus is returned. @discussion It attempts to fill the buffer to its capacity. On return, the buffer's length indicates the number of sample frames successfully converted.

func (*AVAudioConverter) ConvertToBufferFromBufferError

func (o *AVAudioConverter) ConvertToBufferFromBufferError(outputBuffer *AVAudioPCMBuffer, inputBuffer *AVAudioPCMBuffer) (bool, error)

@method convertToBuffer:fromBuffer:error: @abstract Perform a simple conversion. That is, a conversion which does not involve codecs or sample rate conversion. @param inputBuffer The input buffer. @param outputBuffer The output buffer. @param outError An error if the conversion fails. @return YES is returned on success, NO when an error has occurred. @discussion The output buffer's frameCapacity should be at least at large as the inputBuffer's frameLength. If the conversion involves a codec or sample rate conversion, you instead must use convertToBuffer:error:withInputFromBlock:.

func (*AVAudioConverter) Dither

func (o *AVAudioConverter) Dither() bool

@property dither @abstract Setting YES will turn on dither, if dither makes sense in given the current formats and settings. Default value is NO.

func (*AVAudioConverter) Downmix

func (o *AVAudioConverter) Downmix() bool

@property downmix @abstract If YES and channel remapping is necessary, then channels will be mixed as appropriate instead of remapped. Default value is NO.

func (*AVAudioConverter) DynamicRangeControlConfiguration

func (o *AVAudioConverter) DynamicRangeControlConfiguration() AVAudioDynamicRangeControlConfiguration

@property dynamicRangeControlConfiguration @abstract Encoder Dynamic Range Control (DRC) configuration. @discussion When supported by the encoder, this property controls which configuration is applied when a bitstream is generated. Note: This is only supported when compressing audio to formats which support it.

func (*AVAudioConverter) InitFromFormatToFormat

func (o *AVAudioConverter) InitFromFormatToFormat(fromFormat *AVAudioFormat, toFormat *AVAudioFormat) *AVAudioConverter

@method initFromFormat:toFormat: @abstract Initialize from input and output formats. @param fromFormat The input format. @param toFormat The output format. @discussion Returns nil if the format conversion is not possible.

func (*AVAudioConverter) InputFormat

func (o *AVAudioConverter) InputFormat() *AVAudioFormat

@property inputFormat @abstract The format of the input audio stream. (NB. AVAudioFormat includes the channel layout)

func (*AVAudioConverter) MagicCookie

func (o *AVAudioConverter) MagicCookie() *foundation.NSData

@property magicCookie @abstract Decoders require some data in the form of a magicCookie in order to decode properly. Encoders will produce a magicCookie.

func (*AVAudioConverter) MaximumOutputPacketSize

func (o *AVAudioConverter) MaximumOutputPacketSize() int

@property maximumOutputPacketSize @abstract The maximum size of an output packet, in bytes. @discussion When encoding it is useful to know how large a packet can be in order to allocate a buffer to receive the output.

func (*AVAudioConverter) OutputFormat

func (o *AVAudioConverter) OutputFormat() *AVAudioFormat

@property outputFormat @abstract The format of the output audio stream. (NB. AVAudioFormat includes the channel layout)

func (*AVAudioConverter) PrimeInfo

@property primeInfo @abstract Indicates the the number of priming frames.

func (*AVAudioConverter) PrimeMethod

@property primeMethod @abstract Indicates the priming method to be used by the sample rate converter or decoder.

func (*AVAudioConverter) Reset

func (o *AVAudioConverter) Reset()

@method reset @abstract Resets the converter so that a new stream may be converted.

func (*AVAudioConverter) SampleRateConverterAlgorithm

func (o *AVAudioConverter) SampleRateConverterAlgorithm() *foundation.NSString

@property sampleRateConverterAlgorithm @abstract An AVSampleRateConverterAlgorithmKey value as defined in AVAudioSettings.h.

func (*AVAudioConverter) SampleRateConverterQuality

func (o *AVAudioConverter) SampleRateConverterQuality() int

@property sampleRateConverterQuality @abstract An AVAudioQuality value as defined in AVAudioSettings.h.

func (*AVAudioConverter) SetAudioSyncPacketFrequency

func (o *AVAudioConverter) SetAudioSyncPacketFrequency(audioSyncPacketFrequency int)

func (*AVAudioConverter) SetBitRate

func (o *AVAudioConverter) SetBitRate(bitRate int)

func (*AVAudioConverter) SetBitRateStrategy

func (o *AVAudioConverter) SetBitRateStrategy(bitRateStrategy *foundation.NSString)

func (*AVAudioConverter) SetChannelMap

func (o *AVAudioConverter) SetChannelMap(channelMap *foundation.NSArray[*foundation.NSNumber])

func (*AVAudioConverter) SetContentSource

func (o *AVAudioConverter) SetContentSource(contentSource AVAudioContentSource)

func (*AVAudioConverter) SetDither

func (o *AVAudioConverter) SetDither(dither bool)

func (*AVAudioConverter) SetDownmix

func (o *AVAudioConverter) SetDownmix(downmix bool)

func (*AVAudioConverter) SetDynamicRangeControlConfiguration

func (o *AVAudioConverter) SetDynamicRangeControlConfiguration(dynamicRangeControlConfiguration AVAudioDynamicRangeControlConfiguration)

func (*AVAudioConverter) SetMagicCookie

func (o *AVAudioConverter) SetMagicCookie(magicCookie *foundation.NSData)

func (*AVAudioConverter) SetPrimeInfo

func (o *AVAudioConverter) SetPrimeInfo(primeInfo AVAudioConverterPrimeInfo)

func (*AVAudioConverter) SetPrimeMethod

func (o *AVAudioConverter) SetPrimeMethod(primeMethod AVAudioConverterPrimeMethod)

func (*AVAudioConverter) SetSampleRateConverterAlgorithm

func (o *AVAudioConverter) SetSampleRateConverterAlgorithm(sampleRateConverterAlgorithm *foundation.NSString)

func (*AVAudioConverter) SetSampleRateConverterQuality

func (o *AVAudioConverter) SetSampleRateConverterQuality(sampleRateConverterQuality int)

type AVAudioConverterInputStatus

type AVAudioConverterInputStatus int64
const (
	// This is the normal case where you supply data to the converter.
	AVAudioConverterInputStatus_HaveData AVAudioConverterInputStatus = 0
	// If you are out of data for now, set *ioNumberOfPackets = 0 and return AVAudioConverterInputStatus_NoDataNow; it is possible that some of the supplied input data may not be converted to output immediately, but instead may be converted to output only if/when more input is provided or the end-of-stream is indicated with the AVAudioConverterInputStatus_EndOfStream status code.
	AVAudioConverterInputStatus_NoDataNow AVAudioConverterInputStatus = 1
	// If you are at the end of stream, set *ioNumberOfPackets = 0 and return AVAudioConverterInputStatus_EndOfStream.
	AVAudioConverterInputStatus_EndOfStream AVAudioConverterInputStatus = 2
)

func (AVAudioConverterInputStatus) String

type AVAudioConverterOutputStatus

type AVAudioConverterOutputStatus int64
const (
	// All of the requested data was returned.
	AVAudioConverterOutputStatus_HaveData AVAudioConverterOutputStatus = 0
	// Not enough input was available to satisfy the request at the current time. The output buffer contains as much as could be converted.
	AVAudioConverterOutputStatus_InputRanDry AVAudioConverterOutputStatus = 1
	// The end of stream has been reached. No data was returned.
	AVAudioConverterOutputStatus_EndOfStream AVAudioConverterOutputStatus = 2
	// An error occurred.
	AVAudioConverterOutputStatus_Error AVAudioConverterOutputStatus = 3
)

func (AVAudioConverterOutputStatus) String

type AVAudioConverterPrimeInfo

type AVAudioConverterPrimeInfo struct {
	LeadingFrames  uint32
	TrailingFrames uint32
}

type AVAudioConverterPrimeMethod

type AVAudioConverterPrimeMethod int64
const (
	// Primes with leading + trailing input frames.
	AVAudioConverterPrimeMethod_Pre AVAudioConverterPrimeMethod = 0
	// Only primes with trailing (zero latency). Leading frames are assumed to be silence.
	AVAudioConverterPrimeMethod_Normal AVAudioConverterPrimeMethod = 1
	// Acts in "latency" mode. Both leading and trailing frames assumed to be silence.
	AVAudioConverterPrimeMethod_None AVAudioConverterPrimeMethod = 2
)

func (AVAudioConverterPrimeMethod) String

type AVAudioDynamicRangeControlConfiguration

type AVAudioDynamicRangeControlConfiguration int64
const (
	AVAudioDynamicRangeControlConfiguration_None    AVAudioDynamicRangeControlConfiguration = 0
	AVAudioDynamicRangeControlConfiguration_Music   AVAudioDynamicRangeControlConfiguration = 1
	AVAudioDynamicRangeControlConfiguration_Speech  AVAudioDynamicRangeControlConfiguration = 2
	AVAudioDynamicRangeControlConfiguration_Movie   AVAudioDynamicRangeControlConfiguration = 3
	AVAudioDynamicRangeControlConfiguration_Capture AVAudioDynamicRangeControlConfiguration = 4
)

func (AVAudioDynamicRangeControlConfiguration) String

type AVAudioEngine

type AVAudioEngine struct {
	foundation.NSObject
}

Apple documentation: https://developer.apple.com/documentation/avfaudio/avaudioengine

func AVAudioEngineFromID

func AVAudioEngineFromID(id objc.ID) *AVAudioEngine

func (*AVAudioEngine) AttachNode

func (o *AVAudioEngine) AttachNode(node *AVAudioNode)

@method attachNode: @abstract Take ownership of a new node. @param node The node to be attached to the engine. To support the instantiation of arbitrary AVAudioNode subclasses, instances are created externally to the engine, but are not usable until they are attached to the engine via this method. Thus the idiom, without ARC, is: ``` // when building engine: AVAudioNode *_player; // member of controller class (for example) ... _player = [[AVAudioPlayerNode alloc] init]; [engine attachNode: _player]; ... // when destroying engine (without ARC) [_player release]; ```

func (*AVAudioEngine) AttachedNodes

func (o *AVAudioEngine) AttachedNodes() *foundation.NSSet[*AVAudioNode]

@property attachedNodes @abstract Set of all nodes attached to the engine.

func (*AVAudioEngine) ConnectMIDIToFormatBlock

func (o *AVAudioEngine) ConnectMIDIToFormatBlock(sourceNode *AVAudioNode, destinationNode *AVAudioNode, format *AVAudioFormat, tapBlock func(int64, uint8, int, unsafe.Pointer) int)

@method connectMIDI:to:format:block: @abstract Establish a MIDI only connection between two nodes. @param sourceNode The source node. @param destinationNode The destination node. @param format If non-nil, the format of the source node's output bus is set to this format. In all cases, the format of the source nodes' output bus has to match with the destination nodes' output bus format. Although the output bus of the source is not in use, the format needs to be set in order to be able to use the sample rate for MIDI event timing calculations. @param tapBlock If non-nil, this block is called from the source node's `AUMIDIOutputEventBlock` on the realtime thread. The host can tap the MIDI data of the source node through this block. May be nil. Use this method to establish a MIDI only connection between a source node and a destination node that has MIDI input capability. The source node can only be a AVAudioUnit node of type `kAudioUnitType_MIDIProcessor`. The destination node types can be `kAudioUnitType_MusicDevice`, `kAudioUnitType_MusicEffect` or `kAudioUnitType_MIDIProcessor`. Note that any pre-existing MIDI connection involving the destination will be broken. Any client installed block on the source node's audio unit `AUMIDIOutputEventBlock` will be overwritten when making the MIDI connection. Deprecated: since macOS 13.0.

func (*AVAudioEngine) ConnectMIDIToFormatEventListBlock

func (o *AVAudioEngine) ConnectMIDIToFormatEventListBlock(sourceNode *AVAudioNode, destinationNode *AVAudioNode, format *AVAudioFormat, tapBlock func(int64, uint8, unsafe.Pointer) int)

@method connectMIDI:to:format:eventListblock: @abstract Establish a MIDI only connection between two nodes. @param sourceNode The source node. @param destinationNode The destination node. @param format If non-nil, the format of the source node's output bus is set to this format. In all cases, the format of the source nodes' output bus has to match with the destination nodes' output bus format. Although the output bus of the source is not in use, the format needs to be set in order to be able to use the sample rate for MIDI event timing calculations. @param tapBlock This block is called from the source node's `AUMIDIOutputEventListBlock` on the realtime thread. The host can tap the MIDI data of the source node through this block. Use this method to establish a MIDI only connection between a source node and a destination node that has MIDI input capability. The source node can only be a AVAudioUnit node of type `kAudioUnitType_MIDIProcessor`. The destination node types can be `kAudioUnitType_MusicDevice`, `kAudioUnitType_MusicEffect` or `kAudioUnitType_MIDIProcessor`. Note that any pre-existing MIDI connection involving the destination will be broken. Any client installed block on the source node's audio unit `AUMIDIOutputEventListBlock` will be overwritten when making the MIDI connection.

func (*AVAudioEngine) ConnectMIDIToNodesFormatBlock

func (o *AVAudioEngine) ConnectMIDIToNodesFormatBlock(sourceNode *AVAudioNode, destinationNodes *foundation.NSArray[*AVAudioNode], format *AVAudioFormat, tapBlock func(int64, uint8, int, unsafe.Pointer) int)

@method connectMIDI:toNodes:format:block: @abstract Establish a MIDI only connection between a source node and multiple destination nodes. @param sourceNode The source node. @param destinationNodes An array of AVAudioNodes specifying destination nodes. @param format If non-nil, the format of the source node's output bus is set to this format. In all cases, the format of the source nodes' output bus has to match with the destination nodes' output bus format. Although the output bus of the source is not in use, the format needs to be set in order to be able to use the sample rate for MIDI event timing calculations. @param tapBlock If non-nil, this block is called from the source node's `AUMIDIOutputEventBlock` on the realtime thread. The host can tap the MIDI data of the source node through this block. May be nil. Use this method to establish a MIDI only connection between a source node and multiple destination nodes. The source node can only be a AVAudioUnit node of type `kAudioUnitType_MIDIProcessor`. The destination node types can be `kAudioUnitType_MusicDevice`, `kAudioUnitType_MusicEffect` or `kAudioUnitType_MIDIProcessor`. MIDI connections made using this method are either one-to-one (when a single destination connection is specified) or one-to-many (when multiple connections are specified), but never many-to-one. Note that any pre-existing connection involving the destination will be broken. Any client installed block on the source node's audio unit `AUMIDIOutputEventBlock` will be overwritten when making the MIDI connection. Deprecated: since macOS 13.0.

func (*AVAudioEngine) ConnectMIDIToNodesFormatEventListBlock

func (o *AVAudioEngine) ConnectMIDIToNodesFormatEventListBlock(sourceNode *AVAudioNode, destinationNodes *foundation.NSArray[*AVAudioNode], format *AVAudioFormat, tapBlock func(int64, uint8, unsafe.Pointer) int)

@method connectMIDI:toNodes:format:eventListBlock: @abstract Establish a MIDI only connection between a source node and multiple destination nodes. @param sourceNode The source node. @param destinationNodes An array of AVAudioNodes specifying destination nodes. @param format If non-nil, the format of the source node's output bus is set to this format. In all cases, the format of the source nodes' output bus has to match with the destination nodes' output bus format. Although the output bus of the source is not in use, the format needs to be set in order to be able to use the sample rate for MIDI event timing calculations. @param tapBlock This block is called from the source node's `AUMIDIOutputEventListBlock` on the realtime thread. The host can tap the MIDI data of the source node through this block. Use this method to establish a MIDI only connection between a source node and multiple destination nodes. The source node can only be a AVAudioUnit node of type `kAudioUnitType_MIDIProcessor`. The destination node types can be `kAudioUnitType_MusicDevice`, `kAudioUnitType_MusicEffect` or `kAudioUnitType_MIDIProcessor`. MIDI connections made using this method are either one-to-one (when a single destination connection is specified) or one-to-many (when multiple connections are specified), but never many-to-one. Note that any pre-existing connection involving the destination will be broken. Any client installed block on the source node's audio unit `AUMIDIOutputEventListBlock` will be overwritten when making the MIDI connection.

func (*AVAudioEngine) ConnectToConnectionPointsFromBusFormat

func (o *AVAudioEngine) ConnectToConnectionPointsFromBusFormat(sourceNode *AVAudioNode, destNodes *foundation.NSArray[*AVAudioConnectionPoint], sourceBus uint, format *AVAudioFormat)

@method connect:toConnectionPoints:fromBus:format: @abstract Establish connections between a source node and multiple destination nodes. @param sourceNode The source node @param destNodes An array of AVAudioConnectionPoint objects specifying destination nodes and busses @param sourceBus The output bus on source node @param format If non-nil, the format of the source node's output bus is set to this format. In all cases, the format of the destination nodes' input bus is set to match that of the source node's output bus Use this method to establish connections from a source node to multiple destination nodes. Connections made using this method are either one-to-one (when a single destination connection is specified) or one-to-many (when multiple connections are specified), but never many-to-one. To incrementally add a new connection to a source node, use this method with an array of AVAudioConnectionPoint objects comprising of pre-existing connections (obtained from `outputConnectionPointsForNode:outputBus:`) and the new connection. Note that any pre-existing connection involving the destination's input bus will be broken. And, any pre-existing connection on source node which is not a part of the specified destination connection array will also be broken. Also note that when the output of a node is split into multiple paths, all the paths must render at the same rate until they reach a common mixer. In other words, starting from the split node until the common mixer node where all split paths terminate, you cannot have: - any AVAudioUnitTimeEffect - any sample rate conversion

func (*AVAudioEngine) ConnectToFormat

func (o *AVAudioEngine) ConnectToFormat(node1 *AVAudioNode, node2 *AVAudioNode, format *AVAudioFormat)

@method connect:to:format: @abstract Establish a connection between two nodes This calls connect:to:fromBus:toBus:format: using bus 0 on the source node, and bus 0 on the destination node, except in the case of a destination which is a mixer, in which case the destination is the mixer's nextAvailableInputBus.

func (*AVAudioEngine) ConnectToFromBusToBusFormat

func (o *AVAudioEngine) ConnectToFromBusToBusFormat(node1 *AVAudioNode, node2 *AVAudioNode, bus1 uint, bus2 uint, format *AVAudioFormat)

@method connect:to:fromBus:toBus:format: @abstract Establish a connection between two nodes. @param node1 The source node @param node2 The destination node @param bus1 The output bus on the source node @param bus2 The input bus on the destination node @param format If non-nil, the format of the source node's output bus is set to this format. In all cases, the format of the destination node's input bus is set to match that of the source node's output bus. Nodes have input and output buses (AVAudioNodeBus). Use this method to establish one-to-one connections betweeen nodes. Connections made using this method are always one-to-one, never one-to-many or many-to-one. Note that any pre-existing connection(s) involving the source's output bus or the destination's input bus will be broken.

func (*AVAudioEngine) DetachNode

func (o *AVAudioEngine) DetachNode(node *AVAudioNode)

@method detachNode: @abstract Detach a node previously attached to the engine. If necessary, the engine will safely disconnect the node before detaching it.

func (*AVAudioEngine) DisableManualRenderingMode

func (o *AVAudioEngine) DisableManualRenderingMode()

@method disableManualRenderingMode @abstract Set the engine to render to/from an audio device. When disabling the manual rendering mode, the engine: 1. Stops and resets itself (see `stop` and `reset`). 2. Switches the output/input nodes to render to/from an audio device. Their input and output formats may change. 3. Removes any taps previously installed on the input and output nodes. 4. Maintains all the engine connections as is. Calling this method when the engine is already rendering to/from an audio device has no effect.

func (*AVAudioEngine) DisconnectMIDIFrom

func (o *AVAudioEngine) DisconnectMIDIFrom(sourceNode *AVAudioNode, destinationNode *AVAudioNode)

@method disconnectMIDI:from: @abstract Remove a MIDI connection between two nodes. @param sourceNode The node whose MIDI output is to be disconnected. @param destinationNode The node whose MIDI input is to be disconnected. If a tap block is installed on the source node, it will be removed when the last connection from the source node is removed.

func (*AVAudioEngine) DisconnectMIDIFromNodes

func (o *AVAudioEngine) DisconnectMIDIFromNodes(sourceNode *AVAudioNode, destinationNodes *foundation.NSArray[*AVAudioNode])

@method disconnectMIDI:fromNodes: @abstract Remove a MIDI connection between one source node and multiple destination nodes. @param sourceNode The node whose MIDI output is to be disconnected. @param destinationNodes An array of AVAudioNodes specifying nodes whose MIDI input is to be disconnected. If a tap block is installed on the source node, it will be removed when the last connection from the source node is removed.

func (*AVAudioEngine) DisconnectMIDIInput

func (o *AVAudioEngine) DisconnectMIDIInput(node *AVAudioNode)

@method disconnectMIDIInput: @abstract Disconnects all input MIDI connections of this node. @param node The node whose MIDI input is to be disconnected.

func (*AVAudioEngine) DisconnectMIDIOutput

func (o *AVAudioEngine) DisconnectMIDIOutput(node *AVAudioNode)

@method disconnectMIDIOutput: @abstract Disconnects all output MIDI connections of this node. @param node The node whose MIDI outputs are to be disconnected.

func (*AVAudioEngine) DisconnectNodeInput

func (o *AVAudioEngine) DisconnectNodeInput(node *AVAudioNode)

@method disconnectNodeInput: @abstract Remove a connection between two nodes. @param node The node whose inputs are to be disconnected Connections are broken on each of the node's input busses.

func (*AVAudioEngine) DisconnectNodeInputBus

func (o *AVAudioEngine) DisconnectNodeInputBus(node *AVAudioNode, bus uint)

@method disconnectNodeInput:bus: @abstract Remove a connection between two nodes. @param node The node whose input is to be disconnected @param bus The destination's input bus to disconnect

func (*AVAudioEngine) DisconnectNodeOutput

func (o *AVAudioEngine) DisconnectNodeOutput(node *AVAudioNode)

@method disconnectNodeOutput: @abstract Remove a connection between two nodes. @param node The node whose outputs are to be disconnected Connections are broken on each of the node's output busses.

func (*AVAudioEngine) DisconnectNodeOutputBus

func (o *AVAudioEngine) DisconnectNodeOutputBus(node *AVAudioNode, bus uint)

@method disconnectNodeOutput:bus: @abstract Remove a connection between two nodes. @param node The node whose output is to be disconnected @param bus The source's output bus to disconnect

func (*AVAudioEngine) EnableManualRenderingModeFormatMaximumFrameCountError

func (o *AVAudioEngine) EnableManualRenderingModeFormatMaximumFrameCountError(mode AVAudioEngineManualRenderingMode, pcmFormat *AVAudioFormat, maximumFrameCount uint32) (bool, error)

@method enableManualRenderingMode:format:maximumFrameCount:error: @abstract Set the engine to operate in a manual rendering mode with the specified render format and maximum frame count. @param mode The manual rendering mode to use. @param pcmFormat The format of the output PCM audio data from the engine. @param maximumFrameCount The maximum number of PCM sample frames the engine will be asked to produce in any single render call. @param outError On exit, if the engine cannot switch to the manual rendering mode, a description of the error (see `AVAudioEngineManualRenderingError` for the possible errors). @return YES for success. Use this method to configure the engine to render in response to requests from the client. The engine must be in a stopped state before calling this method. The render format must be a PCM format and match the format of the buffer to which the engine is asked to render (see `renderOffline:toBuffer:error:`). It is advised to enable manual rendering mode soon after the engine is created, and before accessing any of mainMixerNode, inputNode or outputNode of the engine. Otherwise, accessing or interacting with the engine before enabling manual rendering mode could have the unintended side-effect of configuring the hardware for device-rendering mode. The input data in manual rendering mode can be supplied through the source nodes, e.g. `AVAudioPlayerNode`, `AVAudioInputNode` etc. When switching to manual rendering mode, the engine: 1. Switches the input and output nodes to manual rendering mode. Their input and output formats may change. 2. Removes any taps previously installed on the input and output nodes. 3. Maintains all the engine connections as is. Reasons for potential failure when switching to manual rendering mode include: - Engine is not in a stopped state.

func (*AVAudioEngine) Init

func (o *AVAudioEngine) Init() *AVAudioEngine

@method init @abstract Initialize a new engine. On creation, the engine is by default connected to an audio device and automatically renders in realtime. It can be configured to operate in manual rendering mode through `enableManualRenderingMode:format:maximumFrameCount:error:`.

func (*AVAudioEngine) InputConnectionPointForNodeInputBus

func (o *AVAudioEngine) InputConnectionPointForNodeInputBus(node *AVAudioNode, bus uint) *AVAudioConnectionPoint

@method inputConnectionPointForNode:inputBus: @abstract Get connection information on a node's input bus. @param node The node whose input connection is being queried. @param bus The node's input bus on which the connection is being queried. @return An AVAudioConnectionPoint object with connection information on the node's specified input bus. Connections are always one-to-one or one-to-many, never many-to-one. Returns nil if there is no connection on the node's specified input bus.

func (*AVAudioEngine) InputNode

func (o *AVAudioEngine) InputNode() *AVAudioInputNode

@property inputNode @abstract The engine's singleton input node. Audio input is performed via an input node. The engine creates a singleton on demand when this property is first accessed. To receive input, connect another node from the output of the input node, or create a recording tap on it. When the engine is rendering to/from an audio device, the AVAudioSesssion category and/or availability of hardware determine whether an app can perform input. Check for the input node's input format (i.e. hardware format) for non-zero sample rate and channel count to see if input is enabled. Trying to perform input through the input node when it is not enabled or available will cause the engine to throw an error (when possible) or an exception. Note that if the engine has at any point previously had its inputNode enabled and permission to record was granted, then any time the engine is running, the mic-in-use indicator will appear. For applications which may need to dynamically switch between output-only and input-output modes, it may be advantageous to use two engine instances. In manual rendering mode, the input node can be used to synchronously supply data to the engine while it is rendering (see `AVAudioInputNode(setManualRenderingInputPCMFormat:inputBlock:)`.

func (*AVAudioEngine) IsAutoShutdownEnabled

func (o *AVAudioEngine) IsAutoShutdownEnabled() bool

@property autoShutdownEnabled @abstract When auto shutdown is enabled, the engine can start and stop the audio hardware dynamically, to conserve power. This is the enforced behavior on watchOS and can be optionally enabled on other platforms. To conserve power, it is advised that the client pause/stop the engine when not in use. But when auto shutdown is enabled, the engine will stop the audio hardware if it was running idle for a certain duration, and restart it later when required. Note that, because this operation is dynamic, it may affect the start times of the source nodes (e.g. `AVAudioPlayerNode`), if the engine has to resume from its shutdown state. On watchOS, auto shutdown is always enabled. On other platforms, it is disabled by default, but the client can enable it if needed. This property is applicable only when the engine is rendering to/from an audio device. If the value is changed when the engine is in manual rendering mode, it will take effect whenever the engine is switched to render to/from the audio device.

func (*AVAudioEngine) IsInManualRenderingMode

func (o *AVAudioEngine) IsInManualRenderingMode() bool

@property isInManualRenderingMode @abstract Whether or not the engine is operating in manual rendering mode, i.e. not connected to an audio device and rendering in response to the requests from the client

func (*AVAudioEngine) IsRunning

func (o *AVAudioEngine) IsRunning() bool

@property running @abstract The engine's running state.

func (*AVAudioEngine) MainMixerNode

func (o *AVAudioEngine) MainMixerNode() *AVAudioMixerNode

@property mainMixerNode @abstract The engine's optional singleton main mixer node. The engine will construct a singleton main mixer and connect it to the outputNode on demand, when this property is first accessed. You can then connect additional nodes to the mixer. If the client has never explicitly set the connection format between the mainMixerNode and the outputNode, the engine will always set/update the format to track the format of the outputNode on (re)start, even after an AVAudioEngineConfigurationChangeNotification. Otherwise, it's the client's responsibility to set/update this connection format after an AVAudioEngineConfigurationChangeNotification. By default, the mixer's output format (sample rate and channel count) will track the format of the output node. You may however make the connection explicitly with a different format.

func (*AVAudioEngine) ManualRenderingBlock

func (o *AVAudioEngine) ManualRenderingBlock() objc.Block

@property manualRenderingBlock @abstract Block to render the engine operating in manual rendering mode This block based render call must be used to render the engine when operating in `AVAudioEngineManualRenderingModeRealtime`. In this mode, the engine operates under realtime constraints and will not make any blocking call (e.g. calling libdispatch, blocking on a mutex, allocating memory etc.) while rendering. Before invoking the rendering functionality, client must fetch this block and cache the result. The block can then be called from a realtime context, without any possibility of blocking. When rendering in `AVAudioEngineManualRenderingModeOffline`, either this block based render call or `renderOffline:toBuffer:error:` ObjC method can be used. All the rules outlined in `renderOffline:toBuffer:error:` are applicable here as well.

func (*AVAudioEngine) ManualRenderingFormat

func (o *AVAudioEngine) ManualRenderingFormat() *AVAudioFormat

@property manualRenderingFormat @abstract The render format of the engine in manual rendering mode. Querying this property when the engine is not in manual rendering mode will return an invalid format, with zero sample rate and channel count.

func (*AVAudioEngine) ManualRenderingMaximumFrameCount

func (o *AVAudioEngine) ManualRenderingMaximumFrameCount() uint32

@property manualRenderingMaximumFrameCount @abstract The maximum number of PCM sample frames the engine can produce in any single render call in the manual rendering mode. Querying this property when the engine is not in manual rendering mode will return zero.

func (*AVAudioEngine) ManualRenderingMode

func (o *AVAudioEngine) ManualRenderingMode() AVAudioEngineManualRenderingMode

@property manualRenderingMode @abstract The manual rendering mode configured on the engine This property is meaningful only when the engine is operating in manual rendering mode, i.e. when `isInManualRenderingMode` returns true.

func (*AVAudioEngine) ManualRenderingSampleTime

func (o *AVAudioEngine) ManualRenderingSampleTime() int64

@property manualRenderingSampleTime @abstract Indicates where the engine is on its render timeline in manual rendering mode. The timeline in manual rendering mode starts at a sample time of zero, and is in terms of the render format's sample rate. Resetting the engine (see `reset`) will reset the timeline back to zero.

func (*AVAudioEngine) MusicSequence

func (o *AVAudioEngine) MusicSequence() unsafe.Pointer

@property musicSequence @abstract The MusicSequence previously attached to the engine (if any).

func (*AVAudioEngine) OutputConnectionPointsForNodeOutputBus

func (o *AVAudioEngine) OutputConnectionPointsForNodeOutputBus(node *AVAudioNode, bus uint) *foundation.NSArray[*AVAudioConnectionPoint]

@method outputConnectionPointsForNode:outputBus: @abstract Get connection information on a node's output bus. @param node The node whose output connections are being queried. @param bus The node's output bus on which connections are being queried. @return An array of AVAudioConnectionPoint objects with connection information on the node's specified output bus. Connections are always one-to-one or one-to-many, never many-to-one. Returns an empty array if there are no connections on the node's specified output bus.

func (*AVAudioEngine) OutputNode

func (o *AVAudioEngine) OutputNode() *AVAudioOutputNode

@property outputNode @abstract The engine's singleton output node. Audio output is performed via an output node. The engine creates a singleton on demand when this property is first accessed. Connect another node to the input of the output node, or obtain a mixer that is connected there by default, using the "mainMixerNode" property. When the engine is rendering to/from an audio device, the AVAudioSesssion category and/or availability of hardware determine whether an app can perform output. Check the output format of output node (i.e. hardware format) for non-zero sample rate and channel count to see if output is enabled. Trying to perform output through the output node when it is not enabled or available will cause the engine to throw an error (when possible) or an exception. In manual rendering mode, the output format of the output node will determine the render format of the engine. It can be changed through `enableManualRenderingMode:format:maximumFrameCount:error:`.

func (*AVAudioEngine) Pause

func (o *AVAudioEngine) Pause()

@method pause @abstract Pause the engine. When the engine is rendering to/from an audio device, stops the audio hardware and the flow of audio through the engine. When operating in this mode, it is recommended that the engine be paused or stopped (as applicable) when not in use, to minimize power consumption. Pausing the engine does not deallocate the resources allocated by prepare. Resume the engine by invoking start again.

func (*AVAudioEngine) Prepare

func (o *AVAudioEngine) Prepare()

@method prepare @abstract Prepare the engine for starting. This method preallocates many of the resources the engine requires in order to start. Use it to responsively start audio input or output. On AVAudioSession supported platforms, this method may cause the audio session to be implicitly activated. Activating the audio session (implicitly or explicitly) may cause other audio sessions to be interrupted or ducked depending on the session's configuration. It is recommended to configure and activate the app's audio session before preparing the engine. See https://developer.apple.com/library/archive/documentation/Audio/Conceptual/AudioSessionProgrammingGuide/Introduction/Introduction.html for details.

func (*AVAudioEngine) RenderOfflineToBufferError

func (o *AVAudioEngine) RenderOfflineToBufferError(numberOfFrames uint32, buffer *AVAudioPCMBuffer) (AVAudioEngineManualRenderingStatus, error)

@method renderOffline:toBuffer:error: @abstract Render call to the engine operating in the offline manual rendering mode @param numberOfFrames The number of PCM sample frames to be rendered @param buffer The PCM buffer to which the engine must render the audio @param outError On exit, if an error occurs during rendering, a description of the error (see `AVAudioEngineManualRenderingError` for the possible errors) @return One of the status codes from `AVAudioEngineManualRenderingStatus`. Irrespective of the returned status code, on exit, the output buffer's frameLength will indicate the number of PCM samples rendered by the engine The engine must be in the offline manual rendering mode (`AVAudioEngineManualRenderingModeOffline`) and started before calling this method. The format of the buffer must match the render format set through `enableManualRenderingMode:format:maximumFrameCount:error:`. The buffer capacity must be greater than or equal to the number of samples asked to render. On exit, the buffer's frameLength will indicate the number of PCM samples rendered by the engine. The engine's timeline in manual rendering mode starts at a sample time of zero, and is in terms of the render format's sample rate. Resetting the engine (see `reset`) will reset the timeline back to zero. When rendering in `AVAudioEngineManualRenderingModeRealtime`, this ObjC render method must not be used, an error is returned otherwise. Use the block based render call (`manualRenderingBlock`) in that mode instead.

func (*AVAudioEngine) Reset

func (o *AVAudioEngine) Reset()

@method reset @abstract reset Reset all of the nodes in the engine. This will reset all of the nodes in the engine. This is useful, for example, for silencing reverb and delay tails. In manual rendering mode, the render timeline is reset to a sample time of zero.

func (*AVAudioEngine) SetAutoShutdownEnabled

func (o *AVAudioEngine) SetAutoShutdownEnabled(autoShutdownEnabled bool)

func (*AVAudioEngine) SetMusicSequence

func (o *AVAudioEngine) SetMusicSequence(musicSequence unsafe.Pointer)

func (*AVAudioEngine) StartAndReturnError

func (o *AVAudioEngine) StartAndReturnError() (bool, error)

@method startAndReturnError: @abstract Start the engine. @return YES for success Calls prepare if it has not already been called since stop. When the engine is rendering to/from an audio device, starts the audio hardware via the AVAudioInputNode and/or AVAudioOutputNode instances in the engine. Audio begins to flow through the engine. Reasons for potential failure to start in this mode include: 1. There is problem in the structure of the graph. Input can't be routed to output or to a recording tap through converter type nodes. 2. An AVAudioSession error. 3. The driver failed to start the hardware. In manual rendering mode, prepares the engine to render when requested by the client. On AVAudioSession supported platforms, this method may cause the audio session to be implicitly activated. It is recommended to configure and activate the app's audio session before starting the engine. For more information, see the `prepare` method above.

func (*AVAudioEngine) Stop

func (o *AVAudioEngine) Stop()

@method stop @abstract When the engine is rendering to/from an audio device, stops the audio hardware and the engine. When operating in this mode, it is recommended that the engine be paused or stopped (as applicable) when not in use, to minimize power consumption. Stopping the engine releases the resources allocated by prepare.

type AVAudioEngineManualRenderingError

type AVAudioEngineManualRenderingError int64
const (
	AVAudioEngineManualRenderingErrorInvalidMode AVAudioEngineManualRenderingError = -80800
	AVAudioEngineManualRenderingErrorInitialized AVAudioEngineManualRenderingError = -80801
	AVAudioEngineManualRenderingErrorNotRunning  AVAudioEngineManualRenderingError = -80802
)

func (AVAudioEngineManualRenderingError) String

type AVAudioEngineManualRenderingMode

type AVAudioEngineManualRenderingMode int64
const (
	AVAudioEngineManualRenderingModeOffline  AVAudioEngineManualRenderingMode = 0
	AVAudioEngineManualRenderingModeRealtime AVAudioEngineManualRenderingMode = 1
)

func (AVAudioEngineManualRenderingMode) String

type AVAudioEngineManualRenderingStatus

type AVAudioEngineManualRenderingStatus int64
const (
	AVAudioEngineManualRenderingStatusError                         AVAudioEngineManualRenderingStatus = -1
	AVAudioEngineManualRenderingStatusSuccess                       AVAudioEngineManualRenderingStatus = 0
	AVAudioEngineManualRenderingStatusInsufficientDataFromInputNode AVAudioEngineManualRenderingStatus = 1
	AVAudioEngineManualRenderingStatusCannotDoInCurrentContext      AVAudioEngineManualRenderingStatus = 2
)

func (AVAudioEngineManualRenderingStatus) String

type AVAudioEnvironmentDistanceAttenuationModel

type AVAudioEnvironmentDistanceAttenuationModel int64
const (
	AVAudioEnvironmentDistanceAttenuationModelExponential AVAudioEnvironmentDistanceAttenuationModel = 1
	AVAudioEnvironmentDistanceAttenuationModelInverse     AVAudioEnvironmentDistanceAttenuationModel = 2
	AVAudioEnvironmentDistanceAttenuationModelLinear      AVAudioEnvironmentDistanceAttenuationModel = 3
)

func (AVAudioEnvironmentDistanceAttenuationModel) String

type AVAudioEnvironmentDistanceAttenuationParameters

type AVAudioEnvironmentDistanceAttenuationParameters struct {
	foundation.NSObject
}

Apple documentation: https://developer.apple.com/documentation/avfaudio/avaudioenvironmentdistanceattenuationparameters

func AVAudioEnvironmentDistanceAttenuationParametersFromID

func AVAudioEnvironmentDistanceAttenuationParametersFromID(id objc.ID) *AVAudioEnvironmentDistanceAttenuationParameters

func (*AVAudioEnvironmentDistanceAttenuationParameters) DistanceAttenuationModel

@property distanceAttenuationModel @abstract Type of distance attenuation model @discussion Default: AVAudioEnvironmentDistanceAttenuationModelInverse

func (*AVAudioEnvironmentDistanceAttenuationParameters) MaximumDistance

@property maximumDistance @abstract The distance beyond which no further attenuation is applied @discussion Default: 100000.0 meters Models: AVAudioEnvironmentDistanceAttenuationModelLinear

func (*AVAudioEnvironmentDistanceAttenuationParameters) ReferenceDistance

@property referenceDistance @abstract The minimum distance at which attenuation is applied @discussion Default: 1.0 meter Models: AVAudioEnvironmentDistanceAttenuationModelInverse, AVAudioEnvironmentDistanceAttenuationModelLinear

func (*AVAudioEnvironmentDistanceAttenuationParameters) RolloffFactor

@property rolloffFactor @abstract Determines the attenuation curve @discussion A higher value results in a steeper attenuation curve. The rolloff factor should be a value greater than 0. Default: 1.0 Models: AVAudioEnvironmentDistanceAttenuationModelExponential AVAudioEnvironmentDistanceAttenuationModelInverse AVAudioEnvironmentDistanceAttenuationModelLinear

func (*AVAudioEnvironmentDistanceAttenuationParameters) SetDistanceAttenuationModel

func (o *AVAudioEnvironmentDistanceAttenuationParameters) SetDistanceAttenuationModel(distanceAttenuationModel AVAudioEnvironmentDistanceAttenuationModel)

func (*AVAudioEnvironmentDistanceAttenuationParameters) SetMaximumDistance

func (o *AVAudioEnvironmentDistanceAttenuationParameters) SetMaximumDistance(maximumDistance float32)

func (*AVAudioEnvironmentDistanceAttenuationParameters) SetReferenceDistance

func (o *AVAudioEnvironmentDistanceAttenuationParameters) SetReferenceDistance(referenceDistance float32)

func (*AVAudioEnvironmentDistanceAttenuationParameters) SetRolloffFactor

func (o *AVAudioEnvironmentDistanceAttenuationParameters) SetRolloffFactor(rolloffFactor float32)

type AVAudioEnvironmentNode

type AVAudioEnvironmentNode struct {
	AVAudioNode
}

Apple documentation: https://developer.apple.com/documentation/avfaudio/avaudioenvironmentnode

func AVAudioEnvironmentNodeFromID

func AVAudioEnvironmentNodeFromID(id objc.ID) *AVAudioEnvironmentNode

func (*AVAudioEnvironmentNode) ApplicableRenderingAlgorithms

func (o *AVAudioEnvironmentNode) ApplicableRenderingAlgorithms() *foundation.NSArray[*foundation.NSNumber]

@property applicableRenderingAlgorithms @abstract Returns an array of AVAudio3DMixingRenderingAlgorithm values based on the current output format @discussion AVAudioEnvironmentNode supports several rendering algorithms per input bus which are defined in <AVFAudio/AVAudioMixing.h>. Depending on the current output format of the environment node, this method returns an immutable array of the applicable rendering algorithms. This is important when the environment node has been configured to a multichannel output format because only a subset of the available rendering algorithms are designed to render to all of the channels. This information should be retrieved after a successful connection to the destination node via the engine's connect method.

func (*AVAudioEnvironmentNode) DistanceAttenuationParameters

func (o *AVAudioEnvironmentNode) DistanceAttenuationParameters() *AVAudioEnvironmentDistanceAttenuationParameters

@property distanceAttenuationParameters @abstract The distance attenuation parameters for the environment

func (*AVAudioEnvironmentNode) Init

func (*AVAudioEnvironmentNode) IsListenerHeadTrackingEnabled

func (o *AVAudioEnvironmentNode) IsListenerHeadTrackingEnabled() bool

@property listenerHeadTrackingEnabled @abstract On capable devices, listener orientation will be automatically rotated based on user's head-orientation if enabled.

func (*AVAudioEnvironmentNode) ListenerAngularOrientation

func (o *AVAudioEnvironmentNode) ListenerAngularOrientation() AVAudio3DAngularOrientation

@property listenerAngularOrientation @abstract The listener's orientation in the environment @discussion Changing listenerAngularOrientation will result in a corresponding change in listenerVectorOrientation. All angles are specified in degrees. Default: The default orientation is with the listener looking directly along the negative Z axis. yaw: 0.0 pitch: 0.0 roll: 0.0

func (*AVAudioEnvironmentNode) ListenerPosition

func (o *AVAudioEnvironmentNode) ListenerPosition() AVAudio3DPoint

@property listenerPosition @abstract Sets the listener's position in the 3D environment @discussion The coordinates are specified in meters. Default: The default position of the listener is at the origin. x: 0.0 y: 0.0 z: 0.0

func (*AVAudioEnvironmentNode) ListenerVectorOrientation

func (o *AVAudioEnvironmentNode) ListenerVectorOrientation() AVAudio3DVectorOrientation

@property listenerVectorOrientation @abstract The listener's orientation in the environment @discussion Changing listenerVectorOrientation will result in a corresponding change in listenerAngularOrientation. Default: The default orientation is with the listener looking directly along the negative Z axis. forward: (0, 0, -1) up: (0, 1, 0)

func (*AVAudioEnvironmentNode) NextAvailableInputBus

func (o *AVAudioEnvironmentNode) NextAvailableInputBus() uint

@property nextAvailableInputBus @abstract Find an unused input bus @discussion This will find and return the first input bus to which no other node is connected.

func (*AVAudioEnvironmentNode) OutputType

@property outputType @abstract Type of output hardware to be used with AVAudio3DMixingRenderingAlgorithmAuto @discussion Output hardware cannot be automatically determined in Manual Rendering modes or for wired output. This property can be used to override the output type if the correct type is known. Selecting an output type that does not match the actual hardware can produce unexpected results, especially with AVAudioEnvironmentOutputTypeBuiltInSpeakers. An app choosing a value other than AVAudio3DMixingOutputTypeAuto should listen to route change notifications and update the output type accordingly. Default: AVAudio3DMixingOutputTypeAuto

func (*AVAudioEnvironmentNode) OutputVolume

func (o *AVAudioEnvironmentNode) OutputVolume() float32

@property outputVolume @abstract The mixer's output volume. @discussion This accesses the mixer's output volume (0.0-1.0, inclusive).

func (*AVAudioEnvironmentNode) ReverbParameters

@property reverbParameters @abstract The reverb parameters for the environment

func (*AVAudioEnvironmentNode) SetListenerAngularOrientation

func (o *AVAudioEnvironmentNode) SetListenerAngularOrientation(listenerAngularOrientation AVAudio3DAngularOrientation)

func (*AVAudioEnvironmentNode) SetListenerHeadTrackingEnabled

func (o *AVAudioEnvironmentNode) SetListenerHeadTrackingEnabled(listenerHeadTrackingEnabled bool)

func (*AVAudioEnvironmentNode) SetListenerPosition

func (o *AVAudioEnvironmentNode) SetListenerPosition(listenerPosition AVAudio3DPoint)

func (*AVAudioEnvironmentNode) SetListenerVectorOrientation

func (o *AVAudioEnvironmentNode) SetListenerVectorOrientation(listenerVectorOrientation AVAudio3DVectorOrientation)

func (*AVAudioEnvironmentNode) SetOutputType

func (o *AVAudioEnvironmentNode) SetOutputType(outputType AVAudioEnvironmentOutputType)

func (*AVAudioEnvironmentNode) SetOutputVolume

func (o *AVAudioEnvironmentNode) SetOutputVolume(outputVolume float32)

type AVAudioEnvironmentOutputType

type AVAudioEnvironmentOutputType int64
const (
	AVAudioEnvironmentOutputTypeAuto             AVAudioEnvironmentOutputType = 0
	AVAudioEnvironmentOutputTypeHeadphones       AVAudioEnvironmentOutputType = 1
	AVAudioEnvironmentOutputTypeBuiltInSpeakers  AVAudioEnvironmentOutputType = 2
	AVAudioEnvironmentOutputTypeExternalSpeakers AVAudioEnvironmentOutputType = 3
)

func (AVAudioEnvironmentOutputType) String

type AVAudioEnvironmentReverbParameters

type AVAudioEnvironmentReverbParameters struct {
	foundation.NSObject
}

Apple documentation: https://developer.apple.com/documentation/avfaudio/avaudioenvironmentreverbparameters

func AVAudioEnvironmentReverbParametersFromID

func AVAudioEnvironmentReverbParametersFromID(id objc.ID) *AVAudioEnvironmentReverbParameters

func (*AVAudioEnvironmentReverbParameters) Enable

@property enable @abstract Turns on/off the reverb @discussion Default: NO

func (*AVAudioEnvironmentReverbParameters) FilterParameters

@property filterParameters @abstract filter that applies to the output of the reverb

func (*AVAudioEnvironmentReverbParameters) Level

@property level @abstract Controls the master level of the reverb @discussion Range: -40 to 40 dB Default: 0.0

func (*AVAudioEnvironmentReverbParameters) LoadFactoryReverbPreset

func (o *AVAudioEnvironmentReverbParameters) LoadFactoryReverbPreset(preset AVAudioUnitReverbPreset)

@method loadFactoryReverbPreset: @abstract Load one of the reverb's factory presets @param preset Reverb preset to be set. @discussion Loading a factory reverb preset changes the sound of the reverb. This works independently of the filter which follows the reverb in the signal chain.

func (*AVAudioEnvironmentReverbParameters) SetEnable

func (o *AVAudioEnvironmentReverbParameters) SetEnable(enable bool)

func (*AVAudioEnvironmentReverbParameters) SetLevel

func (o *AVAudioEnvironmentReverbParameters) SetLevel(level float32)

type AVAudioFile

type AVAudioFile struct {
	foundation.NSObject
}

Apple documentation: https://developer.apple.com/documentation/avfaudio/avaudiofile

func AVAudioFileFromID

func AVAudioFileFromID(id objc.ID) *AVAudioFile

func (*AVAudioFile) Close

func (o *AVAudioFile) Close()

@method close @abstract Close the audio file. @discussion The underlying file will be closed if open. - It is normally unnecessary to close a file opened for reading (it will be automatically closed when the object is released) - It is only necessary to close a file opened for writing in order to achieve specific control over when the file's header is updated. Note: Once closed, further file read or write operations will fail with kAudio_FileNotFoundError.

func (*AVAudioFile) FileFormat

func (o *AVAudioFile) FileFormat() *AVAudioFormat

@property fileFormat @abstract The on-disk format of the file.

func (*AVAudioFile) FramePosition

func (o *AVAudioFile) FramePosition() int64

@property framePosition @abstract The position in the file at which the next read or write will occur. @discussion Set framePosition to perform a seek before a read or write. A read or write operation advances the frame position by the number of frames read or written.

func (*AVAudioFile) Init deprecated

func (o *AVAudioFile) Init() *AVAudioFile

Deprecated: Deprecated - use initForReading or initForWriting

func (*AVAudioFile) InitForReadingCommonFormatInterleavedError

func (o *AVAudioFile) InitForReadingCommonFormatInterleavedError(fileURL *foundation.NSURL, format AVAudioCommonFormat, interleaved bool) (*AVAudioFile, error)

@method initForReading:commonFormat:interleaved:error: @abstract Open a file for reading, using a specified processing format. @param fileURL the file to open @param format the processing format to use when reading from the file @param interleaved whether to use an interleaved processing format @param outError on exit, if an error occurs, a description of the error

func (*AVAudioFile) InitForReadingError

func (o *AVAudioFile) InitForReadingError(fileURL *foundation.NSURL) (*AVAudioFile, error)

@method initForReading:error: @abstract Open a file for reading. @param fileURL the file to open @param outError on exit, if an error occurs, a description of the error @discussion This opens the file for reading using the standard format (deinterleaved floating point).

func (*AVAudioFile) InitForWritingSettingsCommonFormatInterleavedError

func (o *AVAudioFile) InitForWritingSettingsCommonFormatInterleavedError(fileURL *foundation.NSURL, settings *foundation.NSDictionary[*foundation.NSString, objc.ID], format AVAudioCommonFormat, interleaved bool) (*AVAudioFile, error)

@method initForWriting:settings:commonFormat:interleaved:error: @abstract Open a file for writing. @param fileURL the path at which to create the file @param settings the format of the file to create (See `AVAudioRecorder`.) For linear PCM, only interleaved formats are supported for the saved file, non interleaved setting will be ignored and a warning is shown. @param format the processing format to use when writing to the file. @param interleaved whether to use an interleaved processing format @param outError on exit, if an error occurs, a description of the error @discussion The file type to create can be set through the corresponding settings key. If not set, it will be inferred from the file extension. Will overwrite a file at the specified URL if a file exists.

func (*AVAudioFile) InitForWritingSettingsError

func (o *AVAudioFile) InitForWritingSettingsError(fileURL *foundation.NSURL, settings *foundation.NSDictionary[*foundation.NSString, objc.ID]) (*AVAudioFile, error)

@method initForWriting:settings:error: @abstract Open a file for writing. @param fileURL the path at which to create the file @param settings the format of the file to create (See `AVAudioRecorder`.) For linear PCM, only interleaved formats are supported for the saved file, non interleaved setting will be ignored and a warning is shown. @param outError on exit, if an error occurs, a description of the error @discussion The file type to create can be set through the corresponding settings key. If not set, it will be inferred from the file extension. Will overwrite a file at the specified URL if a file exists. This opens the file for writing using the standard format (deinterleaved floating point).

func (*AVAudioFile) IsOpen

func (o *AVAudioFile) IsOpen() bool

@property isOpen @abstract Whether the file is open or not.

func (*AVAudioFile) Length

func (o *AVAudioFile) Length() int64

@property length @abstract The number of sample frames in the file. @discussion Note: this can be expensive to compute for the first time.

func (*AVAudioFile) ProcessingFormat

func (o *AVAudioFile) ProcessingFormat() *AVAudioFormat

@property processingFormat @abstract The processing format of the file.

func (*AVAudioFile) ReadIntoBufferError

func (o *AVAudioFile) ReadIntoBufferError(buffer *AVAudioPCMBuffer) (bool, error)

@method readIntoBuffer:error: @abstract Read an entire buffer. @param buffer The buffer into which to read from the file. Its format must match the file's processing format. @param outError on exit, if an error occurs, a description of the error @return YES for success. @discussion Reading sequentially from framePosition, attempts to fill the buffer to its capacity. On return, the buffer's length indicates the number of sample frames successfully read.

func (*AVAudioFile) ReadIntoBufferFrameCountError

func (o *AVAudioFile) ReadIntoBufferFrameCountError(buffer *AVAudioPCMBuffer, frames uint32) (bool, error)

@method readIntoBuffer:frameCount:error: @abstract Read a portion of a buffer. @param frames The number of frames to read. @param buffer The buffer into which to read from the file. Its format must match the file's processing format. @param outError on exit, if an error occurs, a description of the error @return YES for success. @discussion Like `readIntoBuffer:error:`, but can be used to read fewer frames than buffer.frameCapacity.

func (*AVAudioFile) SetFramePosition

func (o *AVAudioFile) SetFramePosition(framePosition int64)

func (*AVAudioFile) Url

func (o *AVAudioFile) Url() *foundation.NSURL

@property url @abstract The URL the file is reading or writing.

func (*AVAudioFile) WriteFromBufferError

func (o *AVAudioFile) WriteFromBufferError(buffer *AVAudioPCMBuffer) (bool, error)

@method writeFromBuffer:error: @abstract Write a buffer. @param buffer The buffer from which to write to the file. Its format must match the file's processing format. @param outError on exit, if an error occurs, a description of the error @return YES for success. @discussion Writes sequentially. The buffer's frameLength signifies how much of the buffer is to be written.

type AVAudioFormat

type AVAudioFormat struct {
	foundation.NSObject
}

Apple documentation: https://developer.apple.com/documentation/avfaudio/avaudioformat

func AVAudioFormatFromID

func AVAudioFormatFromID(id objc.ID) *AVAudioFormat

func (*AVAudioFormat) ChannelCount

func (o *AVAudioFormat) ChannelCount() uint32

@property channelCount @abstract The number of channels of audio data.

func (*AVAudioFormat) ChannelLayout

func (o *AVAudioFormat) ChannelLayout() *AVAudioChannelLayout

@property channelLayout @abstract The underlying AVAudioChannelLayout, if any. @discussion Only formats with more than 2 channels are required to have channel layouts.

func (*AVAudioFormat) CommonFormat

func (o *AVAudioFormat) CommonFormat() AVAudioCommonFormat

@property commonFormat @abstract An `AVAudioCommonFormat` identifying the format

func (*AVAudioFormat) FormatDescription

func (o *AVAudioFormat) FormatDescription() unsafe.Pointer

@property formatDescription @abstract Converts to a CMAudioFormatDescriptionRef, for use with Core Media API's.

func (*AVAudioFormat) InitStandardFormatWithSampleRateChannelLayout

func (o *AVAudioFormat) InitStandardFormatWithSampleRateChannelLayout(sampleRate float64, layout *AVAudioChannelLayout) *AVAudioFormat

@method initStandardFormatWithSampleRate:channelLayout: @abstract Initialize to deinterleaved float with the specified sample rate and channel layout. @param sampleRate the sample rate @param layout the channel layout. must not be nil.

func (*AVAudioFormat) InitStandardFormatWithSampleRateChannels

func (o *AVAudioFormat) InitStandardFormatWithSampleRateChannels(sampleRate float64, channels uint32) *AVAudioFormat

@method initStandardFormatWithSampleRate:channels: @abstract Initialize to deinterleaved float with the specified sample rate and channel count. @param sampleRate the sample rate @param channels the channel count @discussion If the format specifies more than 2 channels, this method fails (returns nil).

func (*AVAudioFormat) InitWithCMAudioFormatDescription

func (o *AVAudioFormat) InitWithCMAudioFormatDescription(formatDescription unsafe.Pointer) *AVAudioFormat

@method initWithCMAudioFormatDescription: @abstract initialize from a CMAudioFormatDescriptionRef. @param formatDescription the CMAudioFormatDescriptionRef. @discussion If formatDescription is invalid, this method fails (returns nil).

func (*AVAudioFormat) InitWithCommonFormatSampleRateChannelsInterleaved

func (o *AVAudioFormat) InitWithCommonFormatSampleRateChannelsInterleaved(format AVAudioCommonFormat, sampleRate float64, channels uint32, interleaved bool) *AVAudioFormat

@method initWithCommonFormat:sampleRate:channels:interleaved: @abstract Initialize to float with the specified sample rate, channel count and interleavedness. @param format the common format type @param sampleRate the sample rate @param channels the channel count @param interleaved true if interleaved @discussion If the format specifies more than 2 channels, this method fails (returns nil).

func (*AVAudioFormat) InitWithCommonFormatSampleRateInterleavedChannelLayout

func (o *AVAudioFormat) InitWithCommonFormatSampleRateInterleavedChannelLayout(format AVAudioCommonFormat, sampleRate float64, interleaved bool, layout *AVAudioChannelLayout) *AVAudioFormat

@method initWithCommonFormat:sampleRate:interleaved:channelLayout: @abstract Initialize to float with the specified sample rate, channel layout and interleavedness. @param format the common format type @param sampleRate the sample rate @param interleaved true if interleaved @param layout the channel layout. must not be nil.

func (*AVAudioFormat) InitWithSettings

func (o *AVAudioFormat) InitWithSettings(settings *foundation.NSDictionary[*foundation.NSString, objc.ID]) *AVAudioFormat

@method initWithSettings: @abstract Initialize using a settings dictionary. @discussion See AVAudioSettings.h. Note that many settings dictionary elements pertain to encoder settings, not the basic format, and will be ignored. Returns nil if a format cannot be constructed with the provided settings, e.g. when: - AVNumberOfChannelsKey specifies more than 2 channels, but AVChannelLayoutKey hasn't been specified or the layout does not match - AVLinearPCMBitDepthKey for linear PCM format specifies less than 8 or greater than 32 bits - values for the keys are not of the expected types

func (*AVAudioFormat) InitWithStreamDescription

func (o *AVAudioFormat) InitWithStreamDescription(asbd *coreaudiotypes.AudioStreamBasicDescription) *AVAudioFormat

@method initWithStreamDescription: @abstract Initialize from an AudioStreamBasicDescription. @param asbd the AudioStreamBasicDescription @discussion If the format specifies more than 2 channels, this method fails (returns nil).

func (*AVAudioFormat) InitWithStreamDescriptionChannelLayout

func (o *AVAudioFormat) InitWithStreamDescriptionChannelLayout(asbd *coreaudiotypes.AudioStreamBasicDescription, layout *AVAudioChannelLayout) *AVAudioFormat

@method initWithStreamDescription:channelLayout: @abstract Initialize from an AudioStreamBasicDescription and optional channel layout. @param asbd the AudioStreamBasicDescription @param layout the channel layout. Can be nil only if asbd specifies 1 or 2 channels. @discussion If the format specifies more than 2 channels, this method fails (returns nil) unless layout is non-nil.

func (*AVAudioFormat) IsEqual

func (o *AVAudioFormat) IsEqual(object objc.ID) bool

@method isEqual: @abstract Determine whether another format is functionally equivalent. @param object the format to compare against @discussion For PCM, interleavedness is ignored for mono. Differences in the AudioStreamBasicDescription alignment and packedness are ignored when they are not significant (e.g. with 1 channel, 2 bytes per frame and 16 bits per channel, neither alignment, the format is implicitly packed and can be interpreted as either high- or low-aligned.) For AVAudioChannelLayout, a layout with standard mono/stereo tag is considered to be equivalent to a nil layout. Otherwise, the layouts are compared for equality.

func (*AVAudioFormat) IsInterleaved

func (o *AVAudioFormat) IsInterleaved() bool

@property interleaved @abstract Describes whether the samples are interleaved. @discussion For non-PCM formats, the value is undefined.

func (*AVAudioFormat) IsStandard

func (o *AVAudioFormat) IsStandard() bool

@property standard @abstract Describes whether the format is deinterleaved native-endian float.

func (*AVAudioFormat) MagicCookie

func (o *AVAudioFormat) MagicCookie() *foundation.NSData

@property magicCookie @abstract The underlying magic cookie, if any. @discussion A magic cookie contains metadata associated with encoders and decoders. Encoders produce a magic cookie, and some decoders require a magic cookie to decode properly.

func (*AVAudioFormat) SampleRate

func (o *AVAudioFormat) SampleRate() float64

@property sampleRate @abstract A sampling rate in Hertz.

func (*AVAudioFormat) SetMagicCookie

func (o *AVAudioFormat) SetMagicCookie(magicCookie *foundation.NSData)

func (*AVAudioFormat) Settings

@property settings @abstract Returns the format represented as a dictionary with keys from AVAudioSettings.h.

func (*AVAudioFormat) StreamDescription

@property streamDescription @abstract Returns the AudioStreamBasicDescription, for use with lower-level audio API's.

type AVAudioIONode

type AVAudioIONode struct {
	AVAudioNode
}

Apple documentation: https://developer.apple.com/documentation/avfaudio/avaudioionode

func AVAudioIONodeFromID

func AVAudioIONodeFromID(id objc.ID) *AVAudioIONode

func (*AVAudioIONode) AudioUnit

@property audioUnit @abstract The node's underlying AudioUnit, if any. @discussion This is only necessary for certain advanced usages.

func (*AVAudioIONode) IsVoiceProcessingEnabled

func (o *AVAudioIONode) IsVoiceProcessingEnabled() bool

@property voiceProcessingEnabled @abstract Indicates whether voice processing is enabled.

func (*AVAudioIONode) PresentationLatency

func (o *AVAudioIONode) PresentationLatency() float64

@property presentationLatency @abstract The presentation or hardware latency, applicable when the engine is rendering to/from an audio device. @discussion This corresponds to kAudioDevicePropertyLatency and kAudioStreamPropertyLatency. See <CoreAudio/AudioHardwareBase.h>.

func (*AVAudioIONode) SetVoiceProcessingEnabledError

func (o *AVAudioIONode) SetVoiceProcessingEnabledError(enabled bool) (bool, error)

@method setVoiceProcessingEnabled:error: @abstract Enable or disable voice processing on the IO node. @param enabled Whether voice processing is to be enabled. @param outError On exit, if the IO node cannot enable or diable voice processing, a description of the error @return YES for success @discussion If enabled, the input node 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). Disabling this mode on either of the IO nodes automatically disabled it on the other IO node. Voice processing requires both input and output nodes to be in the voice processing mode. Enabling this mode on either of the IO nodes automatically enables it on the other IO node. Voice processing is only supported when the engine is rendering to the audio device and not in the manual rendering mode. Voice processing can only be be enabled or disabled when the engine is in a stopped state. The output format of the input node and the input format of the output node have to be the same and they can only be changed when the engine is in a stopped state.

type AVAudioInputNode

type AVAudioInputNode struct {
	AVAudioIONode
}

Apple documentation: https://developer.apple.com/documentation/avfaudio/avaudioinputnode

func AVAudioInputNodeFromID

func AVAudioInputNodeFromID(id objc.ID) *AVAudioInputNode

func (*AVAudioInputNode) IsVoiceProcessingAGCEnabled

func (o *AVAudioInputNode) IsVoiceProcessingAGCEnabled() bool

@property voiceProcessingAGCEnabled @abstract Enable automatic gain control on the processed microphone uplink. signal. Enabled by default. @discussion Querying this property when voice processing is disabled will return false.

func (*AVAudioInputNode) IsVoiceProcessingBypassed

func (o *AVAudioInputNode) IsVoiceProcessingBypassed() bool

@property voiceProcessingBypassed @abstract Bypass all processing for microphone uplink done by the voice processing unit. @discussion Querying this property when voice processing is disabled will return false.

func (*AVAudioInputNode) IsVoiceProcessingInputMuted

func (o *AVAudioInputNode) IsVoiceProcessingInputMuted() bool

@property voiceProcessingInputMuted @abstract Mutes the input of the voice processing unit. @discussion Querying this property when voice processing is disabled will return false.

func (*AVAudioInputNode) SetManualRenderingInputPCMFormatInputBlock

func (o *AVAudioInputNode) SetManualRenderingInputPCMFormatInputBlock(format *AVAudioFormat, block func(uint32) *coreaudiotypes.AudioBufferList) bool

@method setManualRenderingInputPCMFormat:inputBlock: @abstract Supply the data through the input node to the engine operating in the manual rendering mode. @param format The format of the PCM audio data the block will supply to the engine @param block The block the engine will call on the input node to get the audio to send to the output, when operating in the manual rendering mode. See `AVAudioIONodeInputBlock` for more details @return YES for success @discussion This block must be set if the input node is being used when the engine is operating in manual rendering mode. Switching the engine to render to/from an audio device invalidates any previously set block, and makes this method ineffective.

func (*AVAudioInputNode) SetMutedSpeechActivityEventListener

func (o *AVAudioInputNode) SetMutedSpeechActivityEventListener(listenerBlock func(AVAudioVoiceProcessingSpeechActivityEvent)) bool

@method setMutedSpeechActivityEventListener @abstract Register a listener to be notified when speech activity event occurs while the input is muted. @param listenerBlock The block the engine will call when speech activity event occurs while the input is muted. Passing nil will remove an already set block. @return YES for success @discussion 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 voiceProcessingInputMuted.

func (*AVAudioInputNode) SetVoiceProcessingAGCEnabled

func (o *AVAudioInputNode) SetVoiceProcessingAGCEnabled(voiceProcessingAGCEnabled bool)

func (*AVAudioInputNode) SetVoiceProcessingBypassed

func (o *AVAudioInputNode) SetVoiceProcessingBypassed(voiceProcessingBypassed bool)

func (*AVAudioInputNode) SetVoiceProcessingInputMuted

func (o *AVAudioInputNode) SetVoiceProcessingInputMuted(voiceProcessingInputMuted bool)

func (*AVAudioInputNode) SetVoiceProcessingOtherAudioDuckingConfiguration

func (o *AVAudioInputNode) SetVoiceProcessingOtherAudioDuckingConfiguration(voiceProcessingOtherAudioDuckingConfiguration AVAudioVoiceProcessingOtherAudioDuckingConfiguration)

func (*AVAudioInputNode) VoiceProcessingOtherAudioDuckingConfiguration

func (o *AVAudioInputNode) VoiceProcessingOtherAudioDuckingConfiguration() AVAudioVoiceProcessingOtherAudioDuckingConfiguration

@property voiceProcessingOtherAudioDuckingConfiguration @abstract The configuration of ducking other (i.e. non-voice) audio @discussion Configures the ducking of other (i.e. non-voice) audio, including advanced ducking enablement and ducking level. In general, when other audio is played during voice chat, applying a higher level of ducking could increase the intelligibility of the voice chat. If not set, the default ducking configuration is to disable advanced ducking, with a ducking level set to AVAudioVoiceProcessingOtherAudioDuckingLevelDefault.

type AVAudioMixerNode

type AVAudioMixerNode struct {
	AVAudioNode
}

Apple documentation: https://developer.apple.com/documentation/avfaudio/avaudiomixernode

func AVAudioMixerNodeFromID

func AVAudioMixerNodeFromID(id objc.ID) *AVAudioMixerNode

func (*AVAudioMixerNode) Init

func (*AVAudioMixerNode) NextAvailableInputBus

func (o *AVAudioMixerNode) NextAvailableInputBus() uint

@property nextAvailableInputBus @abstract Find an unused input bus. @discussion This will find and return the first input bus to which no other node is connected.

func (*AVAudioMixerNode) OutputVolume

func (o *AVAudioMixerNode) OutputVolume() float32

@property outputVolume @abstract The mixer's output volume. @discussion This accesses the mixer's output volume (0.0-1.0, inclusive).

func (*AVAudioMixerNode) SetOutputVolume

func (o *AVAudioMixerNode) SetOutputVolume(outputVolume float32)

type AVAudioMixing

type AVAudioMixing interface {
	AVAudioStereoMixing
	AVAudio3DMixing
	DestinationForMixerBus(mixer *AVAudioNode, bus uint) *AVAudioMixingDestination
	Volume() float32
	SetVolume(volume float32)
}

AVAudioMixing wraps the ObjC protocol AVAudioMixing.

type AVAudioMixingDestination

type AVAudioMixingDestination struct {
	foundation.NSObject
}

Apple documentation: https://developer.apple.com/documentation/avfaudio/avaudiomixingdestination

func AVAudioMixingDestinationFromID

func AVAudioMixingDestinationFromID(id objc.ID) *AVAudioMixingDestination

func (*AVAudioMixingDestination) ConnectionPoint

func (o *AVAudioMixingDestination) ConnectionPoint() *AVAudioConnectionPoint

type AVAudioNode

type AVAudioNode struct {
	foundation.NSObject
}

Apple documentation: https://developer.apple.com/documentation/avfaudio/avaudionode

func AVAudioNodeFromID

func AVAudioNodeFromID(id objc.ID) *AVAudioNode

func (*AVAudioNode) AUAudioUnit

func (o *AVAudioNode) AUAudioUnit() objc.ID

@property AUAudioUnit @abstract An AUAudioUnit wrapping or underlying the implementation's AudioUnit. @discussion This provides an AUAudioUnit which either wraps or underlies the implementation's AudioUnit, depending on how that audio unit is packaged. Applications can interact with this AUAudioUnit to control custom properties, select presets, change parameters, etc. No operations that may conflict with state maintained by the engine should be performed directly on the audio unit. These include changing initialization state, stream formats, channel layouts or connections to other audio units.

func (*AVAudioNode) Engine

func (o *AVAudioNode) Engine() *AVAudioEngine

@property engine @abstract The engine to which the node is attached (or nil).

func (*AVAudioNode) InputFormatForBus

func (o *AVAudioNode) InputFormatForBus(bus uint) *AVAudioFormat

@method inputFormatForBus: @abstract Obtain an input bus's format.

func (*AVAudioNode) InstallTapOnBusBufferSizeFormatBlock

func (o *AVAudioNode) InstallTapOnBusBufferSizeFormatBlock(bus uint, bufferSize uint32, format *AVAudioFormat, tapBlock func(*AVAudioPCMBuffer, *AVAudioTime))

@method installTapOnBus:bufferSize:format:block: @abstract Create a "tap" to record/monitor/observe the output of the node. @param bus the node output bus to which to attach the tap @param bufferSize the requested size of the incoming buffers in sample frames. Supported range is [100, 400] ms. @param format If non-nil, attempts to apply this as the format of the specified output bus. This should only be done when attaching to an output bus which is not connected to another node; an error will result otherwise. The tap and connection formats (if non-nil) on the specified bus should be identical. Otherwise, the latter operation will override any previously set format. @param tapBlock a block to be called with audio buffers @discussion Only one tap may be installed on any bus. Taps may be safely installed and removed while the engine is running. Note that if you have a tap installed on AVAudioOutputNode, there could be a mismatch between the tap buffer format and AVAudioOutputNode's output format, depending on the underlying physical device. Hence, instead of tapping the AVAudioOutputNode, it is advised to tap the node connected to it. E.g. to capture audio from input node: <pre> AVAudioEngine *engine = [[AVAudioEngine alloc] init]; AVAudioInputNode *input = [engine inputNode]; AVAudioFormat *format = [input outputFormatForBus: 0]; [input installTapOnBus: 0 bufferSize: 8192 format: format block: ^(AVAudioPCMBuffer *buf, AVAudioTime *when) { // ‘buf' contains audio captured from input node at time 'when' }]; .... // start engine </pre>

func (*AVAudioNode) LastRenderTime

func (o *AVAudioNode) LastRenderTime() *AVAudioTime

@property lastRenderTime @abstract Obtain the time for which the node most recently rendered. @discussion Will return nil if the engine is not running or if the node is not connected to an input or output node.

func (*AVAudioNode) Latency

func (o *AVAudioNode) Latency() float64

@property latency @abstract The processing latency of the node, in seconds. @discussion This property reflects the delay between when an impulse in the audio stream arrives at the input vs. output of the node. 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. A value of zero indicates either no latency or an unknown latency.

func (*AVAudioNode) NameForInputBus

func (o *AVAudioNode) NameForInputBus(bus uint) *foundation.NSString

@method nameForInputBus: @abstract Return the name of an input bus.

func (*AVAudioNode) NameForOutputBus

func (o *AVAudioNode) NameForOutputBus(bus uint) *foundation.NSString

@method nameForOutputBus: @abstract Return the name of an output bus.

func (*AVAudioNode) NumberOfInputs

func (o *AVAudioNode) NumberOfInputs() uint

@property numberOfInputs @abstract The node's number of input busses.

func (*AVAudioNode) NumberOfOutputs

func (o *AVAudioNode) NumberOfOutputs() uint

@property numberOfOutputs @abstract The node's number of output busses.

func (*AVAudioNode) OutputFormatForBus

func (o *AVAudioNode) OutputFormatForBus(bus uint) *AVAudioFormat

@method outputFormatForBus: @abstract Obtain an output bus's format.

func (*AVAudioNode) OutputPresentationLatency

func (o *AVAudioNode) OutputPresentationLatency() float64

@property outputPresentationLatency @abstract The maximum render pipeline latency downstream of the node, in seconds. @discussion This describes the maximum time it will take for the audio at the output of a node to be presented. For instance, the output presentation latency of the output node in the engine is: - zero in manual rendering mode - the presentation latency of the device itself when rendering to an audio device (see `AVAudioIONode(presentationLatency)`) The output presentation latency of a node connected directly to the output node is the output node's presentation latency plus the output node's processing latency (see `latency`). For a node which is exclusively in the input node chain (i.e. not connected to engine's output node), this property reflects the latency for the output of this node to be presented at the output of the terminating node in the input chain. A value of zero indicates either an unknown or no latency. Note that this latency value can change as the engine is reconfigured (started/stopped, connections made/altered downstream of this node etc.). So it is recommended not to cache this value and fetch it whenever it's needed.

func (*AVAudioNode) RemoveTapOnBus

func (o *AVAudioNode) RemoveTapOnBus(bus uint)

@method removeTapOnBus: @abstract Destroy a tap. @param bus the node output bus whose tap is to be destroyed

func (*AVAudioNode) Reset

func (o *AVAudioNode) Reset()

@method reset @abstract Clear a unit's previous processing state.

type AVAudioOutputNode

type AVAudioOutputNode struct {
	AVAudioIONode
}

Apple documentation: https://developer.apple.com/documentation/avfaudio/avaudiooutputnode

func AVAudioOutputNodeFromID

func AVAudioOutputNodeFromID(id objc.ID) *AVAudioOutputNode

type AVAudioPCMBuffer

type AVAudioPCMBuffer struct {
	AVAudioBuffer
}

Apple documentation: https://developer.apple.com/documentation/avfaudio/avaudiopcmbuffer

func AVAudioPCMBufferFromID

func AVAudioPCMBufferFromID(id objc.ID) *AVAudioPCMBuffer

func (*AVAudioPCMBuffer) FloatChannelData

func (o *AVAudioPCMBuffer) FloatChannelData() unsafe.Pointer

@property floatChannelData @abstract Access the buffer's float audio samples. @discussion floatChannelData returns pointers to the buffer's audio samples if the buffer's format is 32-bit float, or nil if it is another format. The returned pointer is to format.channelCount pointers to float. Each of these pointers is to "frameLength" valid samples, which are spaced by "stride" samples. If format.interleaved is false (as with the standard deinterleaved float format), then the pointers will be to separate chunks of memory. "stride" is 1. If format.interleaved is true, then the pointers will refer into the same chunk of interleaved samples, each offset by 1 frame. "stride" is the number of interleaved channels.

func (*AVAudioPCMBuffer) FrameCapacity

func (o *AVAudioPCMBuffer) FrameCapacity() uint32

@property frameCapacity @abstract The buffer's capacity, in audio sample frames.

func (*AVAudioPCMBuffer) FrameLength

func (o *AVAudioPCMBuffer) FrameLength() uint32

@property frameLength @abstract The current number of valid sample frames in the buffer. @discussion You may modify the length of the buffer as part of an operation that modifies its contents. The length must be less than or equal to the frameCapacity. Modifying frameLength will update the mDataByteSize in each of the underlying AudioBufferList's AudioBuffer's correspondingly, and vice versa. Note that in the case of deinterleaved formats, mDataByteSize will refers the size of one channel's worth of audio samples.

func (*AVAudioPCMBuffer) InitWithPCMFormatBufferListNoCopyDeallocator

func (o *AVAudioPCMBuffer) InitWithPCMFormatBufferListNoCopyDeallocator(format *AVAudioFormat, bufferList *coreaudiotypes.AudioBufferList, deallocator func(*coreaudiotypes.AudioBufferList)) *AVAudioPCMBuffer

@method initWithPCMFormat:bufferListNoCopy:deallocator: @abstract Initialize a buffer that is to contain PCM audio samples with a given AudioBufferList without copying samples and a custom deallocator block. @param format The format of the PCM audio to be contained in the buffer. @param bufferList The buffer list with allocated memory to contain the PCM audio data. @param deallocator A block to invoke when the resulting AVAudioPCMBuffer object is deallocated. @discussion An exception is raised if the format is not PCM. Returns nil in the following cases: - if the format has zero bytes per frame (format.streamDescription->mBytesPerFrame == 0) - if supplied buffer has zero number of buffers - if each buffer's data byte size are not equal or if any of the buffers' data byte size is zero - if there is a mismatch between the format's number of buffers and the AudioBufferList's size (1 if interleaved, mChannelsPerFrame if deinterleaved) - if the AudioBufferList's pointer to the buffer of audio data is null. Use the deallocator block to define your own deallocation behavior for the provided AudioBufferList's underlying memory. The AudioBufferList passed to the deallocator is identical to the one which was passed to the initializer, in terms of the buffer count, and each buffer's mData and mDataByteSize members.

func (*AVAudioPCMBuffer) InitWithPCMFormatFrameCapacity

func (o *AVAudioPCMBuffer) InitWithPCMFormatFrameCapacity(format *AVAudioFormat, frameCapacity uint32) *AVAudioPCMBuffer

@method initWithPCMFormat:frameCapacity: @abstract Initialize a buffer that is to contain PCM audio samples. @param format The format of the PCM audio to be contained in the buffer. @param frameCapacity The capacity of the buffer in PCM sample frames. @discussion An exception is raised if the format is not PCM. Returns nil in the following cases: - if the format has zero bytes per frame (format.streamDescription->mBytesPerFrame == 0) - if the buffer byte capacity (frameCapacity * format.streamDescription->mBytesPerFrame) cannot be represented by an uint32_t

func (*AVAudioPCMBuffer) Int16ChannelData

func (o *AVAudioPCMBuffer) Int16ChannelData() unsafe.Pointer

@property int16ChannelData @abstract Access the buffer's int16_t audio samples. @discussion int16ChannelData returns the buffer's audio samples if the buffer's format has 2-byte integer samples, or nil if it is another format. See the discussion of floatChannelData.

func (*AVAudioPCMBuffer) Int32ChannelData

func (o *AVAudioPCMBuffer) Int32ChannelData() unsafe.Pointer

@property int32ChannelData @abstract Access the buffer's int32_t audio samples. @discussion int32ChannelData returns the buffer's audio samples if the buffer's format has 4-byte integer samples, or nil if it is another format. See the discussion of floatChannelData.

func (*AVAudioPCMBuffer) SetFrameLength

func (o *AVAudioPCMBuffer) SetFrameLength(frameLength uint32)

func (*AVAudioPCMBuffer) Stride

func (o *AVAudioPCMBuffer) Stride() uint

@property stride @abstract The buffer's number of interleaved channels. @discussion Useful in conjunction with floatChannelData etc.

type AVAudioPlayer

type AVAudioPlayer struct {
	foundation.NSObject
}

Apple documentation: https://developer.apple.com/documentation/avfaudio/avaudioplayer

func AVAudioPlayerFromID

func AVAudioPlayerFromID(id objc.ID) *AVAudioPlayer

func (*AVAudioPlayer) AveragePowerForChannel

func (o *AVAudioPlayer) AveragePowerForChannel(channelNumber uint) float32

func (*AVAudioPlayer) CurrentDevice

func (o *AVAudioPlayer) CurrentDevice() *foundation.NSString

func (*AVAudioPlayer) CurrentTime

func (o *AVAudioPlayer) CurrentTime() float64

func (*AVAudioPlayer) Data

func (o *AVAudioPlayer) Data() *foundation.NSData

func (*AVAudioPlayer) Delegate

func (o *AVAudioPlayer) Delegate() AVAudioPlayerDelegate

func (*AVAudioPlayer) DeviceCurrentTime

func (o *AVAudioPlayer) DeviceCurrentTime() float64

func (*AVAudioPlayer) Duration

func (o *AVAudioPlayer) Duration() float64

func (*AVAudioPlayer) EnableRate

func (o *AVAudioPlayer) EnableRate() bool

func (*AVAudioPlayer) Format

func (o *AVAudioPlayer) Format() *AVAudioFormat

func (*AVAudioPlayer) InitWithContentsOfURLError

func (o *AVAudioPlayer) InitWithContentsOfURLError(url *foundation.NSURL) (*AVAudioPlayer, error)

func (*AVAudioPlayer) InitWithContentsOfURLFileTypeHintError

func (o *AVAudioPlayer) InitWithContentsOfURLFileTypeHintError(url *foundation.NSURL, utiString *foundation.NSString) (*AVAudioPlayer, error)

func (*AVAudioPlayer) InitWithDataError

func (o *AVAudioPlayer) InitWithDataError(data *foundation.NSData) (*AVAudioPlayer, error)

func (*AVAudioPlayer) InitWithDataFileTypeHintError

func (o *AVAudioPlayer) InitWithDataFileTypeHintError(data *foundation.NSData, utiString *foundation.NSString) (*AVAudioPlayer, error)

func (*AVAudioPlayer) IsMeteringEnabled

func (o *AVAudioPlayer) IsMeteringEnabled() bool

func (*AVAudioPlayer) IsPlaying

func (o *AVAudioPlayer) IsPlaying() bool

func (*AVAudioPlayer) NumberOfChannels

func (o *AVAudioPlayer) NumberOfChannels() uint

func (*AVAudioPlayer) NumberOfLoops

func (o *AVAudioPlayer) NumberOfLoops() int

func (*AVAudioPlayer) Pan

func (o *AVAudioPlayer) Pan() float32

func (*AVAudioPlayer) Pause

func (o *AVAudioPlayer) Pause()

func (*AVAudioPlayer) PeakPowerForChannel

func (o *AVAudioPlayer) PeakPowerForChannel(channelNumber uint) float32

func (*AVAudioPlayer) Play

func (o *AVAudioPlayer) Play() bool

func (*AVAudioPlayer) PlayAtTime

func (o *AVAudioPlayer) PlayAtTime(time_ float64) bool

func (*AVAudioPlayer) PrepareToPlay

func (o *AVAudioPlayer) PrepareToPlay() bool

func (*AVAudioPlayer) Rate

func (o *AVAudioPlayer) Rate() float32

func (*AVAudioPlayer) SetCurrentDevice

func (o *AVAudioPlayer) SetCurrentDevice(currentDevice *foundation.NSString)

func (*AVAudioPlayer) SetCurrentTime

func (o *AVAudioPlayer) SetCurrentTime(currentTime float64)

func (*AVAudioPlayer) SetDelegate

func (o *AVAudioPlayer) SetDelegate(delegate AVAudioPlayerDelegate)

func (*AVAudioPlayer) SetEnableRate

func (o *AVAudioPlayer) SetEnableRate(enableRate bool)

func (*AVAudioPlayer) SetMeteringEnabled

func (o *AVAudioPlayer) SetMeteringEnabled(meteringEnabled bool)

func (*AVAudioPlayer) SetNumberOfLoops

func (o *AVAudioPlayer) SetNumberOfLoops(numberOfLoops int)

func (*AVAudioPlayer) SetPan

func (o *AVAudioPlayer) SetPan(pan float32)

func (*AVAudioPlayer) SetRate

func (o *AVAudioPlayer) SetRate(rate float32)

func (*AVAudioPlayer) SetVolume

func (o *AVAudioPlayer) SetVolume(volume float32)

func (*AVAudioPlayer) SetVolumeFadeDuration

func (o *AVAudioPlayer) SetVolumeFadeDuration(volume float32, duration float64)

func (*AVAudioPlayer) Settings

func (*AVAudioPlayer) Stop

func (o *AVAudioPlayer) Stop()

func (*AVAudioPlayer) UpdateMeters

func (o *AVAudioPlayer) UpdateMeters()

func (*AVAudioPlayer) Url

func (o *AVAudioPlayer) Url() *foundation.NSURL

func (*AVAudioPlayer) Volume

func (o *AVAudioPlayer) Volume() float32

type AVAudioPlayerDelegate

type AVAudioPlayerDelegate interface {
}

AVAudioPlayerDelegate wraps the ObjC protocol AVAudioPlayerDelegate.

type AVAudioPlayerNode

type AVAudioPlayerNode struct {
	AVAudioNode
}

Apple documentation: https://developer.apple.com/documentation/avfaudio/avaudioplayernode

func AVAudioPlayerNodeFromID

func AVAudioPlayerNodeFromID(id objc.ID) *AVAudioPlayerNode

func (*AVAudioPlayerNode) Init

func (*AVAudioPlayerNode) IsPlaying

func (o *AVAudioPlayerNode) IsPlaying() bool

func (*AVAudioPlayerNode) NodeTimeForPlayerTime

func (o *AVAudioPlayerNode) NodeTimeForPlayerTime(playerTime *AVAudioTime) *AVAudioTime

@method nodeTimeForPlayerTime: @abstract Convert from player time to node time. @param playerTime a time relative to the player's start time @return a node time @discussion This method and its inverse `playerTimeForNodeTime:` are discussed in the introduction to this class. If the player is not playing when this method is called, nil is returned.

func (*AVAudioPlayerNode) Pause

func (o *AVAudioPlayerNode) Pause()

@method pause @abstract Pause playback. @discussion The player's sample time does not advance while the node is paused. Note that pausing or stopping all the players connected to an engine does not pause or stop the engine or the underlying hardware. The engine must be explicitly paused or stopped for the hardware to stop.

func (*AVAudioPlayerNode) Play

func (o *AVAudioPlayerNode) Play()

@method play @abstract Start or resume playback immediately. @discussion equivalent to playAtTime:nil

func (*AVAudioPlayerNode) PlayAtTime

func (o *AVAudioPlayerNode) PlayAtTime(when *AVAudioTime)

@method playAtTime: @abstract Start or resume playback at a specific time. @param when the node time at which to start or resume playback. nil signifies "now". @discussion This node is initially paused. Requests to play buffers or file segments are enqueued, and any necessary decoding begins immediately. Playback does not begin, however, until the player has started playing, via this method. Note that providing an AVAudioTime which is past (before lastRenderTime) will cause the player to begin playback immediately. E.g. To start a player X seconds in future: <pre> // start engine and player NSError *nsErr = nil; [_engine startAndReturnError:&nsErr]; if (!nsErr) { const float kStartDelayTime = 0.5; // sec AVAudioFormat *outputFormat = [_player outputFormatForBus:0]; AVAudioFramePosition startSampleTime = _player.lastRenderTime.sampleTime + kStartDelayTime * outputFormat.sampleRate; AVAudioTime *startTime = [AVAudioTime timeWithSampleTime:startSampleTime atRate:outputFormat.sampleRate]; [_player playAtTime:startTime]; } </pre>

func (*AVAudioPlayerNode) PlayerTimeForNodeTime

func (o *AVAudioPlayerNode) PlayerTimeForNodeTime(nodeTime *AVAudioTime) *AVAudioTime

@method playerTimeForNodeTime: @abstract Convert from node time to player time. @param nodeTime a node time @return a time relative to the player's start time @discussion This method and its inverse `nodeTimeForPlayerTime:` are discussed in the introduction to this class. If the player is not playing when this method is called, nil is returned.

func (*AVAudioPlayerNode) PrepareWithFrameCount

func (o *AVAudioPlayerNode) PrepareWithFrameCount(frameCount uint32)

@method prepareWithFrameCount: @abstract Prepares previously scheduled file regions or buffers for playback. @param frameCount The number of sample frames of data to be prepared before returning.

func (*AVAudioPlayerNode) ScheduleBufferAtTimeOptionsCompletionCallbackTypeCompletionHandler

func (o *AVAudioPlayerNode) ScheduleBufferAtTimeOptionsCompletionCallbackTypeCompletionHandler(buffer *AVAudioPCMBuffer, when *AVAudioTime, options AVAudioPlayerNodeBufferOptions, callbackType AVAudioPlayerNodeCompletionCallbackType, completionHandler func(AVAudioPlayerNodeCompletionCallbackType))

@method scheduleBuffer:atTime:options:completionCallbackType:completionHandler: @abstract Schedule playing samples from an AVAudioBuffer. @param buffer the buffer to play @param when the time at which to play the buffer. see the discussion of timestamps, above. @param options options for looping, interrupting other buffers, etc. @param callbackType option to specify when the completion handler must be called @param completionHandler called after the buffer has been consumed by the player or has finished playing back or the player is stopped. may be nil.

func (*AVAudioPlayerNode) ScheduleBufferAtTimeOptionsCompletionHandler

func (o *AVAudioPlayerNode) ScheduleBufferAtTimeOptionsCompletionHandler(buffer *AVAudioPCMBuffer, when *AVAudioTime, options AVAudioPlayerNodeBufferOptions, completionHandler func())

@method scheduleBuffer:atTime:options:completionHandler: @abstract Schedule playing samples from an AVAudioBuffer. @param buffer the buffer to play @param when the time at which to play the buffer. see the discussion of timestamps, above. @param options options for looping, interrupting other buffers, etc. @param completionHandler called after the buffer has been consumed by the player or the player is stopped. may be nil. @discussion It is possible for the completionHandler to be called before rendering begins or before the buffer is played completely.

func (*AVAudioPlayerNode) ScheduleBufferCompletionCallbackTypeCompletionHandler

func (o *AVAudioPlayerNode) ScheduleBufferCompletionCallbackTypeCompletionHandler(buffer *AVAudioPCMBuffer, callbackType AVAudioPlayerNodeCompletionCallbackType, completionHandler func(AVAudioPlayerNodeCompletionCallbackType))

@method scheduleBuffer:completionCallbackType:completionHandler: @abstract Schedule playing samples from an AVAudioBuffer. @param buffer the buffer to play @param callbackType option to specify when the completion handler must be called @param completionHandler called after the buffer has been consumed by the player or has finished playing back or the player is stopped. may be nil. @discussion Schedules the buffer to be played following any previously scheduled commands.

func (*AVAudioPlayerNode) ScheduleBufferCompletionHandler

func (o *AVAudioPlayerNode) ScheduleBufferCompletionHandler(buffer *AVAudioPCMBuffer, completionHandler func())

@method scheduleBuffer:completionHandler: @abstract Schedule playing samples from an AVAudioBuffer. @param buffer the buffer to play @param completionHandler called after the buffer has been consumed by the player or the player is stopped. may be nil. @discussion Schedules the buffer to be played following any previously scheduled commands. It is possible for the completionHandler to be called before rendering begins or before the buffer is played completely.

func (*AVAudioPlayerNode) ScheduleFileAtTimeCompletionCallbackTypeCompletionHandler

func (o *AVAudioPlayerNode) ScheduleFileAtTimeCompletionCallbackTypeCompletionHandler(file *AVAudioFile, when *AVAudioTime, callbackType AVAudioPlayerNodeCompletionCallbackType, completionHandler func(AVAudioPlayerNodeCompletionCallbackType))

@method scheduleFile:atTime:completionCallbackType:completionHandler: @abstract Schedule playing of an entire audio file. @param file the file to play @param when the time at which to play the file. see the discussion of timestamps, above. @param callbackType option to specify when the completion handler must be called @param completionHandler called after the file has been consumed by the player or has finished playing back or the player is stopped. may be nil.

func (*AVAudioPlayerNode) ScheduleFileAtTimeCompletionHandler

func (o *AVAudioPlayerNode) ScheduleFileAtTimeCompletionHandler(file *AVAudioFile, when *AVAudioTime, completionHandler func())

@method scheduleFile:atTime:completionHandler: @abstract Schedule playing of an entire audio file. @param file the file to play @param when the time at which to play the file. see the discussion of timestamps, above. @param completionHandler called after the file has been consumed by the player or the player is stopped. may be nil. @discussion It is possible for the completionHandler to be called before rendering begins or before the file is played completely.

func (*AVAudioPlayerNode) ScheduleSegmentStartingFrameFrameCountAtTimeCompletionCallbackTypeCompletionHandler

func (o *AVAudioPlayerNode) ScheduleSegmentStartingFrameFrameCountAtTimeCompletionCallbackTypeCompletionHandler(file *AVAudioFile, startFrame int64, numberFrames uint32, when *AVAudioTime, callbackType AVAudioPlayerNodeCompletionCallbackType, completionHandler func(AVAudioPlayerNodeCompletionCallbackType))

@method scheduleSegment:startingFrame:frameCount:atTime:completionCallbackType:completionHandler: @abstract Schedule playing a segment of an audio file. @param file the file to play @param startFrame the starting frame position in the stream @param numberFrames the number of frames to play @param when the time at which to play the region. see the discussion of timestamps, above. @param callbackType option to specify when the completion handler must be called @param completionHandler called after the segment has been consumed by the player or has finished playing back or the player is stopped. may be nil.

func (*AVAudioPlayerNode) ScheduleSegmentStartingFrameFrameCountAtTimeCompletionHandler

func (o *AVAudioPlayerNode) ScheduleSegmentStartingFrameFrameCountAtTimeCompletionHandler(file *AVAudioFile, startFrame int64, numberFrames uint32, when *AVAudioTime, completionHandler func())

@method scheduleSegment:startingFrame:frameCount:atTime:completionHandler: @abstract Schedule playing a segment of an audio file. @param file the file to play @param startFrame the starting frame position in the stream @param numberFrames the number of frames to play @param when the time at which to play the region. see the discussion of timestamps, above. @param completionHandler called after the segment has been consumed by the player or the player is stopped. may be nil. @discussion It is possible for the completionHandler to be called before rendering begins or before the segment is played completely.

func (*AVAudioPlayerNode) Stop

func (o *AVAudioPlayerNode) Stop()

@method stop @abstract Clear all of the node's previously scheduled events and stop playback. @discussion All of the node's previously scheduled events are cleared, including any that are in the middle of playing. The node's sample time (and therefore the times to which new events are to be scheduled) is reset to 0, and will not proceed until the node is started again (via play or playAtTime). Note that pausing or stopping all the players connected to an engine does not pause or stop the engine or the underlying hardware. The engine must be explicitly paused or stopped for the hardware to stop.

type AVAudioPlayerNodeBufferOptions

type AVAudioPlayerNodeBufferOptions uint64
const (
	AVAudioPlayerNodeBufferLoops            AVAudioPlayerNodeBufferOptions = 1
	AVAudioPlayerNodeBufferInterrupts       AVAudioPlayerNodeBufferOptions = 2
	AVAudioPlayerNodeBufferInterruptsAtLoop AVAudioPlayerNodeBufferOptions = 4
)

func (AVAudioPlayerNodeBufferOptions) String

type AVAudioPlayerNodeCompletionCallbackType

type AVAudioPlayerNodeCompletionCallbackType int64
const (
	AVAudioPlayerNodeCompletionDataConsumed   AVAudioPlayerNodeCompletionCallbackType = 0
	AVAudioPlayerNodeCompletionDataRendered   AVAudioPlayerNodeCompletionCallbackType = 1
	AVAudioPlayerNodeCompletionDataPlayedBack AVAudioPlayerNodeCompletionCallbackType = 2
)

func (AVAudioPlayerNodeCompletionCallbackType) String

type AVAudioQuality

type AVAudioQuality int64
const (
	AVAudioQualityMin    AVAudioQuality = 0
	AVAudioQualityLow    AVAudioQuality = 32
	AVAudioQualityMedium AVAudioQuality = 64
	AVAudioQualityHigh   AVAudioQuality = 96
	AVAudioQualityMax    AVAudioQuality = 127
)

func (AVAudioQuality) String

func (e AVAudioQuality) String() string

type AVAudioRecorder

type AVAudioRecorder struct {
	foundation.NSObject
}

Apple documentation: https://developer.apple.com/documentation/avfaudio/avaudiorecorder

func AVAudioRecorderFromID

func AVAudioRecorderFromID(id objc.ID) *AVAudioRecorder

func (*AVAudioRecorder) AveragePowerForChannel

func (o *AVAudioRecorder) AveragePowerForChannel(channelNumber uint) float32

@method averagePowerForChannel: @abstract Returns average power in decibels for a given channel.

func (*AVAudioRecorder) CurrentTime

func (o *AVAudioRecorder) CurrentTime() float64

@property currentTime @abstract Get the current time of the recording. @discussion This method is only vaild while recording.

func (*AVAudioRecorder) Delegate

@property delegate @abstract A delegate object to the AudioRecorder that conforms to the AVAudioRecorderDelegate protocol.

func (*AVAudioRecorder) DeleteRecording

func (o *AVAudioRecorder) DeleteRecording() bool

@method deleteRecording @abstract Delete the recorded file. @discussion AudioRecorder must be stopped. Returns YES on success and NO on failure.

func (*AVAudioRecorder) DeviceCurrentTime

func (o *AVAudioRecorder) DeviceCurrentTime() float64

@property deviceCurrentTime @abstract Get the device current time. @discussion This method is always valid.

func (*AVAudioRecorder) Format

func (o *AVAudioRecorder) Format() *AVAudioFormat

@property format @abstract The audio format of the AudioRecorder. @discussion This property is fully valid only when prepareToRecord has been called.

func (*AVAudioRecorder) InitWithURLFormatError

func (o *AVAudioRecorder) InitWithURLFormatError(url *foundation.NSURL, format *AVAudioFormat) (*AVAudioRecorder, error)

@method initWithURL:format:error: @abstract Init the AudioRecorder with a specified url and format. @discussion The file type to create can be set through the corresponding settings key. If not set, it will be inferred from the file extension. Will overwrite a file at the specified url if a file exists.

func (*AVAudioRecorder) InitWithURLSettingsError

func (o *AVAudioRecorder) InitWithURLSettingsError(url *foundation.NSURL, settings *foundation.NSDictionary[*foundation.NSString, objc.ID]) (*AVAudioRecorder, error)

@method initWithURL:settings:error: @abstract Init the AudioRecorder with a specified url and settings. @discussion The file type to create can be set through the corresponding settings key. If not set, it will be inferred from the file extension. Will overwrite a file at the specified url if a file exists.

func (*AVAudioRecorder) IsMeteringEnabled

func (o *AVAudioRecorder) IsMeteringEnabled() bool

@property meteringEnabled @abstract Turns level metering on or off. @discussion Default is off.

func (*AVAudioRecorder) IsRecording

func (o *AVAudioRecorder) IsRecording() bool

@property recording @abstract Returns YES if the AudioRecorder is currently recording.

func (*AVAudioRecorder) Pause

func (o *AVAudioRecorder) Pause()

@method pause @abstract Pause recording.

func (*AVAudioRecorder) PeakPowerForChannel

func (o *AVAudioRecorder) PeakPowerForChannel(channelNumber uint) float32

@method peakPowerForChannel: @abstract Returns peak power in decibels for a given channel.

func (*AVAudioRecorder) PrepareToRecord

func (o *AVAudioRecorder) PrepareToRecord() bool

@method prepareToRecord @abstract Creates the output file and gets ready to record. @discussion This method is called automatically on record. Returns YES on success and NO on failure.

func (*AVAudioRecorder) Record

func (o *AVAudioRecorder) Record() bool

@method record @abstract Start or resume recording to file. @discussion Returns YES on success and NO on failure.

func (*AVAudioRecorder) RecordAtTime

func (o *AVAudioRecorder) RecordAtTime(time_ float64) bool

@method recordAtTime: @abstract Start recording at specified time in the future. @discussion Time is an absolute time based on and greater than deviceCurrentTime. Returns YES on success and NO on failure.

func (*AVAudioRecorder) RecordAtTimeForDuration

func (o *AVAudioRecorder) RecordAtTimeForDuration(time_ float64, duration float64) bool

@method recordAtTime:forDuration: @abstract Record for a specified duration at a specified time in the future. @discussion Time is an absolute time based on and greater than deviceCurrentTime. Returns YES on success and NO on failure.

func (*AVAudioRecorder) RecordForDuration

func (o *AVAudioRecorder) RecordForDuration(duration float64) bool

@method recordForDuration: @abstract Record for a specified duration. @discussion The recorder will stop when it has recorded this length of audio. Returns YES on success and NO on failure.

func (*AVAudioRecorder) SetDelegate

func (o *AVAudioRecorder) SetDelegate(delegate AVAudioRecorderDelegate)

func (*AVAudioRecorder) SetMeteringEnabled

func (o *AVAudioRecorder) SetMeteringEnabled(meteringEnabled bool)

func (*AVAudioRecorder) Settings

@property settings @abstract A dictionary of settings for the AudioRecorder. @discussion These settings are fully valid only when prepareToRecord has been called. For supported key-value pairs, see https://developer.apple.com/documentation/avfaudio/avaudiorecorder/1388386-initwithurl?language=objc

func (*AVAudioRecorder) Stop

func (o *AVAudioRecorder) Stop()

@method stop @abstract Stop recording. @discussion This method also closes the output file.

func (*AVAudioRecorder) UpdateMeters

func (o *AVAudioRecorder) UpdateMeters()

@method updateMeters @abstract Call this method to refresh meter values.

func (*AVAudioRecorder) Url

func (o *AVAudioRecorder) Url() *foundation.NSURL

@property url @abstract URL of the recorded file.

type AVAudioRecorderDelegate

type AVAudioRecorderDelegate interface {
}

AVAudioRecorderDelegate wraps the ObjC protocol AVAudioRecorderDelegate.

type AVAudioRoutingArbiter

type AVAudioRoutingArbiter struct {
	foundation.NSObject
}

Apple documentation: https://developer.apple.com/documentation/avfaudio/avaudioroutingarbiter

func AVAudioRoutingArbiterFromID

func AVAudioRoutingArbiterFromID(id objc.ID) *AVAudioRoutingArbiter

func AVAudioRoutingArbiterSharedRoutingArbiter

func AVAudioRoutingArbiterSharedRoutingArbiter() *AVAudioRoutingArbiter

@property sharedRoutingArbiter @abstract Returns the singleton AVAudioRoutingArbiter instance.

func (*AVAudioRoutingArbiter) BeginArbitrationWithCategoryCompletionHandler

func (o *AVAudioRoutingArbiter) BeginArbitrationWithCategoryCompletionHandler(category AVAudioRoutingArbitrationCategory, handler func(bool, unsafe.Pointer))

@method beginArbitrationWithCategory:completionHandler: @abstract Begin routing arbitration to take ownership of nearby Bluetooth audio routes. @discussion When an app wants to participate in automatic audio arbitration for the wireless headphones route, it has to begin arbitration specifying its arbitration session category. It provides the operating system time to arbitrate with other nearby Apple devices to obtain ownership of supported Bluetooth audio devices. Then upon completion of arbitration, the operating system will automatically determine whether to route audio to the nearby Bluetooth device. Once arbitration completes, the application is free to start running audio I/O. I/O will be started upon the app request even if the -beginArbitrationWithCategory:completionHandler: fails. This method should also be used whenever restarting audio I/O in order to allow the system to arbitrate for ownership of a Bluetooth device that may have been taken by another nearby Apple device during the time that I/O was stopped. @param category The category describes the general type of audio that the app plans to use. @param handler A client-supplied block called asynchronously when audio routing arbitration is completed. This completion handler takes the following parameters: defaultDeviceChanged Indicating that the system default audio device has been changed as a result of the arbitration operation. error An error object that indicates why the request failed, or nil if the request was successful.

func (*AVAudioRoutingArbiter) LeaveArbitration

func (o *AVAudioRoutingArbiter) LeaveArbitration()

@method leaveArbitration @abstract Stop participating in audio routing arbitration. @discussion When an application has stopped using audio for the foreseeable future, it should notify the system. For example, in Voice over IP (VoIP) use cases, the application should call -leaveArbitration when the VoIP call has ended. This allows the system to make a better decision when other participating Apple devices would like to take ownership of a nearby Bluetooth device. Applications should not call this API in cases where audio is only momentarily paused.

type AVAudioRoutingArbitrationCategory

type AVAudioRoutingArbitrationCategory int64
const (
	AVAudioRoutingArbitrationCategoryPlayback           AVAudioRoutingArbitrationCategory = 0
	AVAudioRoutingArbitrationCategoryPlayAndRecord      AVAudioRoutingArbitrationCategory = 1
	AVAudioRoutingArbitrationCategoryPlayAndRecordVoice AVAudioRoutingArbitrationCategory = 2
)

func (AVAudioRoutingArbitrationCategory) String

type AVAudioSequencer

type AVAudioSequencer struct {
	foundation.NSObject
}

Apple documentation: https://developer.apple.com/documentation/avfaudio/avaudiosequencer

func AVAudioSequencerFromID

func AVAudioSequencerFromID(id objc.ID) *AVAudioSequencer

func (*AVAudioSequencer) BeatsForHostTimeError

func (o *AVAudioSequencer) BeatsForHostTimeError(inHostTime uint64) (float64, error)

@method beatsForHostTime:error: @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 0 with an error if the player is not playing or if the starting time of the player was after the specified host time. The method uses the sequence's tempo map to retrieve a beat time from the starting and specified host time.

func (*AVAudioSequencer) BeatsForSeconds

func (o *AVAudioSequencer) BeatsForSeconds(seconds float64) float64

@method beatsForSeconds: @abstract Get the beat position (timestamp) for the given time in the AVMusicTrack

func (*AVAudioSequencer) CreateAndAppendTrack

func (o *AVAudioSequencer) CreateAndAppendTrack() *AVMusicTrack

@method createAndAppendTrack: @abstract Create a new AVMusicTrack and append it to the AVMusicSequencer's list

func (*AVAudioSequencer) CurrentPositionInBeats

func (o *AVAudioSequencer) CurrentPositionInBeats() float64

@property currentPositionInBeats @abstract The current playback position in beats @discussion Setting this positions the sequencer's player to the specified beat. This can be set while the player is playing, in which case playback will resume at the new position.

func (*AVAudioSequencer) CurrentPositionInSeconds

func (o *AVAudioSequencer) CurrentPositionInSeconds() float64

@property currentPositionInSeconds @abstract The current playback position in seconds @discussion Setting this positions the sequencer's player to the specified time. This can be set while the player is playing, in which case playback will resume at the new position.

func (*AVAudioSequencer) DataWithSMPTEResolutionError

func (o *AVAudioSequencer) DataWithSMPTEResolutionError(sMPTEResolution int) (*foundation.NSData, error)

@method dataWithSMPTEResolution:error: @abstract Return a data object containing the events from the sequence @discussion All details regarding the SMPTE resolution apply here as well. The returned NSData lifetime is controlled by the client.

func (*AVAudioSequencer) HostTimeForBeatsError

func (o *AVAudioSequencer) HostTimeForBeatsError(inBeats float64) (uint64, error)

@method hostTimeForBeats:error: @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 0 with an error if the player is not playing or if the starting position of the player (its "starting beat") was after the specified beat. The method uses the sequence's tempo map to translate a beat time from the starting time and beat of the player.

func (*AVAudioSequencer) Init

@method init @abstract Initialize a new sequencer, which will not be connected to an audio engine. @discussion This is used to create a sequencer whose tracks will only send events to external MIDI endpoints.

func (*AVAudioSequencer) InitWithAudioEngine

func (o *AVAudioSequencer) InitWithAudioEngine(engine *AVAudioEngine) *AVAudioSequencer

@method initWithAudioEngine: @abstract Initialize a new sequencer, handing it the audio engine.

func (*AVAudioSequencer) IsPlaying

func (o *AVAudioSequencer) IsPlaying() bool

@property playing @abstract Indicates whether or not the sequencer's player is playing @discussion Returns TRUE if the sequencer's player has been started and not stopped. It may have "played" past the end of the events in the sequence, but it is still considered to be playing (and its time value increasing) until it is explicitly stopped.

func (*AVAudioSequencer) LoadFromDataOptionsError

func (o *AVAudioSequencer) LoadFromDataOptionsError(data *foundation.NSData, options AVMusicSequenceLoadOptions) (bool, error)

@method loadFromData:options:error: @abstract Parse the data and add the its events to the sequence @param data the data to load from @param options determines how the contents are mapped to tracks inside the sequence @param outError on exit, if an error occurs, a description of the error

func (*AVAudioSequencer) LoadFromURLOptionsError

func (o *AVAudioSequencer) LoadFromURLOptionsError(fileURL *foundation.NSURL, options AVMusicSequenceLoadOptions) (bool, error)

@method loadFromURL:options:error: @abstract Load the file referenced by the URL and add the events to the sequence @param fileURL the URL to the file @param options determines how the file's contents are mapped to tracks inside the sequence @param outError on exit, if an error occurs, a description of the error

func (*AVAudioSequencer) PrepareToPlay

func (o *AVAudioSequencer) PrepareToPlay()

@method prepareToPlay @abstract Get ready to play the sequence by prerolling all events @discussion Happens automatically on play if it has not already been called, but may produce a delay in startup.

func (*AVAudioSequencer) Rate

func (o *AVAudioSequencer) Rate() float32

@property rate @abstract The playback rate of the sequencer's player @discussion 1.0 is normal playback rate. Rate must be > 0.0.

func (*AVAudioSequencer) RemoveTrack

func (o *AVAudioSequencer) RemoveTrack(track *AVMusicTrack) bool

@method removeTrack: @abstract Remove the given AVMusicTrack from the AVMusicSequencer. @discussion This does not destroy the AVMusicTrack because it may be re-used.

func (*AVAudioSequencer) ReverseEvents

func (o *AVAudioSequencer) ReverseEvents()

@method reverseEvents: @abstract Reverse the order of all events in all AVMusicTracks, including the tempo track

func (*AVAudioSequencer) SecondsForBeats

func (o *AVAudioSequencer) SecondsForBeats(beats float64) float64

@method secondsForBeats: @abstract Get the time in seconds for the given beat position (timestamp) in the AVMusicTrack

func (*AVAudioSequencer) SetCurrentPositionInBeats

func (o *AVAudioSequencer) SetCurrentPositionInBeats(currentPositionInBeats float64)

func (*AVAudioSequencer) SetCurrentPositionInSeconds

func (o *AVAudioSequencer) SetCurrentPositionInSeconds(currentPositionInSeconds float64)

func (*AVAudioSequencer) SetRate

func (o *AVAudioSequencer) SetRate(rate float32)

func (*AVAudioSequencer) SetUserCallback

func (o *AVAudioSequencer) SetUserCallback(userCallback func(*AVMusicTrack, *foundation.NSData, float64))

@method setUserCallback: @abstract Add a block which will be called each time the AVAudioSequencer encounters an AVMusicUserEvent during playback. @discussion The same callback is called for events which occur on any track in the sequencer. Set the block to nil to disable it.

func (*AVAudioSequencer) StartAndReturnError

func (o *AVAudioSequencer) StartAndReturnError() (bool, error)

@method startAndReturnError: @abstract Start the sequencer's player @discussion If the AVAudioSequencer has not been prerolled, it will pre-roll itself and then start. When the sequencer is associated with an audio engine, the sequencer's player will only play if the audio engine is running.

func (*AVAudioSequencer) Stop

func (o *AVAudioSequencer) Stop()

@method stop @abstract Stop the sequencer's player @discussion Stopping the player leaves it in an un-prerolled state, but stores the playback position so that a subsequent call to startAndReturnError will resume where it left off. This action will not stop an associated audio engine.

func (*AVAudioSequencer) TempoTrack

func (o *AVAudioSequencer) TempoTrack() *AVMusicTrack

@property tempoTrack @abstract The tempo track @discussion Each AVMusicSequence has a single tempo track. All tempo events read from external MIDI files are placed into this track (as well as other appropriate events (e.g., the time signature meta event from the file). The tempo track can be edited and iterated upon as any other track. Non-tempo-related events will generate exceptions if added.

func (*AVAudioSequencer) Tracks

@property tracks @abstract An NSArray containing all the AVMusicTracks in the sequence @discussion This list will not include the tempo track.

func (*AVAudioSequencer) UserInfo

@property userInfo @abstract A dictionary containing meta-data derived from a sequence @discussion The dictionary can contain one or more of the values accessible via the AVAudioSequencerInfoDictionaryKeys.

func (*AVAudioSequencer) WriteToURLSMPTEResolutionReplaceExistingError

func (o *AVAudioSequencer) WriteToURLSMPTEResolutionReplaceExistingError(fileURL *foundation.NSURL, resolution int, replace bool) (bool, error)

@method writeToURL:SMPTEResolution:replaceExisting:error: @abstract Create and write a MIDI file containing the events and complete state of the sequence @param fileURL the path for the file to be created @param resolution the relationship between "tick" and quarter note for saving to a Standard MIDI File - pass in zero to use default - this will be the value that is currently set on the tempo track @param replace if the file already exists, YES will cause it to be overwritten with the new data. Otherwise the call will fail with a permission error. @param outError on exit, if an error occurs, a description of the error @discussion A MIDI file saved via this method will contain not only the complete MIDI content of the sequence, but also the state of all tracks, including muting, loop points and enablement, etc. It will also contain all non-MIDI AVMusicEvent types which had been added to the sequence's track. MIDI files are normally beat based, but can also have a SMPTE (or real-time rather than beat time) representation. The 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

type AVAudioSessionActivationOptions

type AVAudioSessionActivationOptions uint64
const (
	AVAudioSessionActivationOptionNone AVAudioSessionActivationOptions = 0
)

func (AVAudioSessionActivationOptions) String

type AVAudioSessionCapability

type AVAudioSessionCapability struct {
	foundation.NSObject
}

Apple documentation: https://developer.apple.com/documentation/avfaudio/avaudiosessioncapability

func AVAudioSessionCapabilityFromID

func AVAudioSessionCapabilityFromID(id objc.ID) *AVAudioSessionCapability

func (*AVAudioSessionCapability) IsEnabled

func (o *AVAudioSessionCapability) IsEnabled() bool

A Boolean value that indicates whether the capability is enabled.

func (*AVAudioSessionCapability) IsSupported

func (o *AVAudioSessionCapability) IsSupported() bool

A Boolean value that indicates whether the capability is supported.

type AVAudioSessionCategoryOptions

type AVAudioSessionCategoryOptions uint64
const (
	// Controls whether other active audio apps will be interrupted or mixed with when your app's audio session goes active. Details depend on the category. - “AVAudioSessionCategoryPlayAndRecord“ or “AVAudioSessionCategoryMultiRoute“ with “AVAudioSessionModeDefault“: MixWithOthers defaults to false, but can be set to true, allowing other applications to play in the background while your app has both audio input and output enabled. - “AVAudioSessionCategoryPlayback“: MixWithOthers defaults to false, but can be set to true, allowing other applications to play in the background. Your app will still be able to play regardless of the setting of the ringer switch. - Other categories: MixWithOthers defaults to false and cannot be changed. MixWithOthers is only valid with “AVAudioSessionCategoryPlayAndRecord“, “AVAudioSessionCategoryPlayback“, and “AVAudioSessionCategoryMultiRoute“ with “AVAudioSessionModeDefault“.
	AVAudioSessionCategoryOptionMixWithOthers AVAudioSessionCategoryOptions = 1
	// Controls whether or not other active audio apps will be ducked when when your app's audio session goes active. An example of this is a workout app, which provides periodic updates to the user. It reduces the volume of any music currently being played while it provides its status. Defaults to off. 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 to restore full volume playback (un-duck) other sessions. Setting this option will also make your session mixable with others (“AVAudioSessionCategoryOptionMixWithOthers“ will be set). DuckOthers is only valid with “AVAudioSessionCategoryAmbient“, “AVAudioSessionCategoryPlayAndRecord“, “AVAudioSessionCategoryPlayback“, and “AVAudioSessionCategoryMultiRoute“ with “AVAudioSessionModeDefault“.
	AVAudioSessionCategoryOptionDuckOthers AVAudioSessionCategoryOptions = 2
)

func (AVAudioSessionCategoryOptions) String

type AVAudioSessionIOType

type AVAudioSessionIOType uint64
const (
	AVAudioSessionIOTypeNotSpecified AVAudioSessionIOType = 0
	AVAudioSessionIOTypeAggregated   AVAudioSessionIOType = 1
)

func (AVAudioSessionIOType) String

func (e AVAudioSessionIOType) String() string

type AVAudioSessionInterruptionOptions

type AVAudioSessionInterruptionOptions uint64
const (
	// Indicates that you should resume playback now that the interruption has ended.
	AVAudioSessionInterruptionOptionShouldResume AVAudioSessionInterruptionOptions = 1
)

func (AVAudioSessionInterruptionOptions) String

type AVAudioSessionInterruptionReason

type AVAudioSessionInterruptionReason uint64
const (
	AVAudioSessionInterruptionReasonDefault         AVAudioSessionInterruptionReason = 0
	AVAudioSessionInterruptionReasonAppWasSuspended AVAudioSessionInterruptionReason = 1
	AVAudioSessionInterruptionReasonBuiltInMicMuted AVAudioSessionInterruptionReason = 2
)

func (AVAudioSessionInterruptionReason) String

type AVAudioSessionInterruptionType

type AVAudioSessionInterruptionType uint64
const (
	AVAudioSessionInterruptionTypeBegan AVAudioSessionInterruptionType = 1
	AVAudioSessionInterruptionTypeEnded AVAudioSessionInterruptionType = 0
)

func (AVAudioSessionInterruptionType) String

type AVAudioSessionMicrophoneInjectionMode

type AVAudioSessionMicrophoneInjectionMode int64
const (
	// Default state, microphone injection is not preferred
	AVAudioSessionMicrophoneInjectionModeNone AVAudioSessionMicrophoneInjectionMode = 0
	// Inject Spoken Audio, like synthesized speech, with microphone audio
	AVAudioSessionMicrophoneInjectionModeSpokenAudio AVAudioSessionMicrophoneInjectionMode = 1
)

func (AVAudioSessionMicrophoneInjectionMode) String

type AVAudioSessionPortOverride

type AVAudioSessionPortOverride uint64
const (
	// No override.  Return audio routing to the default state for the current audio category.
	AVAudioSessionPortOverrideNone AVAudioSessionPortOverride = 0
)

func (AVAudioSessionPortOverride) String

type AVAudioSessionPromptStyle

type AVAudioSessionPromptStyle uint64
const (
	AVAudioSessionPromptStyleNone   AVAudioSessionPromptStyle = 1852796517
	AVAudioSessionPromptStyleShort  AVAudioSessionPromptStyle = 1936224884
	AVAudioSessionPromptStyleNormal AVAudioSessionPromptStyle = 1852992876
)

func (AVAudioSessionPromptStyle) String

func (e AVAudioSessionPromptStyle) String() string

type AVAudioSessionRecordPermission

type AVAudioSessionRecordPermission uint64

func (AVAudioSessionRecordPermission) String

type AVAudioSessionRenderingMode

type AVAudioSessionRenderingMode int64
const (
	// Default Mode when no asset is loaded or playing
	AVAudioSessionRenderingModeNotApplicable AVAudioSessionRenderingMode = 0
	// Default mode for non multi-channel cases
	AVAudioSessionRenderingModeMonoStereo AVAudioSessionRenderingMode = 1
	// Default mode for multi-channel cases that do not fall into the modes below
	AVAudioSessionRenderingModeSurround AVAudioSessionRenderingMode = 2
	// Fallback mode if provided content is Dolby variant but hardware capabilities don't support it
	AVAudioSessionRenderingModeSpatialAudio AVAudioSessionRenderingMode = 3
	// Dolby Audio mode
	AVAudioSessionRenderingModeDolbyAudio AVAudioSessionRenderingMode = 4
	// Dolby Atmos mode
	AVAudioSessionRenderingModeDolbyAtmos AVAudioSessionRenderingMode = 5
)

func (AVAudioSessionRenderingMode) String

type AVAudioSessionRouteChangeReason

type AVAudioSessionRouteChangeReason uint64
const (
	// The reason is unknown.
	AVAudioSessionRouteChangeReasonUnknown AVAudioSessionRouteChangeReason = 0
	// A new device became available (e.g. headphones have been plugged in).
	AVAudioSessionRouteChangeReasonNewDeviceAvailable AVAudioSessionRouteChangeReason = 1
	// The old device became unavailable (e.g. headphones have been unplugged).
	AVAudioSessionRouteChangeReasonOldDeviceUnavailable AVAudioSessionRouteChangeReason = 2
	// The audio category has changed (e.g. AVAudioSessionCategoryPlayback has been changed to AVAudioSessionCategoryPlayAndRecord).
	AVAudioSessionRouteChangeReasonCategoryChange AVAudioSessionRouteChangeReason = 3
	// The route has been overridden (e.g. category is AVAudioSessionCategoryPlayAndRecord and the output has been changed from the receiver, which is the default, to the speaker).
	AVAudioSessionRouteChangeReasonOverride AVAudioSessionRouteChangeReason = 4
	// The device woke from sleep.
	AVAudioSessionRouteChangeReasonWakeFromSleep AVAudioSessionRouteChangeReason = 6
	// Returned when there is no route for the current category (for instance, the category is AVAudioSessionCategoryRecord but no input device is available).
	AVAudioSessionRouteChangeReasonNoSuitableRouteForCategory AVAudioSessionRouteChangeReason = 7
	// 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. (Introduced in iOS 7.0, watchOS 2.0, tvOS 9.0).
	AVAudioSessionRouteChangeReasonRouteConfigurationChange AVAudioSessionRouteChangeReason = 8
)

func (AVAudioSessionRouteChangeReason) String

type AVAudioSessionRouteSharingPolicy

type AVAudioSessionRouteSharingPolicy uint64
const (
	AVAudioSessionRouteSharingPolicyDefault       AVAudioSessionRouteSharingPolicy = 0
	AVAudioSessionRouteSharingPolicyLongFormAudio AVAudioSessionRouteSharingPolicy = 1
)

func (AVAudioSessionRouteSharingPolicy) String

type AVAudioSessionSetActiveOptions

type AVAudioSessionSetActiveOptions uint64
const (
	// Notify an interrupted app that the interruption has ended and it may resume playback. Only valid on session deactivation.
	AVAudioSessionSetActiveOptionNotifyOthersOnDeactivation AVAudioSessionSetActiveOptions = 1
)

func (AVAudioSessionSetActiveOptions) String

type AVAudioSessionSilenceSecondaryAudioHintType

type AVAudioSessionSilenceSecondaryAudioHintType uint64
const (
	// Another application's primary audio has started.
	AVAudioSessionSilenceSecondaryAudioHintTypeBegin AVAudioSessionSilenceSecondaryAudioHintType = 1
	// Another application's primary audio has stopped.
	AVAudioSessionSilenceSecondaryAudioHintTypeEnd AVAudioSessionSilenceSecondaryAudioHintType = 0
)

func (AVAudioSessionSilenceSecondaryAudioHintType) String

type AVAudioSinkNode

type AVAudioSinkNode struct {
	AVAudioNode
}

Apple documentation: https://developer.apple.com/documentation/avfaudio/avaudiosinknode

func AVAudioSinkNodeFromID

func AVAudioSinkNodeFromID(id objc.ID) *AVAudioSinkNode

func (*AVAudioSinkNode) InitWithReceiverBlock

@method initWithReceiverBlock: @abstract Create a node with a receiver block. @param block The block that receives audio data from the input. @discussion The receiver block is called when the input data is available. The block will be called on the realtime thread and it is the client's responsibility to handle it in a thread-safe manner and to not make any blocking calls. The audio format for the input bus will be set from the connection format when connecting to another node. The audio format for the data received by the block will be set to the node's input format.

type AVAudioSourceNode

type AVAudioSourceNode struct {
	AVAudioNode
}

Apple documentation: https://developer.apple.com/documentation/avfaudio/avaudiosourcenode

func AVAudioSourceNodeFromID

func AVAudioSourceNodeFromID(id objc.ID) *AVAudioSourceNode

func (*AVAudioSourceNode) InitWithFormatRenderBlock

@method initWithFormat:renderBlock: @abstract Create a node with a render block. @param format The format of the PCM audio data that will be supplied by the block. @param block The block to supply audio data to the output. @discussion The block can be called on realtime or non-realtime threads depending on the engine’s operating mode and it is the client's responsibility to handle it in a thread-safe manner. The audio format for the output bus will be set from the connection format when connecting to another node. AVAudioSourceNode supports different audio formats for the block and output, but only Linear PCM conversions are supported (sample rate, bit depth, interleaving).

func (*AVAudioSourceNode) InitWithRenderBlock

@method initWithRenderBlock: @abstract Create a node with a render block. @param block The block to supply audio data to the output. @discussion The block can be called on realtime or non-realtime threads depending on the engine’s operating mode and it is the client's responsibility to handle it in a thread-safe manner. The audio format for the output bus will be set from the connection format when connecting to another node. The audio format for the block will be set to the node's output format. If node is reconnected with a different output format, the audio format for the block will also change.

type AVAudioStereoMixing

type AVAudioStereoMixing interface {
	Pan() float32
	SetPan(pan float32)
}

AVAudioStereoMixing wraps the ObjC protocol AVAudioStereoMixing.

type AVAudioStereoOrientation

type AVAudioStereoOrientation int64
const (
	AVAudioStereoOrientationNone               AVAudioStereoOrientation = 0
	AVAudioStereoOrientationPortrait           AVAudioStereoOrientation = 1
	AVAudioStereoOrientationPortraitUpsideDown AVAudioStereoOrientation = 2
	AVAudioStereoOrientationLandscapeRight     AVAudioStereoOrientation = 3
	AVAudioStereoOrientationLandscapeLeft      AVAudioStereoOrientation = 4
)

func (AVAudioStereoOrientation) String

func (e AVAudioStereoOrientation) String() string

type AVAudioTime

type AVAudioTime struct {
	foundation.NSObject
}

Apple documentation: https://developer.apple.com/documentation/avfaudio/avaudiotime

func AVAudioTimeFromID

func AVAudioTimeFromID(id objc.ID) *AVAudioTime

func AVAudioTimeTimeWithAudioTimeStampSampleRate

func AVAudioTimeTimeWithAudioTimeStampSampleRate(ts *coreaudiotypes.AudioTimeStamp, sampleRate float64) *AVAudioTime

@method timeWithAudioTimeStamp:sampleRate:

func AVAudioTimeTimeWithHostTime

func AVAudioTimeTimeWithHostTime(hostTime uint64) *AVAudioTime

@method timeWithHostTime:

func AVAudioTimeTimeWithHostTimeSampleTimeAtRate

func AVAudioTimeTimeWithHostTimeSampleTimeAtRate(hostTime uint64, sampleTime int64, sampleRate float64) *AVAudioTime

@method timeWithHostTime:sampleTime:atRate:

func AVAudioTimeTimeWithSampleTimeAtRate

func AVAudioTimeTimeWithSampleTimeAtRate(sampleTime int64, sampleRate float64) *AVAudioTime

@method timeWithSampleTime:atRate:

func (*AVAudioTime) AudioTimeStamp

func (o *AVAudioTime) AudioTimeStamp() coreaudiotypes.AudioTimeStamp

@property audioTimeStamp @abstract The time expressed as an AudioTimeStamp structure. @discussion This may be useful for compatibility with lower-level CoreAudio and AudioToolbox API's.

func (*AVAudioTime) ExtrapolateTimeFromAnchor

func (o *AVAudioTime) ExtrapolateTimeFromAnchor(anchorTime *AVAudioTime) *AVAudioTime

@method extrapolateTimeFromAnchor: @abstract Converts between host and sample time. @param anchorTime An AVAudioTime with a more complete AudioTimeStamp than that of the receiver (self). @return the extrapolated time @discussion If anchorTime is an AVAudioTime where both host time and sample time are valid, and self is another timestamp where only one of the two is valid, this method returns a new AVAudioTime copied from self and where any additional valid fields provided by the anchor are also valid. Note that the anchorTime must have both host and sample time valid, and self must have sample rate and at least one of host or sample time valid. Otherwise this method returns nil. <pre> // time0 has a valid audio sample representation, but no host time representation. AVAudioTime *time0 = [AVAudioTime timeWithSampleTime: 0.0 atRate: 44100.0]; // anchor has a valid host time representation and sample time representation. AVAudioTime *anchor = [player playerTimeForNodeTime: player.lastRenderTime]; // fill in valid host time representation AVAudioTime *fullTime0 = [time0 extrapolateTimeFromAnchor: anchor]; </pre>

func (*AVAudioTime) HostTime

func (o *AVAudioTime) HostTime() uint64

@property hostTime @abstract The host time.

func (*AVAudioTime) InitWithAudioTimeStampSampleRate

func (o *AVAudioTime) InitWithAudioTimeStampSampleRate(ts *coreaudiotypes.AudioTimeStamp, sampleRate float64) *AVAudioTime

@method initWithAudioTimeStamp:sampleRate:

func (*AVAudioTime) InitWithHostTime

func (o *AVAudioTime) InitWithHostTime(hostTime uint64) *AVAudioTime

@method initWithHostTime:

func (*AVAudioTime) InitWithHostTimeSampleTimeAtRate

func (o *AVAudioTime) InitWithHostTimeSampleTimeAtRate(hostTime uint64, sampleTime int64, sampleRate float64) *AVAudioTime

@method initWithHostTime:sampleTime:atRate:

func (*AVAudioTime) InitWithSampleTimeAtRate

func (o *AVAudioTime) InitWithSampleTimeAtRate(sampleTime int64, sampleRate float64) *AVAudioTime

@method initWithSampleTime:atRate:

func (*AVAudioTime) IsHostTimeValid

func (o *AVAudioTime) IsHostTimeValid() bool

@property hostTimeValid @abstract Whether the hostTime property is valid.

func (*AVAudioTime) IsSampleTimeValid

func (o *AVAudioTime) IsSampleTimeValid() bool

@property sampleTimeValid @abstract Whether the sampleTime and sampleRate properties are valid.

func (*AVAudioTime) SampleRate

func (o *AVAudioTime) SampleRate() float64

@property sampleRate @abstract The sample rate at which sampleTime is being expressed.

func (*AVAudioTime) SampleTime

func (o *AVAudioTime) SampleTime() int64

@property sampleTime @abstract The time as a number of audio samples, as tracked by the current audio device.

type AVAudioUnit

type AVAudioUnit struct {
	AVAudioNode
}

Apple documentation: https://developer.apple.com/documentation/avfaudio/avaudiounit

func AVAudioUnitFromID

func AVAudioUnitFromID(id objc.ID) *AVAudioUnit

func (*AVAudioUnit) AudioComponentDescription

func (o *AVAudioUnit) AudioComponentDescription() objc.ID

@property audioComponentDescription @abstract AudioComponentDescription of the underlying audio unit.

func (*AVAudioUnit) AudioUnit

@property audioUnit @abstract Reference to the underlying audio unit. @discussion A reference to the underlying audio unit is provided so that parameters that are not exposed by AVAudioUnit subclasses can be modified using the AudioUnit C API. No operations that may conflict with state maintained by the engine should be performed directly on the audio unit. These include changing initialization state, stream formats, channel layouts or connections to other audio units.

func (*AVAudioUnit) LoadAudioUnitPresetAtURLError

func (o *AVAudioUnit) LoadAudioUnitPresetAtURLError(url *foundation.NSURL) (bool, error)

@method loadAudioUnitPresetAtURL:error: @abstract Load an audio unit preset. @param url NSURL of the .aupreset file. @param outError A pointer to a NSError object @discussion If the .aupreset file cannot be successfully loaded, an error is returned.

func (*AVAudioUnit) ManufacturerName

func (o *AVAudioUnit) ManufacturerName() *foundation.NSString

@property manufacturerName @abstract Manufacturer name of the audio unit.

func (*AVAudioUnit) Name

func (o *AVAudioUnit) Name() *foundation.NSString

@property name @abstract Name of the audio unit.

type AVAudioUnitComponent

type AVAudioUnitComponent struct {
	foundation.NSObject
}

Apple documentation: https://developer.apple.com/documentation/avfaudio/avaudiounitcomponent

func AVAudioUnitComponentFromID

func AVAudioUnitComponentFromID(id objc.ID) *AVAudioUnitComponent

func (*AVAudioUnitComponent) AllTagNames

@property allTagNames @abstract represent the tags from the current user and the system tags defined by AudioComponent.

func (*AVAudioUnitComponent) AudioComponent

func (o *AVAudioUnitComponent) AudioComponent() unsafe.Pointer

@property audioComponent @abstract the audioComponent that can be used in AudioComponent APIs.

func (*AVAudioUnitComponent) AudioComponentDescription

func (o *AVAudioUnitComponent) AudioComponentDescription() objc.ID

@property audioComponentDescription @abstract description of the audio component that can be used in AudioComponent APIs.

func (*AVAudioUnitComponent) AvailableArchitectures

func (o *AVAudioUnitComponent) AvailableArchitectures() *foundation.NSArray[*foundation.NSNumber]

@property availableArchitectures @abstract NSArray of NSNumbers each of which corresponds to one of the constants in Mach-O Architecture in NSBundle Class Reference

func (*AVAudioUnitComponent) ComponentURL

func (o *AVAudioUnitComponent) ComponentURL() *foundation.NSURL

@property componentURL @abstract URL representing location of component Deprecated: since macOS 10.11.

func (*AVAudioUnitComponent) ConfigurationDictionary

func (o *AVAudioUnitComponent) ConfigurationDictionary() *foundation.NSDictionary[*foundation.NSString, objc.ID]

@property configurationDictionary @abstract A NSDictionary that contains information describing the capabilities of the AudioComponent. The specific information depends on the type and the keys are defined in AudioUnitProperties.h

func (*AVAudioUnitComponent) HasCustomView

func (o *AVAudioUnitComponent) HasCustomView() bool

@property hasCustomView @abstract YES if the AudioComponent provides custom view, otherwise NO

func (*AVAudioUnitComponent) HasMIDIInput

func (o *AVAudioUnitComponent) HasMIDIInput() bool

@property hasMIDIInput @abstract YES if AudioComponent has midi input, otherwise NO

func (*AVAudioUnitComponent) HasMIDIOutput

func (o *AVAudioUnitComponent) HasMIDIOutput() bool

@property hasMIDIOutput @abstract YES if AudioComponent has midi output, otherwise NO

func (*AVAudioUnitComponent) Icon

func (o *AVAudioUnitComponent) Icon() *appkit.NSImage

func (*AVAudioUnitComponent) IconURL

func (o *AVAudioUnitComponent) IconURL() *foundation.NSURL

@property iconURL @abstract A URL that will specify the location of an icon file that can be used when presenting UI for this audio component.

func (*AVAudioUnitComponent) IsSandboxSafe

func (o *AVAudioUnitComponent) IsSandboxSafe() bool

@property sandboxSafe @abstract On OSX, YES if the AudioComponent can be loaded into a sandboxed process otherwise NO. On iOS, this is always YES.

func (*AVAudioUnitComponent) LocalizedTypeName

func (o *AVAudioUnitComponent) LocalizedTypeName() *foundation.NSString

@property localizedTypeName @abstract localized string of typeName for display

func (*AVAudioUnitComponent) ManufacturerName

func (o *AVAudioUnitComponent) ManufacturerName() *foundation.NSString

@property manufacturerName @abstract the manufacturer name, extracted from the manufacturer key defined in Info.plist dictionary

func (*AVAudioUnitComponent) Name

@property name @abstract the name of an audio component

func (*AVAudioUnitComponent) PassesAUVal

func (o *AVAudioUnitComponent) PassesAUVal() bool

@property passesAUVal @abstract YES if the AudioComponent has passed the AU validation tests, otherwise NO

func (*AVAudioUnitComponent) SetUserTagNames

func (o *AVAudioUnitComponent) SetUserTagNames(userTagNames *foundation.NSArray[*foundation.NSString])

func (*AVAudioUnitComponent) SupportsNumberInputChannelsOutputChannels

func (o *AVAudioUnitComponent) SupportsNumberInputChannelsOutputChannels(numInputChannels int, numOutputChannels int) bool

@method supportsNumberInputChannels:outputChannels: @abstract returns YES if the AudioComponent supports the input/output channel configuration

func (*AVAudioUnitComponent) TypeName

func (o *AVAudioUnitComponent) TypeName() *foundation.NSString

@property typeName @abstract standard audio component types returned as strings

func (*AVAudioUnitComponent) UserTagNames

@property userTagNames @abstract User tags represent the tags from the current user.

func (*AVAudioUnitComponent) VersionString

func (o *AVAudioUnitComponent) VersionString() *foundation.NSString

@property versionString @abstract version number as string

type AVAudioUnitComponentManager

type AVAudioUnitComponentManager struct {
	foundation.NSObject
}

Apple documentation: https://developer.apple.com/documentation/avfaudio/avaudiounitcomponentmanager

func AVAudioUnitComponentManagerFromID

func AVAudioUnitComponentManagerFromID(id objc.ID) *AVAudioUnitComponentManager

func AVAudioUnitComponentManagerSharedAudioUnitComponentManager

func AVAudioUnitComponentManagerSharedAudioUnitComponentManager() *AVAudioUnitComponentManager

func (*AVAudioUnitComponentManager) ComponentsMatchingDescription

func (o *AVAudioUnitComponentManager) ComponentsMatchingDescription(desc objc.ID) *foundation.NSArray[*AVAudioUnitComponent]

@method componentsMatchingDescription: @abstract returns an array of AVAudioUnitComponent objects that match the description. @discussion This method provides a mechanism to search for AudioComponents using AudioComponentDescription structure. The type, subtype and manufacturer fields are used to search for audio units. A value of 0 for any of these fields is a wildcard and returns the first match found.

func (*AVAudioUnitComponentManager) ComponentsMatchingPredicate

func (o *AVAudioUnitComponentManager) ComponentsMatchingPredicate(predicate *foundation.NSPredicate) *foundation.NSArray[*AVAudioUnitComponent]

@method componentsMatchingPredicate: @abstract returns an array of AVAudioUnitComponent objects that match the search predicate. @discussion AudioComponent's information or tags can be used to build a search criteria. For example, "typeName CONTAINS 'Effect'" or tags IN {'Sampler', 'MIDI'}"

func (*AVAudioUnitComponentManager) ComponentsPassingTest

func (o *AVAudioUnitComponentManager) ComponentsPassingTest(testHandler func(*AVAudioUnitComponent, *bool) bool) *foundation.NSArray[*AVAudioUnitComponent]

@method componentsPassingTest: @abstract returns an array of AVAudioUnitComponent objects that pass the user provided block method. @discussion For each AudioComponent found by the manager, the block method will be called. If the return value is YES then the AudioComponent is added to the resulting array else it will excluded. This gives more control to the block provider to filter out the components returned.

func (*AVAudioUnitComponentManager) StandardLocalizedTagNames

func (o *AVAudioUnitComponentManager) StandardLocalizedTagNames() *foundation.NSArray[*foundation.NSString]

func (*AVAudioUnitComponentManager) TagNames

@discussion returns all tags associated with the current user as well as all system tags defined by the audio unit(s).

type AVAudioUnitDelay

type AVAudioUnitDelay struct {
	AVAudioUnitEffect
}

Apple documentation: https://developer.apple.com/documentation/avfaudio/avaudiounitdelay

func AVAudioUnitDelayFromID

func AVAudioUnitDelayFromID(id objc.ID) *AVAudioUnitDelay

func (*AVAudioUnitDelay) DelayTime

func (o *AVAudioUnitDelay) DelayTime() float64

@property delayTime Time taken by the delayed input signal to reach the output @abstract Range: 0 -> 2 Default: 1 Unit: Seconds

func (*AVAudioUnitDelay) Feedback

func (o *AVAudioUnitDelay) Feedback() float32

@property feedback @abstract Amount of the output signal fed back into the delay line Range: -100 -> 100 Default: 50 Unit: Percent

func (*AVAudioUnitDelay) LowPassCutoff

func (o *AVAudioUnitDelay) LowPassCutoff() float32

@property lowPassCutoff @abstract Cutoff frequency above which high frequency content is rolled off Range: 10 -> (samplerate/2) Default: 15000 Unit: Hertz

func (*AVAudioUnitDelay) SetDelayTime

func (o *AVAudioUnitDelay) SetDelayTime(delayTime float64)

func (*AVAudioUnitDelay) SetFeedback

func (o *AVAudioUnitDelay) SetFeedback(feedback float32)

func (*AVAudioUnitDelay) SetLowPassCutoff

func (o *AVAudioUnitDelay) SetLowPassCutoff(lowPassCutoff float32)

func (*AVAudioUnitDelay) SetWetDryMix

func (o *AVAudioUnitDelay) SetWetDryMix(wetDryMix float32)

func (*AVAudioUnitDelay) WetDryMix

func (o *AVAudioUnitDelay) WetDryMix() float32

@property wetDryMix @abstract Blend of the wet and dry signals Range: 0 (all dry) -> 100 (all wet) Default: 100 Unit: Percent

type AVAudioUnitDistortion

type AVAudioUnitDistortion struct {
	AVAudioUnitEffect
}

Apple documentation: https://developer.apple.com/documentation/avfaudio/avaudiounitdistortion

func AVAudioUnitDistortionFromID

func AVAudioUnitDistortionFromID(id objc.ID) *AVAudioUnitDistortion

func (*AVAudioUnitDistortion) LoadFactoryPreset

func (o *AVAudioUnitDistortion) LoadFactoryPreset(preset AVAudioUnitDistortionPreset)

@method loadFactoryPreset: @abstract Load a distortion preset. Default: AVAudioUnitDistortionPresetDrumsBitBrush

func (*AVAudioUnitDistortion) PreGain

func (o *AVAudioUnitDistortion) PreGain() float32

@property preGain @abstract Gain applied to the signal before being distorted Range: -80 -> 20 Default: -6 Unit: dB

func (*AVAudioUnitDistortion) SetPreGain

func (o *AVAudioUnitDistortion) SetPreGain(preGain float32)

func (*AVAudioUnitDistortion) SetWetDryMix

func (o *AVAudioUnitDistortion) SetWetDryMix(wetDryMix float32)

func (*AVAudioUnitDistortion) WetDryMix

func (o *AVAudioUnitDistortion) WetDryMix() float32

@property wetDryMix @abstract Blend of the distorted and dry signals Range: 0 (all dry) -> 100 (all distorted) Default: 50 Unit: Percent

type AVAudioUnitDistortionPreset

type AVAudioUnitDistortionPreset int64
const (
	AVAudioUnitDistortionPresetDrumsBitBrush            AVAudioUnitDistortionPreset = 0
	AVAudioUnitDistortionPresetDrumsBufferBeats         AVAudioUnitDistortionPreset = 1
	AVAudioUnitDistortionPresetDrumsLoFi                AVAudioUnitDistortionPreset = 2
	AVAudioUnitDistortionPresetMultiBrokenSpeaker       AVAudioUnitDistortionPreset = 3
	AVAudioUnitDistortionPresetMultiCellphoneConcert    AVAudioUnitDistortionPreset = 4
	AVAudioUnitDistortionPresetMultiDecimated1          AVAudioUnitDistortionPreset = 5
	AVAudioUnitDistortionPresetMultiDecimated2          AVAudioUnitDistortionPreset = 6
	AVAudioUnitDistortionPresetMultiDecimated3          AVAudioUnitDistortionPreset = 7
	AVAudioUnitDistortionPresetMultiDecimated4          AVAudioUnitDistortionPreset = 8
	AVAudioUnitDistortionPresetMultiDistortedFunk       AVAudioUnitDistortionPreset = 9
	AVAudioUnitDistortionPresetMultiDistortedCubed      AVAudioUnitDistortionPreset = 10
	AVAudioUnitDistortionPresetMultiDistortedSquared    AVAudioUnitDistortionPreset = 11
	AVAudioUnitDistortionPresetMultiEcho1               AVAudioUnitDistortionPreset = 12
	AVAudioUnitDistortionPresetMultiEcho2               AVAudioUnitDistortionPreset = 13
	AVAudioUnitDistortionPresetMultiEchoTight1          AVAudioUnitDistortionPreset = 14
	AVAudioUnitDistortionPresetMultiEchoTight2          AVAudioUnitDistortionPreset = 15
	AVAudioUnitDistortionPresetMultiEverythingIsBroken  AVAudioUnitDistortionPreset = 16
	AVAudioUnitDistortionPresetSpeechAlienChatter       AVAudioUnitDistortionPreset = 17
	AVAudioUnitDistortionPresetSpeechCosmicInterference AVAudioUnitDistortionPreset = 18
	AVAudioUnitDistortionPresetSpeechGoldenPi           AVAudioUnitDistortionPreset = 19
	AVAudioUnitDistortionPresetSpeechRadioTower         AVAudioUnitDistortionPreset = 20
	AVAudioUnitDistortionPresetSpeechWaves              AVAudioUnitDistortionPreset = 21
)

func (AVAudioUnitDistortionPreset) String

type AVAudioUnitEQ

type AVAudioUnitEQ struct {
	AVAudioUnitEffect
}

Apple documentation: https://developer.apple.com/documentation/avfaudio/avaudiouniteq

func AVAudioUnitEQFromID

func AVAudioUnitEQFromID(id objc.ID) *AVAudioUnitEQ

func (*AVAudioUnitEQ) Bands

@property bands @abstract Array of AVAudioUnitEQFilterParameters objects. @discussion The number of elements in the array is equal to the number of bands.

func (*AVAudioUnitEQ) GlobalGain

func (o *AVAudioUnitEQ) GlobalGain() float32

@property globalGain @abstract Overall gain adjustment applied to the signal. @discussion Range: -96 -> 24 Default: 0 Unit: dB

func (*AVAudioUnitEQ) InitWithNumberOfBands

func (o *AVAudioUnitEQ) InitWithNumberOfBands(numberOfBands uint) *AVAudioUnitEQ

@method initWithNumberOfBands: @abstract Initialize the EQ with number of bands. @param numberOfBands The number of bands created by the EQ.

func (*AVAudioUnitEQ) SetGlobalGain

func (o *AVAudioUnitEQ) SetGlobalGain(globalGain float32)

type AVAudioUnitEQFilterParameters

type AVAudioUnitEQFilterParameters struct {
	foundation.NSObject
}

Apple documentation: https://developer.apple.com/documentation/avfaudio/avaudiouniteqfilterparameters

func AVAudioUnitEQFilterParametersFromID

func AVAudioUnitEQFilterParametersFromID(id objc.ID) *AVAudioUnitEQFilterParameters

func (*AVAudioUnitEQFilterParameters) Bandwidth

func (o *AVAudioUnitEQFilterParameters) Bandwidth() float32

@property bandwidth @abstract Bandwidth in octaves. @discussion Range: 0.05 -> 5.0 Unit: Octaves

func (*AVAudioUnitEQFilterParameters) Bypass

func (o *AVAudioUnitEQFilterParameters) Bypass() bool

@property bypass @abstract bypass state of band. @discussion Default: YES

func (*AVAudioUnitEQFilterParameters) FilterType

@property filterType @abstract AVAudioUnitEQFilterType @discussion Default: AVAudioUnitEQFilterTypeParametric

func (*AVAudioUnitEQFilterParameters) Frequency

func (o *AVAudioUnitEQFilterParameters) Frequency() float32

@property frequency @abstract Frequency in Hertz. @discussion Range: 20 -> (SampleRate/2) Unit: Hertz

func (*AVAudioUnitEQFilterParameters) Gain

@property gain @abstract Gain in dB. @discussion Range: -96 -> 24 Default: 0 Unit: dB

func (*AVAudioUnitEQFilterParameters) SetBandwidth

func (o *AVAudioUnitEQFilterParameters) SetBandwidth(bandwidth float32)

func (*AVAudioUnitEQFilterParameters) SetBypass

func (o *AVAudioUnitEQFilterParameters) SetBypass(bypass bool)

func (*AVAudioUnitEQFilterParameters) SetFilterType

func (o *AVAudioUnitEQFilterParameters) SetFilterType(filterType AVAudioUnitEQFilterType)

func (*AVAudioUnitEQFilterParameters) SetFrequency

func (o *AVAudioUnitEQFilterParameters) SetFrequency(frequency float32)

func (*AVAudioUnitEQFilterParameters) SetGain

func (o *AVAudioUnitEQFilterParameters) SetGain(gain float32)

type AVAudioUnitEQFilterType

type AVAudioUnitEQFilterType int64
const (
	AVAudioUnitEQFilterTypeParametric        AVAudioUnitEQFilterType = 0
	AVAudioUnitEQFilterTypeLowPass           AVAudioUnitEQFilterType = 1
	AVAudioUnitEQFilterTypeHighPass          AVAudioUnitEQFilterType = 2
	AVAudioUnitEQFilterTypeResonantLowPass   AVAudioUnitEQFilterType = 3
	AVAudioUnitEQFilterTypeResonantHighPass  AVAudioUnitEQFilterType = 4
	AVAudioUnitEQFilterTypeBandPass          AVAudioUnitEQFilterType = 5
	AVAudioUnitEQFilterTypeBandStop          AVAudioUnitEQFilterType = 6
	AVAudioUnitEQFilterTypeLowShelf          AVAudioUnitEQFilterType = 7
	AVAudioUnitEQFilterTypeHighShelf         AVAudioUnitEQFilterType = 8
	AVAudioUnitEQFilterTypeResonantLowShelf  AVAudioUnitEQFilterType = 9
	AVAudioUnitEQFilterTypeResonantHighShelf AVAudioUnitEQFilterType = 10
)

func (AVAudioUnitEQFilterType) String

func (e AVAudioUnitEQFilterType) String() string

type AVAudioUnitEffect

type AVAudioUnitEffect struct {
	AVAudioUnit
}

Apple documentation: https://developer.apple.com/documentation/avfaudio/avaudiouniteffect

func AVAudioUnitEffectFromID

func AVAudioUnitEffectFromID(id objc.ID) *AVAudioUnitEffect

func (*AVAudioUnitEffect) Bypass

func (o *AVAudioUnitEffect) Bypass() bool

func (*AVAudioUnitEffect) InitWithAudioComponentDescription

func (o *AVAudioUnitEffect) InitWithAudioComponentDescription(audioComponentDescription objc.ID) *AVAudioUnitEffect

@method initWithAudioComponentDescription: @abstract Create an AVAudioUnitEffect object. @param audioComponentDescription AudioComponentDescription of the audio unit to be instantiated. @discussion The componentType must be one of these types kAudioUnitType_Effect kAudioUnitType_MusicEffect kAudioUnitType_Panner kAudioUnitType_RemoteEffect kAudioUnitType_RemoteMusicEffect

func (*AVAudioUnitEffect) SetBypass

func (o *AVAudioUnitEffect) SetBypass(bypass bool)

type AVAudioUnitGenerator

type AVAudioUnitGenerator struct {
	AVAudioUnit
}

Apple documentation: https://developer.apple.com/documentation/avfaudio/avaudiounitgenerator

func AVAudioUnitGeneratorFromID

func AVAudioUnitGeneratorFromID(id objc.ID) *AVAudioUnitGenerator

func (*AVAudioUnitGenerator) Bypass

func (o *AVAudioUnitGenerator) Bypass() bool

func (*AVAudioUnitGenerator) InitWithAudioComponentDescription

func (o *AVAudioUnitGenerator) InitWithAudioComponentDescription(audioComponentDescription objc.ID) *AVAudioUnitGenerator

@method initWithAudioComponentDescription: @abstract Create an AVAudioUnitGenerator object. @param audioComponentDescription AudioComponentDescription of the audio unit to be instantiated. @discussion The componentType must be kAudioUnitType_Generator or kAudioUnitType_RemoteGenerator

func (*AVAudioUnitGenerator) SetBypass

func (o *AVAudioUnitGenerator) SetBypass(bypass bool)

type AVAudioUnitMIDIInstrument

type AVAudioUnitMIDIInstrument struct {
	AVAudioUnit
}

Apple documentation: https://developer.apple.com/documentation/avfaudio/avaudiounitmidiinstrument

func AVAudioUnitMIDIInstrumentFromID

func AVAudioUnitMIDIInstrumentFromID(id objc.ID) *AVAudioUnitMIDIInstrument

func (*AVAudioUnitMIDIInstrument) InitWithAudioComponentDescription

func (o *AVAudioUnitMIDIInstrument) InitWithAudioComponentDescription(description objc.ID) *AVAudioUnitMIDIInstrument

Initialize the node with the component description for an AUv2 Audio Unit. - Parameter description: audio component description structure that describes the audio component of type kAudioUnitType_MusicDevice or kAudioUnitType_RemoteInstrument. - note: To load AUv3 audio units (or any audio unit asynchronously), use the class method “AVAudioUnit/instantiateWithComponentDescription:options:completionHandler:“ instead.

func (*AVAudioUnitMIDIInstrument) SendControllerWithValueOnChannel

func (o *AVAudioUnitMIDIInstrument) SendControllerWithValueOnChannel(controller uint8, value uint8, channel uint8)

Sends a MIDI controller event to the instrument. - Parameters: - controller: a standard MIDI controller number. Range: 0 -> 127 - value: value for the controller. Range: 0 -> 127 - channel: the channel number to which the event is sent. Range: 0 -> 15

func (*AVAudioUnitMIDIInstrument) SendMIDIEventData1

func (o *AVAudioUnitMIDIInstrument) SendMIDIEventData1(midiStatus uint8, data1 uint8)

Sends a MIDI event which contains one data byte to the instrument. - Parameters: - midiStatus: the STATUS value of the MIDI event - data1: the first data byte of the MIDI event

func (*AVAudioUnitMIDIInstrument) SendMIDIEventData1Data2

func (o *AVAudioUnitMIDIInstrument) SendMIDIEventData1Data2(midiStatus uint8, data1 uint8, data2 uint8)

Sends a MIDI event which contains two data bytes to the instrument. - Parameters: - midiStatus: the STATUS value of the MIDI event - data1: the first data byte of the MIDI event - data2: the second data byte of the MIDI event.

func (*AVAudioUnitMIDIInstrument) SendMIDIEventList

func (o *AVAudioUnitMIDIInstrument) SendMIDIEventList(eventList *coremidi.MIDIEventList)

Sends a MIDI event list to the instrument. - Parameters: - eventList: the MIDIEventList

func (*AVAudioUnitMIDIInstrument) SendMIDISysExEvent

func (o *AVAudioUnitMIDIInstrument) SendMIDISysExEvent(midiData *foundation.NSData)

Sends a MIDI System Exclusive event to the instrument. - Parameters: - midiData: a NSData object containing the complete SysEx data including start(F0) and termination(F7) bytes.

func (*AVAudioUnitMIDIInstrument) SendPitchBendOnChannel

func (o *AVAudioUnitMIDIInstrument) SendPitchBendOnChannel(pitchbend uint16, channel uint8)

Sends a MIDI controller event to the instrument. - Parameters: - controller: a standard MIDI controller number. Range: 0 -> 127 - value: value for the controller. Range: 0 -> 127 - channel: the channel number to which the event is sent. Range: 0 -> 15

func (*AVAudioUnitMIDIInstrument) SendPressureForKeyWithValueOnChannel

func (o *AVAudioUnitMIDIInstrument) SendPressureForKeyWithValueOnChannel(key uint8, value uint8, channel uint8)

Sends MIDI Polyphonic key pressure event to the instrument - Parameters: - key: the key (note) number to which the pressure event applies. Range: 0 -> 127 - value: value of the pressure. Range: 0 -> 127 - channel: the channel number to which the event is sent. Range: 0 -> 15so

func (*AVAudioUnitMIDIInstrument) SendPressureOnChannel

func (o *AVAudioUnitMIDIInstrument) SendPressureOnChannel(pressure uint8, channel uint8)

Sends MIDI channel pressure event to the instrument. - Parameters: - pressure: value of the pressure. Range: 0 -> 127 - channel: the channel number to which the event is sent. Range: 0 -> 15

func (*AVAudioUnitMIDIInstrument) SendProgramChangeBankMSBBankLSBOnChannel

func (o *AVAudioUnitMIDIInstrument) SendProgramChangeBankMSBBankLSBOnChannel(program uint8, bankMSB uint8, bankLSB uint8, channel uint8)

Sends a MIDI Program Change and Bank Select events to the instrument - Parameters: - program: specifies the program (preset) number within the bank to load. Range: 0 -> 127 - bankMSB: specifies the most significant byte value for the bank to select. Range: 0 -> 127 - bankLSB: specifies the least significant byte value for the bank to select. Range: 0 -> 127 - channel: the channel number to which the event is sent. Range: 0 -> 15

func (*AVAudioUnitMIDIInstrument) SendProgramChangeOnChannel

func (o *AVAudioUnitMIDIInstrument) SendProgramChangeOnChannel(program uint8, channel uint8)

Sends MIDI Program Change event to the instrument The instrument will be loaded from the bank that has been previous set by MIDI Bank Select controller messages (0 and 31). If none has been set, bank 0 will be used. - Parameters: - program: the program number. Range: 0 -> 127 - channel: the channel number to which the event is sent. Range: 0 -> 15

func (*AVAudioUnitMIDIInstrument) StartNoteWithVelocityOnChannel

func (o *AVAudioUnitMIDIInstrument) StartNoteWithVelocityOnChannel(note uint8, velocity uint8, channel uint8)

Sends a MIDI Note On event to the instrument - Parameters: - note: the note number (key) to play. Range: 0 -> 127 - velocity: specifies the volume with which the note is played. Range: 0 -> 127 - channel: the channel number to which the event is sent. Range: 0 -> 15

func (*AVAudioUnitMIDIInstrument) StopNoteOnChannel

func (o *AVAudioUnitMIDIInstrument) StopNoteOnChannel(note uint8, channel uint8)

Sends a MIDI Note Off event to the instrument - Parameters: - note: the note number (key) to stop. Range: 0 -> 127 - channel: the channel number to which the event is sent. Range: 0 -> 15

type AVAudioUnitReverb

type AVAudioUnitReverb struct {
	AVAudioUnitEffect
}

Apple documentation: https://developer.apple.com/documentation/avfaudio/avaudiounitreverb

func AVAudioUnitReverbFromID

func AVAudioUnitReverbFromID(id objc.ID) *AVAudioUnitReverb

func (*AVAudioUnitReverb) LoadFactoryPreset

func (o *AVAudioUnitReverb) LoadFactoryPreset(preset AVAudioUnitReverbPreset)

@method loadFactoryPreset: @abstract load a reverb preset Default: AVAudioUnitReverbPresetMediumHall

func (*AVAudioUnitReverb) SetWetDryMix

func (o *AVAudioUnitReverb) SetWetDryMix(wetDryMix float32)

func (*AVAudioUnitReverb) WetDryMix

func (o *AVAudioUnitReverb) WetDryMix() float32

type AVAudioUnitReverbPreset

type AVAudioUnitReverbPreset int64
const (
	AVAudioUnitReverbPresetSmallRoom     AVAudioUnitReverbPreset = 0
	AVAudioUnitReverbPresetMediumRoom    AVAudioUnitReverbPreset = 1
	AVAudioUnitReverbPresetLargeRoom     AVAudioUnitReverbPreset = 2
	AVAudioUnitReverbPresetMediumHall    AVAudioUnitReverbPreset = 3
	AVAudioUnitReverbPresetLargeHall     AVAudioUnitReverbPreset = 4
	AVAudioUnitReverbPresetPlate         AVAudioUnitReverbPreset = 5
	AVAudioUnitReverbPresetMediumChamber AVAudioUnitReverbPreset = 6
	AVAudioUnitReverbPresetLargeChamber  AVAudioUnitReverbPreset = 7
	AVAudioUnitReverbPresetCathedral     AVAudioUnitReverbPreset = 8
	AVAudioUnitReverbPresetLargeRoom2    AVAudioUnitReverbPreset = 9
	AVAudioUnitReverbPresetMediumHall2   AVAudioUnitReverbPreset = 10
	AVAudioUnitReverbPresetMediumHall3   AVAudioUnitReverbPreset = 11
	AVAudioUnitReverbPresetLargeHall2    AVAudioUnitReverbPreset = 12
)

func (AVAudioUnitReverbPreset) String

func (e AVAudioUnitReverbPreset) String() string

type AVAudioUnitSampler

type AVAudioUnitSampler struct {
	AVAudioUnitMIDIInstrument
}

Apple documentation: https://developer.apple.com/documentation/avfaudio/avaudiounitsampler

func AVAudioUnitSamplerFromID

func AVAudioUnitSamplerFromID(id objc.ID) *AVAudioUnitSampler

func (*AVAudioUnitSampler) GlobalTuning

func (o *AVAudioUnitSampler) GlobalTuning() float32

@property globalTuning @abstract adjusts the tuning of all the notes played. Range: -2400 -> +2400 cents Default: 0

func (*AVAudioUnitSampler) LoadAudioFilesAtURLsError

func (o *AVAudioUnitSampler) LoadAudioFilesAtURLsError(audioFiles *foundation.NSArray[*foundation.NSURL]) (bool, error)

@method loadAudioFilesAtURLs:error: @abstract configures the sampler by loading a set of audio files. @param audioFiles array of URLs for audio files to be loaded @param outError the status of the operation @discussion The audio files are loaded into a new default instrument with each audio file placed into its own sampler zone. Any information contained in the audio file regarding their placement on the keyboard (e.g. root key, key range) will be used. This method reads from file and allocates memory, so it should not be called on a real time thread.

func (*AVAudioUnitSampler) LoadInstrumentAtURLError

func (o *AVAudioUnitSampler) LoadInstrumentAtURLError(instrumentURL *foundation.NSURL) (bool, error)

@method loadInstrumentAtURL:error: @abstract configures the sampler by loading the specified preset file. @param instrumentURL URL to the preset file or audio file @param outError the status of the operation @discussion The file can be of one of the following types: Logic/GarageBand EXS24 instrument, the Sampler AU's native aupreset, or an audio file (eg. .caf, .aiff, .wav, .mp3). If an audio file URL is loaded, it will become the sole sample in a new default instrument. Any information contained in the file regarding its keyboard placement (e.g. root key, key range) will be used. This method reads from file and allocates memory, so it should not be called on a real time thread.

func (*AVAudioUnitSampler) LoadSoundBankInstrumentAtURLProgramBankMSBBankLSBError

func (o *AVAudioUnitSampler) LoadSoundBankInstrumentAtURLProgramBankMSBBankLSBError(bankURL *foundation.NSURL, program uint8, bankMSB uint8, bankLSB uint8) (bool, error)

@method loadSoundBankInstrumentAtURL:program:bankMSB:bankLSB:error: @abstract loads a specific instrument from the specified sound bank @param bankURL URL for a Soundbank file. The file can be either a DLS bank (.dls) or a SoundFont bank (.sf2). @param program program number for the instrument to load @param bankMSB MSB for the bank number for the instrument to load. This is usually 0x79 for melodic instruments and 0x78 for percussion instruments. @param bankLSB LSB for the bank number for the instrument to load. This is often 0, and represents the "bank variation". @param outError the status of the operation @discussion This method reads from file and allocates memory, so it should not be called on a real time thread.

func (*AVAudioUnitSampler) MasterGain

func (o *AVAudioUnitSampler) MasterGain() float32

@property masterGain @abstract adjusts the gain of all the notes played Range: -90.0 -> +12 db Default: 0 db Deprecated: since macOS 12.0.

func (*AVAudioUnitSampler) OverallGain

func (o *AVAudioUnitSampler) OverallGain() float32

@property overallGain @abstract adjusts the gain of all the notes played Range: -90.0 -> +12 db Default: 0 db

func (*AVAudioUnitSampler) SetGlobalTuning

func (o *AVAudioUnitSampler) SetGlobalTuning(globalTuning float32)

func (*AVAudioUnitSampler) SetMasterGain deprecated

func (o *AVAudioUnitSampler) SetMasterGain(masterGain float32)

Deprecated: since macOS 12.0.

func (*AVAudioUnitSampler) SetOverallGain

func (o *AVAudioUnitSampler) SetOverallGain(overallGain float32)

func (*AVAudioUnitSampler) SetStereoPan

func (o *AVAudioUnitSampler) SetStereoPan(stereoPan float32)

func (*AVAudioUnitSampler) StereoPan

func (o *AVAudioUnitSampler) StereoPan() float32

@property stereoPan @abstract adjusts the pan for all the notes played. Range: -100 -> +100 Default: 0

type AVAudioUnitTimeEffect

type AVAudioUnitTimeEffect struct {
	AVAudioUnit
}

Apple documentation: https://developer.apple.com/documentation/avfaudio/avaudiounittimeeffect

func AVAudioUnitTimeEffectFromID

func AVAudioUnitTimeEffectFromID(id objc.ID) *AVAudioUnitTimeEffect

func (*AVAudioUnitTimeEffect) Bypass

func (o *AVAudioUnitTimeEffect) Bypass() bool

func (*AVAudioUnitTimeEffect) InitWithAudioComponentDescription

func (o *AVAudioUnitTimeEffect) InitWithAudioComponentDescription(audioComponentDescription objc.ID) *AVAudioUnitTimeEffect

@method initWithAudioComponentDescription: @abstract create an AVAudioUnitTimeEffect object @param audioComponentDescription AudioComponentDescription of the audio unit to be initialized @discussion The componentType must be kAudioUnitType_FormatConverter

func (*AVAudioUnitTimeEffect) SetBypass

func (o *AVAudioUnitTimeEffect) SetBypass(bypass bool)

type AVAudioUnitTimePitch

type AVAudioUnitTimePitch struct {
	AVAudioUnitTimeEffect
}

Apple documentation: https://developer.apple.com/documentation/avfaudio/avaudiounittimepitch

func AVAudioUnitTimePitchFromID

func AVAudioUnitTimePitchFromID(id objc.ID) *AVAudioUnitTimePitch

func (*AVAudioUnitTimePitch) Overlap

func (o *AVAudioUnitTimePitch) Overlap() float32

@property overlap @abstract amount of overlap between segments of the input audio signal @discussion A higher value results in fewer artifacts in the output signal. This parameter also impacts the amount of CPU used. Range: 3.0 -> 32.0 Default: 8.0 Unit: Generic

func (*AVAudioUnitTimePitch) Pitch

func (o *AVAudioUnitTimePitch) Pitch() float32

@property pitch @abstract amount by which the input signal is pitch shifted @discussion 1 octave = 1200 cents 1 musical semitone = 100 cents Range: -2400 -> 2400 Default: 0.0 Unit: Cents

func (*AVAudioUnitTimePitch) Rate

func (o *AVAudioUnitTimePitch) Rate() float32

@property rate @abstract playback rate of the input signal Range: 1/32 -> 32.0 Default: 1.0 Unit: Generic

func (*AVAudioUnitTimePitch) SetOverlap

func (o *AVAudioUnitTimePitch) SetOverlap(overlap float32)

func (*AVAudioUnitTimePitch) SetPitch

func (o *AVAudioUnitTimePitch) SetPitch(pitch float32)

func (*AVAudioUnitTimePitch) SetRate

func (o *AVAudioUnitTimePitch) SetRate(rate float32)

type AVAudioUnitVarispeed

type AVAudioUnitVarispeed struct {
	AVAudioUnitTimeEffect
}

Apple documentation: https://developer.apple.com/documentation/avfaudio/avaudiounitvarispeed

func AVAudioUnitVarispeedFromID

func AVAudioUnitVarispeedFromID(id objc.ID) *AVAudioUnitVarispeed

func (*AVAudioUnitVarispeed) Rate

func (o *AVAudioUnitVarispeed) Rate() float32

func (*AVAudioUnitVarispeed) SetRate

func (o *AVAudioUnitVarispeed) SetRate(rate float32)

type AVAudioVoiceProcessingOtherAudioDuckingConfiguration

type AVAudioVoiceProcessingOtherAudioDuckingConfiguration struct {
	EnableAdvancedDucking bool
	DuckingLevel          AVAudioVoiceProcessingOtherAudioDuckingLevel
}

type AVAudioVoiceProcessingOtherAudioDuckingLevel

type AVAudioVoiceProcessingOtherAudioDuckingLevel int64
const (
	AVAudioVoiceProcessingOtherAudioDuckingLevelDefault AVAudioVoiceProcessingOtherAudioDuckingLevel = 0
	AVAudioVoiceProcessingOtherAudioDuckingLevelMin     AVAudioVoiceProcessingOtherAudioDuckingLevel = 10
	AVAudioVoiceProcessingOtherAudioDuckingLevelMid     AVAudioVoiceProcessingOtherAudioDuckingLevel = 20
	AVAudioVoiceProcessingOtherAudioDuckingLevelMax     AVAudioVoiceProcessingOtherAudioDuckingLevel = 30
)

func (AVAudioVoiceProcessingOtherAudioDuckingLevel) String

type AVAudioVoiceProcessingSpeechActivityEvent

type AVAudioVoiceProcessingSpeechActivityEvent int64
const (
	AVAudioVoiceProcessingSpeechActivityStarted AVAudioVoiceProcessingSpeechActivityEvent = 0
	AVAudioVoiceProcessingSpeechActivityEnded   AVAudioVoiceProcessingSpeechActivityEvent = 1
)

func (AVAudioVoiceProcessingSpeechActivityEvent) String

type AVBeatRange

type AVBeatRange struct {
	Start  float64
	Length float64
}

C struct: _AVBeatRange

func AVMakeBeatRange

func AVMakeBeatRange(startBeat float64, lengthInBeats float64) AVBeatRange

type AVExtendedNoteOnEvent

type AVExtendedNoteOnEvent struct {
	AVMusicEvent
}

Apple documentation: https://developer.apple.com/documentation/avfaudio/avextendednoteonevent

func AVExtendedNoteOnEventFromID

func AVExtendedNoteOnEventFromID(id objc.ID) *AVExtendedNoteOnEvent

func (*AVExtendedNoteOnEvent) Duration

func (o *AVExtendedNoteOnEvent) Duration() float64

@property duration The duration of this event in AVMusicTimeStamp beats. Range: Any nonnegative number.

func (*AVExtendedNoteOnEvent) GroupID

func (o *AVExtendedNoteOnEvent) GroupID() uint

@property groupID This represents the audio unit channel (i.e., Group Scope) which should handle this event. Range: normally between 0 and 15, but may be higher if the AVMusicTrack's destinationAudioUnit supports more channels.

func (*AVExtendedNoteOnEvent) InitWithMIDINoteVelocityGroupIDDuration

func (o *AVExtendedNoteOnEvent) InitWithMIDINoteVelocityGroupIDDuration(midiNote float32, velocity float32, groupID uint, duration float64) *AVExtendedNoteOnEvent

@method initWithMIDINote:velocity:groupID:duration @abstract Initialize the event with a midi note, velocity, instrument and group ID, and a duration. @param midiNote The MIDI velocity represented as a floating point. Range: Destination-dependent, usually 0.0 - 127.0. @param velocity The MIDI velocity represented as a floating point. Range: Destination-dependent, usually 0.0 - 127.0. @param groupID An index indicating the AudioUnitElement within the Group Scope which should handle this event (see AudioUnitElement). This normally maps to a channel within the audio unit. Range: normally between 0 and 15, but may be higher if the AVMusicTrack's destinationAudioUnit supports more channels. @param duration The duration of this event in AVMusicTimeStamp beats. Range: Any nonnegative number.

func (*AVExtendedNoteOnEvent) InitWithMIDINoteVelocityInstrumentIDGroupIDDuration

func (o *AVExtendedNoteOnEvent) InitWithMIDINoteVelocityInstrumentIDGroupIDDuration(midiNote float32, velocity float32, instrumentID uint, groupID uint, duration float64) *AVExtendedNoteOnEvent

func (*AVExtendedNoteOnEvent) InstrumentID

func (o *AVExtendedNoteOnEvent) InstrumentID() uint

@property instrumentID This should be set to AVExtendedNoteOnEventDefaultInstrument.

func (*AVExtendedNoteOnEvent) MidiNote

func (o *AVExtendedNoteOnEvent) MidiNote() float32

@property midiNote The MIDI note number represented as a floating point. If the instrument within the AVMusicTrack's destinationAudioUnit supports fractional values, this may be used to generate arbitrary macro- and micro-tunings. Range: Destination-dependent, usually 0.0 - 127.0.

func (*AVExtendedNoteOnEvent) SetDuration

func (o *AVExtendedNoteOnEvent) SetDuration(duration float64)

func (*AVExtendedNoteOnEvent) SetGroupID

func (o *AVExtendedNoteOnEvent) SetGroupID(groupID uint)

func (*AVExtendedNoteOnEvent) SetInstrumentID

func (o *AVExtendedNoteOnEvent) SetInstrumentID(instrumentID uint)

func (*AVExtendedNoteOnEvent) SetMidiNote

func (o *AVExtendedNoteOnEvent) SetMidiNote(midiNote float32)

func (*AVExtendedNoteOnEvent) SetVelocity

func (o *AVExtendedNoteOnEvent) SetVelocity(velocity float32)

func (*AVExtendedNoteOnEvent) Velocity

func (o *AVExtendedNoteOnEvent) Velocity() float32

@property velocity The MIDI velocity represented as a floating point. If the instrument within the AVMusicTrack's destinationAudioUnit supports fractional values, this may be used to generate very precise changes in gain, etc. Range: Destination-dependent, usually 0.0 - 127.0.

type AVExtendedTempoEvent

type AVExtendedTempoEvent struct {
	AVMusicEvent
}

Apple documentation: https://developer.apple.com/documentation/avfaudio/avextendedtempoevent

func AVExtendedTempoEventFromID

func AVExtendedTempoEventFromID(id objc.ID) *AVExtendedTempoEvent

func (*AVExtendedTempoEvent) InitWithTempo

func (o *AVExtendedTempoEvent) InitWithTempo(tempo float64) *AVExtendedTempoEvent

@method initWithTempo: @abstract Initialize the event tempo. @param tempo The new tempo in beats-per-minute. Range: Any positive value. The new tempo will begin at the timestamp for this event.

func (*AVExtendedTempoEvent) SetTempo

func (o *AVExtendedTempoEvent) SetTempo(tempo float64)

func (*AVExtendedTempoEvent) Tempo

func (o *AVExtendedTempoEvent) Tempo() float64

type AVMIDIChannelEvent

type AVMIDIChannelEvent struct {
	AVMusicEvent
}

Apple documentation: https://developer.apple.com/documentation/avfaudio/avmidichannelevent

func AVMIDIChannelEventFromID

func AVMIDIChannelEventFromID(id objc.ID) *AVMIDIChannelEvent

func (*AVMIDIChannelEvent) Channel

func (o *AVMIDIChannelEvent) Channel() uint

func (*AVMIDIChannelEvent) SetChannel

func (o *AVMIDIChannelEvent) SetChannel(channel uint)

type AVMIDIChannelPressureEvent

type AVMIDIChannelPressureEvent struct {
	AVMIDIChannelEvent
}

Apple documentation: https://developer.apple.com/documentation/avfaudio/avmidichannelpressureevent

func AVMIDIChannelPressureEventFromID

func AVMIDIChannelPressureEventFromID(id objc.ID) *AVMIDIChannelPressureEvent

func (*AVMIDIChannelPressureEvent) InitWithChannelPressure

func (o *AVMIDIChannelPressureEvent) InitWithChannelPressure(channel uint, pressure uint) *AVMIDIChannelPressureEvent

@method initWithChannel:pressure: @abstract Initialize the event with a channel and a pressure value. @param channel The MIDI channel for the message. Range: 0-15. @param pressure The MIDI channel pressure. Range: 0-127.

func (*AVMIDIChannelPressureEvent) Pressure

func (o *AVMIDIChannelPressureEvent) Pressure() uint

func (*AVMIDIChannelPressureEvent) SetPressure

func (o *AVMIDIChannelPressureEvent) SetPressure(pressure uint)

type AVMIDIControlChangeEvent

type AVMIDIControlChangeEvent struct {
	AVMIDIChannelEvent
}

Apple documentation: https://developer.apple.com/documentation/avfaudio/avmidicontrolchangeevent

func AVMIDIControlChangeEventFromID

func AVMIDIControlChangeEventFromID(id objc.ID) *AVMIDIControlChangeEvent

func (*AVMIDIControlChangeEvent) InitWithChannelMessageTypeValue

func (o *AVMIDIControlChangeEvent) InitWithChannelMessageTypeValue(channel uint, messageType AVMIDIControlChangeMessageType, value uint) *AVMIDIControlChangeEvent

@method initWithChannel:messageType:value @abstract Initialize the event with a channel, a control change type, and a control value. @param channel The MIDI channel for the control change. Range: 0-15. @param messageType The AVMIDIControlChangeMessageType indicating which MIDI control change message to send. @param value The value for this control change. Range: Depends on the type (see the General MIDI specification).

func (*AVMIDIControlChangeEvent) MessageType

@property messageType The type of control change message, specified as an AVMIDIControlChangeMessageType.

func (*AVMIDIControlChangeEvent) Value

func (o *AVMIDIControlChangeEvent) Value() uint

@property value The value of the control change event. The range of this value depends on the type (see the General MIDI specification).

type AVMIDIControlChangeMessageType

type AVMIDIControlChangeMessageType int64
const (
	AVMIDIControlChangeMessageTypeBankSelect          AVMIDIControlChangeMessageType = 0
	AVMIDIControlChangeMessageTypeModWheel            AVMIDIControlChangeMessageType = 1
	AVMIDIControlChangeMessageTypeBreath              AVMIDIControlChangeMessageType = 2
	AVMIDIControlChangeMessageTypeFoot                AVMIDIControlChangeMessageType = 4
	AVMIDIControlChangeMessageTypePortamentoTime      AVMIDIControlChangeMessageType = 5
	AVMIDIControlChangeMessageTypeDataEntry           AVMIDIControlChangeMessageType = 6
	AVMIDIControlChangeMessageTypeVolume              AVMIDIControlChangeMessageType = 7
	AVMIDIControlChangeMessageTypeBalance             AVMIDIControlChangeMessageType = 8
	AVMIDIControlChangeMessageTypePan                 AVMIDIControlChangeMessageType = 10
	AVMIDIControlChangeMessageTypeExpression          AVMIDIControlChangeMessageType = 11
	AVMIDIControlChangeMessageTypeSustain             AVMIDIControlChangeMessageType = 64
	AVMIDIControlChangeMessageTypePortamento          AVMIDIControlChangeMessageType = 65
	AVMIDIControlChangeMessageTypeSostenuto           AVMIDIControlChangeMessageType = 66
	AVMIDIControlChangeMessageTypeSoft                AVMIDIControlChangeMessageType = 67
	AVMIDIControlChangeMessageTypeLegatoPedal         AVMIDIControlChangeMessageType = 68
	AVMIDIControlChangeMessageTypeHold2Pedal          AVMIDIControlChangeMessageType = 69
	AVMIDIControlChangeMessageTypeFilterResonance     AVMIDIControlChangeMessageType = 71
	AVMIDIControlChangeMessageTypeReleaseTime         AVMIDIControlChangeMessageType = 72
	AVMIDIControlChangeMessageTypeAttackTime          AVMIDIControlChangeMessageType = 73
	AVMIDIControlChangeMessageTypeBrightness          AVMIDIControlChangeMessageType = 74
	AVMIDIControlChangeMessageTypeDecayTime           AVMIDIControlChangeMessageType = 75
	AVMIDIControlChangeMessageTypeVibratoRate         AVMIDIControlChangeMessageType = 76
	AVMIDIControlChangeMessageTypeVibratoDepth        AVMIDIControlChangeMessageType = 77
	AVMIDIControlChangeMessageTypeVibratoDelay        AVMIDIControlChangeMessageType = 78
	AVMIDIControlChangeMessageTypeReverbLevel         AVMIDIControlChangeMessageType = 91
	AVMIDIControlChangeMessageTypeChorusLevel         AVMIDIControlChangeMessageType = 93
	AVMIDIControlChangeMessageTypeRPN_LSB             AVMIDIControlChangeMessageType = 100
	AVMIDIControlChangeMessageTypeRPN_MSB             AVMIDIControlChangeMessageType = 101
	AVMIDIControlChangeMessageTypeAllSoundOff         AVMIDIControlChangeMessageType = 120
	AVMIDIControlChangeMessageTypeResetAllControllers AVMIDIControlChangeMessageType = 121
	AVMIDIControlChangeMessageTypeAllNotesOff         AVMIDIControlChangeMessageType = 123
	AVMIDIControlChangeMessageTypeOmniModeOff         AVMIDIControlChangeMessageType = 124
	AVMIDIControlChangeMessageTypeOmniModeOn          AVMIDIControlChangeMessageType = 125
	AVMIDIControlChangeMessageTypeMonoModeOn          AVMIDIControlChangeMessageType = 126
	AVMIDIControlChangeMessageTypeMonoModeOff         AVMIDIControlChangeMessageType = 127
)

func (AVMIDIControlChangeMessageType) String

type AVMIDIMetaEvent

type AVMIDIMetaEvent struct {
	AVMusicEvent
}

Apple documentation: https://developer.apple.com/documentation/avfaudio/avmidimetaevent

func AVMIDIMetaEventFromID

func AVMIDIMetaEventFromID(id objc.ID) *AVMIDIMetaEvent

func (*AVMIDIMetaEvent) InitWithTypeData

func (o *AVMIDIMetaEvent) InitWithTypeData(type_ AVMIDIMetaEventType, data *foundation.NSData) *AVMIDIMetaEvent

@method initWithType:data @abstract Initialize the event with a MIDI Meta-Event type and an NSData. @param type A AVMIDIMetaEventType indicating which type of Meta-Event. @param data An NSData object containing the raw contents of the Meta-Event.

func (*AVMIDIMetaEvent) Type

type AVMIDIMetaEventType

type AVMIDIMetaEventType int64
const (
	AVMIDIMetaEventTypeSequenceNumber   AVMIDIMetaEventType = 0
	AVMIDIMetaEventTypeText             AVMIDIMetaEventType = 1
	AVMIDIMetaEventTypeCopyright        AVMIDIMetaEventType = 2
	AVMIDIMetaEventTypeTrackName        AVMIDIMetaEventType = 3
	AVMIDIMetaEventTypeInstrument       AVMIDIMetaEventType = 4
	AVMIDIMetaEventTypeLyric            AVMIDIMetaEventType = 5
	AVMIDIMetaEventTypeMarker           AVMIDIMetaEventType = 6
	AVMIDIMetaEventTypeCuePoint         AVMIDIMetaEventType = 7
	AVMIDIMetaEventTypeMidiChannel      AVMIDIMetaEventType = 32
	AVMIDIMetaEventTypeMidiPort         AVMIDIMetaEventType = 33
	AVMIDIMetaEventTypeEndOfTrack       AVMIDIMetaEventType = 47
	AVMIDIMetaEventTypeTempo            AVMIDIMetaEventType = 81
	AVMIDIMetaEventTypeSmpteOffset      AVMIDIMetaEventType = 84
	AVMIDIMetaEventTypeTimeSignature    AVMIDIMetaEventType = 88
	AVMIDIMetaEventTypeKeySignature     AVMIDIMetaEventType = 89
	AVMIDIMetaEventTypeProprietaryEvent AVMIDIMetaEventType = 127
)

func (AVMIDIMetaEventType) String

func (e AVMIDIMetaEventType) String() string

type AVMIDINoteEvent

type AVMIDINoteEvent struct {
	AVMusicEvent
}

Apple documentation: https://developer.apple.com/documentation/avfaudio/avmidinoteevent

func AVMIDINoteEventFromID

func AVMIDINoteEventFromID(id objc.ID) *AVMIDINoteEvent

func (*AVMIDINoteEvent) Channel

func (o *AVMIDINoteEvent) Channel() uint

@property channel The MIDI channel for the event. Range: 0-15.

func (*AVMIDINoteEvent) Duration

func (o *AVMIDINoteEvent) Duration() float64

@property duration The duration of the event in AVMusicTimeStamp beats. Range: Any non-negative number.

func (*AVMIDINoteEvent) InitWithChannelKeyVelocityDuration

func (o *AVMIDINoteEvent) InitWithChannelKeyVelocityDuration(channel uint, keyNum uint, velocity uint, duration float64) *AVMIDINoteEvent

@method initWithChannel:key:velocity:duration @abstract Initialize the event with a MIDI channel, key number, velocity and duration. @param channel The MIDI channel. Range: 0-15. @param key The MIDI key number. Range: 0-127. @param velocity The MIDI velocity. Range: 0-127 with zero indicating a note-off event. @param duration The duration in beats for this note. Range: Any non-negative number.

func (*AVMIDINoteEvent) Key

func (o *AVMIDINoteEvent) Key() uint

@property key The MIDI key number for the event. Range: 0-127.

func (*AVMIDINoteEvent) SetChannel

func (o *AVMIDINoteEvent) SetChannel(channel uint)

func (*AVMIDINoteEvent) SetDuration

func (o *AVMIDINoteEvent) SetDuration(duration float64)

func (*AVMIDINoteEvent) SetKey

func (o *AVMIDINoteEvent) SetKey(key uint)

func (*AVMIDINoteEvent) SetVelocity

func (o *AVMIDINoteEvent) SetVelocity(velocity uint)

func (*AVMIDINoteEvent) Velocity

func (o *AVMIDINoteEvent) Velocity() uint

@property velocity The MIDI velocity for the event. Range: 0-127.

type AVMIDIPitchBendEvent

type AVMIDIPitchBendEvent struct {
	AVMIDIChannelEvent
}

Apple documentation: https://developer.apple.com/documentation/avfaudio/avmidipitchbendevent

func AVMIDIPitchBendEventFromID

func AVMIDIPitchBendEventFromID(id objc.ID) *AVMIDIPitchBendEvent

func (*AVMIDIPitchBendEvent) InitWithChannelValue

func (o *AVMIDIPitchBendEvent) InitWithChannelValue(channel uint, value uint) *AVMIDIPitchBendEvent

@method initWithChannel:value: @abstract Initialize the event with a channel and a pitch bend value. @param channel The MIDI channel for the message. Range: 0-15. @param value The pitch bend value. Range: 0-16383 (midpoint 8192).

func (*AVMIDIPitchBendEvent) SetValue

func (o *AVMIDIPitchBendEvent) SetValue(value uint)

func (*AVMIDIPitchBendEvent) Value

func (o *AVMIDIPitchBendEvent) Value() uint

type AVMIDIPlayer

type AVMIDIPlayer struct {
	foundation.NSObject
}

Apple documentation: https://developer.apple.com/documentation/avfaudio/avmidiplayer

func AVMIDIPlayerFromID

func AVMIDIPlayerFromID(id objc.ID) *AVMIDIPlayer

func (*AVMIDIPlayer) CurrentPosition

func (o *AVMIDIPlayer) CurrentPosition() float64

@property currentPosition @abstract The current playback position in seconds @discussion Setting this positions the player to the specified time. No range checking on the time value is done. This can be set while the player is playing, in which case playback will resume at the new time.

func (*AVMIDIPlayer) Duration

func (o *AVMIDIPlayer) Duration() float64

@property duration @abstract The length of the currently loaded file in seconds.

func (*AVMIDIPlayer) InitWithContentsOfURLSoundBankURLError

func (o *AVMIDIPlayer) InitWithContentsOfURLSoundBankURLError(inURL *foundation.NSURL, bankURL *foundation.NSURL) (*AVMIDIPlayer, error)

@method initWithContentsOfURL:soundBankURL:error: @abstract Create a player with the contents of the file specified by the URL. @discussion 'bankURL' should contain the path to a SoundFont2 or DLS bank to be used by the MIDI synthesizer. For OSX it can be set to nil for the default, but for iOS it must always refer to a valid bank file.

func (*AVMIDIPlayer) InitWithDataSoundBankURLError

func (o *AVMIDIPlayer) InitWithDataSoundBankURLError(data *foundation.NSData, bankURL *foundation.NSURL) (*AVMIDIPlayer, error)

@method initWithData:soundBankURL:error: @abstract Create a player with the contents of the data object @discussion 'bankURL' should contain the path to a SoundFont2 or DLS bank to be used by the MIDI synthesizer. For OSX it can be set to nil for the default, but for iOS it must always refer to a valid bank file.

func (*AVMIDIPlayer) IsPlaying

func (o *AVMIDIPlayer) IsPlaying() bool

@property playing @abstract Indicates whether or not the player is playing

func (*AVMIDIPlayer) Play

func (o *AVMIDIPlayer) Play(completionHandler func())

@method play: @abstract Play the sequence.

func (*AVMIDIPlayer) PrepareToPlay

func (o *AVMIDIPlayer) PrepareToPlay()

@method prepareToPlay @abstract Get ready to play the sequence by prerolling all events @discussion Happens automatically on play if it has not already been called, but may produce a delay in startup.

func (*AVMIDIPlayer) Rate

func (o *AVMIDIPlayer) Rate() float32

@property rate @abstract The playback rate of the player @discussion 1.0 is normal playback rate. Rate must be > 0.0.

func (*AVMIDIPlayer) SetCurrentPosition

func (o *AVMIDIPlayer) SetCurrentPosition(currentPosition float64)

func (*AVMIDIPlayer) SetRate

func (o *AVMIDIPlayer) SetRate(rate float32)

func (*AVMIDIPlayer) Stop

func (o *AVMIDIPlayer) Stop()

@method stop @abstract Stop playing the sequence.

type AVMIDIPolyPressureEvent

type AVMIDIPolyPressureEvent struct {
	AVMIDIChannelEvent
}

Apple documentation: https://developer.apple.com/documentation/avfaudio/avmidipolypressureevent

func AVMIDIPolyPressureEventFromID

func AVMIDIPolyPressureEventFromID(id objc.ID) *AVMIDIPolyPressureEvent

func (*AVMIDIPolyPressureEvent) InitWithChannelKeyPressure

func (o *AVMIDIPolyPressureEvent) InitWithChannelKeyPressure(channel uint, key uint, pressure uint) *AVMIDIPolyPressureEvent

@method initWithChannel:key:pressure @abstract Initialize the event with a channel, a MIDI key number, and a key pressure value. @param channel The MIDI channel for the message. Range: 0-15. @param key The MIDI key number to which the pressure should be applied. @param pressure The poly pressure value.

func (*AVMIDIPolyPressureEvent) Key

func (o *AVMIDIPolyPressureEvent) Key() uint

@property key The MIDI key number.

func (*AVMIDIPolyPressureEvent) Pressure

func (o *AVMIDIPolyPressureEvent) Pressure() uint

@property pressure The poly pressure value for the requested key.

func (*AVMIDIPolyPressureEvent) SetKey

func (o *AVMIDIPolyPressureEvent) SetKey(key uint)

func (*AVMIDIPolyPressureEvent) SetPressure

func (o *AVMIDIPolyPressureEvent) SetPressure(pressure uint)

type AVMIDIProgramChangeEvent

type AVMIDIProgramChangeEvent struct {
	AVMIDIChannelEvent
}

Apple documentation: https://developer.apple.com/documentation/avfaudio/avmidiprogramchangeevent

func AVMIDIProgramChangeEventFromID

func AVMIDIProgramChangeEventFromID(id objc.ID) *AVMIDIProgramChangeEvent

func (*AVMIDIProgramChangeEvent) InitWithChannelProgramNumber

func (o *AVMIDIProgramChangeEvent) InitWithChannelProgramNumber(channel uint, programNumber uint) *AVMIDIProgramChangeEvent

@method initWithChannel:programNumber: @abstract Initialize the event with a channel and a program number. @param channel The MIDI channel for the message. Range: 0-15. @param programNumber The program number to be sent. Range: 0-127. @discussion Per the General MIDI specification, the actual instrument that is chosen will depend on optional AVMIDIControlChangeMessageTypeBankSelect events sent prior to this program change.

func (*AVMIDIProgramChangeEvent) ProgramNumber

func (o *AVMIDIProgramChangeEvent) ProgramNumber() uint

func (*AVMIDIProgramChangeEvent) SetProgramNumber

func (o *AVMIDIProgramChangeEvent) SetProgramNumber(programNumber uint)

type AVMIDISysexEvent

type AVMIDISysexEvent struct {
	AVMusicEvent
}

Apple documentation: https://developer.apple.com/documentation/avfaudio/avmidisysexevent

func AVMIDISysexEventFromID

func AVMIDISysexEventFromID(id objc.ID) *AVMIDISysexEvent

func (*AVMIDISysexEvent) InitWithData

func (o *AVMIDISysexEvent) InitWithData(data *foundation.NSData) *AVMIDISysexEvent

@method initWithData: @abstract Initialize the event with an NSData. @param data An NSData object containing the raw contents of the system exclusive event.

func (*AVMIDISysexEvent) SizeInBytes

func (o *AVMIDISysexEvent) SizeInBytes() uint

type AVMusicEvent

type AVMusicEvent struct {
	foundation.NSObject
}

Apple documentation: https://developer.apple.com/documentation/avfaudio/avmusicevent

func AVMusicEventFromID

func AVMusicEventFromID(id objc.ID) *AVMusicEvent

type AVMusicSequenceLoadOptions

type AVMusicSequenceLoadOptions uint64
const (
	AVMusicSequenceLoadSMF_PreserveTracks   AVMusicSequenceLoadOptions = 0
	AVMusicSequenceLoadSMF_ChannelsToTracks AVMusicSequenceLoadOptions = 1
)

func (AVMusicSequenceLoadOptions) String

type AVMusicTrack

type AVMusicTrack struct {
	foundation.NSObject
}

Apple documentation: https://developer.apple.com/documentation/avfaudio/avmusictrack

func AVMusicTrackFromID

func AVMusicTrackFromID(id objc.ID) *AVMusicTrack

func (*AVMusicTrack) AddEventAtBeat

func (o *AVMusicTrack) AddEventAtBeat(event *AVMusicEvent, beat float64)

func (*AVMusicTrack) ClearEventsInRange

func (o *AVMusicTrack) ClearEventsInRange(range_ AVBeatRange)

@method clearEventsInRange: @abstract Removes all events in the given beat range, erasing that portion of the AVMusicTrack. @param range the range of beats. Must be a valid AVBeatRange. @discussion All events outside of the specified range left unmodified.

func (*AVMusicTrack) CopyAndMergeEventsInRangeFromTrackMergeAtBeat

func (o *AVMusicTrack) CopyAndMergeEventsInRangeFromTrackMergeAtBeat(range_ AVBeatRange, sourceTrack *AVMusicTrack, mergeStartBeat float64)

@method copyAndMergeEventsInRange:fromTrack:mergeAtBeat @abstract Copies all events in the given beat range from the specified AVMusicTrack, merging them into the current AVMusicTrack. @param range the range of beats. Must be a valid AVBeatRange. @param sourceTrack the AVMusicTrack to copy the events from. @param insertStartBeat the start beat at which the copied events should be merged. @discussion All events originally at or past mergeStartBeat will be left unmodified. Copying events from track to track follows the same type-exclusion rules as adding events: The operation will generate an exception.

func (*AVMusicTrack) CopyEventsInRangeFromTrackInsertAtBeat

func (o *AVMusicTrack) CopyEventsInRangeFromTrackInsertAtBeat(range_ AVBeatRange, sourceTrack *AVMusicTrack, insertStartBeat float64)

@method copyEventsInRange:fromTrack:insertAtBeat @abstract Copies all events in the given beat range from the specified AVMusicTrack, splicing them into the current AVMusicTrack. @param range the range of beats. Must be a valid AVBeatRange. @param sourceTrack the AVMusicTrack to copy the events from. @param insertStartBeat the start beat at which the copied events should be spliced in. @discussion All events originally at or past insertStartBeat will be shifted forward by the duration of the copied-in range.

func (*AVMusicTrack) CutEventsInRange

func (o *AVMusicTrack) CutEventsInRange(range_ AVBeatRange)

@method cutEventsInRange: @abstract Removes all events in the given beat range, splicing out that portion of the AVMusicTrack. @param range the range of beats. Must be a valid AVBeatRange. @discussion All events past the end of the specified range will be shifted backward by the duration of the range.

func (*AVMusicTrack) DestinationAudioUnit

func (o *AVMusicTrack) DestinationAudioUnit() *AVAudioUnit

@property destinationAudioUnit @abstract The AVAudioUnit which will receive the track's events @discussion This is mutually exclusive with setting a destination MIDIEndpoint. The AU must already be attached to an audio engine, and the track must be part of the AVAudioSequencer associated with that engine. When playing, the track will send its events to that AVAudioUnit. The destination AU cannot be changed while the track's sequence is playing.

func (*AVMusicTrack) DestinationMIDIEndpoint

func (o *AVMusicTrack) DestinationMIDIEndpoint() uint

func (*AVMusicTrack) EnumerateEventsInRangeUsing

func (o *AVMusicTrack) EnumerateEventsInRangeUsing(range_ AVBeatRange, block func(*AVMusicEvent, *float64, *bool))

@method enumerateEventsInRange:usingBlock: @abstract Iterates through the AVMusicEvents within the AVMusicTrack whose timestamps fit within the range, calling the block for each. @param block the AVMusicEventEnumerationBlock to call for each event. @discussion Each event returned via the block should be examined using `NSObject(isKindOfClass:)` to determine its subclass and then cast and accessed/edited accordingly. The iteration may continue after removing an event. The event objects returned via the block will not be the same instances which were added to the AVMusicTrack, though their contents will be identical.

func (*AVMusicTrack) IsLoopingEnabled

func (o *AVMusicTrack) IsLoopingEnabled() bool

@property loopingEnabled @abstract Determines whether or not the track is looped. @discussion If loopRange has not been set, the full track will be looped.

func (*AVMusicTrack) IsMuted

func (o *AVMusicTrack) IsMuted() bool

@property muted @abstract Whether the track is muted

func (*AVMusicTrack) IsSoloed

func (o *AVMusicTrack) IsSoloed() bool

@property soloed @abstract Whether the track is soloed

func (*AVMusicTrack) LengthInBeats

func (o *AVMusicTrack) LengthInBeats() float64

@property lengthInBeats @abstract The total duration of the track in beats @discussion This will return the beat of the last event in the track plus any additional time that may be needed for fading out of ending notes or round a loop point to musical bar, etc. If this has not been set by the user, 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 maximum of the user-set track length, or the calculated length.

func (*AVMusicTrack) LengthInSeconds

func (o *AVMusicTrack) LengthInSeconds() float64

@property lengthInSeconds @abstract The total duration of the track in seconds @discussion This will return time of the last event in the track plus any additional time that may be needed for fading out of ending notes or round a loop point to musical bar, etc. If this has not been set by the user, 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 maximum of the user-set track length, or the calculated length.

func (*AVMusicTrack) LoopRange

func (o *AVMusicTrack) LoopRange() AVBeatRange

@property loopRange @abstract The timestamp range in beats for the loop @discussion The loop is set by specifying its beat range.

func (*AVMusicTrack) MoveEventsInRangeByAmount

func (o *AVMusicTrack) MoveEventsInRangeByAmount(range_ AVBeatRange, beatAmount float64)

@method moveEventsInRange:byAmount @abstract Shift the beat location of all events in the given beat range by the amount specified. @param range the range of beats. Must be a valid AVBeatRange. @param beatAmount the amount in beats to shift each event. The amount may be positive or negative.

func (*AVMusicTrack) NumberOfLoops

func (o *AVMusicTrack) NumberOfLoops() int

@property numberOfLoops @abstract The number of times that the track's loop will repeat @discussion If set to AVMusicTrackLoopCountForever, the track will loop forever. Otherwise, legal values start with 1.

func (*AVMusicTrack) OffsetTime

func (o *AVMusicTrack) OffsetTime() float64

@property offsetTime @abstract Offset the track's start time to the specified time in beats @discussion By default this value is zero.

func (*AVMusicTrack) SetDestinationAudioUnit

func (o *AVMusicTrack) SetDestinationAudioUnit(destinationAudioUnit *AVAudioUnit)

func (*AVMusicTrack) SetDestinationMIDIEndpoint

func (o *AVMusicTrack) SetDestinationMIDIEndpoint(destinationMIDIEndpoint uint)

func (*AVMusicTrack) SetLengthInBeats

func (o *AVMusicTrack) SetLengthInBeats(lengthInBeats float64)

func (*AVMusicTrack) SetLengthInSeconds

func (o *AVMusicTrack) SetLengthInSeconds(lengthInSeconds float64)

func (*AVMusicTrack) SetLoopRange

func (o *AVMusicTrack) SetLoopRange(loopRange AVBeatRange)

func (*AVMusicTrack) SetLoopingEnabled

func (o *AVMusicTrack) SetLoopingEnabled(loopingEnabled bool)

func (*AVMusicTrack) SetMuted

func (o *AVMusicTrack) SetMuted(muted bool)

func (*AVMusicTrack) SetNumberOfLoops

func (o *AVMusicTrack) SetNumberOfLoops(numberOfLoops int)

func (*AVMusicTrack) SetOffsetTime

func (o *AVMusicTrack) SetOffsetTime(offsetTime float64)

func (*AVMusicTrack) SetSoloed

func (o *AVMusicTrack) SetSoloed(soloed bool)

func (*AVMusicTrack) SetUsesAutomatedParameters

func (o *AVMusicTrack) SetUsesAutomatedParameters(usesAutomatedParameters bool)

func (*AVMusicTrack) TimeResolution

func (o *AVMusicTrack) TimeResolution() uint

@property timeResolution @abstract The time resolution value for the sequence, in ticks (pulses) per quarter note (PPQN) @discussion If a MIDI file was used to construct the containing sequence, the resolution will be what was in the file. If you want to keep a time resolution when writing a new file, you can retrieve this value and then specify it when calling -[AVAudioSequencer writeToFile:flags:withResolution]. It has no direct bearing on the rendering or notion of time of the sequence itself, just its representation in MIDI files. By default this is set to either 480 if the sequence was created manually, or a value based on what was in a MIDI file if the sequence was created from a MIDI file. This can only be retrieved from the tempo track.

func (*AVMusicTrack) UsesAutomatedParameters

func (o *AVMusicTrack) UsesAutomatedParameters() bool

@property usesAutomatedParameters @abstract Indicates whether the track is an automation track. @discussion If set to YES, this can be used to contain, parameter automation events, exclusively. Adding any other event types will generate exceptions. If a track already contains non-parameter events, setting this to YES will generate an exception.

type AVMusicTrackLoopCount

type AVMusicTrackLoopCount int64
const (
	AVMusicTrackLoopCountForever AVMusicTrackLoopCount = -1
)

func (AVMusicTrackLoopCount) String

func (e AVMusicTrackLoopCount) String() string

type AVMusicUserEvent

type AVMusicUserEvent struct {
	AVMusicEvent
}

Apple documentation: https://developer.apple.com/documentation/avfaudio/avmusicuserevent

func AVMusicUserEventFromID

func AVMusicUserEventFromID(id objc.ID) *AVMusicUserEvent

func (*AVMusicUserEvent) InitWithData

func (o *AVMusicUserEvent) InitWithData(data *foundation.NSData) *AVMusicUserEvent

@method initWithData: @abstract Initialize the event with an NSData. @param data An NSData object containing the contents to be returned via the AVMusicTrack's user callback.

func (*AVMusicUserEvent) SizeInBytes

func (o *AVMusicUserEvent) SizeInBytes() uint

type AVParameterEvent

type AVParameterEvent struct {
	AVMusicEvent
}

Apple documentation: https://developer.apple.com/documentation/avfaudio/avparameterevent

func AVParameterEventFromID

func AVParameterEventFromID(id objc.ID) *AVParameterEvent

func (*AVParameterEvent) Element

func (o *AVParameterEvent) Element() uint

@property element The element index within the scope (see AudioUnitElement).

func (*AVParameterEvent) InitWithParameterIDScopeElementValue

func (o *AVParameterEvent) InitWithParameterIDScopeElementValue(parameterID uint, scope uint, element uint, value float32) *AVParameterEvent

@method initWithParameterID:scope:element:value @abstract Initialize the event with the parameter ID, scope, element, and value for the parameter to be set. @param parameterID The ID of the parameter (see AudioUnitParameterID). @param scope The audio unit scope for the parameter (see AudioUnitScope). @param element The element index within the scope (see AudioUnitElement). @param value The value of the parameter to be set. Range: Dependent on parameter.

func (*AVParameterEvent) ParameterID

func (o *AVParameterEvent) ParameterID() uint

@property parameterID The ID of the parameter (see AudioUnitParameterID).

func (*AVParameterEvent) Scope

func (o *AVParameterEvent) Scope() uint

@property scope The audio unit scope for the parameter (see AudioUnitScope).

func (*AVParameterEvent) SetElement

func (o *AVParameterEvent) SetElement(element uint)

func (*AVParameterEvent) SetParameterID

func (o *AVParameterEvent) SetParameterID(parameterID uint)

func (*AVParameterEvent) SetScope

func (o *AVParameterEvent) SetScope(scope uint)

func (*AVParameterEvent) SetValue

func (o *AVParameterEvent) SetValue(value float32)

func (*AVParameterEvent) Value

func (o *AVParameterEvent) Value() float32

@property value The value of the parameter to be set. Range: Dependent on parameter.

type AVSpeechBoundary

type AVSpeechBoundary int64
const (
	AVSpeechBoundaryImmediate AVSpeechBoundary = 0
	AVSpeechBoundaryWord      AVSpeechBoundary = 1
)

func (AVSpeechBoundary) String

func (e AVSpeechBoundary) String() string

type AVSpeechSynthesisMarker

type AVSpeechSynthesisMarker struct {
	foundation.NSObject
}

Apple documentation: https://developer.apple.com/documentation/avfaudio/avspeechsynthesismarker

func AVSpeechSynthesisMarkerFromID

func AVSpeechSynthesisMarkerFromID(id objc.ID) *AVSpeechSynthesisMarker

func (*AVSpeechSynthesisMarker) BookmarkName

func (o *AVSpeechSynthesisMarker) BookmarkName() *foundation.NSString

func (*AVSpeechSynthesisMarker) ByteSampleOffset

func (o *AVSpeechSynthesisMarker) ByteSampleOffset() uint

Byte offset into the associated audio buffer

func (*AVSpeechSynthesisMarker) InitWithBookmarkNameAtByteSampleOffset

func (o *AVSpeechSynthesisMarker) InitWithBookmarkNameAtByteSampleOffset(mark *foundation.NSString, byteSampleOffset int) *AVSpeechSynthesisMarker

func (*AVSpeechSynthesisMarker) InitWithMarkerTypeForTextRangeAtByteSampleOffset

func (o *AVSpeechSynthesisMarker) InitWithMarkerTypeForTextRangeAtByteSampleOffset(type_ AVSpeechSynthesisMarkerMark, range_ foundation.NSRange, byteSampleOffset uint) *AVSpeechSynthesisMarker

func (*AVSpeechSynthesisMarker) InitWithParagraphRangeAtByteSampleOffset

func (o *AVSpeechSynthesisMarker) InitWithParagraphRangeAtByteSampleOffset(range_ foundation.NSRange, byteSampleOffset int) *AVSpeechSynthesisMarker

func (*AVSpeechSynthesisMarker) InitWithPhonemeStringAtByteSampleOffset

func (o *AVSpeechSynthesisMarker) InitWithPhonemeStringAtByteSampleOffset(phoneme *foundation.NSString, byteSampleOffset int) *AVSpeechSynthesisMarker

func (*AVSpeechSynthesisMarker) InitWithSentenceRangeAtByteSampleOffset

func (o *AVSpeechSynthesisMarker) InitWithSentenceRangeAtByteSampleOffset(range_ foundation.NSRange, byteSampleOffset int) *AVSpeechSynthesisMarker

func (*AVSpeechSynthesisMarker) InitWithWordRangeAtByteSampleOffset

func (o *AVSpeechSynthesisMarker) InitWithWordRangeAtByteSampleOffset(range_ foundation.NSRange, byteSampleOffset int) *AVSpeechSynthesisMarker

func (*AVSpeechSynthesisMarker) Mark

func (*AVSpeechSynthesisMarker) Phoneme

func (*AVSpeechSynthesisMarker) SetBookmarkName

func (o *AVSpeechSynthesisMarker) SetBookmarkName(bookmarkName *foundation.NSString)

func (*AVSpeechSynthesisMarker) SetByteSampleOffset

func (o *AVSpeechSynthesisMarker) SetByteSampleOffset(byteSampleOffset uint)

func (*AVSpeechSynthesisMarker) SetMark

func (*AVSpeechSynthesisMarker) SetPhoneme

func (o *AVSpeechSynthesisMarker) SetPhoneme(phoneme *foundation.NSString)

func (*AVSpeechSynthesisMarker) SetTextRange

func (o *AVSpeechSynthesisMarker) SetTextRange(textRange foundation.NSRange)

func (*AVSpeechSynthesisMarker) TextRange

The location and length of the pertaining speech request's SSML text. This marker applies to the range of characters represented by the NSString.

type AVSpeechSynthesisMarkerMark

type AVSpeechSynthesisMarkerMark int64
const (
	AVSpeechSynthesisMarkerMarkPhoneme   AVSpeechSynthesisMarkerMark = 0
	AVSpeechSynthesisMarkerMarkWord      AVSpeechSynthesisMarkerMark = 1
	AVSpeechSynthesisMarkerMarkSentence  AVSpeechSynthesisMarkerMark = 2
	AVSpeechSynthesisMarkerMarkParagraph AVSpeechSynthesisMarkerMark = 3
	AVSpeechSynthesisMarkerMarkBookmark  AVSpeechSynthesisMarkerMark = 4
)

func (AVSpeechSynthesisMarkerMark) String

type AVSpeechSynthesisPersonalVoiceAuthorizationStatus

type AVSpeechSynthesisPersonalVoiceAuthorizationStatus uint64
const (
	// The app's authorization status has not yet been determined. When your app's status is not determined, calling the requestAuthorization: method prompts the user to grant or deny authorization.
	AVSpeechSynthesisPersonalVoiceAuthorizationStatusNotDetermined AVSpeechSynthesisPersonalVoiceAuthorizationStatus = 0
	// The user denied your app's request to use personal voices.
	AVSpeechSynthesisPersonalVoiceAuthorizationStatusDenied AVSpeechSynthesisPersonalVoiceAuthorizationStatus = 1
	// Personal voices are unsupported on this device.
	AVSpeechSynthesisPersonalVoiceAuthorizationStatusUnsupported AVSpeechSynthesisPersonalVoiceAuthorizationStatus = 2
	// The user granted your app's request to use personal voices.
	AVSpeechSynthesisPersonalVoiceAuthorizationStatusAuthorized AVSpeechSynthesisPersonalVoiceAuthorizationStatus = 3
)

func AVSpeechSynthesizerPersonalVoiceAuthorizationStatus

func AVSpeechSynthesizerPersonalVoiceAuthorizationStatus() AVSpeechSynthesisPersonalVoiceAuthorizationStatus

Returns your app's current authorization to use personal voices. @Discussion The user can reject your app's request to use personal voices, but your request can also be denied if personal voices are not supported on the device. The app can also change your app's authorization status at any time from the Settings app. @Returns The app's current authorization status value. For a list of values, see AVSpeechSynthesisPersonalVoiceAuthorizationStatus.

func (AVSpeechSynthesisPersonalVoiceAuthorizationStatus) String

type AVSpeechSynthesisProviderAudioUnit

type AVSpeechSynthesisProviderAudioUnit struct {
	// contains filtered or unexported fields
}

Apple documentation: https://developer.apple.com/documentation/avfaudio/avspeechsynthesisprovideraudiounit

func AVSpeechSynthesisProviderAudioUnitFromID

func AVSpeechSynthesisProviderAudioUnitFromID(id objc.ID) *AVSpeechSynthesisProviderAudioUnit

func (*AVSpeechSynthesisProviderAudioUnit) CancelSpeechRequest

func (o *AVSpeechSynthesisProviderAudioUnit) CancelSpeechRequest()

@brief Informs the audio unit that the speech request job should be discarded.

func (*AVSpeechSynthesisProviderAudioUnit) InitPtr

func (*AVSpeechSynthesisProviderAudioUnit) Ptr

func (*AVSpeechSynthesisProviderAudioUnit) SetSpeechSynthesisOutputMetadataBlock

func (o *AVSpeechSynthesisProviderAudioUnit) SetSpeechSynthesisOutputMetadataBlock(speechSynthesisOutputMetadataBlock func(*foundation.NSArray[*AVSpeechSynthesisMarker], *AVSpeechSynthesisProviderRequest))

func (*AVSpeechSynthesisProviderAudioUnit) SetSpeechVoices

func (*AVSpeechSynthesisProviderAudioUnit) SpeechSynthesisOutputMetadataBlock

func (o *AVSpeechSynthesisProviderAudioUnit) SpeechSynthesisOutputMetadataBlock() objc.Block

@brief A property set by the host that is called by the audio unit to supply metadata for a speech request. @discussion A synthesizer should call this method when it has produced relevant data to the audio buffers it is sending back to the host. In some cases speech output may be delayed until these markers are delivered. For example, word highlighting depends on marker data from synthesizers in order to properly time which words are highlighted. Many speech synthesizers generate this information on the fly, while synthesizing the audio. The array of markers can reference future audio buffers that have yet to be delivered. There may be cases in which marker data is not fully known until further audio processing is done. In these cases, and other casers where marker data has changed, calling this block with marker data that contains perviously delivered audio buffer ranges will replace that audio buffer range's marker data, as it will be considered stale.

func (*AVSpeechSynthesisProviderAudioUnit) SpeechVoices

@brief Returns the voices this audio unit has available and ready for synthesis. @discussion This method should fetch and return the voices ready to synthesize that a user can select from (usually through Settings). Required for speech synthesizer audio unit extensions. An audio unit with a dynamic list of voices can override this property's getter to perform a more complex fetch.

func (*AVSpeechSynthesisProviderAudioUnit) SynthesizeSpeechRequest

func (o *AVSpeechSynthesisProviderAudioUnit) SynthesizeSpeechRequest(speechRequest *AVSpeechSynthesisProviderRequest)

@brief Sends a new speech request to be synthesized @discussion Sends a new speech request to the synthesizer to render. When the synthesizer audio unit is finished generating audio buffers for the speech request, it should indicate this within its internal render block, @c AUInternalRenderBlock, specifically through the @c AudioUnitRenderActionFlags flag @c kAudioOfflineUnitRenderAction_Complete.

type AVSpeechSynthesisProviderRequest

type AVSpeechSynthesisProviderRequest struct {
	foundation.NSObject
}

Apple documentation: https://developer.apple.com/documentation/avfaudio/avspeechsynthesisproviderrequest

func AVSpeechSynthesisProviderRequestFromID

func AVSpeechSynthesisProviderRequestFromID(id objc.ID) *AVSpeechSynthesisProviderRequest

func (*AVSpeechSynthesisProviderRequest) InitWithSSMLRepresentationVoice

func (*AVSpeechSynthesisProviderRequest) SsmlRepresentation

func (o *AVSpeechSynthesisProviderRequest) SsmlRepresentation() *foundation.NSString

@abstract The SSML representation of the text to be synthesized with the corresponding speech synthesis attributes for customization of pitch, rate, intonation, and more. @see https://www.w3.org/TR/speech-synthesis11/

func (*AVSpeechSynthesisProviderRequest) Voice

@abstract The voice to be used in this speech request

type AVSpeechSynthesisProviderVoice

type AVSpeechSynthesisProviderVoice struct {
	foundation.NSObject
}

Apple documentation: https://developer.apple.com/documentation/avfaudio/avspeechsynthesisprovidervoice

func AVSpeechSynthesisProviderVoiceFromID

func AVSpeechSynthesisProviderVoiceFromID(id objc.ID) *AVSpeechSynthesisProviderVoice

func (*AVSpeechSynthesisProviderVoice) Age

@brief The age of the voice in years (optional) @discussion This is an optional property that indicates the age of this voice, to be treated as a personality trait. Defaults to 0.

func (*AVSpeechSynthesisProviderVoice) Gender

@brief The gender of the voice (optional)

func (*AVSpeechSynthesisProviderVoice) Identifier

@brief A unique identifier for the voice @discussion The recommended format is reverse domain notation. Behavior is undefined if identifiers are not unique for all voices within a given extension.

func (*AVSpeechSynthesisProviderVoice) InitWithNameIdentifierPrimaryLanguagesSupportedLanguages

func (o *AVSpeechSynthesisProviderVoice) InitWithNameIdentifierPrimaryLanguagesSupportedLanguages(name *foundation.NSString, identifier *foundation.NSString, primaryLanguages *foundation.NSArray[*foundation.NSString], supportedLanguages *foundation.NSArray[*foundation.NSString]) *AVSpeechSynthesisProviderVoice

func (*AVSpeechSynthesisProviderVoice) Name

@brief The localized name of the voice

func (*AVSpeechSynthesisProviderVoice) PrimaryLanguages

@brief A set of BCP 47 codes identifying the languages this synthesizer is primarily used for. @discussion These languages are what a user would expect a synthesizer to fully support and be primarily used for.

func (*AVSpeechSynthesisProviderVoice) SetAge

func (o *AVSpeechSynthesisProviderVoice) SetAge(age int)

func (*AVSpeechSynthesisProviderVoice) SetGender

func (*AVSpeechSynthesisProviderVoice) SetVoiceSize

func (o *AVSpeechSynthesisProviderVoice) SetVoiceSize(voiceSize int64)

func (*AVSpeechSynthesisProviderVoice) SupportedLanguages

@brief A superset of BCP 47 codes identifying the voice’s supported languages. @discussion These languages are what a user would expect a voice to be able to speak such that if the voice is given a multi-lingual phrase, it would be able to speak the entire phrase without a need to to switch voices. For example, a zh-CN voice could have @c ["zh-CN"] as its @c primaryLanguages, but in @c supportedLanguages have @c ["zh-CN","en-US"] indicating if it received "你好 means Hello", it would be able to speak the entire phrase.

func (*AVSpeechSynthesisProviderVoice) VoiceSize

func (o *AVSpeechSynthesisProviderVoice) VoiceSize() int64

@brief The size of the voice (optional) @discussion This reported size of the voice package on disk, in bytes. Defaults to 0.

type AVSpeechSynthesisVoice

type AVSpeechSynthesisVoice struct {
	foundation.NSObject
}

Apple documentation: https://developer.apple.com/documentation/avfaudio/avspeechsynthesisvoice

func AVSpeechSynthesisVoiceFromID

func AVSpeechSynthesisVoiceFromID(id objc.ID) *AVSpeechSynthesisVoice

func AVSpeechSynthesisVoiceVoiceWithIdentifier

func AVSpeechSynthesisVoiceVoiceWithIdentifier(identifier *foundation.NSString) *AVSpeechSynthesisVoice

@method voiceWithIdentifier: @abstract Retrieve a voice by its identifier. @param identifier A unique identifier for a voice. @discussion Passing in an invalid identifier will return nil. Returns nil if the identifier is valid, but the voice is not available on device (i.e. not yet downloaded by the user).

func AVSpeechSynthesisVoiceVoiceWithLanguage

func AVSpeechSynthesisVoiceVoiceWithLanguage(languageCode *foundation.NSString) *AVSpeechSynthesisVoice

@method voiceWithLanguage: @abstract Use a BCP-47 language tag to specify the desired language and region. @param languageCode Specifies the BCP-47 language tag that represents the voice. @discussion The default is the system's region and language. Passing in nil will return the default voice. Passing in an invalid languageCode will return nil. Will return enhanced quality voice if available, default quality otherwise. Examples: en-US (U.S. English), fr-CA (French Canadian)

func (*AVSpeechSynthesisVoice) AudioFileSettings

func (*AVSpeechSynthesisVoice) Gender

func (*AVSpeechSynthesisVoice) Identifier

func (o *AVSpeechSynthesisVoice) Identifier() *foundation.NSString

func (*AVSpeechSynthesisVoice) Language

func (*AVSpeechSynthesisVoice) Name

func (*AVSpeechSynthesisVoice) Quality

func (*AVSpeechSynthesisVoice) VoiceTraits

type AVSpeechSynthesisVoiceGender

type AVSpeechSynthesisVoiceGender int64
const (
	AVSpeechSynthesisVoiceGenderUnspecified AVSpeechSynthesisVoiceGender = 0
	AVSpeechSynthesisVoiceGenderMale        AVSpeechSynthesisVoiceGender = 1
	AVSpeechSynthesisVoiceGenderFemale      AVSpeechSynthesisVoiceGender = 2
)

func (AVSpeechSynthesisVoiceGender) String

type AVSpeechSynthesisVoiceQuality

type AVSpeechSynthesisVoiceQuality int64
const (
	AVSpeechSynthesisVoiceQualityDefault  AVSpeechSynthesisVoiceQuality = 1
	AVSpeechSynthesisVoiceQualityEnhanced AVSpeechSynthesisVoiceQuality = 2
	AVSpeechSynthesisVoiceQualityPremium  AVSpeechSynthesisVoiceQuality = 3
)

func (AVSpeechSynthesisVoiceQuality) String

type AVSpeechSynthesisVoiceTraits

type AVSpeechSynthesisVoiceTraits uint64
const (
	AVSpeechSynthesisVoiceTraitNone AVSpeechSynthesisVoiceTraits = 0
	// The voice is generally for novelty purposes, for example a character's voice in a game.
	AVSpeechSynthesisVoiceTraitIsNoveltyVoice AVSpeechSynthesisVoiceTraits = 1
	// The voice is was generated by, and belongs to the user. Voices with this trait will only be avilable when AVSpeechSynthesizer.personalVoiceAuthorizationStatus is AVSpeechSynthesisPersonalVoiceAuthorizationStatusAuthorized
	AVSpeechSynthesisVoiceTraitIsPersonalVoice AVSpeechSynthesisVoiceTraits = 2
)

func (AVSpeechSynthesisVoiceTraits) String

type AVSpeechSynthesizer

type AVSpeechSynthesizer struct {
	foundation.NSObject
}

Apple documentation: https://developer.apple.com/documentation/avfaudio/avspeechsynthesizer

func AVSpeechSynthesizerFromID

func AVSpeechSynthesizerFromID(id objc.ID) *AVSpeechSynthesizer

func (*AVSpeechSynthesizer) ContinueSpeaking

func (o *AVSpeechSynthesizer) ContinueSpeaking() bool

func (*AVSpeechSynthesizer) Delegate

func (*AVSpeechSynthesizer) IsPaused

func (o *AVSpeechSynthesizer) IsPaused() bool

func (*AVSpeechSynthesizer) IsSpeaking

func (o *AVSpeechSynthesizer) IsSpeaking() bool

func (*AVSpeechSynthesizer) PauseSpeakingAtBoundary

func (o *AVSpeechSynthesizer) PauseSpeakingAtBoundary(boundary AVSpeechBoundary) bool

func (*AVSpeechSynthesizer) SetDelegate

func (o *AVSpeechSynthesizer) SetDelegate(delegate AVSpeechSynthesizerDelegate)

func (*AVSpeechSynthesizer) SpeakUtterance

func (o *AVSpeechSynthesizer) SpeakUtterance(utterance *AVSpeechUtterance)

func (*AVSpeechSynthesizer) StopSpeakingAtBoundary

func (o *AVSpeechSynthesizer) StopSpeakingAtBoundary(boundary AVSpeechBoundary) bool

func (*AVSpeechSynthesizer) WriteUtteranceToBufferCallback

func (o *AVSpeechSynthesizer) WriteUtteranceToBufferCallback(utterance *AVSpeechUtterance, bufferCallback func(*AVAudioBuffer))

func (*AVSpeechSynthesizer) WriteUtteranceToBufferCallbackToMarkerCallback

func (o *AVSpeechSynthesizer) WriteUtteranceToBufferCallbackToMarkerCallback(utterance *AVSpeechUtterance, bufferCallback func(*AVAudioBuffer), markerCallback func(*foundation.NSArray[*AVSpeechSynthesisMarker]))

Use this method to receive audio buffers and associated metadata that can be used to store or further process synthesized speech. The dictionary provided by -[AVSpeechSynthesisVoice audioFileSettings] can be used to create an AVAudioFile.

type AVSpeechSynthesizerDelegate

type AVSpeechSynthesizerDelegate interface {
}

AVSpeechSynthesizerDelegate wraps the ObjC protocol AVSpeechSynthesizerDelegate.

type AVSpeechUtterance

type AVSpeechUtterance struct {
	foundation.NSObject
}

Apple documentation: https://developer.apple.com/documentation/avfaudio/avspeechutterance

func AVSpeechUtteranceFromID

func AVSpeechUtteranceFromID(id objc.ID) *AVSpeechUtterance

func AVSpeechUtteranceSpeechUtteranceWithAttributedString

func AVSpeechUtteranceSpeechUtteranceWithAttributedString(string_ *foundation.NSAttributedString) *AVSpeechUtterance

func AVSpeechUtteranceSpeechUtteranceWithSSMLRepresentation

func AVSpeechUtteranceSpeechUtteranceWithSSMLRepresentation(string_ *foundation.NSString) *AVSpeechUtterance

A speech utterance that expects markup written using the Speech Synthesis Markup Language (SSML) standard. Returns nil if invalid SSML is passed in.

func AVSpeechUtteranceSpeechUtteranceWithString

func AVSpeechUtteranceSpeechUtteranceWithString(string_ *foundation.NSString) *AVSpeechUtterance

func (*AVSpeechUtterance) AttributedSpeechString

func (o *AVSpeechUtterance) AttributedSpeechString() *foundation.NSAttributedString

func (*AVSpeechUtterance) InitWithAttributedString

func (o *AVSpeechUtterance) InitWithAttributedString(string_ *foundation.NSAttributedString) *AVSpeechUtterance

func (*AVSpeechUtterance) InitWithSSMLRepresentation

func (o *AVSpeechUtterance) InitWithSSMLRepresentation(string_ *foundation.NSString) *AVSpeechUtterance

@abstract A speech utterance that expects markup written using the Speech Synthesis Markup Language (SSML) standard. @discussion Uses SSML markup to add attributes. If using SSML to request voices that fall under certain attributes, a single utterance may be split into multiple parts, each sent to the appropriate synthesizer. If no voice matches the properties, the voice in the @c voice property of the utterance will be used. If no @c voice is specified, the system's default will be used. @c AVSpeechUtterance properties that affect the prosidy of a voice such as @c rate, @c pitchMultiplier, @c pitchMultiplier will not apply to an utterance that uses an SSML representation. Returns nil if invalid SSML is passed in.

func (*AVSpeechUtterance) InitWithString

func (o *AVSpeechUtterance) InitWithString(string_ *foundation.NSString) *AVSpeechUtterance

func (*AVSpeechUtterance) PitchMultiplier

func (o *AVSpeechUtterance) PitchMultiplier() float32

func (*AVSpeechUtterance) PostUtteranceDelay

func (o *AVSpeechUtterance) PostUtteranceDelay() float64

func (*AVSpeechUtterance) PreUtteranceDelay

func (o *AVSpeechUtterance) PreUtteranceDelay() float64

func (*AVSpeechUtterance) PrefersAssistiveTechnologySettings

func (o *AVSpeechUtterance) PrefersAssistiveTechnologySettings() bool

func (*AVSpeechUtterance) Rate

func (o *AVSpeechUtterance) Rate() float32

func (*AVSpeechUtterance) SetPitchMultiplier

func (o *AVSpeechUtterance) SetPitchMultiplier(pitchMultiplier float32)

func (*AVSpeechUtterance) SetPostUtteranceDelay

func (o *AVSpeechUtterance) SetPostUtteranceDelay(postUtteranceDelay float64)

func (*AVSpeechUtterance) SetPreUtteranceDelay

func (o *AVSpeechUtterance) SetPreUtteranceDelay(preUtteranceDelay float64)

func (*AVSpeechUtterance) SetPrefersAssistiveTechnologySettings

func (o *AVSpeechUtterance) SetPrefersAssistiveTechnologySettings(prefersAssistiveTechnologySettings bool)

func (*AVSpeechUtterance) SetRate

func (o *AVSpeechUtterance) SetRate(rate float32)

func (*AVSpeechUtterance) SetVoice

func (o *AVSpeechUtterance) SetVoice(voice *AVSpeechSynthesisVoice)

func (*AVSpeechUtterance) SetVolume

func (o *AVSpeechUtterance) SetVolume(volume float32)

func (*AVSpeechUtterance) SpeechString

func (o *AVSpeechUtterance) SpeechString() *foundation.NSString

func (*AVSpeechUtterance) Voice

func (*AVSpeechUtterance) Volume

func (o *AVSpeechUtterance) Volume() float32

type Acl_entry_id_t

type Acl_entry_id_t int64
const (
	ACL_FIRST_ENTRY Acl_entry_id_t = 0
	ACL_NEXT_ENTRY  Acl_entry_id_t = -1
	ACL_LAST_ENTRY  Acl_entry_id_t = -2
)

func (Acl_entry_id_t) String

func (e Acl_entry_id_t) String() string

type Acl_flag_t

type Acl_flag_t int64
const (
	ACL_FLAG_DEFER_INHERIT      Acl_flag_t = 1
	ACL_FLAG_NO_INHERIT         Acl_flag_t = 131072
	ACL_ENTRY_INHERITED         Acl_flag_t = 16
	ACL_ENTRY_FILE_INHERIT      Acl_flag_t = 32
	ACL_ENTRY_DIRECTORY_INHERIT Acl_flag_t = 64
	ACL_ENTRY_LIMIT_INHERIT     Acl_flag_t = 128
	ACL_ENTRY_ONLY_INHERIT      Acl_flag_t = 256
)

func (Acl_flag_t) String

func (e Acl_flag_t) String() string

type Acl_perm_t

type Acl_perm_t int64
const (
	ACL_READ_DATA           Acl_perm_t = 2
	ACL_LIST_DIRECTORY      Acl_perm_t = 2
	ACL_WRITE_DATA          Acl_perm_t = 4
	ACL_ADD_FILE            Acl_perm_t = 4
	ACL_EXECUTE             Acl_perm_t = 8
	ACL_SEARCH              Acl_perm_t = 8
	ACL_DELETE              Acl_perm_t = 16
	ACL_APPEND_DATA         Acl_perm_t = 32
	ACL_ADD_SUBDIRECTORY    Acl_perm_t = 32
	ACL_DELETE_CHILD        Acl_perm_t = 64
	ACL_READ_ATTRIBUTES     Acl_perm_t = 128
	ACL_WRITE_ATTRIBUTES    Acl_perm_t = 256
	ACL_READ_EXTATTRIBUTES  Acl_perm_t = 512
	ACL_WRITE_EXTATTRIBUTES Acl_perm_t = 1024
	ACL_READ_SECURITY       Acl_perm_t = 2048
	ACL_WRITE_SECURITY      Acl_perm_t = 4096
	ACL_CHANGE_OWNER        Acl_perm_t = 8192
	ACL_SYNCHRONIZE         Acl_perm_t = 1048576
)

func (Acl_perm_t) String

func (e Acl_perm_t) String() string

type Acl_tag_t

type Acl_tag_t int64
const (
	ACL_UNDEFINED_TAG  Acl_tag_t = 0
	ACL_EXTENDED_ALLOW Acl_tag_t = 1
	ACL_EXTENDED_DENY  Acl_tag_t = 2
)

func (Acl_tag_t) String

func (e Acl_tag_t) String() string

type Acl_type_t

type Acl_type_t int64
const (
	ACL_TYPE_EXTENDED Acl_type_t = 256
	ACL_TYPE_ACCESS   Acl_type_t = 0
	ACL_TYPE_DEFAULT  Acl_type_t = 1
	ACL_TYPE_AFS      Acl_type_t = 2
	ACL_TYPE_CODA     Acl_type_t = 3
	ACL_TYPE_NTFS     Acl_type_t = 4
	ACL_TYPE_NWFS     Acl_type_t = 5
)

func (Acl_type_t) String

func (e Acl_type_t) String() string

type CGLCPContextPriorityRequest

type CGLCPContextPriorityRequest int64
const (
	KCGLCPContextPriorityRequestHigh   CGLCPContextPriorityRequest = 0
	KCGLCPContextPriorityRequestNormal CGLCPContextPriorityRequest = 1
	KCGLCPContextPriorityRequestLow    CGLCPContextPriorityRequest = 2
)

func (CGLCPContextPriorityRequest) String

type Clockid_t

type Clockid_t int64

func (Clockid_t) String

func (e Clockid_t) String() string

type Dispatch_autorelease_frequency_t

type Dispatch_autorelease_frequency_t uint64
const (
	DISPATCH_AUTORELEASE_FREQUENCY_INHERIT   Dispatch_autorelease_frequency_t = 0
	DISPATCH_AUTORELEASE_FREQUENCY_WORK_ITEM Dispatch_autorelease_frequency_t = 1
	DISPATCH_AUTORELEASE_FREQUENCY_NEVER     Dispatch_autorelease_frequency_t = 2
)

func (Dispatch_autorelease_frequency_t) String

type Dispatch_block_flags_t

type Dispatch_block_flags_t uint64
const (
	DISPATCH_BLOCK_BARRIER           Dispatch_block_flags_t = 1
	DISPATCH_BLOCK_DETACHED          Dispatch_block_flags_t = 2
	DISPATCH_BLOCK_ASSIGN_CURRENT    Dispatch_block_flags_t = 4
	DISPATCH_BLOCK_NO_QOS_CLASS      Dispatch_block_flags_t = 8
	DISPATCH_BLOCK_INHERIT_QOS_CLASS Dispatch_block_flags_t = 16
	DISPATCH_BLOCK_ENFORCE_QOS_CLASS Dispatch_block_flags_t = 32
)

func (Dispatch_block_flags_t) String

func (e Dispatch_block_flags_t) String() string

type EvCmd

type EvCmd int64
const (
	EVNOP   EvCmd = 0
	EVHIDE  EvCmd = 1
	EVSHOW  EvCmd = 2
	EVMOVE  EvCmd = 3
	EVLEVEL EvCmd = 4
)

func (EvCmd) String

func (e EvCmd) String() string

type Filesec_property_t

type Filesec_property_t int64
const (
	FILESEC_OWNER         Filesec_property_t = 1
	FILESEC_GROUP         Filesec_property_t = 2
	FILESEC_UUID          Filesec_property_t = 3
	FILESEC_MODE          Filesec_property_t = 4
	FILESEC_ACL           Filesec_property_t = 5
	FILESEC_GRPUUID       Filesec_property_t = 6
	FILESEC_ACL_RAW       Filesec_property_t = 100
	FILESEC_ACL_ALLOCSIZE Filesec_property_t = 101
)

func (Filesec_property_t) String

func (e Filesec_property_t) String() string

type Idtype_t

type Idtype_t int64
const (
	P_ALL  Idtype_t = 0
	P_PID  Idtype_t = 1
	P_PGID Idtype_t = 2
)

func (Idtype_t) String

func (e Idtype_t) String() string

type Ipc_info_object_type_t

type Ipc_info_object_type_t int64
const (
	IPC_OTYPE_NONE                 Ipc_info_object_type_t = 0
	IPC_OTYPE_THREAD_CONTROL       Ipc_info_object_type_t = 1
	IPC_OTYPE_TASK_CONTROL         Ipc_info_object_type_t = 2
	IPC_OTYPE_HOST                 Ipc_info_object_type_t = 3
	IPC_OTYPE_HOST_PRIV            Ipc_info_object_type_t = 4
	IPC_OTYPE_PROCESSOR            Ipc_info_object_type_t = 5
	IPC_OTYPE_PROCESSOR_SET        Ipc_info_object_type_t = 6
	IPC_OTYPE_PROCESSOR_SET_NAME   Ipc_info_object_type_t = 7
	IPC_OTYPE_TIMER                Ipc_info_object_type_t = 8
	IPC_OTYPE_PORT_SUBST_ONCE      Ipc_info_object_type_t = 9
	IPC_OTYPE_MIG                  Ipc_info_object_type_t = 10
	IPC_OTYPE_MEMORY_OBJECT        Ipc_info_object_type_t = 11
	IPC_OTYPE_XMM_PAGER            Ipc_info_object_type_t = 12
	IPC_OTYPE_XMM_KERNEL           Ipc_info_object_type_t = 13
	IPC_OTYPE_XMM_REPLY            Ipc_info_object_type_t = 14
	IPC_OTYPE_UND_REPLY            Ipc_info_object_type_t = 15
	IPC_OTYPE_HOST_NOTIFY          Ipc_info_object_type_t = 16
	IPC_OTYPE_HOST_SECURITY        Ipc_info_object_type_t = 17
	IPC_OTYPE_LEDGER               Ipc_info_object_type_t = 18
	IPC_OTYPE_MAIN_DEVICE          Ipc_info_object_type_t = 19
	IPC_OTYPE_TASK_NAME            Ipc_info_object_type_t = 20
	IPC_OTYPE_SUBSYSTEM            Ipc_info_object_type_t = 21
	IPC_OTYPE_IO_DONE_QUEUE        Ipc_info_object_type_t = 22
	IPC_OTYPE_SEMAPHORE            Ipc_info_object_type_t = 23
	IPC_OTYPE_LOCK_SET             Ipc_info_object_type_t = 24
	IPC_OTYPE_CLOCK                Ipc_info_object_type_t = 25
	IPC_OTYPE_CLOCK_CTRL           Ipc_info_object_type_t = 26
	IPC_OTYPE_IOKIT_IDENT          Ipc_info_object_type_t = 27
	IPC_OTYPE_NAMED_ENTRY          Ipc_info_object_type_t = 28
	IPC_OTYPE_IOKIT_CONNECT        Ipc_info_object_type_t = 29
	IPC_OTYPE_IOKIT_OBJECT         Ipc_info_object_type_t = 30
	IPC_OTYPE_UPL                  Ipc_info_object_type_t = 31
	IPC_OTYPE_MEM_OBJ_CONTROL      Ipc_info_object_type_t = 32
	IPC_OTYPE_AU_SESSIONPORT       Ipc_info_object_type_t = 33
	IPC_OTYPE_FILEPORT             Ipc_info_object_type_t = 34
	IPC_OTYPE_LABELH               Ipc_info_object_type_t = 35
	IPC_OTYPE_TASK_RESUME          Ipc_info_object_type_t = 36
	IPC_OTYPE_VOUCHER              Ipc_info_object_type_t = 37
	IPC_OTYPE_VOUCHER_ATTR_CONTROL Ipc_info_object_type_t = 38
	IPC_OTYPE_WORK_INTERVAL        Ipc_info_object_type_t = 39
	IPC_OTYPE_UX_HANDLER           Ipc_info_object_type_t = 40
	IPC_OTYPE_UEXT_OBJECT          Ipc_info_object_type_t = 41
	IPC_OTYPE_ARCADE_REG           Ipc_info_object_type_t = 42
	IPC_OTYPE_EVENTLINK            Ipc_info_object_type_t = 43
	IPC_OTYPE_TASK_INSPECT         Ipc_info_object_type_t = 44
	IPC_OTYPE_TASK_READ            Ipc_info_object_type_t = 45
	IPC_OTYPE_THREAD_INSPECT       Ipc_info_object_type_t = 46
	IPC_OTYPE_THREAD_READ          Ipc_info_object_type_t = 47
	IPC_OTYPE_SUID_CRED            Ipc_info_object_type_t = 48
	IPC_OTYPE_HYPERVISOR           Ipc_info_object_type_t = 49
	IPC_OTYPE_TASK_ID_TOKEN        Ipc_info_object_type_t = 50
	IPC_OTYPE_TASK_FATAL           Ipc_info_object_type_t = 51
	IPC_OTYPE_KCDATA               Ipc_info_object_type_t = 52
	IPC_OTYPE_EXCLAVES_RESOURCE    Ipc_info_object_type_t = 53
	IPC_OTYPE_THREAD_RESUME        Ipc_info_object_type_t = 54
	IPC_OTYPE_UNKNOWN              Ipc_info_object_type_t = 4294967295
)

func (Ipc_info_object_type_t) String

func (e Ipc_info_object_type_t) String() string

type Launch_data_type_t

type Launch_data_type_t int64
const (
	LAUNCH_DATA_DICTIONARY Launch_data_type_t = 1
	LAUNCH_DATA_ARRAY      Launch_data_type_t = 2
	LAUNCH_DATA_FD         Launch_data_type_t = 3
	LAUNCH_DATA_INTEGER    Launch_data_type_t = 4
	LAUNCH_DATA_REAL       Launch_data_type_t = 5
	LAUNCH_DATA_BOOL       Launch_data_type_t = 6
	LAUNCH_DATA_STRING     Launch_data_type_t = 7
	LAUNCH_DATA_OPAQUE     Launch_data_type_t = 8
	LAUNCH_DATA_ERRNO      Launch_data_type_t = 9
	LAUNCH_DATA_MACHPORT   Launch_data_type_t = 10
)

func (Launch_data_type_t) String

func (e Launch_data_type_t) String() string

type MDLabelDomain

type MDLabelDomain int64

@typedef MDLabelDomain @abstract These constants are used to specify a domain to MDLabelCreate().

const (
	KMDLabelUserDomain  MDLabelDomain = 0
	KMDLabelLocalDomain MDLabelDomain = 1
)

func (MDLabelDomain) String

func (e MDLabelDomain) String() string

type MDQueryOptionFlags

type MDQueryOptionFlags int64
const (
	KMDQuerySynchronous        MDQueryOptionFlags = 1
	KMDQueryWantsUpdates       MDQueryOptionFlags = 4
	KMDQueryAllowFSTranslation MDQueryOptionFlags = 8
)

func (MDQueryOptionFlags) String

func (e MDQueryOptionFlags) String() string

type MDQuerySortOptionFlags

type MDQuerySortOptionFlags int64

@enum MDQuerySortOptionFlags @constant kMDQueryReverseSortOrderFlag Sort the attribute in reverse order.

const (
	KMDQueryReverseSortOrderFlag MDQuerySortOptionFlags = 1
)

func (MDQuerySortOptionFlags) String

func (e MDQuerySortOptionFlags) String() string

type Mach_vm_range_flags_t

type Mach_vm_range_flags_t int64
const (
	MACH_VM_RANGE_NONE Mach_vm_range_flags_t = 0
)

func (Mach_vm_range_flags_t) String

func (e Mach_vm_range_flags_t) String() string

type Mach_vm_range_flavor_t

type Mach_vm_range_flavor_t int64
const (
	MACH_VM_RANGE_FLAVOR_INVALID Mach_vm_range_flavor_t = 0
	MACH_VM_RANGE_FLAVOR_V1      Mach_vm_range_flavor_t = 1
)

func (Mach_vm_range_flavor_t) String

func (e Mach_vm_range_flavor_t) String() string

type Mach_vm_range_tag_t

type Mach_vm_range_tag_t int64
const (
	MACH_VM_RANGE_DEFAULT Mach_vm_range_tag_t = 0
	MACH_VM_RANGE_DATA    Mach_vm_range_tag_t = 1
	MACH_VM_RANGE_FIXED   Mach_vm_range_tag_t = 2
)

func (Mach_vm_range_tag_t) String

func (e Mach_vm_range_tag_t) String() string

type Mpo_flags_t

type Mpo_flags_t int64
const (
	MPO_PORT                            Mpo_flags_t = 0
	MPO_SERVICE_PORT                    Mpo_flags_t = 1024
	MPO_CONNECTION_PORT                 Mpo_flags_t = 2048
	MPO_REPLY_PORT                      Mpo_flags_t = 4096
	MPO_WEAK_REPLY_PORT                 Mpo_flags_t = 16384
	MPO_NOTIFICATION_PORT               Mpo_flags_t = 17408
	MPO_EXCEPTION_PORT                  Mpo_flags_t = 32768
	MPO_CONNECTION_PORT_WITH_PORT_ARRAY Mpo_flags_t = 65536
)

func (Mpo_flags_t) String

func (e Mpo_flags_t) String() string

type NXMouseButton

type NXMouseButton int64
const (
	NX_OneButton   NXMouseButton = 0
	NX_LeftButton  NXMouseButton = 1
	NX_RightButton NXMouseButton = 2
)

func (NXMouseButton) String

func (e NXMouseButton) String() string

type Os_clockid_t

type Os_clockid_t int64
const (
	OS_CLOCK_MACH_ABSOLUTE_TIME Os_clockid_t = 32
)

func (Os_clockid_t) String

func (e Os_clockid_t) String() string

type PMPageToPaperMappingType

type PMPageToPaperMappingType int64
const (
	KPMPageToPaperMappingNone       PMPageToPaperMappingType = 1
	KPMPageToPaperMappingScaleToFit PMPageToPaperMappingType = 2
)

func (PMPageToPaperMappingType) String

func (e PMPageToPaperMappingType) String() string

type Ptrauth_key

type Ptrauth_key int64
const (
	Ptrauth_key_none                     Ptrauth_key = -1
	Ptrauth_key_asia                     Ptrauth_key = 0
	Ptrauth_key_asib                     Ptrauth_key = 1
	Ptrauth_key_asda                     Ptrauth_key = 2
	Ptrauth_key_asdb                     Ptrauth_key = 3
	Ptrauth_key_process_independent_code Ptrauth_key = 0
	Ptrauth_key_process_dependent_code   Ptrauth_key = 1
	Ptrauth_key_process_independent_data Ptrauth_key = 2
	Ptrauth_key_process_dependent_data   Ptrauth_key = 3
	Ptrauth_key_return_address           Ptrauth_key = 1
	Ptrauth_key_frame_pointer            Ptrauth_key = 3
	Ptrauth_key_function_pointer         Ptrauth_key = 0
	Ptrauth_key_block_function           Ptrauth_key = 0
	Ptrauth_key_cxx_vtable_pointer       Ptrauth_key = 2
	Ptrauth_key_method_list_pointer      Ptrauth_key = 2
	Ptrauth_key_objc_isa_pointer         Ptrauth_key = 2
	Ptrauth_key_objc_super_pointer       Ptrauth_key = 2
	Ptrauth_key_objc_sel_pointer         Ptrauth_key = 3
	Ptrauth_key_objc_class_ro_pointer    Ptrauth_key = 2
	Ptrauth_key_block_descriptor_pointer Ptrauth_key = 2
	Ptrauth_key_init_fini_pointer        Ptrauth_key = 0
)

func (Ptrauth_key) String

func (e Ptrauth_key) String() string

type Qos_class_t

type Qos_class_t uint32
const (
	QOS_CLASS_USER_INTERACTIVE Qos_class_t = 33
	QOS_CLASS_USER_INITIATED   Qos_class_t = 25
	QOS_CLASS_DEFAULT          Qos_class_t = 21
	QOS_CLASS_UTILITY          Qos_class_t = 17
	QOS_CLASS_BACKGROUND       Qos_class_t = 9
	QOS_CLASS_UNSPECIFIED      Qos_class_t = 0
)

func (Qos_class_t) String

func (e Qos_class_t) String() string

type Virtual_memory_guard_exception_code_t

type Virtual_memory_guard_exception_code_t int64
const (
	KGUARD_EXC_DEALLOC_GAP                   Virtual_memory_guard_exception_code_t = 1
	KGUARD_EXC_RECLAIM_COPYIO_FAILURE        Virtual_memory_guard_exception_code_t = 2
	KGUARD_EXC_RECLAIM_INDEX_FAILURE         Virtual_memory_guard_exception_code_t = 4
	KGUARD_EXC_RECLAIM_DEALLOCATE_FAILURE    Virtual_memory_guard_exception_code_t = 8
	KGUARD_EXC_RECLAIM_ACCOUNTING_FAILURE    Virtual_memory_guard_exception_code_t = 9
	KGUARD_EXC_SEC_IOPL_ON_EXEC_PAGE         Virtual_memory_guard_exception_code_t = 10
	KGUARD_EXC_SEC_EXEC_ON_IOPL_PAGE         Virtual_memory_guard_exception_code_t = 11
	KGUARD_EXC_SEC_UPL_WRITE_ON_EXEC_REGION  Virtual_memory_guard_exception_code_t = 12
	KGUARD_EXC_LARGE_ALLOCATION_TELEMETRY    Virtual_memory_guard_exception_code_t = 13
	KGUARD_EXC_SEC_ACCESS_FAULT              Virtual_memory_guard_exception_code_t = 98
	KGUARD_EXC_SEC_ASYNC_ACCESS_FAULT        Virtual_memory_guard_exception_code_t = 99
	KGUARD_EXC_SEC_COPY_DENIED               Virtual_memory_guard_exception_code_t = 100
	KGUARD_EXC_SEC_SHARING_DENIED            Virtual_memory_guard_exception_code_t = 101
	KGUARD_EXC_MTE_SYNC_FAULT                Virtual_memory_guard_exception_code_t = 200
	KGUARD_EXC_MTE_ASYNC_USER_FAULT          Virtual_memory_guard_exception_code_t = 201
	KGUARD_EXC_MTE_ASYNC_KERN_FAULT          Virtual_memory_guard_exception_code_t = 202
	KGUARD_EXC_GUARD_OBJECT_ASYNC_USER_FAULT Virtual_memory_guard_exception_code_t = 203
	KGUARD_EXC_GUARD_OBJECT_ASYNC_KERN_FAULT Virtual_memory_guard_exception_code_t = 204
)

func (Virtual_memory_guard_exception_code_t) String

type Xpc_listener_create_flags_t

type Xpc_listener_create_flags_t int64
const (
	XPC_LISTENER_CREATE_NONE             Xpc_listener_create_flags_t = 0
	XPC_LISTENER_CREATE_INACTIVE         Xpc_listener_create_flags_t = 1
	XPC_LISTENER_CREATE_FORCE_MACH       Xpc_listener_create_flags_t = 2
	XPC_LISTENER_CREATE_FORCE_XPCSERVICE Xpc_listener_create_flags_t = 4
)

func (Xpc_listener_create_flags_t) String

type Xpc_session_create_flags_t

type Xpc_session_create_flags_t int64
const (
	XPC_SESSION_CREATE_NONE            Xpc_session_create_flags_t = 0
	XPC_SESSION_CREATE_INACTIVE        Xpc_session_create_flags_t = 1
	XPC_SESSION_CREATE_MACH_PRIVILEGED Xpc_session_create_flags_t = 2
)

func (Xpc_session_create_flags_t) String

Source Files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL