In the tone generator example for iOS:http://www.cocoawithlove.com/2010/10/ios-tone-generator-introduction-to.html
I am trying to convert a short array to Float32 in iOS.
Float32 *buffer = (Float32 *)ioData->mBuffers[channel].mData;
short* outputShortBuffer = static_cast<short*>(outputBuffer);
for (UInt32 frame = 0, j=0; frame < inNumberFrames; frame++, j=j+2)
{
buffer[frame] = outputShortBuffer[frame];
}
For some reasons, I am hearing an added noise when played back from the speaker. I think that there is a problem with conversion from short to Float32?