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

Side by Side Diff: webrtc/modules/audio_processing/audio_processing_impl.cc

Issue 1525173002: Bugfix that fixes the integration issue that cause WebRTC AEC mobile to fail (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Changes in response to reviewer comments Created 5 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2012 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 483 matching lines...) Expand 10 before | Expand all | Expand 10 after
494 } 494 }
495 495
496 if (capture_.transient_suppressor_enabled != 496 if (capture_.transient_suppressor_enabled !=
497 config.Get<ExperimentalNs>().enabled) { 497 config.Get<ExperimentalNs>().enabled) {
498 capture_.transient_suppressor_enabled = 498 capture_.transient_suppressor_enabled =
499 config.Get<ExperimentalNs>().enabled; 499 config.Get<ExperimentalNs>().enabled;
500 InitializeTransient(); 500 InitializeTransient();
501 } 501 }
502 } 502 }
503 503
504 int AudioProcessingImpl::input_sample_rate_hz() const {
505 // Accessed from outside APM, hence a lock is needed.
506 rtc::CritScope cs(&crit_capture_);
507 return formats_.api_format.input_stream().sample_rate_hz();
508 }
509
504 int AudioProcessingImpl::proc_sample_rate_hz() const { 510 int AudioProcessingImpl::proc_sample_rate_hz() const {
505 // Used as callback from submodules, hence locking is not allowed. 511 // Used as callback from submodules, hence locking is not allowed.
506 return capture_nonlocked_.fwd_proc_format.sample_rate_hz(); 512 return capture_nonlocked_.fwd_proc_format.sample_rate_hz();
507 } 513 }
508 514
509 int AudioProcessingImpl::proc_split_sample_rate_hz() const { 515 int AudioProcessingImpl::proc_split_sample_rate_hz() const {
510 // Used as callback from submodules, hence locking is not allowed. 516 // Used as callback from submodules, hence locking is not allowed.
511 return capture_nonlocked_.split_rate; 517 return capture_nonlocked_.split_rate;
512 } 518 }
513 519
(...skipping 970 matching lines...) Expand 10 before | Expand all | Expand 10 after
1484 debug_dump_.capture.event_msg->set_type(audioproc::Event::CONFIG); 1490 debug_dump_.capture.event_msg->set_type(audioproc::Event::CONFIG);
1485 debug_dump_.capture.event_msg->mutable_config()->CopyFrom(config); 1491 debug_dump_.capture.event_msg->mutable_config()->CopyFrom(config);
1486 1492
1487 RETURN_ON_ERR(WriteMessageToDebugFile(debug_dump_.debug_file.get(), 1493 RETURN_ON_ERR(WriteMessageToDebugFile(debug_dump_.debug_file.get(),
1488 &crit_debug_, &debug_dump_.capture)); 1494 &crit_debug_, &debug_dump_.capture));
1489 return kNoError; 1495 return kNoError;
1490 } 1496 }
1491 #endif // WEBRTC_AUDIOPROC_DEBUG_DUMP 1497 #endif // WEBRTC_AUDIOPROC_DEBUG_DUMP
1492 1498
1493 } // namespace webrtc 1499 } // namespace webrtc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698