Skip to content

Commit

Permalink
[DROID][JNI] Add method to query HW sample rate.
Browse files Browse the repository at this point in the history
  • Loading branch information
t-nelson committed Mar 4, 2014
1 parent 189d55d commit 34d1b05
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
6 changes: 6 additions & 0 deletions xbmc/android/jni/AudioTrack.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

1 change: 1 addition & 0 deletions xbmc/android/jni/AudioTrack.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
};

};
Expand Down

0 comments on commit 34d1b05

Please sign in to comment.