From 95f09bf393abc346861834a466547cf2d1ab4e90 Mon Sep 17 00:00:00 2001 From: Henrik Rydgard Date: Thu, 12 Apr 2012 17:31:00 +0200 Subject: [PATCH] Add stub that detects the OS version --- android/src/com/turboviking/libnative/NativeActivity.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/android/src/com/turboviking/libnative/NativeActivity.java b/android/src/com/turboviking/libnative/NativeActivity.java index 275f1af9c9..37e7c9dba9 100644 --- a/android/src/com/turboviking/libnative/NativeActivity.java +++ b/android/src/com/turboviking/libnative/NativeActivity.java @@ -27,6 +27,7 @@ import android.media.AudioManager; import android.media.AudioTrack; import android.net.Uri; import android.opengl.GLSurfaceView; +import android.os.Build; import android.os.Bundle; import android.os.Environment; import android.util.Log; @@ -332,6 +333,10 @@ public class NativeActivity extends Activity { mGLSurfaceView = new NativeGLView(this); mGLSurfaceView.setRenderer(new NativeRenderer(this)); setContentView(mGLSurfaceView); + if (Build.VERSION.SDK_INT >= 9) { + // Native OpenSL is available. Let's not use the Java player in the future. + // TODO: code for that. + } audioPlayer = new NativeAudioPlayer(); }