Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Does Core Audio / OpenAL resample audio files?

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?

like image 330
Ian1971 Avatar asked Nov 20 '25 06:11

Ian1971


1 Answers

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.)

like image 98
hotpaw2 Avatar answered Nov 21 '25 19:11

hotpaw2



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!