没有什么好说明的,直接上代码:
RIL_Answer(m_hRil);
RILAUDIODEVICEINFO audioDeviceInfo;
audioDeviceInfo.cbSize = sizeof(audioDeviceInfo);
audioDeviceInfo.dwParams = RIL_PARAM_ADI_ALL;
audioDeviceInfo.dwRxDevice = RIL_AUDIO_HANDSET;
audioDeviceInfo.dwTxDevice = RIL_AUDIO_HANDSET;
RIL_SetAudioDevices(m_hRil, &audioDeviceInfo);
RILAUDIODEVICEINFO audioDeviceInfo;
audioDeviceInfo.cbSize = sizeof(audioDeviceInfo);
audioDeviceInfo.dwParams = RIL_PARAM_ADI_ALL;
audioDeviceInfo.dwRxDevice = RIL_AUDIO_HANDSET;
audioDeviceInfo.dwTxDevice = RIL_AUDIO_HANDSET;
RIL_SetAudioDevices(m_hRil, &audioDeviceInfo);
维护
1. 2010-6-7 实践发现不同机型特征不一,比如我现在测的一款机器就是加了这段代码没声,没加就正常了,所有千万不要直接复制粘贴就了事,关键还是RIL驱动实现不一样!
本文转自博客园农民伯伯的博客,原文链接:RIL接听电话没有声音的问题 [ RIL_Answer | RIL_SetAudioDevices ],如需转载请自行联系原博主。