import type { NobjcObject } from "objc-js";
import type { _NSArray } from "../Foundation/NSArray.js";
import type { _NSDictionary } from "../Foundation/NSDictionary.js";
import type { _NSObject } from "../Foundation/NSObject.js";
import type { _NSURL } from "../Foundation/NSURL.js";
import type { _AVAudioFormat } from "./AVAudioFormat.js";
import type { _AVAudioRecorderDelegate } from "./AVAudioRecorderDelegate.js";
export declare class _AVAudioRecorder extends _NSObject {
    static alloc(): _AVAudioRecorder;
    static new(): _AVAudioRecorder;
    init(): _AVAudioRecorder;
    /**
     * @method initWithURL:settings:error: @abstract Init the AudioRecorder with a specified url and settings. @discussion The file type to create can be set through the corresponding settings key. If not set, it will be inferred from the file extension. Will overwrite a file at the specified url if a file exists.
     */
    initWithURL$settings$error$(url: _NSURL, settings: _NSDictionary, outError: NobjcObject | null): _AVAudioRecorder | null;
    /**
     * @method initWithURL:format:error: @abstract Init the AudioRecorder with a specified url and format. @discussion The file type to create can be set through the corresponding settings key. If not set, it will be inferred from the file extension. Will overwrite a file at the specified url if a file exists.
     */
    initWithURL$format$error$(url: _NSURL, format: _AVAudioFormat, outError: NobjcObject | null): _AVAudioRecorder | null;
    /**
     * @method prepareToRecord @abstract Creates the output file and gets ready to record. @discussion This method is called automatically on record. Returns YES on success and NO on failure.
     */
    prepareToRecord(): boolean;
    /**
     * @method record @abstract Start or resume recording to file. @discussion Returns YES on success and NO on failure.
     */
    record(): boolean;
    /**
     * @method recordAtTime: @abstract Start recording at specified time in the future. @discussion Time is an absolute time based on and greater than deviceCurrentTime. Returns YES on success and NO on failure.
     */
    recordAtTime$(time: number): boolean;
    /**
     * @method recordForDuration: @abstract Record for a specified duration. @discussion The recorder will stop when it has recorded this length of audio. Returns YES on success and NO on failure.
     */
    recordForDuration$(duration: number): boolean;
    /**
     * @method recordAtTime:forDuration: @abstract Record for a specified duration at a specified time in the future. @discussion Time is an absolute time based on and greater than deviceCurrentTime. Returns YES on success and NO on failure.
     */
    recordAtTime$forDuration$(time: number, duration: number): boolean;
    /** @method pause @abstract Pause recording. */
    pause(): void;
    /**
     * @method stop @abstract Stop recording. @discussion This method also closes the output file.
     */
    stop(): void;
    /**
     * @method deleteRecording @abstract Delete the recorded file. @discussion AudioRecorder must be stopped. Returns YES on success and NO on failure.
     */
    deleteRecording(): boolean;
    /** @method updateMeters @abstract Call this method to refresh meter values. */
    updateMeters(): void;
    /**
     * @method peakPowerForChannel: @abstract Returns peak power in decibels for a given channel.
     */
    peakPowerForChannel$(channelNumber: number): number;
    /**
     * @method averagePowerForChannel: @abstract Returns average power in decibels for a given channel.
     */
    averagePowerForChannel$(channelNumber: number): number;
    /**
     * @property recording @abstract Returns YES if the AudioRecorder is currently recording.
     */
    recording(): boolean;
    /** @property url @abstract URL of the recorded file. */
    url(): _NSURL;
    /**
     * @property settings @abstract A dictionary of settings for the AudioRecorder. @discussion These settings are fully valid only when prepareToRecord has been called. For supported key-value pairs, see https://developer.apple.com/documentation/avfaudio/avaudiorecorder/1388386-initwithurl?language=objc
     */
    settings(): _NSDictionary;
    /**
     * @property format @abstract The audio format of the AudioRecorder. @discussion This property is fully valid only when prepareToRecord has been called.
     */
    format(): _AVAudioFormat;
    /**
     * @property delegate @abstract A delegate object to the AudioRecorder that conforms to the AVAudioRecorderDelegate protocol.
     */
    delegate(): _AVAudioRecorderDelegate | null;
    setDelegate$(value: _AVAudioRecorderDelegate | null): void;
    /**
     * @property currentTime @abstract Get the current time of the recording. @discussion This method is only vaild while recording.
     */
    currentTime(): number;
    /**
     * @property deviceCurrentTime @abstract Get the device current time. @discussion This method is always valid.
     */
    deviceCurrentTime(): number;
    /**
     * @property meteringEnabled @abstract Turns level metering on or off. @discussion Default is off.
     */
    meteringEnabled(): boolean;
    setMeteringEnabled$(value: boolean): void;
    /**
     * @property channelAssignments @abstract Array of AVAudioSessionChannelDescription objects @discussion The channels property lets you assign the output to record specific channels as described by AVAudioSessionPortDescription's channels property. This property is nil valued until set. The array must have the same number of channels as returned by the numberOfChannels property.
     */
    channelAssignments(): _NSArray;
    setChannelAssignments$(value: _NSArray): void;
}
