# MicrophoneSource

class MicrophoneSource(var audioSource: Int = MediaRecorder.AudioSource.DEFAULT) : AudioSource, GetMicrophoneData

Created by pedro on 12/1/24.

## Constructors

MicrophoneSource
Link copied to clipboard
constructor(audioSource: Int = MediaRecorder.AudioSource.DEFAULT)

## Properties

audioSource
Link copied to clipboard
var audioSource: Int
created
Link copied to clipboard
var created: Boolean
echoCanceler
Link copied to clipboard
var echoCanceler: Boolean
isStereo
Link copied to clipboard
var isStereo: Boolean
microphoneVolume
Link copied to clipboard
var microphoneVolume: Float
noiseSuppressor
Link copied to clipboard
var noiseSuppressor: Boolean
sampleRate
Link copied to clipboard
var sampleRate: Int

## Functions

init
Link copied to clipboard
fun init(sampleRate: Int, isStereo: Boolean, echoCanceler: Boolean, noiseSuppressor: Boolean): Boolean
inputPCMData
Link copied to clipboard
open override fun inputPCMData(frame: Frame)
isMuted
Link copied to clipboard
fun isMuted(): Boolean
isRunning
Link copied to clipboard
open override fun isRunning(): Boolean
mute
Link copied to clipboard
fun mute()
release
Link copied to clipboard
open override fun release()
setAudioEffect
Link copied to clipboard
fun setAudioEffect(effect: CustomAudioEffect)
setPreferredDevice
Link copied to clipboard
@RequiresApi(api = 23)
fun setPreferredDevice(deviceInfo: AudioDeviceInfo?): Boolean
start
Link copied to clipboard
open override fun start(getMicrophoneData: GetMicrophoneData)
stop
Link copied to clipboard
open override fun stop()
unMute
Link copied to clipboard
fun unMute()