6 ms·
Maybe it's a silly question, but how did you output sound after decoding the stream? I wasn't aware browser JavaScript had any APIs that work with sounds direct
by romaniv 15y ago
Maybe it's a silly question, but how did you output sound after decoding the stream? I wasn't aware browser JavaScript had any APIs that work with sounds directly. There is Audio, but IIRC it just streams the file from the server.
I've looked at the sources, but couldn't fine the part that would answer my question.
- nddrylliog 15y agoYou're talking about the HTML5 <audio> tag. We're using audiolib.js, which abstracts over Mozilla's Audio Data API and Chrome's Web Audio API - both of which allow direct access to the sound device :) (And no, it's a really good question! More people should know about this stuff!)