Platforms to show: All Mac Windows Linux Cross-Platform
Back to AVAudioRecorderMBS class.
AVAudioRecorderMBS.averagePowerForChannel(channelNumber as Integer) as Double
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | AVFoundation | MBS AVFoundation Plugin | 13.2 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
channelNumber: The number of the channel that you want the average power value for.
Returns the current average power, in decibels, for the sound being recorded. A return value of 0 dB indicates full scale, or maximum power; a return value of -160 dB indicates minimum power (that is, near silence).
If the signal provided to the audio recorder exceeds ±full scale, then the return value may exceed 0 (that is, it may enter the positive range).
To obtain a current average power value, you must call the updateMeters method before calling this method.
AVAudioRecorderMBS.Constructor(file as folderitem, settings as Dictionary, byref error as NSErrorMBS)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | AVFoundation | MBS AVFoundation Plugin | 13.2 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
url: The file system location to record to. The file type to record to is inferred from the file extension included in this parameter's value.
settings: Settings for the recording session. For information on the settings available for an audio recorder, see AV Foundation Audio Settings Constants.
Error: Pass in the address of a nil-initialized NSError object. If an error occurs, upon return the NSError object describes the error. If you do not want error information, pass in NULL.
See also:
AVAudioRecorderMBS.Constructor(URL as string, settings as Dictionary, byref error as NSErrorMBS)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | AVFoundation | MBS AVFoundation Plugin | 13.2 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
url: The file system location to record to. The file type to record to is inferred from the file extension included in this parameter's value.
settings: Settings for the recording session. For information on the settings available for an audio recorder, see AV Foundation Audio Settings Constants.
Error: Pass in the address of a nil-initialized NSError object. If an error occurs, upon return the NSError object describes the error. If you do not want error information, pass in NULL.
See also:
AVAudioRecorderMBS.currentTime as Double
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | AVFoundation | MBS AVFoundation Plugin | 13.2 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
When the audio recorder is stopped, calling this method returns a value of 0.
Available in OS X v10.7 and later.
AVAudioRecorderMBS.deleteRecording as boolean
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | AVFoundation | MBS AVFoundation Plugin | 13.2 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
Returns true on success, or false on failure.
The audio recorder must be stopped before you call this method.
AVAudioRecorderMBS.MeteringEnabled as boolean
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
property | AVFoundation | MBS AVFoundation Plugin | 13.2 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
By default, audio level metering is off for an audio recorder. Because metering uses computing resources, turn it on only if you intend to use it.
Available in OS X v10.7 and later.
(Read and Write computed property)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | AVFoundation | MBS AVFoundation Plugin | 13.2 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
Call record to resume recording.
AVAudioRecorderMBS.peakPowerForChannel(channelNumber as Integer) as Double
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | AVFoundation | MBS AVFoundation Plugin | 13.2 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
channelNumber: The number of the channel that you want the peak power value for.
Returns the current peak power, in decibels, for the sound being recorded. A return value of 0 dB indicates full scale, or maximum power; a return value of -160 dB indicates minimum power (that is, near silence).
If the signal provided to the audio recorder exceeds ±full scale, then the return value may exceed 0 (that is, it may enter the positive range).
To obtain a current peak power value, call the updateMeters method immediately before calling this method.
AVAudioRecorderMBS.prepareToRecord as boolean
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | AVFoundation | MBS AVFoundation Plugin | 13.2 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
Returns true on success, or false on failure.
Creates an audio file at the location specified by the url parameter in the Constructor method. If a file already exists at that location, this method overwrites it.
The preparation invoked by this method takes place automatically when you call record. Use prepareToRecord when you want recording to start as quickly as possible upon calling record.
AVAudioRecorderMBS.record as boolean
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | AVFoundation | MBS AVFoundation Plugin | 13.2 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
Returns true on success, or false on failure.
Calling this method implicitly calls prepareToRecord, which creates (or erases) an audio file and prepares the system for recording.
AVAudioRecorderMBS.recordForDuration(duration as Double) as boolean
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | AVFoundation | MBS AVFoundation Plugin | 13.2 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
duration: The maximum duration, in seconds, for the recording.
Returns true on success, or false on failure.
The recorder stops when the duration of recorded audio reaches the value in the duration parameter.
Calling this method implicitly calls prepareToRecord, which creates (or erases) an audio file and prepares the system for recording.
Some examples using this method:
AVAudioRecorderMBS.Recording as boolean
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | AVFoundation | MBS AVFoundation Plugin | 13.2 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
AVAudioRecorderMBS.settings as Dictionary
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | AVFoundation | MBS AVFoundation Plugin | 13.2 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
Audio recorder settings are in effect only after you explicitly call the prepareToRecord method, or after you call it implicitly by starting recording. The audio settings keys are described in AV Foundation Audio Settings Constants.
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | AVFoundation | MBS AVFoundation Plugin | 13.2 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
AVAudioRecorderMBS.updateMeters
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | AVFoundation | MBS AVFoundation Plugin | 13.2 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
To obtain current audio power values, you must call this method before you call averagePowerForChannel or peakPowerForChannel.
AVAudioRecorderMBS.url as string
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | AVFoundation | MBS AVFoundation Plugin | 13.2 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
The items on this page are in the following plugins: MBS AVFoundation Plugin.