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

Side by Side Diff: webrtc/modules/audio_coding/test/opus_test.cc

Issue 1985743002: Propagate muted parameter to VoE::Channel (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Resurrect the PlayoutData10Ms(int, AudioFrame*) method 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
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2013 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 318 matching lines...) Expand 10 before | Expand all | Expand 10 after
329 rtp_timestamp_ += static_cast<uint32_t>(frame_length); 329 rtp_timestamp_ += static_cast<uint32_t>(frame_length);
330 read_samples += frame_length * channels; 330 read_samples += frame_length * channels;
331 } 331 }
332 if (read_samples == written_samples) { 332 if (read_samples == written_samples) {
333 read_samples = 0; 333 read_samples = 0;
334 written_samples = 0; 334 written_samples = 0;
335 } 335 }
336 } 336 }
337 337
338 // Run received side of ACM. 338 // Run received side of ACM.
339 ASSERT_EQ(0, acm_receiver_->PlayoutData10Ms(out_freq_hz_b, &audio_frame)); 339 bool muted;
340 ASSERT_EQ(
341 0, acm_receiver_->PlayoutData10Ms(out_freq_hz_b, &audio_frame, &muted));
342 ASSERT_FALSE(muted);
340 343
341 // Write output speech to file. 344 // Write output speech to file.
342 out_file_.Write10MsData( 345 out_file_.Write10MsData(
343 audio_frame.data_, 346 audio_frame.data_,
344 audio_frame.samples_per_channel_ * audio_frame.num_channels_); 347 audio_frame.samples_per_channel_ * audio_frame.num_channels_);
345 348
346 // Write stand-alone speech to file. 349 // Write stand-alone speech to file.
347 out_file_standalone_.Write10MsData(out_audio, decoded_samples * channels); 350 out_file_standalone_.Write10MsData(out_audio, decoded_samples * channels);
348 351
349 if (audio_frame.timestamp_ > start_time_stamp) { 352 if (audio_frame.timestamp_ > start_time_stamp) {
(...skipping 24 matching lines...) Expand all
374 out_file_.Open(file_name, 48000, "wb"); 377 out_file_.Open(file_name, 48000, "wb");
375 file_stream.str(""); 378 file_stream.str("");
376 file_name = file_stream.str(); 379 file_name = file_stream.str();
377 file_stream << webrtc::test::OutputPath() << "opusstandalone_out_" 380 file_stream << webrtc::test::OutputPath() << "opusstandalone_out_"
378 << test_number << ".pcm"; 381 << test_number << ".pcm";
379 file_name = file_stream.str(); 382 file_name = file_stream.str();
380 out_file_standalone_.Open(file_name, 48000, "wb"); 383 out_file_standalone_.Open(file_name, 48000, "wb");
381 } 384 }
382 385
383 } // namespace webrtc 386 } // namespace webrtc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698