From what I see in the code, the Ouya version of MonoGame will no longer compile due to API references that require API level 17. These are calls in the audio system that recently were updated. The Ouya runs on an API level of 16.
Specifically the follow code causes problems:
if (Android.OS.Build.VERSION.SdkInt >= Android.OS.BuildVersionCodes.JellyBeanMr1)
{
Android.Util.Log.Debug("OAL", Game.Activity.PackageManager.HasSystemFeature(PackageManager.FeatureAudioLowLatency) ? "Supports low latency audio playback." : "Does not support low latency audio playback.");
var audioManager = Game.Activity.GetSystemService(Context.AudioService) as AudioManager;
if (audioManager != null)
{
var result = audioManager.GetProperty(AudioManager.PropertyOutputSampleRate);
if (!string.IsNullOrEmpty(result))
frequency = int.Parse(result, CultureInfo.InvariantCulture);
result = audioManager.GetProperty(AudioManager.PropertyOutputFramesPerBuffer);
if (!string.IsNullOrEmpty(result))
updateSize = int.Parse(result, CultureInfo.InvariantCulture);
}
// If 4.4 or higher, then we don't need to double buffer on the application side.
// See http://stackoverflow.com/a/15006327
// Use the explicit value rather than a constant as the 4.2 SDK (the build SDK) does not define a constant for 4.4.
if ((int)Android.OS.Build.VERSION.SdkInt >= 19)
{
updateBuffers = 1;
}
}
where JellyBeanMr1, PropertyOutSamplerate, and PropertyOutputFramesPerBuffer are not defined in API level 16. I’ve worked around this by surrounding the above with a #if !OUYA check in my own code.
Has anyone else come across this issue? Is the above directive that bypasses the new audio code something that should be pushed to the repo?