bchociej / trombone

A trombone sound
Apache License 2.0
0 stars 1 forks source link

trombone.play() results in "Illegal instruction: 4" #1

Open tandrewnichols opened 7 years ago

tandrewnichols commented 7 years ago

It does play correctly, but when the sound ends, this error occurs. Tried from both the REPL and a node script using node 7.7.2.

tandrewnichols commented 7 years ago

Even a try/catch around trombone.play() does not prevent this error (which I assume means it's something in the compiled code).

tandrewnichols commented 7 years ago

Ah, it seems this is a Mac-related issue? The OS doesn't understand some instruction. Maybe you can't fix that? (but it would be cool if you could)

bchociej commented 7 years ago

I strongly suspect there's a problem with the lame package on Mac. But I'd like to switch to a pure JS version of this whole thing if at all possible, so perhaps I'll just try and make that happen when I have some spare cycles

tandrewnichols commented 7 years ago

Is there a way I can test that to confirm?

bchociej commented 7 years ago

Give the latest master a try, also published to npm as 1.1.0

tandrewnichols commented 7 years ago

Nope . . . still the same. Would version of node make a difference?

tandrewnichols commented 7 years ago

This seems to be an issue in the speaker dependency: https://github.com/TooTallNate/node-speaker/issues/95

tandrewnichols commented 7 years ago

The instructions there (npm install speaker --mpg123-backend=openal) did fix the issue. Maybe you want to list that as a peer dependency and add instructions in the README to install with that package with that particular command? Unless you know of a way to add it as a package dependency to be install with that particular flag.

tandrewnichols commented 7 years ago

Ah, adding this to my package.json works:

"scripts": {
  "install": "npm install speaker --mpg123-backend=openal"
}

So you could remove the dependency on speaker and install it manually after install.