Closed Arcnor closed 6 years ago
Sorry for not getting back sooner. Looks like we have to start using child_process.spawn
instead of child_process.execFile
.
would this be a possible work around?
const player = require('play-sound')(opts = {maxBuffer: 1024 * 1000})
Closed by #22.
Hi,
I'm getting the error in the title when
play-sound
uses something likemplayer
to play. The error is defined a bit here: https://github.com/robrich/gulp-exec/issues/27 (not sure ifplay-sound
uses that module or not).My guess is that the "progress bar" (not really, just a count of the elapsed time) that
mplayer
generates is filling the output buffer for the process. Using something likeafplay
(which doesn't output anything at all) works perfectly.Not sure how to fix it, but if possible, piping all the output of the commands to something like
/dev/null
(for UNIX systems, obviously :D) should fix the issue (or adding a parameter to every supported player to work in silent mode, but I'm not sure that's possible for all of them :P)