[DROID][JNI] Add method to query HW sample rate.
authorTrent Nelson <trent.a.b.nelson@gmail.com>
Tue, 14 Jan 2014 18:23:55 +0000 (11:23 -0700)
committerTrent Nelson <trent.a.b.nelson@gmail.com>
Tue, 4 Mar 2014 17:36:28 +0000 (10:36 -0700)
xbmc/android/jni/AudioTrack.cpp
xbmc/android/jni/AudioTrack.h

index e28e803..d0eb560 100644 (file)
@@ -116,3 +116,9 @@ int CJNIAudioTrack::getMinBufferSize(int sampleRateInHz, int channelConfig, int
                                   sampleRateInHz, channelConfig, audioFormat);
 }
 
+int CJNIAudioTrack::getNativeOutputSampleRate(int streamType)
+{
+  return call_static_method<int>( "android/media/AudioTrack", "getNativeOutputSampleRate", "(I)I",
+                                  streamType);
+}
+
index 627edac..30ad3c6 100644 (file)
@@ -45,6 +45,7 @@ class CJNIAudioTrack : public CJNIBase
     
     static void PopulateStaticFields();
     static int  getMinBufferSize(int sampleRateInHz, int channelConfig, int audioFormat);
+    static int  getNativeOutputSampleRate(int streamType);
 };
 
 };