Closed roymacdonald closed 5 years ago
Thank you! I didn't notice it.
I fixed a bit. In case of decoding to ofSoundBuffer of non-allocated or different settings.
super. by the way, great addon. Thanks. What is that you fixed a bit?
I fixed your code a bit to avoid possibly crash by adding ofSoundBuffer reallcation in AudioFrame::decode. Now it works if the buffer was not setup as AudioFrame expected.
If empty(size()==0) buffer was passed, 'NDIlib_util_audio_to_interleaved_32f_v2(this, &interleaved_frame);' would write to non allocated memory.
Oh, I see, sure. thanks for that.
Hi, I found out that the addon was not handling multi channel audio in the correct way, so I made the fix in this PR. NDI uses planar sound buffers, this means that each channel is saved sequentially instead of OF which uses interleaved sound buffers. I've tested it and works as expected.