QCC 音频输入输出
QCC蓝牙芯片(QCC3040 QCC3083 QCC3084 QCC5181 等等)支持DAC、I2S、SPDIF输出,AUX、I2S、SPDIF、A2DP 输入
蓝牙音频输入,模拟输出是最常见的方式。
也可以再此基础上动态切换输入方式。
输入方式切换参考
static void kymeraWiredAnalog_StartChains(kymeraTaskData *theKymera)
{
bool connected;
Source line_in_l = SourcekymeraWiredAnalog_GetSource(appConfigLeftAudioChannel(), appConfigLeftAudioInstance(), KymeraOutput_GetMainSampleRate() /* for now input/output rate are same */);
Source line_in_r = SourcekymeraWiredAnalog_GetSource(appConfigRightAudioChannel(), appConfigRightAudioInstance(), KymeraOutput_GetMainSampleRate() /* for now input/output rate are same */);
/* if stereo, then synchronize */
if(line_in_r)
SourceSynchronise(line_in_l, line_in_r);
DEBUG_LOG("kymeraWiredAnalog_StartChains");
/* The media source may fail to connect to the input chain if the source
disconnects between the time wired analog audio asks Kymera to start and this
function being called. wired analog audio will subsequently ask Kymera to stop. */
connected = ChainConnectInput(theKymera->chain_input_handle, line_in_l, EPR_WIRED_STEREO_INPUT_L);
if(line_in_r)
connected = ChainConnectInput(theKymera->chain_input_handle, line_in_r, EPR_WIRED_STEREO_INPUT_R);
/* Start the output chain regardless of whether the source was connected
to the input chain. Failing to do so would mean audio would be unable
to play a tone. This would cause kymera to lock, since it would never
receive a KYMERA_OP_MSG_ID_TONE_END and the kymera lock would never
be cleared. */
KymeraOutput_ChainStart();
Kymera_StartMusicProcessingChain();
if (connected)
ChainStart(theKymera->chain_input_handle);
}文章来源:https://www.toymoban.com/news/detail-830114.html
基础上动态切换输出方式,
根据使用场景也可以直接修改为同时输出
文章来源地址https://www.toymoban.com/news/detail-830114.html
到了这里,关于QCC 音频输入输出的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!