// setFrame() - set the 2D frame i to the incoming signal. void MLSignal::setFrame(int i, const MLSignal& src) { // only valid for 3D signals assert(is3D()); // source must be 2D assert(src.is2D()); // src signal should match our dimensions if((src.getWidth() != mWidth) || (src.getHeight() != mHeight)) { return; } MLSample* pDestFrame = mDataAligned + plane(i); const MLSample* pSrc = src.getConstBuffer(); std::copy(pSrc, pSrc + src.getSize(), pDestFrame); }