Possible to modify buffer as it is streaming?
I'm creating a bot to play a preset library of sound effects. Currently only 1 sound effect can be played at a time. My desired behavior is to:
- Combine the buffers of two sound effects so that they overlap, with the 2nd sound effect being overlaid at the current playhead position of the first
- Begin playing this new buffer instead of the old one, without stopping playback
Is this possible? Is there a way to handle each chunk of the stream manually?
Thanks
3 Replies
- What's your exact discord.js
npm list discord.js
and node node -v
version?
- Not a discord.js issue? Check out #other-js-ts.
- Consider reading #how-to-get-help to improve your question!
- Explain what exactly your issue is.
- Post the full error stack trace, not just the top part!
- Show your code!
- Issue solved? Press the button!Just pass the modified stream to another function that adds effect on the stream
It's gonna be a little laggy but it should work
And I do not recommend implementing audio filtering natively anyway