diff options
Diffstat (limited to 'Alc/backends')
-rw-r--r-- | Alc/backends/opensl.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/Alc/backends/opensl.c b/Alc/backends/opensl.c index 1e4bcb06..08530d95 100644 --- a/Alc/backends/opensl.c +++ b/Alc/backends/opensl.c @@ -237,13 +237,11 @@ static ALCboolean opensl_reset_playback(ALCdevice *Device) SLInterfaceID id; SLresult result; SLboolean req; + JNIEnv *env; - if((Device->Flags&DEVICE_FREQUENCY_REQUEST)) - sampleRate = Device->Frequency; - else + sampleRate = Device->Frequency; + if(!(Device->Flags&DEVICE_FREQUENCY_REQUEST) && (env=Android_GetJNIEnv()) != NULL) { - JNIEnv *env = Android_GetJNIEnv(); - /* Get necessary stuff for using java.lang.Integer, * android.content.Context, and android.media.AudioManager. */ |