I'm making a function call in my Obj-C++ which returns a C++ float vector:
vector<float> mixedFrames = song.getMixedFrames();
These frames are for audio playback and CoreAudio expects them inside a Float32 array which was defined like this:
Float32 *buffer = (Float32 *)ioData->mBuffers[channel].mData;
My question is which is the fastest way to copy mixedFrames to buffer. Should I just loop through mixedFrames and copy every value to buffer or is there a faster way which would take less memory?