QCC 音频输入输出

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);

}在这里插入图片描述

基础上动态切换输出方式,
在这里插入图片描述
根据使用场景也可以直接修改为同时输出
在这里插入图片描述

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值