atomic14 / atomic14/esp32_audio
Change frame buffer content for I2S Output
- Dominant language
- C++
- Stars
- 467
- Forks
- 116
- PR merge metrics
- No merged PRs in 30d
Description
I am trying to port code from a M0 based system to ESP32 which includes an I2S buzzer output. The total project is fairly complex and I2S in the background is ideal. Your code using the dma event queue seems a good way to help achieve this. I have found getting to grips with esp32 I2s a lot harder than on the M0 platform!
I have added a simple square wave constructor to I2S Output and can change the tone and volume by re compiling code. I would like to be able to change the content of the frames buffer on the fly so that I can call something like:
buzz ( tone, duration_in_ms , volume) to re load the frames buffer and restart the i2s output for the given duration.
I have tried doing this by stopping / starting i2s and /or suspending the Output task. These tests don't give a clean restart to the output as any stop start may be at any point in the write cycle. A change in the frame buffer gives noise or no output and crashes from time to time. :-(
I would welcome any suggestions on how this might be achieved.
Thanks
Ted
ted at kitst dot co dot uk
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by examining the repository's I2S Output implementation and the DMA event queue mentioned in the issue, focusing on how the frame buffer and output task are managed. The work is done when callers can change tone, duration, and volume at runtime and restart output cleanly without noise, missing output, or intermittent crashes.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- audio-video-rtc, embedded-iot
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100