Android,通过wlan拨打音频流

我正计划为android开发我的特定voip应用程序.

这是场景:
当我打电话的时候,我想听听那个用我本地电脑的人来电的人,我想通过我自己的电脑麦克风/耳机和他说话.所以我需要通过wlan网络发送我和我正在谈话的人的音频流.

像这样的东西:

...
onCallStateChanged(int state, String phoneNumber){
 while(state == PhoneListener.CALL_STATE_OFFHOOK){ //while phone call is happening
  //send incoming speech via wlan to pc
  //receive audiostream from pc microphone and direct it to the phone call
 }
}
...

这可能与当前的Android API有关吗? (实际上它应该是因为voip应用程序在市场上可用)
我在Android API上做了一些研究,我发现的是AudioManager,它有常量命名

public static final int  STREAM_VOICE_CALL; //The audio stream for phone calls 

但我不知道如何使用它我们应该如何让我访问我可以通过网络发送的实际音频流.我该如何设法做到这一点?

连接将通过TCP套接字实现.

解决方法:

Here’s the scenario: when a phone call
occurs I want to hear the person who’s
calling on my local pc speakers and I
want to speak to him via my own pc
microphone / headset. So I need to
send the audio stream of both me and
the person I am talking to via the
wlan network.

让Android在混合中有什么意义?如果您有本地PC,并且想要使用本地PC进行音频输入/输出,请使用本地PC上的VOIP应用程序.

Something like this: onCallStateChanged()…

这适用于使用内置电话子系统(3G,CDMA等)的语音呼叫.这与VOIP无关.

Is this possible with the current Android API?

这取决于“这”是什么.如果“这个”是“拦截来电的3G电话,并且呼叫的音频由Android代码处理”,那么不,这是不可能的.

上一篇:我怎么知道一个电话的状态 – 星号和PHP?


下一篇:c# – 创建视频语音聊天应用程序的提示