ArtskydJ / node-sox-bin

:speaker: Get SoX as a binary
10 stars 3 forks source link

Mac OS X M1 #8

Open pietrop opened 3 years ago

pietrop commented 3 years ago

👋 What would it take for this sox-bin to work on Mac OSX M1 machines?

The dependency it's crashing npm install for one of my project.

Thanks in advance, and happy to help with a little guidance 😄

ArtskydJ commented 3 years ago

This sox-bin library just has some already-compiled binaries. Sox hasn't cut a release since 2015-02-22, so there's no official M1 version.

Maybe you can try compiling it yourself?

AustinLeath commented 2 years ago

Experiencing this issue now. Did anyone confirm that downloading the source files and compiling them on an M1 works?

ArtskydJ commented 2 years ago

I don't have a mac, but it appears that sox can be installed via homebrew?

I don't know if someone could install it on an M1 and then copy the binary to this repo. Sometimes that works, but sometimes not...

AustinLeath commented 2 years ago

it does indeed work. We have a project where we are using sox and then piping it into pulseaudio. On an M1 there is some sort of issue with audio volume manipulation, when piping sox into pulseaudio you have to pass the --volume flag to paplay in order to get ungarbled audio.

AustinLeath commented 2 years ago

The command that we are using that got it to work on an M1 is /opt/homebrew/Cellar/sox/14.4.2_3/bin/sox -d -t wav -r 44100 -b 32 -c 2 - | /opt/homebrew/Cellar/pulseaudio/14.2/bin/paplay --latency=10 --volume=28000