| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "remoting/protocol/webrtc_audio_module.h" | 5 #include "remoting/protocol/webrtc_audio_module.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/stl_util.h" | 8 #include "base/stl_util.h" |
| 9 #include "base/threading/thread_task_runner_handle.h" | 9 #include "base/threading/thread_task_runner_handle.h" |
| 10 | 10 |
| (...skipping 470 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 481 return -1; | 481 return -1; |
| 482 } | 482 } |
| 483 | 483 |
| 484 int32_t WebrtcAudioModule::EnableBuiltInNS(bool enable) { | 484 int32_t WebrtcAudioModule::EnableBuiltInNS(bool enable) { |
| 485 NOTREACHED(); | 485 NOTREACHED(); |
| 486 return -1; | 486 return -1; |
| 487 } | 487 } |
| 488 | 488 |
| 489 #if defined(WEBRTC_IOS) | 489 #if defined(WEBRTC_IOS) |
| 490 int WebrtcAudioModule::GetPlayoutAudioParameters( | 490 int WebrtcAudioModule::GetPlayoutAudioParameters( |
| 491 AudioParameters* params) const { | 491 webrtc::AudioParameters* params) const { |
| 492 NOTREACHED(); | 492 NOTREACHED(); |
| 493 return -1; | 493 return -1; |
| 494 } | 494 } |
| 495 | 495 |
| 496 int WebrtcAudioModule::GetRecordAudioParameters(AudioParameters* params) const { | 496 int WebrtcAudioModule::GetRecordAudioParameters( |
| 497 webrtc::AudioParameters* params) const { |
| 497 NOTREACHED(); | 498 NOTREACHED(); |
| 498 return -1; | 499 return -1; |
| 499 } | 500 } |
| 500 #endif // WEBRTC_IOS | 501 #endif // WEBRTC_IOS |
| 501 | 502 |
| 502 void WebrtcAudioModule::StartPlayoutOnAudioThread() { | 503 void WebrtcAudioModule::StartPlayoutOnAudioThread() { |
| 503 DCHECK(audio_task_runner_->BelongsToCurrentThread()); | 504 DCHECK(audio_task_runner_->BelongsToCurrentThread()); |
| 504 poll_timer_.Start( | 505 poll_timer_.Start( |
| 505 FROM_HERE, kPollInterval, | 506 FROM_HERE, kPollInterval, |
| 506 base::Bind(&WebrtcAudioModule::PollFromSource, base::Unretained(this))); | 507 base::Bind(&WebrtcAudioModule::PollFromSource, base::Unretained(this))); |
| (...skipping 16 matching lines...) Expand all Loading... |
| 523 int64_t ntp_time_ms = -1; | 524 int64_t ntp_time_ms = -1; |
| 524 char data[kBytesPerSample * kChannels * kSamplesPerFrame]; | 525 char data[kBytesPerSample * kChannels * kSamplesPerFrame]; |
| 525 audio_transport_->PullRenderData(kBytesPerSample * 8, kSamplingRate, | 526 audio_transport_->PullRenderData(kBytesPerSample * 8, kSamplingRate, |
| 526 kChannels, kSamplesPerFrame, data, | 527 kChannels, kSamplesPerFrame, data, |
| 527 &elapsed_time_ms, &ntp_time_ms); | 528 &elapsed_time_ms, &ntp_time_ms); |
| 528 } | 529 } |
| 529 } | 530 } |
| 530 | 531 |
| 531 } // namespace protocol | 532 } // namespace protocol |
| 532 } // namespace remoting | 533 } // namespace remoting |
| OLD | NEW |