shime / play-sound

Play sounds by shelling out to one of the available audio players.
MIT License
208 stars 31 forks source link

Stop function (and aplay) #13

Closed ghost closed 8 years ago

ghost commented 8 years ago

Noticed you took over play.js (after noticing it was a bit nonactive), nice job! :+1:

An open issue there was a request for stop functionality, thought of mentioning it here too as it still seems pretty relevant to this package.

Could probably be done with spawn instead of exec, hold reference and kill child, may possible also (partially) resolve https://github.com/shime/play-sound/issues/12.

(Also, was thinking, perhaps aplay could be added to the default players? It is pretty common on Linux systems)

shime commented 8 years ago

Thanks for reporting. Just published 1.1.1 with aplay added to defaults, and @justinjmoses added support for holding a reference to child_process so you can kill it later. Check the readme for more info.