OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 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 | 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_MANAGER_IMPL_H_ | 5 #ifndef COMPONENTS_COPRESENCE_MEDIUMS_AUDIO_AUDIO_MANAGER_IMPL_H_ |
6 #define COMPONENTS_COPRESENCE_MEDIUMS_AUDIO_AUDIO_MANAGER_IMPL_H_ | 6 #define COMPONENTS_COPRESENCE_MEDIUMS_AUDIO_AUDIO_MANAGER_IMPL_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/callback.h" | 10 #include "base/callback.h" |
(...skipping 10 matching lines...) Expand all Loading... |
21 class AudioPlayer; | 21 class AudioPlayer; |
22 class AudioRecorder; | 22 class AudioRecorder; |
23 | 23 |
24 // The AudioManagerImpl class manages the playback and recording of tokens. Once | 24 // The AudioManagerImpl class manages the playback and recording of tokens. Once |
25 // playback or recording is started, it is up to the audio manager to handle | 25 // playback or recording is started, it is up to the audio manager to handle |
26 // the specifics of how this is done. In the future, for example, this class | 26 // the specifics of how this is done. In the future, for example, this class |
27 // may pause recording and playback to implement carrier sense. | 27 // may pause recording and playback to implement carrier sense. |
28 class AudioManagerImpl final : public AudioManager { | 28 class AudioManagerImpl final : public AudioManager { |
29 public: | 29 public: |
30 AudioManagerImpl(); | 30 AudioManagerImpl(); |
31 ~AudioManagerImpl(); | 31 ~AudioManagerImpl() override; |
32 | 32 |
33 // AudioManager overrides: | 33 // AudioManager overrides: |
34 void Initialize(const DecodeSamplesCallback& decode_cb, | 34 void Initialize(const DecodeSamplesCallback& decode_cb, |
35 const EncodeTokenCallback& encode_cb) override; | 35 const EncodeTokenCallback& encode_cb) override; |
36 void StartPlaying(AudioType type) override; | 36 void StartPlaying(AudioType type) override; |
37 void StopPlaying(AudioType type) override; | 37 void StopPlaying(AudioType type) override; |
38 void StartRecording(AudioType type) override; | 38 void StartRecording(AudioType type) override; |
39 void StopRecording(AudioType type) override; | 39 void StopRecording(AudioType type) override; |
40 void SetToken(AudioType type, const std::string& url_unsafe_token) override; | 40 void SetToken(AudioType type, const std::string& url_unsafe_token) override; |
41 const std::string GetToken(AudioType type) override; | 41 const std::string GetToken(AudioType type) override; |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
98 // expires the oldest samples first. | 98 // expires the oldest samples first. |
99 // Indexed using enum AudioType. | 99 // Indexed using enum AudioType. |
100 ScopedVector<SamplesMap> samples_cache_; | 100 ScopedVector<SamplesMap> samples_cache_; |
101 | 101 |
102 DISALLOW_COPY_AND_ASSIGN(AudioManagerImpl); | 102 DISALLOW_COPY_AND_ASSIGN(AudioManagerImpl); |
103 }; | 103 }; |
104 | 104 |
105 } // namespace copresence | 105 } // namespace copresence |
106 | 106 |
107 #endif // COMPONENTS_COPRESENCE_MEDIUMS_AUDIO_AUDIO_MANAGER_IMPL_H_ | 107 #endif // COMPONENTS_COPRESENCE_MEDIUMS_AUDIO_AUDIO_MANAGER_IMPL_H_ |
OLD | NEW |