audiocore: Add async support

Rename the exising audiocore C module to _audiocore and create a new
Micropython wrapper module audiocore. This makes it easier to implement
async methods.
Add interrupt support to _audiocore that notifies core0 whenever data
has been consumed from the MP3 bitstream buffer.
Use this interrupt and an asyncio.ThreadSafeFlag to implement
audiocore.async_put which will play back the provided buffer, allowing
other async tasks to run while waiting for space in the bitstream
buffer.
This commit is contained in:
2025-03-15 22:43:22 +01:00
parent cc2bf8a84b
commit 931571bd0a
10 changed files with 144 additions and 30 deletions

View File

@@ -11,3 +11,5 @@ require("aiorepl")
module("mfrc522.py", "../../lib/micropython-mfrc522/")
module("microdot.py", "../../lib/microdot/src/microdot/")
module("audiocore.py", "../../src/audiocore")