node-sfx icon indicating copy to clipboard operation
node-sfx copied to clipboard

Only plays '.aiff' sounds

Open likethemammal opened this issue 10 years ago • 2 comments

I wasn't able to get this to play .mp3s. After looking through the source, I realized you only used .aiff sounds. Luckily I was able to convert my files.

Can you add a section in the readme describing the supported audio formats? Or is it somehow based on the OS specifically? I'm using Linux at the moment.

likethemammal avatar Jun 09 '15 20:06 likethemammal

Yeah, it looks like a Linux issue. If you look inside the /platforms folder, you can check out how node-sfx actually plays the sound for each platform. It simply runs a command that plays audio with a path to the sound file. It looks like paplay, the command the Linux platform uses, doesn't support MP3. We could change the command to something that does support MP3 but we'd probably have to introduce a new dependency. Thoughts?

adriancooney avatar Jun 09 '15 21:06 adriancooney

My main reason for choosing this package, as opposed to others on npm that play sounds, was because it didn't require any external install of a CLI player.

As long as that dependancy isn't outside npm I'm golden. But seeing as Audacity had no problem exporting to aiff, it's not really an issue for me anymore.

likethemammal avatar Jun 10 '15 03:06 likethemammal