I have done some test with files at 32kHz
and 48 kHz, and the MusicPlayer changes the device sampling rate depending on
what’s playing. Which make sense since it is probably more efficient this
way in terms of CPU cylces and power consumption.
I don’t know what happens with 3rd
party app on the top of that, I guess that the first app requesting sample rate
for background audio gets it the second app has do to with it.
From:
email@hidden [mailto:email@hidden] On Behalf Of Raphaël - Mancing Dolecules
Sent: August-11-10 7:10 PM
To: Stéphane Beauchemin
Cc: email@hidden
Subject: Re: iPhone, iPad sampling
rates
Interesting note indeed.
As third-party apps are now allowed to run audio in the background, thanks to
iOS 4, I would bet that the behavior you noticed with the iPod app would be
reproduced with some other "audio backgrounding" app. Possibly with
different sample rate than 44.1 kHz, depending on, and if, they have setted
their own
kAudioSessionProperty_PreferredHardwareSampleRate.
Pandora, Spotify or music creation apps like ThumbJam, which is very likely to
use kAudioSessionProperty_PreferredHardwareSampleRate, could be used for testing this.
Regarding the 44.1 kHz of the music player, if it can be something else, it
would probably be the sampling rate of the played file itself. So feeding your
iPod Touch with audio files with various sampling rates would be a good start
point for testing, assuming there is no resampling/transcoding in the sync
process.