In some case, I was able to simply replace index with buffer right away. But I’m having problem with this example which involve using memcpy When I replace input with &buffer it compiles just fine but won’t get the right output. I’m guessing it had something to do with sizeof(float) but I’m at my wit ends how to fix it.
to copy an audio buffer you just need to use the ’= operator, so if you get buffer in the callback and have another one called audioBuffer you just need to call:
I can indeed just go back to use void audioIn(float* input, int bufferSize, int nChannels) and it would works just fine. It’s just that I want to understand relationship/differences between float and ofSoundBuffer here.