Fixes crash in WebRtcAudioManager.setCommunicationMode
BUG=b/21360598 R=tommi@webrtc.org Review URL: https://webrtc-codereview.appspot.com/53579004 Cr-Commit-Position: refs/heads/master@{#9311}
This commit is contained in:
parent
c41fe5d5d0
commit
796e17237b
@ -51,7 +51,8 @@ void AudioManager::JavaAudioManager::Close() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void AudioManager::JavaAudioManager::SetCommunicationMode(bool enable) {
|
void AudioManager::JavaAudioManager::SetCommunicationMode(bool enable) {
|
||||||
audio_manager_->CallVoidMethod(set_communication_mode_, enable);
|
audio_manager_->CallVoidMethod(set_communication_mode_,
|
||||||
|
static_cast<jboolean>(enable));
|
||||||
}
|
}
|
||||||
|
|
||||||
// AudioManager implementation
|
// AudioManager implementation
|
||||||
|
@ -40,7 +40,9 @@ AudioRecordJni::JavaAudioRecord::~JavaAudioRecord() {}
|
|||||||
|
|
||||||
int AudioRecordJni::JavaAudioRecord::InitRecording(
|
int AudioRecordJni::JavaAudioRecord::InitRecording(
|
||||||
int sample_rate, int channels) {
|
int sample_rate, int channels) {
|
||||||
return audio_record_->CallIntMethod(init_recording_, sample_rate, channels);
|
return audio_record_->CallIntMethod(init_recording_,
|
||||||
|
static_cast<jint>(sample_rate),
|
||||||
|
static_cast<jint>(channels));
|
||||||
}
|
}
|
||||||
|
|
||||||
bool AudioRecordJni::JavaAudioRecord::StartRecording() {
|
bool AudioRecordJni::JavaAudioRecord::StartRecording() {
|
||||||
@ -52,7 +54,8 @@ bool AudioRecordJni::JavaAudioRecord::StopRecording() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool AudioRecordJni::JavaAudioRecord::EnableBuiltInAEC(bool enable) {
|
bool AudioRecordJni::JavaAudioRecord::EnableBuiltInAEC(bool enable) {
|
||||||
return audio_record_->CallBooleanMethod(enable_built_in_aec_, enable);
|
return audio_record_->CallBooleanMethod(enable_built_in_aec_,
|
||||||
|
static_cast<jboolean>(enable));
|
||||||
}
|
}
|
||||||
|
|
||||||
// AudioRecordJni implementation.
|
// AudioRecordJni implementation.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user