OLD | NEW |
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 279 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
290 ? formats_.rev_proc_format.num_frames() | 290 ? formats_.rev_proc_format.num_frames() |
291 : formats_.api_format.reverse_output_stream().num_frames(); | 291 : formats_.api_format.reverse_output_stream().num_frames(); |
292 if (formats_.api_format.reverse_input_stream().num_channels() > 0) { | 292 if (formats_.api_format.reverse_input_stream().num_channels() > 0) { |
293 render_.render_audio.reset(new AudioBuffer( | 293 render_.render_audio.reset(new AudioBuffer( |
294 formats_.api_format.reverse_input_stream().num_frames(), | 294 formats_.api_format.reverse_input_stream().num_frames(), |
295 formats_.api_format.reverse_input_stream().num_channels(), | 295 formats_.api_format.reverse_input_stream().num_channels(), |
296 formats_.rev_proc_format.num_frames(), | 296 formats_.rev_proc_format.num_frames(), |
297 formats_.rev_proc_format.num_channels(), | 297 formats_.rev_proc_format.num_channels(), |
298 rev_audio_buffer_out_num_frames)); | 298 rev_audio_buffer_out_num_frames)); |
299 if (rev_conversion_needed()) { | 299 if (rev_conversion_needed()) { |
300 render_.render_converter = rtc::ScopedToUnique(AudioConverter::Create( | 300 render_.render_converter = AudioConverter::Create( |
301 formats_.api_format.reverse_input_stream().num_channels(), | 301 formats_.api_format.reverse_input_stream().num_channels(), |
302 formats_.api_format.reverse_input_stream().num_frames(), | 302 formats_.api_format.reverse_input_stream().num_frames(), |
303 formats_.api_format.reverse_output_stream().num_channels(), | 303 formats_.api_format.reverse_output_stream().num_channels(), |
304 formats_.api_format.reverse_output_stream().num_frames())); | 304 formats_.api_format.reverse_output_stream().num_frames()); |
305 } else { | 305 } else { |
306 render_.render_converter.reset(nullptr); | 306 render_.render_converter.reset(nullptr); |
307 } | 307 } |
308 } else { | 308 } else { |
309 render_.render_audio.reset(nullptr); | 309 render_.render_audio.reset(nullptr); |
310 render_.render_converter.reset(nullptr); | 310 render_.render_converter.reset(nullptr); |
311 } | 311 } |
312 capture_.capture_audio.reset( | 312 capture_.capture_audio.reset( |
313 new AudioBuffer(formats_.api_format.input_stream().num_frames(), | 313 new AudioBuffer(formats_.api_format.input_stream().num_frames(), |
314 formats_.api_format.input_stream().num_channels(), | 314 formats_.api_format.input_stream().num_channels(), |
(...skipping 1141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1456 debug_dump_.capture.event_msg->mutable_config()->CopyFrom(config); | 1456 debug_dump_.capture.event_msg->mutable_config()->CopyFrom(config); |
1457 | 1457 |
1458 RETURN_ON_ERR(WriteMessageToDebugFile(debug_dump_.debug_file.get(), | 1458 RETURN_ON_ERR(WriteMessageToDebugFile(debug_dump_.debug_file.get(), |
1459 &debug_dump_.num_bytes_left_for_log_, | 1459 &debug_dump_.num_bytes_left_for_log_, |
1460 &crit_debug_, &debug_dump_.capture)); | 1460 &crit_debug_, &debug_dump_.capture)); |
1461 return kNoError; | 1461 return kNoError; |
1462 } | 1462 } |
1463 #endif // WEBRTC_AUDIOPROC_DEBUG_DUMP | 1463 #endif // WEBRTC_AUDIOPROC_DEBUG_DUMP |
1464 | 1464 |
1465 } // namespace webrtc | 1465 } // namespace webrtc |
OLD | NEW |