开发者

Audio output latency on BASS un4seen on android

I have been trying to stream mic feed directly from mic to speaker in which i am facing audio latency which varies from device to device.

Following is the code i have tried so far.

The library i am using right now is BASS un4seen for Android

val rchan = BASS.BASS_RecordStart(
        freq, chans, BASS.BASS_RECORD_PAUSE,
        { handle, _, _, _ ->
            BASSenc.BASS_Encode_IsActive(handle) != 0 // continue recording if encoder is alive
        }, 0
    )
val StreamProc =
        BASS.STREAMPROC { handle, buffer, length, user ->
            BASS.BASS_ChannelGetData(rchan, buffer, length) // get data from the recording stream
        }开发者_开发百科

    chanPlay = BASS.BASS_StreamCreate(44100, 1, 0, StreamProc, null);
    BASS.BASS_ChannelPlay(chanPlay, false);
    BASS.BASS_ChannelPlay(rchan, false)
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜