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

Unified Diff: webrtc/modules/audio_device/android/java/src/org/webrtc/voiceengine/WebRtcAudioTrack.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 | « webrtc/modules/audio_device/android/java/src/org/webrtc/voiceengine/WebRtcAudioRecord.java ('k') | no next file » | 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/WebRtcAudioTrack.java
diff --git a/webrtc/modules/audio_device/android/java/src/org/webrtc/voiceengine/WebRtcAudioTrack.java b/webrtc/modules/audio_device/android/java/src/org/webrtc/voiceengine/WebRtcAudioTrack.java
index 79961b95fc93f0bc7347884e88758c7483e816da..5ea647a44bcfeb7d0040061c109f5bddf8387817 100644
--- a/webrtc/modules/audio_device/android/java/src/org/webrtc/voiceengine/WebRtcAudioTrack.java
+++ b/webrtc/modules/audio_device/android/java/src/org/webrtc/voiceengine/WebRtcAudioTrack.java
@@ -212,11 +212,6 @@ public class WebRtcAudioTrack {
Logging.e(TAG, "Initialization of audio track failed.");
return false;
}
- // Verify that all audio parameters are valid and correct.
- if (!areParametersValid(sampleRate, channels)) {
- Logging.e(TAG, "At least one audio track parameter is invalid.");
- return false;
- }
logMainParameters();
logMainParametersExtended();
return true;
@@ -280,17 +275,6 @@ public class WebRtcAudioTrack {
return audioManager.getStreamVolume(AudioManager.STREAM_VOICE_CALL);
}
- // Verifies that the audio track is using correct parameters, i.e., that the
- // created track uses the parameters that we asked for.
- private boolean areParametersValid(int sampleRate, int channels) {
- final int streamType = audioTrack.getStreamType();
- return (audioTrack.getAudioFormat() == AudioFormat.ENCODING_PCM_16BIT
- && audioTrack.getChannelConfiguration() == channelCountToConfiguration(channels)
- && streamType == AudioManager.STREAM_VOICE_CALL && audioTrack.getSampleRate() == sampleRate
- && sampleRate == audioTrack.getNativeOutputSampleRate(streamType)
- && audioTrack.getChannelCount() == channels);
- }
-
private void logMainParameters() {
Logging.d(TAG, "AudioTrack: "
+ "session ID: " + audioTrack.getAudioSessionId() + ", "
« no previous file with comments | « webrtc/modules/audio_device/android/java/src/org/webrtc/voiceengine/WebRtcAudioRecord.java ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698