Buffer specs for Sound.create() #3

Closed
NHQ opened this Issue Jan 8, 2012 · 1 comment

Comments

Projects
None yet
2 participants
@NHQ

NHQ commented Jan 8, 2012

I'm trying to couple node-sound with audiolib.js

But when I try to pass a buffer from audiolib to node-sound, the get no audio.

Must the buffer be 16 bit signed Int?

@xk

This comment has been minimized.

Show comment Hide comment
@xk

xk Jan 8, 2012

Owner

Hi NHQ,

Yes, the buffer must be a PCM sound, 16 bits per sample (signed), stereo @ 44100 Hz (samples per second). If you look at the files test-multiwaves, test-sinewave, squarewave etc. you'll see how to synthesize a sound. I don't know much about audiolib, but if it can export a sound in PCM 16 bits stereo @ 44100 Hz it should work fine with node-sound. If it doesn't, you could try to save audiolib's sound to a file and let node-sound bufferify() it. Hope it helps.

Owner

xk commented Jan 8, 2012

Hi NHQ,

Yes, the buffer must be a PCM sound, 16 bits per sample (signed), stereo @ 44100 Hz (samples per second). If you look at the files test-multiwaves, test-sinewave, squarewave etc. you'll see how to synthesize a sound. I don't know much about audiolib, but if it can export a sound in PCM 16 bits stereo @ 44100 Hz it should work fine with node-sound. If it doesn't, you could try to save audiolib's sound to a file and let node-sound bufferify() it. Hope it helps.

@xk xk closed this Feb 27, 2012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment