I have a method that relies on knowing the hardwares sample rate and buffer duration in order to calculate some values. Currently the implementation of this on iOS is as follow:
double sampleRate = [[AVAudioSession sharedInstance] sampleRate];
double bufferDuration = [[AVAudioSession sharedInstance] IOBufferDuration];
float bufferLength = sampleRate*bufferDuration;
However, on OSX, the AVAudioSession
class is not recognized and does not appear to be part of the SDK. And documentation about this sort of thing seems to be very scant.
How to I query the same values on the OSX OS?