Platforms to show: All Mac Windows Linux Cross-Platform

Back to AVAudioFormatMBS class.

AVAudioFormatMBS.Constructor(format as Integer, sampleRate as Double, channels as Integer, interleaved as Boolean)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method AVFoundationNode MBS AVFoundation Plugin 15.3 ✅ Yes ❌ No ❌ No ✅ Yes All
Initializes a newly allocated audio format instance.

format: The audio format. See AVAudioCommonFormat for values.
sampleRate: The sample rate, in hertz.
channels: The channel count.
interleaved: True if the audio format is interleaved; otherwise false.

See also:

AVAudioFormatMBS.Constructor(format as Integer, sampleRate as Double, interleaved as Boolean, layout as AVAudioChannelLayoutMBS)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method AVFoundationNode MBS AVFoundation Plugin 15.3 ✅ Yes ❌ No ❌ No ✅ Yes All
Initializes a newly allocated audio format instance with the specified auto format, sample rate, interleaved format and channel layout.

format: The audio format. See AVAudioCommonFormat for values.
sampleRate: The sample rate, in hertz.
interleaved: True if the audio format is interleaved; otherwise false.
layout: The channel layout. Must not be nil.

See also:

AVAudioFormatMBS.Constructor(sampleRate as Double, channels as Integer)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method AVFoundationNode MBS AVFoundation Plugin 15.3 ✅ Yes ❌ No ❌ No ✅ Yes All
Initializes a newly allocated audio format instance with the specified sample rate and channel count.

sampleRate: The sample rate, in hertz.
channels: The channel count.

The returned AVAudioFormat instance uses the AVAudioPCMFormatFloat32 format.

See also:

AVAudioFormatMBS.Constructor(sampleRate as Double, layout as AVAudioChannelLayoutMBS)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method AVFoundationNode MBS AVFoundation Plugin 15.3 ✅ Yes ❌ No ❌ No ✅ Yes All
Initializes a newly allocated audio format instance as a deinterleaved float with the specified sample rate and channel layout.
Example
Function StereoFormat() As AVAudioFormatMBS
// stereo format with standard layout tag
dim qlayout as new QTAudioChannelLayoutMBS

qlayout.ChannelLayoutTag = QTAudioChannelLayoutMBS.kAudioChannelLayoutTag_Stereo

dim layout as new AVAudioChannelLayoutMBS(qlayout)
dim pf as new AVAudioFormatMBS(44100, layout)

Return pf
End Function

sampleRate: The sample rate, in hertz.
layout: The channel layout. Must not be nil.

The returned AVAudioFormat instance uses the AVAudioPCMFormatFloat32 format.

See also:

AVAudioFormatMBS.Constructor(Settings as Dictionary)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method AVFoundationNode MBS AVFoundation Plugin 15.3 ✅ Yes ❌ No ❌ No ✅ Yes All
Initializes a newly allocated audio format instance using a settings dictionary.

settings: The settings dictionary. See AV Foundation Audio Settings Constants for supported key/value pairs.
Many settings dictionary elements pertain to encoder settings, not the basic format, and will be ignored.

See also:

AVAudioFormatMBS.isEqual(other as AVAudioFormatMBS) as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
method AVFoundationNode MBS AVFoundation Plugin 15.3 ✅ Yes ❌ No ❌ No ✅ Yes All
Returns a Boolean value that indicates whether the audo format instance and a given object have identical format settings.

object: The object to be compared.

Returns true if the receiver and object are equal, otherwise false.

This method defines what it means for instances to be equal. The two objects are considered equal if and only if they return identical values for all the settings.

The items on this page are in the following plugins: MBS AVFoundation Plugin.


The biggest plugin in space...