Merge "Test for non-null AudioTrack() object in android_media_AudioTrack_setOutputDevice()." into mnc-dev
This commit is contained in:
@@ -623,7 +623,7 @@ static jboolean android_media_AudioRecord_setInputDevice(
|
||||
|
||||
sp<AudioRecord> lpRecorder = getAudioRecord(env, thiz);
|
||||
if (lpRecorder == 0) {
|
||||
return 0;
|
||||
return false;
|
||||
}
|
||||
return lpRecorder->setInputDevice(device_id) == NO_ERROR;
|
||||
}
|
||||
|
||||
@@ -998,6 +998,9 @@ static jboolean android_media_AudioTrack_setOutputDevice(
|
||||
JNIEnv *env, jobject thiz, jint device_id) {
|
||||
|
||||
sp<AudioTrack> lpTrack = getAudioTrack(env, thiz);
|
||||
if (lpTrack == 0) {
|
||||
return false;
|
||||
}
|
||||
return lpTrack->setOutputDevice(device_id) == NO_ERROR;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user