esp-adf icon indicating copy to clipboard operation
esp-adf copied to clipboard

Problems with using examples\recorder\pipeline_recording_to_sdcard (AUD-5609)

Open Szeroy opened this issue 6 months ago • 1 comments

I want to use a routine to read data from digital microphone and save it to sd card, but the routine uses chip reading microphone inside, my current microphone is directly i2s directly read 24bit raw data, how should I modify it? I see that the initialization inside the direct call is the component's function to read, do not know how I should write my own read function put in. This is a function inside the routine,I see that there are many parameters in the structure i2s_stream_cfg_t , I am not clear how to modify it.Pass on the data I've read myself.

audio_element_handle_t i2s_stream_init(i2s_stream_cfg_t *config)
{
    audio_element_cfg_t cfg = DEFAULT_AUDIO_ELEMENT_CONFIG();
    audio_element_handle_t el;
    cfg.open = _i2s_open;
    cfg.close = _i2s_close;
    cfg.process = _i2s_process;
    cfg.destroy = _i2s_destroy;
    cfg.task_stack = config->task_stack;
    cfg.task_prio = config->task_prio;
    cfg.task_core = config->task_core;
    cfg.stack_in_ext = config->stack_in_ext;
    cfg.out_rb_size = config->out_rb_size;
    cfg.multi_out_rb_num = config->multi_out_num;
    cfg.tag = "iis";
    cfg.buffer_len = config->buffer_len;

Szeroy avatar Aug 11 '24 14:08 Szeroy