guo-yu / player

a command line player, supports play mp3 both from uri and local stream.
261 stars 66 forks source link

Playback stops before end #20

Open Bernardstanislas opened 10 years ago

Bernardstanislas commented 10 years ago

Playback stops before end of the mp3 file (less than one second), on Archlinux 3.12.21-1-ARCH, either with local or remote file

guo-yu commented 9 years ago

This is an unsolved bug, please check out the comments here : https://github.com/turingou/player/blob/48afcec268fcb053962f73d6c9f0338db2a1b07d/libs/player.js#L100-L103

Saw-zall commented 7 years ago

maybe you can use the finish event on your _speaker2 to emit your playend event

something like var speaker = new _pcmVolume2['default'](); var spk2 = new _speaker2['default'](self.lameFormat) speaker.pipe(spk2) .on('finish', function() { console.log('play finished') return self.emit('playend', song); });

am i right ?