openframeworks / openFrameworks

openFrameworks is a community-developed cross platform toolkit for creative coding in C++.
http://openframeworks.cc
Other
9.96k stars 2.55k forks source link

iPhone 6s audio out of tune #4425

Closed cerupcat closed 9 years ago

cerupcat commented 9 years ago

I'm not sure if this is related to openframeworks or libpd, but I thought I'd ask here just in case. All of my users on the new iPhone 6s are reporting that my tuning app is now reporting / playing sound significantly flat. Has anyone else had reports of this (I don't yet have an iPhone 6s to test).

sonologico commented 9 years ago

I have never programmed for the iphone, but is the device running on a different sample rate than the one your application expects? This may be a source of this kind of problem.

danoli3 commented 9 years ago

Yeah it was the sample rate. https://github.com/libpd/libpd/issues/108

Probably related to the iPhone 6S forcing a 48k sameplerate: https://forum.audiob.us/discussion/10362/ab-reports-warning-low-latency-on-iphone6s

Thanks @danomatika that's exactly the issue. When setting up the audio sample rate in OF / libPd, we have to get the sample rate from AVAudioSession after it's active to get the true sample rate of the device at the time.

See the libpd issue for a solution