Skip to content
Snippets Groups Projects
Commit 128da4b3 authored by Vincent Lucas's avatar Vincent Lucas
Browse files

Corrects sample rate initialization for Core Audio.

parent 4a1bb6d4
No related branches found
No related tags found
No related merge requests found
......@@ -266,13 +266,12 @@ private static double getSupportedSampleRate(
boolean input,
String deviceUID)
{
double supportedSampleRate = MacCoreAudioDevice.DEFAULT_SAMPLE_RATE;
double defaultSampleRate
double supportedSampleRate
= MacCoreAudioDevice.getNominalSampleRate(deviceUID);
if (defaultSampleRate >= MediaUtils.MAX_AUDIO_SAMPLE_RATE)
if(supportedSampleRate >= MediaUtils.MAX_AUDIO_SAMPLE_RATE)
{
supportedSampleRate = defaultSampleRate;
supportedSampleRate = MacCoreAudioDevice.DEFAULT_SAMPLE_RATE;
}
return supportedSampleRate;
......
......@@ -319,6 +319,12 @@ public void open()
throw new ResourceUnavailableException(
"No locator/MediaLocator is set.");
}
if (inputFormat == null)
{
throw new ResourceUnavailableException(
"inputFormat not set");
}
}
finally
{
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment