How to remove background Noise in Audio Track?

若如初见. 提交于 2019-12-08 11:56:07

问题


I am developing VOIP kind of application. Sending the voice is perfect but when i receive the same voice from the webserver, i am playing back that using AudioTrack API.

I am calling at.play() and at.write in a Thread so that i should get all the voice which is recorded and sent from the other device.

But, now the problem here i m facing is, if there is no voice than its still playing like some bullet sound, i mean there is a continuos background sound when i try to play .

I m using this following function in a Thread:

                   if (at != null) {
                        if (at.getPlayState() != AudioTrack.PLAYSTATE_PLAYING) {
                            at.play();
                   } else {
                       if (playing == true) {
                                System.out.println("BEFORE WRITE");
                                at.write(playShortData, 0,
                                        playShortData.length);
                                System.out.println("AFTER WRITE");

                                at.flush();
                                playing = false;
                            }
                        }
                    }

How can i remove the background noise if there no voice is send from other device.


回答1:


I think its playing Junk value when none of them is speaking on other sides, its just sending junk values ..



来源:https://stackoverflow.com/questions/13877058/how-to-remove-background-noise-in-audio-track

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!