vDSP_vfix16

2020-03-13  本文已影响0人  程序员都是傻子呀
        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);
            }
        }
上一篇 下一篇

猜你喜欢

热点阅读