diff options
author | Trent Nelson <trent.a.b.nelson@gmail.com> | 2014-01-14 11:23:55 -0700 |
---|---|---|
committer | Trent Nelson <trent.a.b.nelson@gmail.com> | 2014-03-04 10:36:28 -0700 |
commit | 34d1b05eadfbb5bac64e1f95d0831917523be7fe (patch) | |
tree | 5d4f4ff4267e8a5439b2ea5f7636fa7f73f11760 | |
parent | 189d55d093c4cfe87a08db31cf3f6562647ab5a9 (diff) |
[DROID][JNI] Add method to query HW sample rate.
-rw-r--r-- | xbmc/android/jni/AudioTrack.cpp | 6 | ||||
-rw-r--r-- | xbmc/android/jni/AudioTrack.h | 1 |
2 files changed, 7 insertions, 0 deletions
diff --git a/xbmc/android/jni/AudioTrack.cpp b/xbmc/android/jni/AudioTrack.cpp index e28e803aa2..d0eb5609b0 100644 --- a/xbmc/android/jni/AudioTrack.cpp +++ b/xbmc/android/jni/AudioTrack.cpp @@ -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); +} + diff --git a/xbmc/android/jni/AudioTrack.h b/xbmc/android/jni/AudioTrack.h index 627edac522..30ad3c6a70 100644 --- a/xbmc/android/jni/AudioTrack.h +++ b/xbmc/android/jni/AudioTrack.h @@ -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); }; }; |