2
votes

I've noticed that if my audio files are in caf 11250Hz mono they perform worse than 44.1Khz mono. Tracing it with profiler I can see that for the low sample rate files one of the longest traces ends with LinearConverterInt32. This isn't present in the 44.1KHz trace.

I want to use the lower sample rate files to keep file size (and hopefully memory size) down.

I've noticed in my log file that I get this AudioStreamBasicDescription: 2 ch, 44100 Hz, 'lpcm' (0x00000C2C) 8.24-bit little-endian signed integer, deinterleaved

So I am guessing that this is the format it is converting to, but I have no idea how to tell it to use 1 ch, 11250 Hz 16 bit.

Thoughts?

2

2 Answers

1
votes

Yes, Core Audio can resample, and probably does, as an app does not have control over the actual hardware sample rate. The OS does, probably depending on the device type, the OS version, the audio session type of your app and any other apps that have previously run or are currently in the background (and/or the phase-of-the-moon, etc.)

0
votes

If you want to conserve memory, you should use 44.1 kHz audio compressed with IMA 4:1 in CAF file format. It does introduce some noise, though, so you should do some listening test to see if it's right for you.