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:
@@ -11,3 +11,5 @@ require("aiorepl")
|
||||
|
||||
module("mfrc522.py", "../../lib/micropython-mfrc522/")
|
||||
module("microdot.py", "../../lib/microdot/src/microdot/")
|
||||
|
||||
module("audiocore.py", "../../src/audiocore")
|
||||
|
||||
Reference in New Issue
Block a user