[audioManager setInputBlock:^(float *newAudio, UInt32 numSamples, UInt32 numChannels) {
// Now you're getting audio from the microphone every 20 milliseconds or so. How's that for easy?
// Audio comes in interleaved, so,
// if numChannels = 2, newAudio[0] is channel 1, newAudio[1] is channel 2, newAudio[2] is channel 1, etc.
}];
1) what exactly comes from *newAudio? the audio level from 0 to 1?
2) why do you say it will read the microphone every 20 milliseconds? are you talking about audio samples? It cannot be or you would only be able to record waves up to 50 Hz...
Two fast questions:
When you put this code
[audioManager setInputBlock:^(float *newAudio, UInt32 numSamples, UInt32 numChannels) { // Now you're getting audio from the microphone every 20 milliseconds or so. How's that for easy? // Audio comes in interleaved, so, // if numChannels = 2, newAudio[0] is channel 1, newAudio[1] is channel 2, newAudio[2] is channel 1, etc. }];
1) what exactly comes from *newAudio? the audio level from 0 to 1? 2) why do you say it will read the microphone every 20 milliseconds? are you talking about audio samples? It cannot be or you would only be able to record waves up to 50 Hz...
Care to explain? thanks.