toggle menu
RootEncoder
androidJvm
switch theme
search in API
encoder
/
com.pedro.encoder.input.sources.audio
/
MicrophoneSource
Microphone
Source
class
MicrophoneSource
(
var
audioSource
:
Int
=
MediaRecorder.AudioSource.DEFAULT
)
:
AudioSource
,
GetMicrophoneData
Created by pedro on 12/1/24.
Members
Constructors
Microphone
Source
Link copied to clipboard
constructor
(
audioSource
:
Int
=
MediaRecorder.AudioSource.DEFAULT
)
Properties
audio
Source
Link copied to clipboard
var
audioSource
:
Int
created
Link copied to clipboard
var
created
:
Boolean
echo
Canceler
Link copied to clipboard
var
echoCanceler
:
Boolean
is
Stereo
Link copied to clipboard
var
isStereo
:
Boolean
microphone
Volume
Link copied to clipboard
var
microphoneVolume
:
Float
noise
Suppressor
Link copied to clipboard
var
noiseSuppressor
:
Boolean
sample
Rate
Link copied to clipboard
var
sampleRate
:
Int
Functions
init
Link copied to clipboard
fun
init
(
sampleRate
:
Int
,
isStereo
:
Boolean
,
echoCanceler
:
Boolean
,
noiseSuppressor
:
Boolean
)
:
Boolean
input
PCMData
Link copied to clipboard
open
override
fun
inputPCMData
(
frame
:
Frame
)
is
Muted
Link copied to clipboard
fun
isMuted
(
)
:
Boolean
is
Running
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
(
)
set
Audio
Effect
Link copied to clipboard
fun
setAudioEffect
(
effect
:
CustomAudioEffect
)
set
Preferred
Device
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
(
)
un
Mute
Link copied to clipboard
fun
unMute
(
)