Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(396)

Side by Side Diff: components/audio_modem/audio_player_impl.h

Issue 865483005: Creating the audio_modem component (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Merging again Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « components/audio_modem/audio_player.h ('k') | components/audio_modem/audio_player_impl.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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_
OLDNEW
« no previous file with comments | « components/audio_modem/audio_player.h ('k') | components/audio_modem/audio_player_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698