I am making program using OpenAL. When i try to run the code (which is very simple) i get an error: no saved enable hardware sample rate converter preference found. So, i tried to enable this option in audio-midi setup. But i didn't found this option. How i can activate hardware sample rate converter.
Add a Comment
Replies
Can you show the code, if it is simple that will not be too long.
Have a look here
https://developer.apple.com/documentation/avfoundation/avaudiosession
and more precisely to set sample rate:
https://developer.apple.com/documentation/avfoundation/avaudiosession/1616523-setpreferredsamplerate
setPreferredSampleRate(_:)
Sets the preferred sample rate for input and output.
The hardware sample rate to use. The available range for hardware sample rate is device dependent. It typically ranges from 8000 through 48000 hertz.
Return Value
true
if a request was successfully made, or false
otherwise.Discussion
This method requests a change to the input and output audio sample rate. To see the effect of this change, use the
sampleRate
property.You can set a preferred sample rate before or after activating the audio session.