OLD | NEW |
(Empty) | |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #include "components/copresence/mediums/audio/audio_recorder_stub.h" |
| 6 |
| 7 namespace copresence { |
| 8 |
| 9 AudioRecorderStub::AudioRecorderStub() : is_recording_(false) { |
| 10 } |
| 11 |
| 12 AudioRecorderStub::~AudioRecorderStub() { |
| 13 } |
| 14 |
| 15 void AudioRecorderStub::Initialize(const RecordedSamplesCallback& cb) { |
| 16 cb_ = cb; |
| 17 } |
| 18 |
| 19 void AudioRecorderStub::Record() { |
| 20 is_recording_ = true; |
| 21 } |
| 22 |
| 23 void AudioRecorderStub::Stop() { |
| 24 is_recording_ = false; |
| 25 } |
| 26 |
| 27 void AudioRecorderStub::Finalize() { |
| 28 delete this; |
| 29 } |
| 30 |
| 31 bool AudioRecorderStub::IsRecording() { |
| 32 return is_recording_; |
| 33 } |
| 34 |
| 35 void AudioRecorderStub::TriggerDecodeRequest() { |
| 36 if (!cb_.is_null()) |
| 37 cb_.Run(std::string(7, 0x1337)); |
| 38 } |
| 39 |
| 40 } // namespace copresence |
OLD | NEW |