Documentation
¶
Overview ¶
Package soundanalysis provides a fluent Go API over the macOS SoundAnalysis framework.
Construction ¶
New… functions create objects; each With… method sets one property and returns its receiver, so configuration calls chain. A <Type>FromID constructor adopts an Objective-C object obtained elsewhere.
Lifecycle ¶
A wrapper releases its Objective-C object automatically once the garbage collector finds it unreachable. Call Release to relinquish the reference deterministically (for objects holding scarce resources); Release is idempotent, and afterwards the wrapper's methods are no-ops returning zero values.
Errors ¶
Failing calls return errors carrying the Objective-C error domain and code. Match them against this package's Err… sentinel values with errors.Is, or inspect domain, code, and Apple's prose via errors.As with *errkit.Error.
Index ¶
- Variables
- func SNClassifierIdentifierVersion1() obj.Object
- func SNErrorDomain() obj.Object
- type AudioFileAnalyzer
- func (afa *AudioFileAnalyzer) Analyze()
- func (afa *AudioFileAnalyzer) AnalyzeWithCompletionHandler(completionHandler func(bool))
- func (afa *AudioFileAnalyzer) CancelAnalysis()
- func (afa *AudioFileAnalyzer) Description() string
- func (afa *AudioFileAnalyzer) IsEqual(other obj.Object) bool
- func (afa *AudioFileAnalyzer) IsKind(className string) bool
- func (afa *AudioFileAnalyzer) RemoveAllRequests()
- func (afa *AudioFileAnalyzer) String() string
- type AudioStreamAnalyzer
- func (asa *AudioStreamAnalyzer) AnalyzeAudioBufferAtAudioFramePosition(audioBuffer obj.Object, audioFramePosition int64)
- func (asa *AudioStreamAnalyzer) CompleteAnalysis()
- func (asa *AudioStreamAnalyzer) Description() string
- func (asa *AudioStreamAnalyzer) IsEqual(other obj.Object) bool
- func (asa *AudioStreamAnalyzer) IsKind(className string) bool
- func (asa *AudioStreamAnalyzer) RemoveAllRequests()
- func (asa *AudioStreamAnalyzer) String() string
- type CGLCPContextPriorityRequest
- type Classification
- type ClassificationResult
- func (cr *ClassificationResult) ClassificationForIdentifier(identifier string) *Classification
- func (cr *ClassificationResult) Classifications() []*Classification
- func (cr *ClassificationResult) Description() string
- func (cr *ClassificationResult) IsEqual(other obj.Object) bool
- func (cr *ClassificationResult) IsKind(className string) bool
- func (cr *ClassificationResult) String() string
- func (cr *ClassificationResult) TimeRange() coremedia.CMTimeRange
- type ClassifySoundRequest
- func (csr *ClassifySoundRequest) Description() string
- func (csr *ClassifySoundRequest) IsEqual(other obj.Object) bool
- func (csr *ClassifySoundRequest) IsKind(className string) bool
- func (csr *ClassifySoundRequest) KnownClassifications() []string
- func (csr *ClassifySoundRequest) OverlapFactor() float64
- func (csr *ClassifySoundRequest) String() string
- func (csr *ClassifySoundRequest) WindowDuration() coremedia.CMTime
- func (csr *ClassifySoundRequest) WindowDurationConstraint() *TimeDurationConstraint
- func (csr *ClassifySoundRequest) WithOverlapFactor(overlapFactor float64) *ClassifySoundRequest
- func (csr *ClassifySoundRequest) WithWindowDuration(windowDuration coremedia.CMTime) *ClassifySoundRequest
- type Clockid
- type DispatchAutoreleaseFrequency
- type DispatchBlockFlags
- type EntryID
- type ErrorCode
- type EvCmd
- type FilesecProperty
- type Flag
- type Idtype
- type IpcInfoObjectType
- type LaunchDataType
- type MDLabelDomain
- type MDQueryOptionFlags
- type MDQuerySortOptionFlags
- type MachVMRangeFlags
- type MachVMRangeFlavor
- type MachVMRangeTag
- type MpoFlags
- type NXMouseButton
- type OSClockid
- type PMPageToPaperMappingType
- type Perm
- type PtrauthKey
- type QosClass
- type Request
- type Result
- type ResultsObserving
- type Tag
- type TimeDurationConstraint
- func (tdc *TimeDurationConstraint) Description() string
- func (tdc *TimeDurationConstraint) DurationRange() coremedia.CMTimeRange
- func (tdc *TimeDurationConstraint) EnumeratedDurations() []obj.Object
- func (tdc *TimeDurationConstraint) IsEqual(other obj.Object) bool
- func (tdc *TimeDurationConstraint) IsKind(className string) bool
- func (tdc *TimeDurationConstraint) String() string
- func (tdc *TimeDurationConstraint) Type() TimeDurationConstraintType
- type TimeDurationConstraintType
- type Type
- type VirtualMemoryGuardExceptionCode
- type XpcListenerCreateFlags
- type XpcSessionCreateFlags
Constants ¶
This section is empty.
Variables ¶
var ErrCodeInvalidFile = errkit.New("SNErrorDomain", 5)
ErrCodeInvalidFile matches the SoundAnalysis error SNErrorCodeInvalidFile.
var ErrCodeInvalidFormat = errkit.New("SNErrorDomain", 3)
ErrCodeInvalidFormat matches the SoundAnalysis error SNErrorCodeInvalidFormat.
var ErrCodeInvalidModel = errkit.New("SNErrorDomain", 4)
ErrCodeInvalidModel matches the SoundAnalysis error SNErrorCodeInvalidModel.
var ErrCodeOperationFailed = errkit.New("SNErrorDomain", 2)
ErrCodeOperationFailed matches the SoundAnalysis error SNErrorCodeOperationFailed.
var ErrCodeUnknownError = errkit.New("SNErrorDomain", 1)
ErrCodeUnknownError matches the SoundAnalysis error SNErrorCodeUnknownError.
Functions ¶
func SNClassifierIdentifierVersion1 ¶
SNClassifierIdentifierVersion1 returns the string constant SNClassifierIdentifierVersion1, for use as a dictionary key or argument.
func SNErrorDomain ¶
SNErrorDomain returns the string constant SNErrorDomain, for use as a dictionary key or argument.
Types ¶
type AudioFileAnalyzer ¶ added in v0.17.0
AudioFileAnalyzer is an idiomatic wrapper over the Objective-C class SNAudioFileAnalyzer.
An analyzer that runs sound classification requests on an audio file.
func AudioFileAnalyzerFromID ¶ added in v0.17.0
func AudioFileAnalyzerFromID(id objc.ID) *AudioFileAnalyzer
AudioFileAnalyzerFromID adopts an existing Objective-C object as a AudioFileAnalyzer (nil for 0), retaining it and registering a release finalizer.
func NewAudioFileAnalyzerWithURL ¶ added in v0.17.0
func NewAudioFileAnalyzerWithURL(url string) (result *AudioFileAnalyzer, err error)
NewAudioFileAnalyzerWithURL creates a new audio file analyzer.
func (*AudioFileAnalyzer) Analyze ¶ added in v0.17.0
func (afa *AudioFileAnalyzer) Analyze()
Analyze analyzes the audio file synchronously.
func (*AudioFileAnalyzer) AnalyzeWithCompletionHandler ¶ added in v0.17.0
func (afa *AudioFileAnalyzer) AnalyzeWithCompletionHandler(completionHandler func(bool))
AnalyzeWithCompletionHandler analyzes the audio file asynchronously.
func (*AudioFileAnalyzer) CancelAnalysis ¶ added in v0.17.0
func (afa *AudioFileAnalyzer) CancelAnalysis()
CancelAnalysis cancels all the asynchronous sound analysis requests the analyzer is currently processing.
func (*AudioFileAnalyzer) Description ¶ added in v0.17.0
func (afa *AudioFileAnalyzer) Description() string
Description returns the object's -description text.
func (*AudioFileAnalyzer) IsEqual ¶ added in v0.17.0
func (afa *AudioFileAnalyzer) IsEqual(other obj.Object) bool
IsEqual reports Objective-C equality (isEqual:) with another object.
func (*AudioFileAnalyzer) IsKind ¶ added in v0.17.0
func (afa *AudioFileAnalyzer) IsKind(className string) bool
IsKind reports whether the object is an instance of the named class or a subclass.
func (*AudioFileAnalyzer) RemoveAllRequests ¶ added in v0.17.0
func (afa *AudioFileAnalyzer) RemoveAllRequests()
RemoveAllRequests removes all the sound analysis requests from the audio file analyzer.
func (*AudioFileAnalyzer) String ¶ added in v0.17.0
func (afa *AudioFileAnalyzer) String() string
String returns the object's -description text, so a wrapper prints usefully under fmt.
type AudioStreamAnalyzer ¶ added in v0.17.0
AudioStreamAnalyzer is an idiomatic wrapper over the Objective-C class SNAudioStreamAnalyzer.
An object you create to analyze a stream of audio data and provide the results to your app.
func AudioStreamAnalyzerFromID ¶ added in v0.17.0
func AudioStreamAnalyzerFromID(id objc.ID) *AudioStreamAnalyzer
AudioStreamAnalyzerFromID adopts an existing Objective-C object as a AudioStreamAnalyzer (nil for 0), retaining it and registering a release finalizer.
func NewAudioStreamAnalyzerWithFormat ¶ added in v0.17.0
func NewAudioStreamAnalyzerWithFormat(format obj.Object) *AudioStreamAnalyzer
NewAudioStreamAnalyzerWithFormat creates a new audio stream analyzer.
func (*AudioStreamAnalyzer) AnalyzeAudioBufferAtAudioFramePosition ¶ added in v0.17.0
func (asa *AudioStreamAnalyzer) AnalyzeAudioBufferAtAudioFramePosition(audioBuffer obj.Object, audioFramePosition int64)
AnalyzeAudioBufferAtAudioFramePosition adds a new audio buffer to the analyzer’s larger stream buffer.
func (*AudioStreamAnalyzer) CompleteAnalysis ¶ added in v0.17.0
func (asa *AudioStreamAnalyzer) CompleteAnalysis()
CompleteAnalysis notifies the analyzer when it receives the final audio buffer.
func (*AudioStreamAnalyzer) Description ¶ added in v0.17.0
func (asa *AudioStreamAnalyzer) Description() string
Description returns the object's -description text.
func (*AudioStreamAnalyzer) IsEqual ¶ added in v0.17.0
func (asa *AudioStreamAnalyzer) IsEqual(other obj.Object) bool
IsEqual reports Objective-C equality (isEqual:) with another object.
func (*AudioStreamAnalyzer) IsKind ¶ added in v0.17.0
func (asa *AudioStreamAnalyzer) IsKind(className string) bool
IsKind reports whether the object is an instance of the named class or a subclass.
func (*AudioStreamAnalyzer) RemoveAllRequests ¶ added in v0.17.0
func (asa *AudioStreamAnalyzer) RemoveAllRequests()
RemoveAllRequests removes all the sound analysis requests from the audio stream analyzer.
func (*AudioStreamAnalyzer) String ¶ added in v0.17.0
func (asa *AudioStreamAnalyzer) String() string
String returns the object's -description text, so a wrapper prints usefully under fmt.
type CGLCPContextPriorityRequest ¶
type CGLCPContextPriorityRequest int32
const ( KCGLCPContextPriorityRequestHigh CGLCPContextPriorityRequest = 0 KCGLCPContextPriorityRequestNormal CGLCPContextPriorityRequest = 1 KCGLCPContextPriorityRequestLow CGLCPContextPriorityRequest = 2 )
func (CGLCPContextPriorityRequest) String ¶
func (e CGLCPContextPriorityRequest) String() string
String returns the CGLCPContextPriorityRequest constant's name, or its numeric form when the value is not a known constant.
type Classification ¶ added in v0.17.0
Classification is an idiomatic wrapper over the Objective-C class SNClassification.
A type that pairs a sound classifier’s prediction with its confidence in that prediction.
func ClassificationFromID ¶ added in v0.17.0
func ClassificationFromID(id objc.ID) *Classification
ClassificationFromID adopts an existing Objective-C object as a Classification (nil for 0), retaining it and registering a release finalizer.
func NewClassification ¶ added in v0.17.0
func NewClassification() *Classification
NewClassification creates a new Classification.
func (*Classification) Confidence ¶ added in v0.17.0
func (c *Classification) Confidence() float64
Confidence returns the level of confidence normalized to [0, 1], where 1 is most confident
func (*Classification) Description ¶ added in v0.17.0
func (c *Classification) Description() string
Description returns the object's -description text.
func (*Classification) Identifier ¶ added in v0.17.0
func (c *Classification) Identifier() string
Identifier returns the identifier of a classification request. An example classification could be a string like 'laughter' or 'applause'. The string is defined in the model that was used for the classification. Usually these are technical labels that are not localized and not meant to be used directly to be presented to an end user in the UI.
func (*Classification) IsEqual ¶ added in v0.17.0
func (c *Classification) IsEqual(other obj.Object) bool
IsEqual reports Objective-C equality (isEqual:) with another object.
func (*Classification) IsKind ¶ added in v0.17.0
func (c *Classification) IsKind(className string) bool
IsKind reports whether the object is an instance of the named class or a subclass.
func (*Classification) String ¶ added in v0.17.0
func (c *Classification) String() string
String returns the object's -description text, so a wrapper prints usefully under fmt.
type ClassificationResult ¶ added in v0.17.0
ClassificationResult is an idiomatic wrapper over the Objective-C class SNClassificationResult.
A result that contains the highest-ranking classifications in a time range.
func ClassificationResultFromID ¶ added in v0.17.0
func ClassificationResultFromID(id objc.ID) *ClassificationResult
ClassificationResultFromID adopts an existing Objective-C object as a ClassificationResult (nil for 0), retaining it and registering a release finalizer.
func NewClassificationResult ¶ added in v0.17.0
func NewClassificationResult() *ClassificationResult
NewClassificationResult creates a new ClassificationResult.
func (*ClassificationResult) ClassificationForIdentifier ¶ added in v0.17.0
func (cr *ClassificationResult) ClassificationForIdentifier(identifier string) *Classification
ClassificationForIdentifier returns the classification for an identifier.
func (*ClassificationResult) Classifications ¶ added in v0.17.0
func (cr *ClassificationResult) Classifications() []*Classification
Classifications returns all classification candidates, sorted with highest confidence first.
Classifications returns the collection as a Go slice.
func (*ClassificationResult) Description ¶ added in v0.17.0
func (cr *ClassificationResult) Description() string
Description returns the object's -description text.
func (*ClassificationResult) IsEqual ¶ added in v0.17.0
func (cr *ClassificationResult) IsEqual(other obj.Object) bool
IsEqual reports Objective-C equality (isEqual:) with another object.
func (*ClassificationResult) IsKind ¶ added in v0.17.0
func (cr *ClassificationResult) IsKind(className string) bool
IsKind reports whether the object is an instance of the named class or a subclass.
func (*ClassificationResult) String ¶ added in v0.17.0
func (cr *ClassificationResult) String() string
String returns the object's -description text, so a wrapper prints usefully under fmt.
func (*ClassificationResult) TimeRange ¶ added in v0.17.0
func (cr *ClassificationResult) TimeRange() coremedia.CMTimeRange
TimeRange returns the time range in the client-provided audio stream to which this classification result corresponds Each CMTime contains of a value (audio frame count) and timescale (client sample rate). This enables the client to precisely identify the frame range in the original audio stream to which this result corresponds. Time ranges will often be in the past compared to the frame count of the most recent audio buffer provided to the analyzer, due to the inherent audio buffering operations required to deliver a full block of audio to an MLModel.
type ClassifySoundRequest ¶ added in v0.17.0
ClassifySoundRequest is an idiomatic wrapper over the Objective-C class SNClassifySoundRequest.
A request that classifies sound using a Core ML model.
func ClassifySoundRequestFromID ¶ added in v0.17.0
func ClassifySoundRequestFromID(id objc.ID) *ClassifySoundRequest
ClassifySoundRequestFromID adopts an existing Objective-C object as a ClassifySoundRequest (nil for 0), retaining it and registering a release finalizer.
func NewClassifySoundRequestWithClassifierIdentifier ¶ added in v0.17.0
func NewClassifySoundRequestWithClassifierIdentifier(classifierIdentifier obj.Object) (result *ClassifySoundRequest, err error)
NewClassifySoundRequestWithClassifierIdentifier creates a request that uses the framework’s built-in sound classification model.
func NewClassifySoundRequestWithMLModel ¶ added in v0.17.0
func NewClassifySoundRequestWithMLModel(mlModel obj.Object) (result *ClassifySoundRequest, err error)
NewClassifySoundRequestWithMLModel creates a request that uses a custom sound classification model.
func (*ClassifySoundRequest) Description ¶ added in v0.17.0
func (csr *ClassifySoundRequest) Description() string
Description returns the object's -description text.
func (*ClassifySoundRequest) IsEqual ¶ added in v0.17.0
func (csr *ClassifySoundRequest) IsEqual(other obj.Object) bool
IsEqual reports Objective-C equality (isEqual:) with another object.
func (*ClassifySoundRequest) IsKind ¶ added in v0.17.0
func (csr *ClassifySoundRequest) IsKind(className string) bool
IsKind reports whether the object is an instance of the named class or a subclass.
func (*ClassifySoundRequest) KnownClassifications ¶ added in v0.17.0
func (csr *ClassifySoundRequest) KnownClassifications() []string
KnownClassifications returns lists all labels that can be produced by this request. - Returns: An array of strings containing all sound identifiers which can be produced by this request.
KnownClassifications returns the collection as a Go slice.
func (*ClassifySoundRequest) OverlapFactor ¶ added in v0.17.0
func (csr *ClassifySoundRequest) OverlapFactor() float64
OverlapFactor returns the overlap factor of the windows of audio data provided to the classifier, if the model operates on fixed audio block sizes. When performing audio analysis on fixed audio block sizes, it is common for the analysis windows to overlap by some factor. Without overlapping the analysis windows (when the overlap factor is 0.0), a sound might be split across two analysis windows, which could negatively affect classification performance. Overlapping the analysis windows by 50% ensures each sound will fall near the center of at least one analysis window. The supported range is [0.0, 1.0), and the default value is 0.5. Increasing the overlap factor increases computational complexity, so values greater than 0.5 should be used with care.
func (*ClassifySoundRequest) String ¶ added in v0.17.0
func (csr *ClassifySoundRequest) String() string
String returns the object's -description text, so a wrapper prints usefully under fmt.
func (*ClassifySoundRequest) WindowDuration ¶ added in v0.17.0
func (csr *ClassifySoundRequest) WindowDuration() coremedia.CMTime
WindowDuration returns the duration of a single analysis window. When performing classification over an audio stream, a classifier computes each classification result based on a single 'analysis window' of audio. Analysis windows are uniformly-sized time intervals, where the size of any given window is considered that window's 'duration'. Some classifiers can operate over analysis windows which conform to one of several different duration options. Larger window durations allow classification to execute less frequently over larger contexts of audio, potentially improving classification performance. Smaller window durations allow classification to execute more frequently over smaller contexts of audio, producing results with sharper time resolution. Depending on the use-case, a larger or smaller window may be preferable. When configuring the window duration, it is important to respect the capabilities of the classifier. A classifier's supported window durations can be discovered using the `windowDurationConstraint` property. If an unsupported window duration is selected, the window duration will be automatically rounded down to the nearest supported value if possible, else rounded up.
func (*ClassifySoundRequest) WindowDurationConstraint ¶ added in v0.17.0
func (csr *ClassifySoundRequest) WindowDurationConstraint() *TimeDurationConstraint
WindowDurationConstraint returns the constraints governing permitted analysis window durations. The analysis window duration is controlled using the `windowDuration` property. If an analysis window duration is selected which does not meet the necessary constraints, it will automatically be adjusted to meet these constraints (see `windowDuration` for more information regarding how this adjustment will be applied).
func (*ClassifySoundRequest) WithOverlapFactor ¶ added in v0.17.0
func (csr *ClassifySoundRequest) WithOverlapFactor(overlapFactor float64) *ClassifySoundRequest
WithOverlapFactor sets the amount of overlap between successive analysis windows when the model operates on a fixed-size audio block.
func (*ClassifySoundRequest) WithWindowDuration ¶ added in v0.17.0
func (csr *ClassifySoundRequest) WithWindowDuration(windowDuration coremedia.CMTime) *ClassifySoundRequest
WithWindowDuration sets the duration of the audio buffer the request sends to the underlying sound classifier for each prediction.
type DispatchAutoreleaseFrequency ¶ added in v0.17.0
type DispatchAutoreleaseFrequency uint64
const ( DispatchAutoreleaseFrequencyInherit DispatchAutoreleaseFrequency = 0 DispatchAutoreleaseFrequencyWorkItem DispatchAutoreleaseFrequency = 1 DispatchAutoreleaseFrequencyNever DispatchAutoreleaseFrequency = 2 )
func (DispatchAutoreleaseFrequency) String ¶ added in v0.17.0
func (e DispatchAutoreleaseFrequency) String() string
String returns the DispatchAutoreleaseFrequency constant's name, or its numeric form when the value is not a known constant.
type DispatchBlockFlags ¶ added in v0.17.0
type DispatchBlockFlags uint64
Bitmask — values may be combined with |.
const ( DispatchBlockFlagsBarrier DispatchBlockFlags = 1 DispatchBlockFlagsDetached DispatchBlockFlags = 2 DispatchBlockFlagsAssignCurrent DispatchBlockFlags = 4 DispatchBlockFlagsNoQosClass DispatchBlockFlags = 8 DispatchBlockFlagsInheritQosClass DispatchBlockFlags = 16 DispatchBlockFlagsEnforceQosClass DispatchBlockFlags = 32 )
func (DispatchBlockFlags) String ¶ added in v0.17.0
func (e DispatchBlockFlags) String() string
String returns the DispatchBlockFlags constant's name, or its numeric form when the value is not a known constant.
type ErrorCode ¶ added in v0.17.0
type ErrorCode int64
The enumerated error codes that the Sound Analysis framework produces.
type FilesecProperty ¶ added in v0.17.0
type FilesecProperty int32
const ( FilesecPropertyOwner FilesecProperty = 1 FilesecPropertyGroup FilesecProperty = 2 FilesecPropertyUUID FilesecProperty = 3 FilesecPropertyMode FilesecProperty = 4 FilesecPropertyACL FilesecProperty = 5 FilesecPropertyGrpuuid FilesecProperty = 6 FilesecPropertyACLRaw FilesecProperty = 100 FilesecPropertyACLAllocsize FilesecProperty = 101 )
func (FilesecProperty) String ¶ added in v0.17.0
func (e FilesecProperty) String() string
String returns the FilesecProperty constant's name, or its numeric form when the value is not a known constant.
type IpcInfoObjectType ¶ added in v0.17.0
type IpcInfoObjectType uint32
const ( IpcInfoObjectTypeNone IpcInfoObjectType = 0 IpcInfoObjectTypeThreadControl IpcInfoObjectType = 1 IpcInfoObjectTypeTaskControl IpcInfoObjectType = 2 IpcInfoObjectTypeHost IpcInfoObjectType = 3 IpcInfoObjectTypeHostPriv IpcInfoObjectType = 4 IpcInfoObjectTypeProcessor IpcInfoObjectType = 5 IpcInfoObjectTypeProcessorSet IpcInfoObjectType = 6 IpcInfoObjectTypeProcessorSetName IpcInfoObjectType = 7 IpcInfoObjectTypeTimer IpcInfoObjectType = 8 IpcInfoObjectTypePortSubstOnce IpcInfoObjectType = 9 IpcInfoObjectTypeMig IpcInfoObjectType = 10 IpcInfoObjectTypeMemoryObject IpcInfoObjectType = 11 IpcInfoObjectTypeXmmPager IpcInfoObjectType = 12 IpcInfoObjectTypeXmmKernel IpcInfoObjectType = 13 IpcInfoObjectTypeXmmReply IpcInfoObjectType = 14 IpcInfoObjectTypeUndReply IpcInfoObjectType = 15 IpcInfoObjectTypeHostNotify IpcInfoObjectType = 16 IpcInfoObjectTypeHostSecurity IpcInfoObjectType = 17 IpcInfoObjectTypeLedger IpcInfoObjectType = 18 IpcInfoObjectTypeMainDevice IpcInfoObjectType = 19 IpcInfoObjectTypeTaskName IpcInfoObjectType = 20 IpcInfoObjectTypeSubsystem IpcInfoObjectType = 21 IpcInfoObjectTypeIODoneQueue IpcInfoObjectType = 22 IpcInfoObjectTypeSemaphore IpcInfoObjectType = 23 IpcInfoObjectTypeLockSet IpcInfoObjectType = 24 IpcInfoObjectTypeClock IpcInfoObjectType = 25 IpcInfoObjectTypeClockCtrl IpcInfoObjectType = 26 IpcInfoObjectTypeIokitIdent IpcInfoObjectType = 27 IpcInfoObjectTypeNamedEntry IpcInfoObjectType = 28 IpcInfoObjectTypeIokitConnect IpcInfoObjectType = 29 IpcInfoObjectTypeIokitObject IpcInfoObjectType = 30 IpcInfoObjectTypeUpl IpcInfoObjectType = 31 IpcInfoObjectTypeMemObjControl IpcInfoObjectType = 32 IpcInfoObjectTypeAuSessionport IpcInfoObjectType = 33 IpcInfoObjectTypeFileport IpcInfoObjectType = 34 IpcInfoObjectTypeLabelh IpcInfoObjectType = 35 IpcInfoObjectTypeTaskResume IpcInfoObjectType = 36 IpcInfoObjectTypeVoucher IpcInfoObjectType = 37 IpcInfoObjectTypeVoucherAttrControl IpcInfoObjectType = 38 IpcInfoObjectTypeWorkInterval IpcInfoObjectType = 39 IpcInfoObjectTypeUxHandler IpcInfoObjectType = 40 IpcInfoObjectTypeUextObject IpcInfoObjectType = 41 IpcInfoObjectTypeArcadeReg IpcInfoObjectType = 42 IpcInfoObjectTypeEventlink IpcInfoObjectType = 43 IpcInfoObjectTypeTaskInspect IpcInfoObjectType = 44 IpcInfoObjectTypeTaskRead IpcInfoObjectType = 45 IpcInfoObjectTypeThreadInspect IpcInfoObjectType = 46 IpcInfoObjectTypeThreadRead IpcInfoObjectType = 47 IpcInfoObjectTypeSuidCred IpcInfoObjectType = 48 IpcInfoObjectTypeHypervisor IpcInfoObjectType = 49 IpcInfoObjectTypeTaskIDToken IpcInfoObjectType = 50 IpcInfoObjectTypeTaskFatal IpcInfoObjectType = 51 IpcInfoObjectTypeKcdata IpcInfoObjectType = 52 IpcInfoObjectTypeExclavesResource IpcInfoObjectType = 53 IpcInfoObjectTypeThreadResume IpcInfoObjectType = 54 IpcInfoObjectTypeUnknown IpcInfoObjectType = 4294967295 )
func (IpcInfoObjectType) String ¶ added in v0.17.0
func (e IpcInfoObjectType) String() string
String returns the IpcInfoObjectType constant's name, or its numeric form when the value is not a known constant.
type LaunchDataType ¶ added in v0.17.0
type LaunchDataType int32
const ( LaunchDataTypeDictionary LaunchDataType = 1 LaunchDataTypeArray LaunchDataType = 2 LaunchDataTypeFd LaunchDataType = 3 LaunchDataTypeInteger LaunchDataType = 4 LaunchDataTypeReal LaunchDataType = 5 LaunchDataTypeBool LaunchDataType = 6 LaunchDataTypeString LaunchDataType = 7 LaunchDataTypeOpaque LaunchDataType = 8 LaunchDataTypeErrno LaunchDataType = 9 LaunchDataTypeMachport LaunchDataType = 10 )
func (LaunchDataType) String ¶ added in v0.17.0
func (e LaunchDataType) String() string
String returns the LaunchDataType constant's name, or its numeric form when the value is not a known constant.
type MDLabelDomain ¶
type MDLabelDomain int32
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
String returns the MDLabelDomain constant's name, or its numeric form when the value is not a known constant.
type MDQueryOptionFlags ¶
type MDQueryOptionFlags int32
const ( KMDQuerySynchronous MDQueryOptionFlags = 1 KMDQueryWantsUpdates MDQueryOptionFlags = 4 KMDQueryAllowFSTranslation MDQueryOptionFlags = 8 )
func (MDQueryOptionFlags) String ¶
func (e MDQueryOptionFlags) String() string
String returns the MDQueryOptionFlags constant's name, or its numeric form when the value is not a known constant.
type MDQuerySortOptionFlags ¶
type MDQuerySortOptionFlags int32
const (
KMDQueryReverseSortOrderFlag MDQuerySortOptionFlags = 1
)
func (MDQuerySortOptionFlags) String ¶
func (e MDQuerySortOptionFlags) String() string
String returns the MDQuerySortOptionFlags constant's name, or its numeric form when the value is not a known constant.
type MachVMRangeFlags ¶ added in v0.17.0
type MachVMRangeFlags uint64
Bitmask — values may be combined with |.
const (
MachVMRangeFlagsNone MachVMRangeFlags = 0
)
func (MachVMRangeFlags) String ¶ added in v0.17.0
func (e MachVMRangeFlags) String() string
String returns the MachVMRangeFlags constant's name, or its numeric form when the value is not a known constant.
type MachVMRangeFlavor ¶ added in v0.17.0
type MachVMRangeFlavor uint32
const ( MachVMRangeFlavorInvalid MachVMRangeFlavor = 0 MachVMRangeFlavorV1 MachVMRangeFlavor = 1 )
func (MachVMRangeFlavor) String ¶ added in v0.17.0
func (e MachVMRangeFlavor) String() string
String returns the MachVMRangeFlavor constant's name, or its numeric form when the value is not a known constant.
type MachVMRangeTag ¶ added in v0.17.0
type MachVMRangeTag uint16
const ( MachVMRangeTagDefault MachVMRangeTag = 0 MachVMRangeTagData MachVMRangeTag = 1 MachVMRangeTagFixed MachVMRangeTag = 2 )
func (MachVMRangeTag) String ¶ added in v0.17.0
func (e MachVMRangeTag) String() string
String returns the MachVMRangeTag constant's name, or its numeric form when the value is not a known constant.
type MpoFlags ¶ added in v0.17.0
type MpoFlags uint32
Bitmask — values may be combined with |.
const ( MpoFlagsPort MpoFlags = 0 MpoFlagsServicePort MpoFlags = 1024 MpoFlagsConnectionPort MpoFlags = 2048 MpoFlagsReplyPort MpoFlags = 4096 MpoFlagsWeakReplyPort MpoFlags = 16384 MpoFlagsNotificationPort MpoFlags = 17408 MpoFlagsExceptionPort MpoFlags = 32768 MpoFlagsConnectionPortWithPortArray MpoFlags = 65536 )
type NXMouseButton ¶
type NXMouseButton int32
const ( NX_OneButton NXMouseButton = 0 NX_LeftButton NXMouseButton = 1 NX_RightButton NXMouseButton = 2 )
func (NXMouseButton) String ¶
func (e NXMouseButton) String() string
String returns the NXMouseButton constant's name, or its numeric form when the value is not a known constant.
type PMPageToPaperMappingType ¶
type PMPageToPaperMappingType int32
const ( KPMPageToPaperMappingNone PMPageToPaperMappingType = 1 KPMPageToPaperMappingScaleToFit PMPageToPaperMappingType = 2 )
func (PMPageToPaperMappingType) String ¶
func (e PMPageToPaperMappingType) String() string
String returns the PMPageToPaperMappingType constant's name, or its numeric form when the value is not a known constant.
type Perm ¶ added in v0.17.0
type Perm int32
const ( PermReadData Perm = 2 PermListDirectory Perm = 2 PermWriteData Perm = 4 PermAddFile Perm = 4 PermExecute Perm = 8 PermSearch Perm = 8 PermDelete Perm = 16 PermAppendData Perm = 32 PermAddSubdirectory Perm = 32 PermDeleteChild Perm = 64 PermReadAttributes Perm = 128 PermWriteAttributes Perm = 256 PermReadExtattributes Perm = 512 PermWriteExtattributes Perm = 1024 PermReadSecurity Perm = 2048 PermWriteSecurity Perm = 4096 PermChangeOwner Perm = 8192 PermSynchronize Perm = 1048576 )
type PtrauthKey ¶ added in v0.17.0
type PtrauthKey int32
const ( Ptrauth_key_none PtrauthKey = -1 Ptrauth_key_asia PtrauthKey = 0 Ptrauth_key_asib PtrauthKey = 1 Ptrauth_key_asda PtrauthKey = 2 Ptrauth_key_asdb PtrauthKey = 3 Ptrauth_key_process_independent_code PtrauthKey = 0 Ptrauth_key_process_dependent_code PtrauthKey = 1 Ptrauth_key_process_independent_data PtrauthKey = 2 Ptrauth_key_process_dependent_data PtrauthKey = 3 Ptrauth_key_return_address PtrauthKey = 1 Ptrauth_key_frame_pointer PtrauthKey = 3 Ptrauth_key_function_pointer PtrauthKey = 0 Ptrauth_key_block_function PtrauthKey = 0 Ptrauth_key_cxx_vtable_pointer PtrauthKey = 2 Ptrauth_key_method_list_pointer PtrauthKey = 2 Ptrauth_key_objc_isa_pointer PtrauthKey = 2 Ptrauth_key_objc_super_pointer PtrauthKey = 2 Ptrauth_key_objc_sel_pointer PtrauthKey = 3 Ptrauth_key_objc_class_ro_pointer PtrauthKey = 2 Ptrauth_key_block_descriptor_pointer PtrauthKey = 2 Ptrauth_key_init_fini_pointer PtrauthKey = 0 )
func (PtrauthKey) String ¶ added in v0.17.0
func (e PtrauthKey) String() string
String returns the PtrauthKey constant's name, or its numeric form when the value is not a known constant.
type Request ¶ added in v0.17.0
type Request interface {
}
Request is the Go form of the Objective-C protocol SNRequest.
type Result ¶ added in v0.17.0
type Result interface {
}
Result is the Go form of the Objective-C protocol SNResult.
type ResultsObserving ¶ added in v0.17.0
ResultsObserving is the Go form of the Objective-C protocol SNResultsObserving.
type TimeDurationConstraint ¶ added in v0.17.0
TimeDurationConstraint is an idiomatic wrapper over the Objective-C class SNTimeDurationConstraint.
Defines the time duration windows the request’s underlying sound classifier accepts with a range, or an array, of durations.
func NewTimeDurationConstraintWithDurationRange ¶ added in v0.17.0
func NewTimeDurationConstraintWithDurationRange(durationRange coremedia.CMTimeRange) *TimeDurationConstraint
NewTimeDurationConstraintWithDurationRange initializes a range-type constraint. - Parameter durationRange: A continuous range of duration values (represented as CMTime values) permitted by this constraint. - Returns: An instance whose `type` is `SNTimeDurationConstraintTypeRange`, and which constrains durations values to the provided range.
func NewTimeDurationConstraintWithEnumeratedDurations ¶ added in v0.17.0
func NewTimeDurationConstraintWithEnumeratedDurations(enumeratedDurations []*foundation.Value) *TimeDurationConstraint
NewTimeDurationConstraintWithEnumeratedDurations initializes an enumerated-type constraint. - Parameter enumeratedDurations: A discrete set of duration values (represented as CMTime values boxed in NSValue instances) permitted by this constraint. - Returns: An instance whose `type` is `SNTimeDurationConstraintTypeEnumerated`, and which constrains duration values to the provided set of discrete values.
func TimeDurationConstraintFromID ¶ added in v0.17.0
func TimeDurationConstraintFromID(id objc.ID) *TimeDurationConstraint
TimeDurationConstraintFromID adopts an existing Objective-C object as a TimeDurationConstraint (nil for 0), retaining it and registering a release finalizer.
func (*TimeDurationConstraint) Description ¶ added in v0.17.0
func (tdc *TimeDurationConstraint) Description() string
Description returns the object's -description text.
func (*TimeDurationConstraint) DurationRange ¶ added in v0.17.0
func (tdc *TimeDurationConstraint) DurationRange() coremedia.CMTimeRange
DurationRange returns if the constraint type is range, then the range of allowable window durations. - Returns: If the constraint type is range, a CMTimeRange representing the range of allowable window durations. If the constraint type is not range, `kCMTimeRangeInvalid`. The `type` property should be queried before this property is accessed. This property will only yield meaningful values if the constraint type is considered to be 'range'. The constraint type is considered to be 'range' if the `type` property is equal to `SNTimeDurationConstraintTypeRange`.
func (*TimeDurationConstraint) EnumeratedDurations ¶ added in v0.17.0
func (tdc *TimeDurationConstraint) EnumeratedDurations() []obj.Object
EnumeratedDurations returns if the constraint type is enumerated, then the set of discrete allowable time durations. - Returns: If the constraint type is enumerated, an array of CMTime structures (boxed in NSValue instances) representing the set of allowable time durations. The durations will always be provided sorted in order of ascending time. If the constraint type is not enumerated, an empty array will be returned. The `type` property should be queried before this property is accessed. This property will only yield meaningful values if the constraint type is considered to be 'enumerated'. The constraint type is considered to be 'enumerated' if the `type` property is equal to `SNTimeDurationConstraintTypeEnumerated`.
EnumeratedDurations returns the collection as a Go slice.
func (*TimeDurationConstraint) IsEqual ¶ added in v0.17.0
func (tdc *TimeDurationConstraint) IsEqual(other obj.Object) bool
IsEqual reports Objective-C equality (isEqual:) with another object.
func (*TimeDurationConstraint) IsKind ¶ added in v0.17.0
func (tdc *TimeDurationConstraint) IsKind(className string) bool
IsKind reports whether the object is an instance of the named class or a subclass.
func (*TimeDurationConstraint) String ¶ added in v0.17.0
func (tdc *TimeDurationConstraint) String() string
String returns the object's -description text, so a wrapper prints usefully under fmt.
func (*TimeDurationConstraint) Type ¶ added in v0.17.0
func (tdc *TimeDurationConstraint) Type() TimeDurationConstraintType
Type returns the time constraint type. The value of this property dictates whether or not other properties associated with this class can be validly accessed. Please refer to the documentation of other individual properties to understand their relationship to this one. This property is always valid to access.
type TimeDurationConstraintType ¶ added in v0.17.0
type TimeDurationConstraintType int64
Defines the types a time duration constraint uses.
const ( // A constraint type that uses an array of time durations to define what a request’s underlying sound classifier accepts. TimeDurationConstraintTypeEnumerated TimeDurationConstraintType = 1 // A constraint type that uses a time duration range to define what a request’s underlying sound classifier accepts. TimeDurationConstraintTypeRange TimeDurationConstraintType = 2 )
func (TimeDurationConstraintType) String ¶ added in v0.17.0
func (e TimeDurationConstraintType) String() string
String returns the TimeDurationConstraintType constant's name, or its numeric form when the value is not a known constant.
type VirtualMemoryGuardExceptionCode ¶ added in v0.17.0
type VirtualMemoryGuardExceptionCode uint32
const ( KGUARD_EXC_DEALLOC_GAP VirtualMemoryGuardExceptionCode = 1 KGUARD_EXC_RECLAIM_COPYIO_FAILURE VirtualMemoryGuardExceptionCode = 2 KGUARD_EXC_RECLAIM_INDEX_FAILURE VirtualMemoryGuardExceptionCode = 4 KGUARD_EXC_RECLAIM_DEALLOCATE_FAILURE VirtualMemoryGuardExceptionCode = 8 KGUARD_EXC_RECLAIM_ACCOUNTING_FAILURE VirtualMemoryGuardExceptionCode = 9 KGUARD_EXC_SEC_IOPL_ON_EXEC_PAGE VirtualMemoryGuardExceptionCode = 10 KGUARD_EXC_SEC_EXEC_ON_IOPL_PAGE VirtualMemoryGuardExceptionCode = 11 KGUARD_EXC_SEC_UPL_WRITE_ON_EXEC_REGION VirtualMemoryGuardExceptionCode = 12 KGUARD_EXC_LARGE_ALLOCATION_TELEMETRY VirtualMemoryGuardExceptionCode = 13 KGUARD_EXC_SEC_ACCESS_FAULT VirtualMemoryGuardExceptionCode = 98 KGUARD_EXC_SEC_ASYNC_ACCESS_FAULT VirtualMemoryGuardExceptionCode = 99 KGUARD_EXC_SEC_COPY_DENIED VirtualMemoryGuardExceptionCode = 100 KGUARD_EXC_SEC_SHARING_DENIED VirtualMemoryGuardExceptionCode = 101 KGUARD_EXC_MTE_SYNC_FAULT VirtualMemoryGuardExceptionCode = 200 KGUARD_EXC_MTE_ASYNC_USER_FAULT VirtualMemoryGuardExceptionCode = 201 KGUARD_EXC_MTE_ASYNC_KERN_FAULT VirtualMemoryGuardExceptionCode = 202 KGUARD_EXC_GUARD_OBJECT_ASYNC_USER_FAULT VirtualMemoryGuardExceptionCode = 203 KGUARD_EXC_GUARD_OBJECT_ASYNC_KERN_FAULT VirtualMemoryGuardExceptionCode = 204 )
func (VirtualMemoryGuardExceptionCode) String ¶ added in v0.17.0
func (e VirtualMemoryGuardExceptionCode) String() string
String returns the VirtualMemoryGuardExceptionCode constant's name, or its numeric form when the value is not a known constant.
type XpcListenerCreateFlags ¶ added in v0.17.0
type XpcListenerCreateFlags uint64
Bitmask — values may be combined with |.
const ( XpcListenerCreateFlagsNone XpcListenerCreateFlags = 0 XpcListenerCreateFlagsInactive XpcListenerCreateFlags = 1 XpcListenerCreateFlagsForceMach XpcListenerCreateFlags = 2 XpcListenerCreateFlagsForceXpcservice XpcListenerCreateFlags = 4 )
func (XpcListenerCreateFlags) String ¶ added in v0.17.0
func (e XpcListenerCreateFlags) String() string
String returns the XpcListenerCreateFlags constant's name, or its numeric form when the value is not a known constant.
type XpcSessionCreateFlags ¶ added in v0.17.0
type XpcSessionCreateFlags uint64
Bitmask — values may be combined with |.
const ( XpcSessionCreateFlagsNone XpcSessionCreateFlags = 0 XpcSessionCreateFlagsInactive XpcSessionCreateFlags = 1 XpcSessionCreateFlagsMachPrivileged XpcSessionCreateFlags = 2 )
func (XpcSessionCreateFlags) String ¶ added in v0.17.0
func (e XpcSessionCreateFlags) String() string
String returns the XpcSessionCreateFlags constant's name, or its numeric form when the value is not a known constant.
Source Files
¶
- SNAudioFileAnalyzer_generated.go
- SNAudioStreamAnalyzer_generated.go
- SNClassificationResult_generated.go
- SNClassification_generated.go
- SNClassifySoundRequest_generated.go
- SNTimeDurationConstraint_generated.go
- doc.go
- soundanalysis_constants_generated.go
- soundanalysis_enums_generated.go
- soundanalysis_errors_generated.go
- soundanalysis_protocols_generated.go
- soundanalysis_runtime_generated.go