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

Side by Side Diff: webrtc/modules/audio_processing/intelligibility/test/intelligibility_proc.cc

Issue 1913603002: Compensate for the compression gain in the IntelligibilityEnhancer (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Naming Created 4 years, 7 months 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 unified diff | Download patch
« no previous file with comments | « webrtc/modules/audio_processing/intelligibility/intelligibility_enhancer_unittest.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2014 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2014 The WebRTC project authors. All Rights Reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source 5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 10
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 while (in_file.ReadSamples(in.size(), in.data()) == in.size() && 57 while (in_file.ReadSamples(in.size(), in.data()) == in.size() &&
58 noise_file.ReadSamples(noise.size(), noise.data()) == noise.size()) { 58 noise_file.ReadSamples(noise.size(), noise.data()) == noise.size()) {
59 FloatS16ToFloat(noise.data(), noise.size(), noise.data()); 59 FloatS16ToFloat(noise.data(), noise.size(), noise.data());
60 Deinterleave(in.data(), in_buf.num_frames(), in_buf.num_channels(), 60 Deinterleave(in.data(), in_buf.num_frames(), in_buf.num_channels(),
61 in_buf.channels()); 61 in_buf.channels());
62 Deinterleave(noise.data(), noise_buf.num_frames(), noise_buf.num_channels(), 62 Deinterleave(noise.data(), noise_buf.num_frames(), noise_buf.num_channels(),
63 noise_buf.channels()); 63 noise_buf.channels());
64 capture_audio.CopyFrom(noise_buf.channels(), stream_config); 64 capture_audio.CopyFrom(noise_buf.channels(), stream_config);
65 ns.AnalyzeCaptureAudio(&capture_audio); 65 ns.AnalyzeCaptureAudio(&capture_audio);
66 ns.ProcessCaptureAudio(&capture_audio); 66 ns.ProcessCaptureAudio(&capture_audio);
67 enh.SetCaptureNoiseEstimate(ns.NoiseEstimate()); 67 enh.SetCaptureNoiseEstimate(ns.NoiseEstimate(), 0);
68 enh.ProcessRenderAudio(in_buf.channels(), in_file.sample_rate(), 68 enh.ProcessRenderAudio(in_buf.channels(), in_file.sample_rate(),
69 in_file.num_channels()); 69 in_file.num_channels());
70 Interleave(in_buf.channels(), in_buf.num_frames(), in_buf.num_channels(), 70 Interleave(in_buf.channels(), in_buf.num_frames(), in_buf.num_channels(),
71 in.data()); 71 in.data());
72 out_file.WriteSamples(in.data(), in.size()); 72 out_file.WriteSamples(in.data(), in.size());
73 } 73 }
74 } 74 }
75 75
76 } // namespace 76 } // namespace
77 } // namespace webrtc 77 } // namespace webrtc
78 78
79 int main(int argc, char* argv[]) { 79 int main(int argc, char* argv[]) {
80 webrtc::void_main(argc, argv); 80 webrtc::void_main(argc, argv);
81 return 0; 81 return 0;
82 } 82 }
OLDNEW
« no previous file with comments | « webrtc/modules/audio_processing/intelligibility/intelligibility_enhancer_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698