Hacker News new | ask | show | jobs
by alexbw 5187 days ago
Documentation will be forthcoming. What do you mean by audio sample formats? One of the things I tried to do was make sure that you never, ever, EVER have to think about anything but floating point audio. In my experience, audio comes in as either float or SInt16s (I've never seen fixed-point coming in by default, but I haven't done an enormous amount of odd-peripheral Mac audio), and novocaine just handles it for you.
1 comments

I'm working on a VoIP app and the back end requires specific audio formats.
You'd use Novocaine to grab the audio, and then you'd do the audio format conversion yourself. e.g.:

[[Novocaine audioManager] setInputBlock:^(float * inData, UInt32 numSamples, UInt32 numChannels) { for (int i=0; i < numSamples * numChannels; ++i) { dataForVoip[i] = YourType(inData[i]) * someScaling; } }];