Search found 5 matches
- Thu Jun 24, 2021 10:13 am
- Forum: ESP-ADF
- Topic: Custom Audio Element Problem
- Replies: 6
- Views: 11767
Re: Custom Audio Element Problem
Hello, I think your approach is not real-time. In the loop function, you first call `i2s_read_bytes` then wait 6 ms, then you send them to i2s output, and then, again you read the next batch. The latter batch you read is 6 ms late. I don't know Arduino-style coding on esp32 but there should be a met...
- Sat May 15, 2021 6:12 pm
- Forum: ESP-IDF
- Topic: esp-idf linker script question
- Replies: 2
- Views: 3972
esp-idf linker script question
Hello, I'm trying to keep an unreferenced function in the memory and later call it from another file. My files are like this: main/linker.lf: [sections:fnreg] entries: fnreg [scheme:fnreg] entries: fnreg -> dram0_data [mapping:map] archive: libmain.a entries: fn1 (fnreg); fnreg -> dram0_data KEEP() ...
- Thu Apr 01, 2021 8:36 pm
- Forum: ESP-ADF
- Topic: Custom Audio Element Problem
- Replies: 6
- Views: 11767
Re: Custom Audio Element Problem
Ok, the problem is caused by `uint16_t`. Converting it to `int16_t` solved the problem. Here is the corrected part: static int el_process(audio_element_handle_t self, char *buf, int len) { int rsize = audio_element_input(self, buf, len); if (len != rsize || (rsize % 4) != 0) { ESP_LOGW(TAG, "unexpec...
- Thu Apr 01, 2021 8:18 pm
- Forum: ESP-ADF
- Topic: Custom Audio Element Problem
- Replies: 6
- Views: 11767
Re: Custom Audio Element Problem
Ok, there were many things wrong with this code. Here is the correct version: #include <string.h> #include "board.h" #include "esp_log.h" #include "audio_pipeline.h" #include "audio_element.h" #include "i2s_stream.h" static const char *TAG = "ELEMENTEXAMPLE"; static esp_err_t el_open(audio_element_h...
- Thu Apr 01, 2021 3:07 pm
- Forum: ESP-ADF
- Topic: Custom Audio Element Problem
- Replies: 6
- Views: 11767
Custom Audio Element Problem
Hello, I'm trying to write my own audio element. The board I'm using is LyraT v4.3. I created a pipeline i2s_stream_reader -> my_element -> i2s_stream_writer. In the process function of 'my_element', if I forward the samples without doing anything with them, I can hear my voice from the headphones w...