import { AgoraRteAudioSourceType, AgoraRteMediaSourceState } from '../../type'; import { AgoraRteAudioRawDataConfig, AgoraRteMicrophoneTrackObserver, AgoraRteObservableTrack } from './type'; import { AgoraRteAudioEffectEnhancer } from './effect-enhancer'; /** * Interface for a microphone audio track in Agora RTE SDK. */ export interface AgoraRteMicrophoneTrack extends AgoraRteObservableTrack { /** * Gets the device ID of the microphone. */ getDeviceId(): string; /** * Gets the state of the microphone audio track. */ getState(): AgoraRteMediaSourceState; /** * Gets the audio source type of the microphone audio track. */ getAudioSourceType(): AgoraRteAudioSourceType; /** * Sets the audio raw data configuration for the track. * @param config The audio raw data configuration. */ setAudioRawDataConfig(config: AgoraRteAudioRawDataConfig): number; /** * Starts the microphone audio track for the specified device. * onLocalMicrophoneAudioStateUpdated callback will be triggered when the state of the microphone changes. * Note: * - {@link startTest} should be called after this method when you are not in a channel, * otherwise onLocalMicrophoneAudioStateUpdated may not be triggered in electron. */ start(): number; /** * Stops the microphone audio track for the specified device. */ stop(): number; /** * Starts the microphone test for the specified device. * @param interval The interval for the microphone test. */ startTest(interval: number): number; /** * Stops the microphone test for the specified device. */ stopTest(): number; /** * Updates the signal volume for the microphone audio track. * @param volume The volume level to set, range from 0 to 100. */ adjustVolume(volume: number): number; /** * Gets the audio effect enhancer for the microphone audio track. * @returns The audio effect enhancer for the track. */ getAudioEffectEnhancer(): AgoraRteAudioEffectEnhancer; }