Platforms to show: All Mac Windows Linux Cross-Platform

Back to AVCaptureAudioFileOutputMBS class.

AVCaptureAudioFileOutputMBS.audioSettings as dictionary

Type Topic Plugin Version macOS Windows Linux iOS Targets
property AVFoundation MBS AVFoundation Plugin 13.2 ✅ Yes ❌ No ❌ No ❌ No Desktop, Console & Web
The settings used to decode or re-encode audio before it is output by the receiver.

The value of this property is a dictionary containing values for audio settings keys defined in AVAudioSettings.h. If you set the value of this property to nil, the output vends samples in their device native format.
(Read and Write computed property)

AVCaptureAudioFileOutputMBS.Constructor

Type Topic Plugin Version macOS Windows Linux iOS Targets
method AVFoundation MBS AVFoundation Plugin 13.2 ✅ Yes ❌ No ❌ No ❌ No Desktop, Console & Web
The constructor.

AVCaptureAudioFileOutputMBS.EnableEvents

Type Topic Plugin Version macOS Windows Linux iOS Targets
method AVFoundation MBS AVFoundation Plugin 13.2 ✅ Yes ❌ No ❌ No ❌ No Desktop, Console & Web
Enables the events for this output.

Those are normally handled automatically, but if you add event with AddHandler you need to call this method.

AVCaptureAudioFileOutputMBS.metadata as AVMetadataItemMBS()

Type Topic Plugin Version macOS Windows Linux iOS Targets
method AVFoundation MBS AVFoundation Plugin 13.2 ✅ Yes ❌ No ❌ No ❌ No Desktop, Console & Web
A collection of metadata to be written to the receiver's output files.

The value of this property is an array of AVMetadataItem objects representing the collection of top-level metadata to be written in each output file. Only ID3 v2.2, v2.3, or v2.4 style metadata items are supported.

AVCaptureAudioFileOutputMBS.setMetadata(items() as AVMetadataItemMBS)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method AVFoundation MBS AVFoundation Plugin 13.2 ✅ Yes ❌ No ❌ No ❌ No Desktop, Console & Web
Sets the metadata array.

AVCaptureAudioFileOutputMBS.startRecordingToOutputFile(file as folderitem, outputFileType as string)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method AVFoundation MBS AVFoundation Plugin 13.2 ✅ Yes ❌ No ❌ No ❌ No Desktop, Console & Web
Tells the receiver to start recording to a new file of the specified format, and specifies a delegate that will be notified when recording is finished.

file: The output file. If a file already exists when capturing starts, recording to the new file will fail.
fileType: A UTI indicating the format of the file to be written. UTIs for common audio file types are declared in AVMediaFormat.h.

You do not need not to call stopRecording before calling this method while another recording is in progress. If this method is invoked while an existing output file was already being recorded, no media samples will be discarded between the old file and the new file.

When recording is stopped—by calling stopRecording, by changing files using this method, or because of an error—the remaining data that needs to be included to the file will be written in the background. Therefore, you must specify a delegate that will be notified when all data has been written to the file using the captureOutputDidFinishRecordingToOutputFileAtURL method. The recording delegate can also optionally implement methods that inform it when data starts being written, when recording is paused and resumed, and when recording is about to be finished.

On OS X, if this method is called within the captureOutputDidOutputSampleBuffer event method, the first samples written to the new file are guaranteed to be those contained in the sample buffer passed to that method.

AVCaptureAudioFileOutputMBS.startRecordingToOutputFileURL(URL as string, outputFileType as string)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method AVFoundation MBS AVFoundation Plugin 13.2 ✅ Yes ❌ No ❌ No ❌ No Desktop, Console & Web
Tells the receiver to start recording to a new file of the specified format, and specifies a delegate that will be notified when recording is finished.

URL: The URL of the output file. This method throws an NSInvalidArgumentException if the URL is not a valid file URL. If a file at the given URL already exists when capturing starts, recording to the new file will fail.
fileType: A UTI indicating the format of the file to be written. UTIs for common audio file types are declared in AVMediaFormat.h.

You do not need not to call stopRecording before calling this method while another recording is in progress. If this method is invoked while an existing output file was already being recorded, no media samples will be discarded between the old file and the new file.

When recording is stopped—by calling stopRecording, by changing files using this method, or because of an error—the remaining data that needs to be included to the file will be written in the background. Therefore, you must specify a delegate that will be notified when all data has been written to the file using the captureOutputDidFinishRecordingToOutputFileAtURL method. The recording delegate can also optionally implement methods that inform it when data starts being written, when recording is paused and resumed, and when recording is about to be finished.

On OS X, if this method is called within the captureOutputDidOutputSampleBuffer event method, the first samples written to the new file are guaranteed to be those contained in the sample buffer passed to that method.

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


The biggest plugin in space...