audio_sink.cc (915B)
1 /* 2 * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved. 3 * 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 6 * tree. An additional intellectual property rights grant can be found 7 * in the file PATENTS. All contributing project authors may 8 * be found in the AUTHORS file in the root of the source tree. 9 */ 10 11 #include "modules/audio_coding/neteq/tools/audio_sink.h" 12 13 #include <cstddef> 14 #include <cstdint> 15 16 namespace webrtc { 17 namespace test { 18 19 bool AudioSinkFork::WriteArray(const int16_t* audio, size_t num_samples) { 20 return left_sink_->WriteArray(audio, num_samples) && 21 right_sink_->WriteArray(audio, num_samples); 22 } 23 24 bool VoidAudioSink::WriteArray(const int16_t* /* audio */, 25 size_t /* num_samples */) { 26 return true; 27 } 28 29 } // namespace test 30 } // namespace webrtc