prepareAudio
open fun prepareAudio(audioSource: Int, bitrate: Int, sampleRate: Int, isStereo: Boolean, echoCanceler: Boolean, noiseSuppressor: Boolean): Boolean
Call this method before use @startStream. If not you will do a stream without audio.
Return
true if success, false if you get a error (Normally because the encoder selected doesn't support any configuration seated or your device hasn't a AAC encoder).
Parameters
bitrate
AAC in kb.
sampleRate
of audio in hz. Can be 8000, 16000, 22500, 32000, 44100.
isStereo
true if you want Stereo audio (2 audio channels), false if you want Mono audio (1 audio channel).
echoCanceler
true enable echo canceler, false disable.
noiseSuppressor
true enable noise suppressor, false disable.
open fun prepareAudio(bitrate: Int, sampleRate: Int, isStereo: Boolean, echoCanceler: Boolean, noiseSuppressor: Boolean): Boolean
Same to call: prepareAudio(64 * 1024, 32000, true, false, false);
Return
true if success, false if you get a error (Normally because the encoder selected doesn't support any configuration seated or your device hasn't a AAC encoder).