i2s_stream_reader和i2s_stream_writer为何不能一起初始化
Posted: Sat Oct 12, 2024 9:47 am
我用esp32 s3 korvo2 v3开发板,idfV5.3.1,在adf开发中碰到一个诡异的问题,不能同时初始化i2s_stream_reader和writer,单用哪个都非常正常,但如果初始化完reader再初始化writer,reader那边录音声音就变得很慢,难道还不能同时具备 录音和播放功能吗,哪位大神告诉我,这是为啥啊
很明显这俩配置一模一样,不存在不匹配的问题,另外我为什么编译时不会用到i2s_stream_idf5.c,我明明环境是5.3.1
Code: Select all
i2s_stream_cfg_t i2s_cfg = I2S_STREAM_CFG_DEFAULT_WITH_TYLE_AND_CH(CODEC_ADC_I2S_PORT, 44100, 16, AUDIO_STREAM_READER, 1);
i2s_cfg.out_rb_size = 16 * 1024; // Increase buffer to avoid missing data in bad network conditions
i2s_stream_reader = i2s_stream_init(&i2s_cfg);
i2s_stream_cfg_t i2s_cfg1 = I2S_STREAM_CFG_DEFAULT_WITH_TYLE_AND_CH(CODEC_ADC_I2S_PORT, 44100, 16, AUDIO_STREAM_WRITER, 1);
i2s_cfg1.out_rb_size = 16 * 1024;
i2s_stream_writer = i2s_stream_init(&i2s_cfg1);