AudioQueue recording as float

Posted by niklassaers on Stack Overflow See other posts from Stack Overflow or by niklassaers
Published on 2010-04-30T09:21:32Z Indexed on 2010/04/30 9:27 UTC
Read the original article Hit count: 493

Hi guys,

I would like to have the result from my recording as a float in the range [0.0, 1.0], alternatively [-1.0, 1.0] because of a bit of math I want to do on it.

When I set my recordingformat to be in float, like this:

mRecordFormat.mFormatFlags = kLinearPCMFormatFlagIsFloat;

I get:

Error: AudioQueueNewInput failed ('fmt?')

Does this mean the hardware doesn't support recording to floats? If not, how do I set it to record in floats? If so, are there any processor-friendly ways I can convert a signed integer array to a float array?

Cheers

Nik

© Stack Overflow or respective owner

Related posts about iphone

Related posts about iphone-sdk