MicrophoneManagerManual

Similar to MicrophoneManager but samples are not read automatically. The owner must manually call read(...) as often as samples are needed.

Constructors

Link copied to clipboard
constructor()

Properties

Link copied to clipboard
val audioFormat: Int = 2
Link copied to clipboard
open val channel: Int
Link copied to clipboard
open var sampleRate: Int

Functions

Link copied to clipboard

open fun createInternalMicrophone(config: AudioPlaybackCaptureConfiguration, sampleRate: Int, isStereo: Boolean, echoCanceler: Boolean, noiseSuppressor: Boolean): Boolean
Create audio record with params and AudioPlaybackCaptureConfig used for capturing internal audio Notice that you should granted RECORD_AUDIO before calling this!
Link copied to clipboard
open fun createMicrophone()
Create audio record
open fun createMicrophone(sampleRate: Int, isStereo: Boolean, echoCanceler: Boolean, noiseSuppressor: Boolean): Boolean
Create audio record with params and default audio source
open fun createMicrophone(audioSource: Int, sampleRate: Int, isStereo: Boolean, echoCanceler: Boolean, noiseSuppressor: Boolean): Boolean
Create audio record with params and selected audio source
Link copied to clipboard
open fun getGetFrame(): GetFrame
Link copied to clipboard
open fun getInputFrame(): Frame
Link copied to clipboard
open fun isCreated(): Boolean
Link copied to clipboard
open fun isMuted(): Boolean
Link copied to clipboard
open fun isRunning(): Boolean
Link copied to clipboard
open fun mute()
Link copied to clipboard
open fun read(directBuffer: ByteBuffer, numBytes: Int): Int
Call when you need mic samples.
Link copied to clipboard
open fun setCustomAudioEffect(customAudioEffect: CustomAudioEffect)
Link copied to clipboard
Link copied to clipboard
open fun start()
Start record and get data
Link copied to clipboard
open fun stop()
Stop and release microphone
Link copied to clipboard
open fun unMute()