| 115 | } |
| 116 | |
| 117 | void OLABuffer_writeFrame(OLABuffer *self, MYFLT *inputFrame, int32_t frameIndex) |
| 118 | { |
| 119 | int32_t firstHalfOffset = self->overlapSamplesCount * frameIndex; |
| 120 | int32_t firstHalfCount = self->frameSamplesCount - firstHalfOffset; |
| 121 | int32_t secondHalfCount = self->frameSamplesCount - firstHalfCount; |
| 122 | memcpy(&self->frames[frameIndex][firstHalfOffset], inputFrame, |
| 123 | firstHalfCount * sizeof(MYFLT)); |
| 124 | memcpy(self->frames[frameIndex], &inputFrame[firstHalfCount], |
| 125 | secondHalfCount * sizeof(MYFLT)); |
| 126 | } |
| 127 | |
| 128 | void OLABuffer_readFrame(OLABuffer *self, MYFLT *outputFrame, |
| 129 | int32_t outputFrameOffset, |