Skip to content
This repository has been archived by the owner on Sep 30, 2018. It is now read-only.

Commit

Permalink
[droid] fixed, no need to make two local refs when one will do fine
Browse files Browse the repository at this point in the history
  • Loading branch information
davilla committed Jul 31, 2012
1 parent f043387 commit 728f6a4
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions xbmc/cores/AudioEngine/Sinks/AESinkAUDIOTRACK.cpp
Expand Up @@ -313,9 +313,7 @@ void CAESinkAUDIOTRACK::Process()
JNIEnv *jenv = NULL;
CXBMCApp::AttachCurrentThread(&jenv, NULL);

jclass cls = jenv->FindClass("android/media/AudioTrack");
jclass jcAudioTrack = static_cast<jclass>(jenv->NewLocalRef(cls));
jenv->DeleteLocalRef(cls);
jclass jcAudioTrack = jenv->FindClass("android/media/AudioTrack");

jmethodID jmInit = jenv->GetMethodID(jcAudioTrack, "<init>", "(IIIIII)V");
jmethodID jmPlay = jenv->GetMethodID(jcAudioTrack, "play", "()V");
Expand All @@ -328,7 +326,6 @@ void CAESinkAUDIOTRACK::Process()
jmethodID jmPlayHeadPosition = jenv->GetMethodID(jcAudioTrack, "getPlaybackHeadPosition", "()I");
jmethodID jmGetMinBufferSize = jenv->GetStaticMethodID(jcAudioTrack, "getMinBufferSize", "(III)I");


jint audioFormat = GetStaticIntField(jenv, "AudioFormat", "ENCODING_PCM_16BIT");
jint channelConfig = GetStaticIntField(jenv, "AudioFormat", "CHANNEL_OUT_STEREO");

Expand Down

0 comments on commit 728f6a4

Please sign in to comment.