Open akashbudhia opened 6 years ago
+Bump
+Bump
Did you get the solution?
any solution
Open for suggestions on how an API for this would look!
Did you get the solution?
My suggestion would be to write a custom throughput stream which accepts the piped data and processes them in a small buffered loop which you can stop via a custom control command. (true instant stop is not possible because the audio card uses an internal buffer. But with a size of 1024 samples and 44100 samples per second this is relatively short).
I pipe a local mp3 file stream via node-lame decoder to the node-speaker instance to play a local mp3 file. What would be the correct way to instantly stop the audio from playing?