views:

25

answers:

0

I have an iPhone application which allows you to mix several samples with Audio Queue Services. When I developed this app for iPhone OS 3.0, I sometimes had a glitch where the audio would sound as if the treble had been muted. When I restarted the app it was gone.

Now, I had to do some fixes for iOS 4.0/4.1 so I opened up the project, but now it permanently has this bug. My App starts 10 .caf files, all exactly 15 seconds long at the same time. It sounds as if AudioQueueServices reduces the samplefrequency to 22.4kHz, and thus allowing for a maximum hearable frequency of 11.2kHz (Nyquist–Shannon sampling theorem).

Anyone else ran into this problem, and how did you fix it? I already tried:

Starting only 1 file (maybe the CPU is busy and it's dropping half the samples) Using the original .wav file instead of the .caf (both sound fine through headphones from mac mini). Setting the dataFormat.mSampleRate hardcoded (aqData->mDataFormat.mSampleRate = 44100.0;)

No luck so far :(