faridco / rsox

libsox binding for Ruby
18 stars 20 forks source link

RSoxBuffers contents don't appear to be correct #3

Closed tism closed 12 years ago

tism commented 13 years ago

I'm not sure if it's how sox is presenting the samples or what but if I take the contents of a series of buffers, split them by the number of channels and pack it out into alsa I should get the correct audio. Currently I'm only getting the right channel and it's at half speed. I'm not sure what's in the buffer is right or if it's scaled or not.

This is based on the assumption that sox is providing the samples interleaves, so: Channel 1, Channel 2, Channel 1, Channel 2...

tism commented 12 years ago

Was pushing the sox samples straight to alsa which was expecting 16bit samples not the 32bit that sox uses