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