Fixes a crash in VoE when unregistering JNI hooks.
BUG=11695087 R=andrew@webrtc.org Review URL: https://webrtc-codereview.appspot.com/3939004 git-svn-id: http://webrtc.googlecode.com/svn/trunk@5144 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
parent
364f204d16
commit
a750044396
@ -126,7 +126,6 @@ int32_t OpenSlesInput::RecordingIsAvailable(bool& available) { // NOLINT
|
|||||||
|
|
||||||
int32_t OpenSlesInput::InitRecording() {
|
int32_t OpenSlesInput::InitRecording() {
|
||||||
assert(initialized_);
|
assert(initialized_);
|
||||||
assert(!rec_initialized_);
|
|
||||||
rec_initialized_ = true;
|
rec_initialized_ = true;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@ -165,6 +164,7 @@ int32_t OpenSlesInput::StartRecording() {
|
|||||||
int32_t OpenSlesInput::StopRecording() {
|
int32_t OpenSlesInput::StopRecording() {
|
||||||
StopCbThreads();
|
StopCbThreads();
|
||||||
DestroyAudioRecorder();
|
DestroyAudioRecorder();
|
||||||
|
recording_ = false;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -139,7 +139,6 @@ int32_t OpenSlesOutput::PlayoutIsAvailable(bool& available) { // NOLINT
|
|||||||
|
|
||||||
int32_t OpenSlesOutput::InitPlayout() {
|
int32_t OpenSlesOutput::InitPlayout() {
|
||||||
assert(initialized_);
|
assert(initialized_);
|
||||||
assert(!play_initialized_);
|
|
||||||
play_initialized_ = true;
|
play_initialized_ = true;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@ -176,6 +175,7 @@ int32_t OpenSlesOutput::StartPlayout() {
|
|||||||
int32_t OpenSlesOutput::StopPlayout() {
|
int32_t OpenSlesOutput::StopPlayout() {
|
||||||
StopCbThreads();
|
StopCbThreads();
|
||||||
DestroyAudioPlayer();
|
DestroyAudioPlayer();
|
||||||
|
playing_ = false;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -149,7 +149,11 @@ int VoiceEngine::SetAndroidObjects(void* javaVM, void* env, void* context)
|
|||||||
{
|
{
|
||||||
#ifdef WEBRTC_ANDROID
|
#ifdef WEBRTC_ANDROID
|
||||||
#ifdef WEBRTC_ANDROID_OPENSLES
|
#ifdef WEBRTC_ANDROID_OPENSLES
|
||||||
AudioManagerJni::SetAndroidAudioDeviceObjects(javaVM, env, context);
|
if (javaVM && env && context) {
|
||||||
|
AudioManagerJni::SetAndroidAudioDeviceObjects(javaVM, env, context);
|
||||||
|
} else {
|
||||||
|
AudioManagerJni::ClearAndroidAudioDeviceObjects();
|
||||||
|
}
|
||||||
return 0;
|
return 0;
|
||||||
#else
|
#else
|
||||||
return AudioDeviceAndroidJni::SetAndroidAudioDeviceObjects(
|
return AudioDeviceAndroidJni::SetAndroidAudioDeviceObjects(
|
||||||
|
Loading…
Reference in New Issue
Block a user