背景音乐通话 [英] Background music for call

查看:1079
本文介绍了背景音乐通话的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想开发一个应用程序播放背景音乐的号召,只对主叫用户和listener.Is有这已经是可用的任何应用程序可闻,是否有可能在Android的???

I want to develop an app which play background music for a call,and is audible only for the caller and listener.Is there any application which is already available,Is it possible in android???

推荐答案

一些移动平台都支持这一功能在平台级的(如我测试过这与高通APQ8064,我已经配置了硬件codeC路线因此,和它的作品)。但是Android不具备,它可以让你用这个作为一个应用程序开发者的API,所以在一个无根的手机有没有真的什么可以做
为什么有它没有API - 或者是否会有之一Android系统未来的版本 - 我不知道。有可能是法律问题在某些市场,或者它可能只是因为它被认为是一个半晦涩特征,他们没有看到有很大的需求,其中只支持数量相对较少的平台上。

Some mobile platforms do support this functionality at the platform-level (e.g. I've tested this with the Qualcomm APQ8064 where I had configured the hardware codec route accordingly, and it works). But Android doesn't have an API that let's you use this as an app developer, so on a non-rooted phone there's not really anything you can do.
Why there's no API for it - or whether there will be one in coming versions of Android - I don't know. There might be legal issues in some markets, or it might just be because it's considered as a semi-obscure feature that they don't see a great demand for and which is supported only by a relatively small number of platforms.

另一个要考虑的是,你的真正的希望有音乐在通话过程中播放的背景?
的声音将是8千赫单(或16kHz的单声道,如果你再在宽带电话),并且这将是AMR-CN $ C $随着语音信号的其余部分(AMR是一种低比特率codeC专为编码语音)的CD。换句话说,你打过来的语音呼叫上行的任何音乐是要健全真的,真的很不错。

Another thing to consider is, do you really want to have music playing in the background during a call?
The audio is going to be 8 kHz mono (or 16 kHz mono if you're in a wideband call), and it's going to be AMR-encoded along with the rest of the speech signal (AMR is a low-bitrate codec designed for encoding speech). In other words, any music you play over the voice call uplink is going to sound really, really bad.

更新:对于APQ8064系统的手机,你有root权限,程序会是这样的(我不记得了我的头顶部的确切语法):

UPDATE: For APQ8064-based phones where you have root access, the procedure would be something like this (I don't remember the exact syntax off the top of my head):

audioManager.setParameters("incall_music_enabled=true");

// Execute the following using e.g. Runtime.exec()
amix 'SLIMBUS_4_RX Audio Mixer MultiMedia2' 1
aplay -Dhw:0,1 mono_8khz_data.pcm

// When you want to stop music playback, stop the aplay process, and then do
audioManager.setParameters("incall_music_enabled=false");

这篇关于背景音乐通话的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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