There's no I2S support at the moment, but you could easily enable it by extending the Espruino interpreter with C code.
The issue really is supplying the data to it fast enough. For that, you really need DMA (which you can enable pretty easily), but then where do you get data from? There's not much memory on-chip for high bitrate audio, JS isn't fast enough to generate it, and even the SD card library would struggle at the moment.
So to be honest you're probably going to end up writing all your audio stuff in C, and then just controlling it from JS. That's great, but it means that there's very little point exposing I2S to JavaScript :(
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
There's no I2S support at the moment, but you could easily enable it by extending the Espruino interpreter with C code.
The issue really is supplying the data to it fast enough. For that, you really need DMA (which you can enable pretty easily), but then where do you get data from? There's not much memory on-chip for high bitrate audio, JS isn't fast enough to generate it, and even the SD card library would struggle at the moment.
So to be honest you're probably going to end up writing all your audio stuff in C, and then just controlling it from JS. That's great, but it means that there's very little point exposing I2S to JavaScript :(