sox-play
node module to play sound files via sox's play
command
You will need to install sox before use.
If you want to use MP3 files, you will also need libsox-fmt-mp3
Usage
var AudioPlayer = ; var player = file:'/home/pixnbits/Music/birds.ogg'; // http://www.portal2sounds.com/2265 player; player; player; player;
In addition, you can use an interpolated position whenever you want:
console;
The guess is simply the last reported position plus whatever time has transpired since then.
You can also stop easily:
player; // SIGINT// orplayer; // SIGKILL
Due to the nature of the spawned process, .stop()
will not end immediately. However, .stopHard()
is done via SIGKILL
so it is not without fault.