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

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

Issue 1279953003: Fix data race in AMP. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 5 years, 4 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 | « no previous file | 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) 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 471 matching lines...) Expand 10 before | Expand all | Expand 10 after
482 return output_will_be_muted_; 482 return output_will_be_muted_;
483 } 483 }
484 484
485 int AudioProcessingImpl::ProcessStream(const float* const* src, 485 int AudioProcessingImpl::ProcessStream(const float* const* src,
486 int samples_per_channel, 486 int samples_per_channel,
487 int input_sample_rate_hz, 487 int input_sample_rate_hz,
488 ChannelLayout input_layout, 488 ChannelLayout input_layout,
489 int output_sample_rate_hz, 489 int output_sample_rate_hz,
490 ChannelLayout output_layout, 490 ChannelLayout output_layout,
491 float* const* dest) { 491 float* const* dest) {
492 CriticalSectionScoped crit_scoped(crit_);
Andrew MacDonald 2015/08/11 18:56:36 FYI: Looks like the webrtc mutexes are recursive,
492 StreamConfig input_stream = api_format_.input_stream(); 493 StreamConfig input_stream = api_format_.input_stream();
493 input_stream.set_sample_rate_hz(input_sample_rate_hz); 494 input_stream.set_sample_rate_hz(input_sample_rate_hz);
494 input_stream.set_num_channels(ChannelsFromLayout(input_layout)); 495 input_stream.set_num_channels(ChannelsFromLayout(input_layout));
495 input_stream.set_has_keyboard(LayoutHasKeyboard(input_layout)); 496 input_stream.set_has_keyboard(LayoutHasKeyboard(input_layout));
496 497
497 StreamConfig output_stream = api_format_.output_stream(); 498 StreamConfig output_stream = api_format_.output_stream();
498 output_stream.set_sample_rate_hz(output_sample_rate_hz); 499 output_stream.set_sample_rate_hz(output_sample_rate_hz);
499 output_stream.set_num_channels(ChannelsFromLayout(output_layout)); 500 output_stream.set_num_channels(ChannelsFromLayout(output_layout));
500 output_stream.set_has_keyboard(LayoutHasKeyboard(output_layout)); 501 output_stream.set_has_keyboard(LayoutHasKeyboard(output_layout));
501 502
(...skipping 638 matching lines...) Expand 10 before | Expand all | Expand 10 after
1140 int err = WriteMessageToDebugFile(); 1141 int err = WriteMessageToDebugFile();
1141 if (err != kNoError) { 1142 if (err != kNoError) {
1142 return err; 1143 return err;
1143 } 1144 }
1144 1145
1145 return kNoError; 1146 return kNoError;
1146 } 1147 }
1147 #endif // WEBRTC_AUDIOPROC_DEBUG_DUMP 1148 #endif // WEBRTC_AUDIOPROC_DEBUG_DUMP
1148 1149
1149 } // namespace webrtc 1150 } // namespace webrtc
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698