Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1698)

Unified Diff: webrtc/modules/audio_device/android/java/src/org/webrtc/voiceengine/WebRtcAudioRecord.java

Issue 2572963003: Removes verification of audio parameters on Android (Closed)
Patch Set: Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | webrtc/modules/audio_device/android/java/src/org/webrtc/voiceengine/WebRtcAudioTrack.java » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/modules/audio_device/android/java/src/org/webrtc/voiceengine/WebRtcAudioRecord.java
diff --git a/webrtc/modules/audio_device/android/java/src/org/webrtc/voiceengine/WebRtcAudioRecord.java b/webrtc/modules/audio_device/android/java/src/org/webrtc/voiceengine/WebRtcAudioRecord.java
index c3665442b06260557cf94c8e5cd2724926773da7..136cce45e0a8af3b8009091c362235bb6cb01728 100644
--- a/webrtc/modules/audio_device/android/java/src/org/webrtc/voiceengine/WebRtcAudioRecord.java
+++ b/webrtc/modules/audio_device/android/java/src/org/webrtc/voiceengine/WebRtcAudioRecord.java
@@ -198,11 +198,6 @@ public class WebRtcAudioRecord {
if (effects != null) {
effects.enable(audioRecord.getAudioSessionId());
}
- // Verify that all audio parameters are valid and correct.
- if (!areParametersValid(sampleRate, channels)) {
- Logging.e(TAG, "At least one audio record parameter is invalid.");
- return -1;
- }
logMainParameters();
logMainParametersExtended();
return framesPerBuffer;
@@ -243,15 +238,6 @@ public class WebRtcAudioRecord {
return true;
}
- // Verifies that the audio record is using correct parameters, i.e., that the
- // created instance uses the parameters that we asked for.
- private boolean areParametersValid(int sampleRate, int channels) {
- return (audioRecord.getAudioFormat() == AudioFormat.ENCODING_PCM_16BIT
- && audioRecord.getChannelConfiguration() == channelCountToConfiguration(channels)
- && audioRecord.getAudioSource() == AudioSource.VOICE_COMMUNICATION
- && audioRecord.getSampleRate() == sampleRate && audioRecord.getChannelCount() == channels);
- }
-
private void logMainParameters() {
Logging.d(TAG, "AudioRecord: "
+ "session ID: " + audioRecord.getAudioSessionId() + ", "
« no previous file with comments | « no previous file | webrtc/modules/audio_device/android/java/src/org/webrtc/voiceengine/WebRtcAudioTrack.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698