init(url:settings:)
Creates an audio recorder with settings.
Declaration
init(url: URL, settings: [String : Any]) throwsParameters
- url:
The file system location to record to.
- settings:
The audio settings to use for the recording.
Return Value
A new audio recorder, or nil if an error occurred.
Discussion
The system supports the following keys when defining the format settings:
Key | Supported Values |
|---|---|
Kaudioformatlinearpcm [Image] Kaudioformatmpeg4aac [Image] Kaudioformatapplelossless [Image] Kaudioformatappleima4 [Image] Kaudioformatilbc [Image] Kaudioformatulaw | |
8 kHz to 192 kHz | |
1 to 64 |
The system supports additional configuration options based on your selected audio format. See Linear PCM format settings for information about customizing Linear PCM formats and Encoder settings for compressed formats.