You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hoping someone can clear this up for me, I've only just got into naudiodon and portaudio. Reading the portaudio c documentation, it says that it reads in multichannel pcm as interleaved or non-interleaved samples and 'automatically performs conversion where necessary'. I'm a bit confused how this concept applies within naudiodon.
Are we required to feed our multichannel files as interleaved or non-interleaved samples? I.e [chan1sampl0,chan2sampl0,chan3sampl0, chan1sampl1,chan2sampl1, chan3sampl1] or [chan1sampl0,chan1sampl1,chan2sampl0,chan2sampl1, chan3sampl0, chan3sampl1]?
Doing some tests, I see interleaving 8 bit samples seems to do the trick.
Now, when streaming more than 8 bit samples, how do we fill a buffer with the correct bytes for each sample? For instance, a 16 bit word, do we fill the buffer [upper16chan1sampl0,lower16chan1sampl0,upper16chan2sampl0,lower16chan1sampl0,... Etc ] or some other way?
Would appreciate any guidance with this!
The text was updated successfully, but these errors were encountered:
naudiodon doesn't attempt to do any kind of formatting of the audio data to or from portaudio. It expects interleaved samples for multichannel streams with the bit depth of each sample corresponding to the sample format specified in the options object. I think your 16-bit example looks about right - though you might need to check your endianness.
Yes, I think there is a problem with my endianness. Have tried the above example and just get a nasty screech. Will look into it and post here once I've found out in case anyone else is wanting to know.
Hey there!
Hoping someone can clear this up for me, I've only just got into naudiodon and portaudio. Reading the portaudio c documentation, it says that it reads in multichannel pcm as interleaved or non-interleaved samples and 'automatically performs conversion where necessary'. I'm a bit confused how this concept applies within naudiodon.
Are we required to feed our multichannel files as interleaved or non-interleaved samples? I.e [chan1sampl0,chan2sampl0,chan3sampl0, chan1sampl1,chan2sampl1, chan3sampl1] or [chan1sampl0,chan1sampl1,chan2sampl0,chan2sampl1, chan3sampl0, chan3sampl1]?
Doing some tests, I see interleaving 8 bit samples seems to do the trick.
Now, when streaming more than 8 bit samples, how do we fill a buffer with the correct bytes for each sample? For instance, a 16 bit word, do we fill the buffer [upper16chan1sampl0,lower16chan1sampl0,upper16chan2sampl0,lower16chan1sampl0,... Etc ] or some other way?
Would appreciate any guidance with this!
The text was updated successfully, but these errors were encountered: