| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 #ifndef COMPONENTS_COPRESENCE_MEDIUMS_AUDIO_AUDIO_RECORDER_IMPL_H_ | 5 #ifndef COMPONENTS_AUDIO_MODEM_AUDIO_RECORDER_IMPL_H_ |
| 6 #define COMPONENTS_COPRESENCE_MEDIUMS_AUDIO_AUDIO_RECORDER_IMPL_H_ | 6 #define COMPONENTS_AUDIO_MODEM_AUDIO_RECORDER_IMPL_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/gtest_prod_util.h" | 10 #include "base/gtest_prod_util.h" |
| 11 #include "base/macros.h" | 11 #include "base/macros.h" |
| 12 #include "base/memory/scoped_ptr.h" | 12 #include "base/memory/scoped_ptr.h" |
| 13 #include "components/copresence/mediums/audio/audio_recorder.h" | 13 #include "components/audio_modem/audio_recorder.h" |
| 14 #include "media/audio/audio_io.h" | 14 #include "media/audio/audio_io.h" |
| 15 #include "media/audio/audio_parameters.h" | 15 #include "media/audio/audio_parameters.h" |
| 16 #include "media/base/audio_converter.h" | 16 #include "media/base/audio_converter.h" |
| 17 | 17 |
| 18 namespace base { | 18 namespace base { |
| 19 class MessageLoop; | 19 class MessageLoop; |
| 20 } | 20 } |
| 21 | 21 |
| 22 namespace media { | 22 namespace media { |
| 23 class AudioBus; | 23 class AudioBus; |
| 24 } | 24 } |
| 25 | 25 |
| 26 namespace copresence { | 26 namespace audio_modem { |
| 27 | 27 |
| 28 // The AudioRecorder class will record audio until told to stop. | 28 // The AudioRecorder class will record audio until told to stop. |
| 29 class AudioRecorderImpl final | 29 class AudioRecorderImpl final |
| 30 : public AudioRecorder, | 30 : public AudioRecorder, |
| 31 public media::AudioInputStream::AudioInputCallback, | 31 public media::AudioInputStream::AudioInputCallback, |
| 32 public media::AudioConverter::InputCallback { | 32 public media::AudioConverter::InputCallback { |
| 33 public: | 33 public: |
| 34 using RecordedSamplesCallback = base::Callback<void(const std::string&)>; | 34 using RecordedSamplesCallback = base::Callback<void(const std::string&)>; |
| 35 | 35 |
| 36 AudioRecorderImpl(); | 36 AudioRecorderImpl(); |
| (...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 103 int buffer_frame_index_; | 103 int buffer_frame_index_; |
| 104 | 104 |
| 105 scoped_ptr<media::AudioConverter> converter_; | 105 scoped_ptr<media::AudioConverter> converter_; |
| 106 | 106 |
| 107 scoped_ptr<media::AudioInputStream> input_stream_for_testing_; | 107 scoped_ptr<media::AudioInputStream> input_stream_for_testing_; |
| 108 scoped_ptr<media::AudioParameters> params_for_testing_; | 108 scoped_ptr<media::AudioParameters> params_for_testing_; |
| 109 | 109 |
| 110 DISALLOW_COPY_AND_ASSIGN(AudioRecorderImpl); | 110 DISALLOW_COPY_AND_ASSIGN(AudioRecorderImpl); |
| 111 }; | 111 }; |
| 112 | 112 |
| 113 } // namespace copresence | 113 } // namespace audio_modem |
| 114 | 114 |
| 115 #endif // COMPONENTS_COPRESENCE_MEDIUMS_AUDIO_AUDIO_RECORDER_IMPL_H_ | 115 #endif // COMPONENTS_AUDIO_MODEM_AUDIO_RECORDER_IMPL_H_ |
| OLD | NEW |