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

Side by Side Diff: webrtc/modules/audio_coding/neteq/tools/neteq_rtpplay.cc

Issue 1769883002: Remove the type parameter to NetEq::GetAudio (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@acm-rec-delete-vad
Patch Set: After review Created 4 years, 9 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_coding/neteq/tools/neteq_quality_test.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) 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 587 matching lines...) Expand 10 before | Expand all | Expand 10 after
598 // Set next input time to the maximum value of int64_t to prevent the 598 // Set next input time to the maximum value of int64_t to prevent the
599 // time_now_ms from becoming stuck at the final value. 599 // time_now_ms from becoming stuck at the final value.
600 next_input_time_ms = std::numeric_limits<int64_t>::max(); 600 next_input_time_ms = std::numeric_limits<int64_t>::max();
601 packet_available = false; 601 packet_available = false;
602 } 602 }
603 } 603 }
604 604
605 // Check if it is time to get output audio. 605 // Check if it is time to get output audio.
606 while (time_now_ms >= next_output_time_ms && output_event_available) { 606 while (time_now_ms >= next_output_time_ms && output_event_available) {
607 webrtc::AudioFrame out_frame; 607 webrtc::AudioFrame out_frame;
608 int error = neteq->GetAudio(&out_frame, NULL); 608 int error = neteq->GetAudio(&out_frame);
609 if (error != NetEq::kOK) { 609 if (error != NetEq::kOK) {
610 std::cerr << "GetAudio returned error code " << 610 std::cerr << "GetAudio returned error code " <<
611 neteq->LastError() << std::endl; 611 neteq->LastError() << std::endl;
612 } else { 612 } else {
613 sample_rate_hz = out_frame.sample_rate_hz_; 613 sample_rate_hz = out_frame.sample_rate_hz_;
614 } 614 }
615 615
616 // Write to file. 616 // Write to file.
617 // TODO(hlundin): Make writing to file optional. 617 // TODO(hlundin): Make writing to file optional.
618 if (!output->WriteArray(out_frame.data_, out_frame.samples_per_channel_ * 618 if (!output->WriteArray(out_frame.data_, out_frame.samples_per_channel_ *
(...skipping 14 matching lines...) Expand all
633 } 633 }
634 } 634 }
635 printf("Simulation done\n"); 635 printf("Simulation done\n");
636 printf("Produced %i ms of audio\n", 636 printf("Produced %i ms of audio\n",
637 static_cast<int>(time_now_ms - start_time_ms)); 637 static_cast<int>(time_now_ms - start_time_ms));
638 638
639 delete neteq; 639 delete neteq;
640 webrtc::Trace::ReturnTrace(); 640 webrtc::Trace::ReturnTrace();
641 return 0; 641 return 0;
642 } 642 }
OLDNEW
« no previous file with comments | « webrtc/modules/audio_coding/neteq/tools/neteq_quality_test.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698