I am using the EXTAudioFileReadTest app provided in the Core Audio SDK documentation and I'm trying to get all of the floating point values from the mData buffer so that I can draw a waveform with them.
Currently, I'm printing out the floating point values for single channel and this is what I'm getting in the console:
2010-09-10 19:22:43.360 ExtAudioFileReadTest[71828:a0f] 0.127136
2010-09-10 19:22:43.360 ExtAudioFileReadTest[71828:a0f] -0.057033
2010-09-10 19:22:43.360 ExtAudioFileReadTest[71828:a0f] -0.146455
2010-09-10 19:22:43.360 ExtAudioFileReadTest[71828:a0f] 0.090759
2010-09-10 19:22:43.360 ExtAudioFileReadTest[71828:a0f] 0.240837
2010-09-10 19:22:43.360 ExtAudioFileReadTest[71828:a0f] -0.072719
2010-09-10 19:22:43.361 ExtAudioFileReadTest[71828:a0f] -0.258782
2010-09-10 19:22:43.361 ExtAudioFileReadTest[71828:a0f] -0.063972
2010-09-10 19:22:43.361 ExtAudioFileReadTest[71828:a0f] 0.088692
2010-09-10 19:22:43.361 ExtAudioFileReadTest[71828:a0f] 0.153571
2010-09-10 19:22:43.361 ExtAudioFileReadTest[71828:a0f] 0.080644
2010-09-10 19:22:43.383 ExtAudioFileReadTest[71828:a0f] -0.087060
2010-09-10 19:22:43.383 ExtAudioFileReadTest[71828:a0f] 0.196455
2010-09-10 19:22:43.383 ExtAudioFileReadTest[71828:a0f] 0.167777
2010-09-10 19:22:43.383 ExtAudioFileReadTest[71828:a0f] -0.192430
2010-09-10 19:22:43.383 ExtAudioFileReadTest[71828:a0f] -0.209936
2010-09-10 19:22:43.383 ExtAudioFileReadTest[71828:a0f] 0.012049
2010-09-10 19:22:43.383 ExtAudioFileReadTest[71828:a0f] 0.110493
2010-09-10 19:22:43.384 ExtAudioFileReadTest[71828:a0f] 0.150715
2010-09-10 19:22:43.384 ExtAudioFileReadTest[71828:a0f] 0.016413
2010-09-10 19:22:43.384 ExtAudioFileReadTest[71828:a0f] -0.056843
2010-09-10 19:22:43.384 ExtAudioFileReadTest[71828:a0f] 0.206117
2010-09-10 19:22:43.384 ExtAudioFileReadTest[71828:a0f] 0.020673
2010-09-10 19:22:43.384 ExtAudioFileReadTest[71828:a0f] -0.561129
2010-09-10 19:22:43.384 ExtAudioFileReadTest[71828:a0f] -0.184265
2010-09-10 19:22:43.384 ExtAudioFileReadTest[71828:a0f] 0.620910
2010-09-10 19:22:43.385 ExtAudioFileReadTest[71828:a0f] 0.309018
2010-09-10 19:22:43.385 ExtAudioFileReadTest[71828:a0f] -0.371634
2010-09-10 19:22:43.385 ExtAudioFileReadTest[71828:a0f] -0.238362
2010-09-10 19:22:43.385 ExtAudioFileReadTest[71828:a0f] 0.125136
2010-09-10 19:22:43.385 ExtAudioFileReadTest[71828:a0f] 0.139757
2010-09-10 19:22:43.385 ExtAudioFileReadTest[71828:a0f] -0.023419
2010-09-10 19:22:43.385 ExtAudioFileReadTest[71828:a0f] -0.142903
2010-09-10 19:22:43.385 ExtAudioFileReadTest[71828:a0f] 0.041068
2010-09-10 19:22:43.386 ExtAudioFileReadTest[71828:a0f] 0.252621
2010-09-10 19:22:43.386 ExtAudioFileReadTest[71828:a0f] -0.002240
2010-09-10 19:22:43.386 ExtAudioFileReadTest[71828:a0f] -0.261686
2010-09-10 19:22:43.386 ExtAudioFileReadTest[71828:a0f] -0.105053
2010-09-10 19:22:43.386 ExtAudioFileReadTest[71828:a0f] 0.072798
2010-09-10 19:22:43.386 ExtAudioFileReadTest[71828:a0f] 0.141572
2010-09-10 19:22:43.386 ExtAudioFileReadTest[71828:a0f] 0.110190
I guess i'm confused.. .as I was expecting to find some type of voltage sample and not a number between -1 and 1. What do these values actually mean? What would be a good formula for converting these values to some upper/lower limit that would be between 0 and 1?
Thanks in advance. I've been searching all over the place and can't find this information anywhere... especially not in the documentation.