玩pre-录制的音频到语音呼叫 [英] Play pre-recorded audio into a voice call

查看:195
本文介绍了玩pre-录制的音频到语音呼叫的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这个问题已经被问过(<一href="http://stackoverflow.com/questions/8784221/how-to-play-an-audio-file-on-a-voice-call-in-android">How就在Android的语音呼叫播放音频文件,玩语音呼叫等)的音频文件,但我会问反正:是否可以播放音频文件为正在进行的语音呼叫。我知道简单的答案是否,但我还没有想通了为什么它是如此。

The question have been asked before ( How to play an audio file on a voice call in android, play an audio file on a voice call etc), but I will ask it anyway: Is it possible to play an audio file into an ongoing voice call. I know the short answer is "No", but i haven't figured it out why it is so.

我知道SDK不具有任何支持,但将它的任何机会,有可能以某种方式来写自己的code处理这个,也许从C / C ++ code帮助(使用NDK)。难道人对如何解决这个任何想法?或者是回答了严格的不,你不能玩pre-录制的音频到语音呼叫?

I know the SDK doesn't has any support for it, but would it by any chances be possible in some way to write your own code that handles this, maybe with help from C/C++ code (using the NDK). Do anyone have any ideas on how to solve this? Or is the answer a strict "no, you can't play pre-recorded audio into a voice call"?

我真的不关心,如果解不上赫然出现时间最长的我能找到一个支持的解决方案的一些设备上的所有设备的工作,如果这是需要,我可以考虑获得root权限。

I don't really care if the solution doesn't work on all devices out there as longest I can find some devices that supports the solution, and I can consider the get root access if that is needed.

推荐答案

我用Audiotrack播放音频流设置语音通话过程中STREAM_VOICE_CALL我一加(测试设备),它完美地工作,但该音频是我说话的一声清晰,播放的音乐是没有听说过。噪声消除功能,可能是因为应用。我用棒棒糖基于ROM中this.So答案是肯定的,我们可以玩了。

I used Audiotrack to play audio with stream set to STREAM_VOICE_CALL during voice call on my One-Plus(Test Device) and it worked perfectly, however the audio which I speak is heard clearly and the music played is not heard. Probably because of the noise cancellation feature applied. I used Lollipop based Rom for this.So the answer is yes we can play.

这篇关于玩pre-录制的音频到语音呼叫的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆