guo-yu / player

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

Illegal instruction: 4 #72

Open alexey-sh opened 7 years ago

alexey-sh commented 7 years ago

Hi, thanks for the cool library. I tried to pause an audio and got the error in console Illegal instruction: 4

a part of my source code

        if (url.pathname === '/play') {
            if (currentPlayer) {
                currentPlayer.stop();
            }
            currentPlayer = new Player(data);
            currentPlayer.play();
            currentPlayer.on('error', function(err){
                // when error occurs
                console.log(err);
            });

        }
        else if (url.pathname === '/pause') {
            if (currentPlayer) {
                currentPlayer.pause();
            }
        }
        else if (url.pathname === '/stop') {
            if (currentPlayer) {
                currentPlayer.stop();
            }
        }

Same goes for .stop()

How can I prevent the error?

node: v5.10.1 os: mac os 10.12.4

stromgren commented 7 years ago

I have the same issue, working great on my Raspberry PI.

Process finished with exit code 132 (interrupted by signal 4: SIGILL)

I've only tried this with a streaming source.

node: v6.10.2 mac os: 10.12.4

stromgren commented 7 years ago

After some reasearch, I found the problem. It's related to the speaker-module and not this package. There is an issue registered and also a workaround that works for me.

https://github.com/TooTallNate/node-speaker/issues/95#issuecomment-289070066