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_PLAYER_IMPL_H_ | 5 #ifndef COMPONENTS_AUDIO_MODEM_AUDIO_PLAYER_IMPL_H_ |
6 #define COMPONENTS_COPRESENCE_MEDIUMS_AUDIO_AUDIO_PLAYER_IMPL_H_ | 6 #define COMPONENTS_AUDIO_MODEM_AUDIO_PLAYER_IMPL_H_ |
7 | 7 |
8 #include <vector> | 8 #include <vector> |
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/ref_counted.h" | 12 #include "base/memory/ref_counted.h" |
13 #include "base/synchronization/lock.h" | 13 #include "base/synchronization/lock.h" |
14 #include "components/copresence/mediums/audio/audio_player.h" | 14 #include "components/audio_modem/audio_player.h" |
15 #include "media/audio/audio_io.h" | 15 #include "media/audio/audio_io.h" |
16 | 16 |
17 namespace media { | 17 namespace media { |
18 class AudioBus; | 18 class AudioBus; |
19 class AudioBusRefCounted; | 19 class AudioBusRefCounted; |
20 } | 20 } |
21 | 21 |
22 namespace copresence { | 22 namespace audio_modem { |
23 | 23 |
24 // The AudioPlayerImpl class will play a set of samples till it is told to stop. | 24 // The AudioPlayerImpl class will play a set of samples till it is told to stop. |
25 class AudioPlayerImpl final | 25 class AudioPlayerImpl final |
26 : public AudioPlayer, | 26 : public AudioPlayer, |
27 public media::AudioOutputStream::AudioSourceCallback { | 27 public media::AudioOutputStream::AudioSourceCallback { |
28 public: | 28 public: |
29 AudioPlayerImpl(); | 29 AudioPlayerImpl(); |
30 | 30 |
31 // AudioPlayer overrides: | 31 // AudioPlayer overrides: |
32 void Initialize() override; | 32 void Initialize() override; |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
76 base::Lock state_lock_; | 76 base::Lock state_lock_; |
77 | 77 |
78 scoped_refptr<media::AudioBusRefCounted> samples_; | 78 scoped_refptr<media::AudioBusRefCounted> samples_; |
79 | 79 |
80 // Index to the frame in the samples that we need to play next. | 80 // Index to the frame in the samples that we need to play next. |
81 int frame_index_; | 81 int frame_index_; |
82 | 82 |
83 DISALLOW_COPY_AND_ASSIGN(AudioPlayerImpl); | 83 DISALLOW_COPY_AND_ASSIGN(AudioPlayerImpl); |
84 }; | 84 }; |
85 | 85 |
86 } // namespace copresence | 86 } // namespace audio_modem |
87 | 87 |
88 #endif // COMPONENTS_COPRESENCE_MEDIUMS_AUDIO_AUDIO_PLAYER_IMPL_H_ | 88 #endif // COMPONENTS_AUDIO_MODEM_AUDIO_PLAYER_IMPL_H_ |
OLD | NEW |