• 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);
    
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6
    • 7
    • 8
    • 9
    • 10
    • 11
    • 12
    • 13
    • 14
    • 15
    • 16
    • 17
    • 18
    • 19
    • 20
    • 21
    • 22
    • 23
    • 24

    }在这里插入图片描述

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

  • 相关阅读:
    spring boot启动报错java.lang.UnsupportedOperationException
    pytorch-激活函数与GPU加速
    LabVIEW学习记录4-局部变量、全局变量、共享变量
    turn.js 模版简单使用
    cuda,显卡,pytorch三者配置相关知识--学习笔记
    Selenium操作已经打开的Chrome浏览器窗口
    【beanshell】数据写入本地多种方法
    JSD-2204-HTML-CSS-Day02
    蜂鸟E203学习笔记(四)——取指
    onnx模型转换opset版本和固定动态输入尺寸
  • 原文地址:https://blog.csdn.net/TengTaiTech/article/details/133974675