float scale = (float)INT16_MAX;
vDSP_vsmul(self->_outData, 1, &scale, self->_outData, 1, numberOfFrames * self.numberOfChannels);
for (int iBuffer = 0; iBuffer < ioData->mNumberBuffers; iBuffer++) {
int thisNumChannels = ioData->mBuffers[iBuffer].mNumberChannels;
for (int iChannel = 0; iChannel < thisNumChannels; iChannel++) {
vDSP_vfix16(self->_outData + iChannel,
self.numberOfChannels,
(SInt16 *)ioData->mBuffers[iBuffer].mData + iChannel,
thisNumChannels,
numberOfFrames);
}
}
网友评论