Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!
i have a question. How can i get the herts from an audio file i recorded. I am using AVAudioEngine and i want to get the hertz realtime. Is this even possible? and could you give me a hint how to get this.
var sr:Float = Float(mixer.outputFormatForBus(0).sampleRate)
var n_channels = mixer.outputFormatForBus(0).channelCount
for var i = 0; i < Int(buffer.frameLength); i+=Int(n_channels) {
var val = sinf(441.0*Float(i)*2*Float(M_PI)/sr)
buffer.floatChannelData.memory = val * 0.5
//test
println("buffer waarde:\(buffer.floatChannelData.memory * 100 )");
}
BUT i get strange values could anyone help me out here is, is it becouse i use the iphone simulator?