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

Side by Side Diff: components/audio_modem/audio_player.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
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_H_ 5 #ifndef COMPONENTS_AUDIO_MODEM_AUDIO_PLAYER_H_
6 #define COMPONENTS_COPRESENCE_MEDIUMS_AUDIO_AUDIO_PLAYER_H_ 6 #define COMPONENTS_AUDIO_MODEM_AUDIO_PLAYER_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
11 #include "base/memory/ref_counted.h" 11 #include "base/memory/ref_counted.h"
12 12
13 namespace media { 13 namespace media {
14 class AudioBusRefCounted; 14 class AudioBusRefCounted;
15 } 15 }
16 16
17 namespace copresence { 17 namespace audio_modem {
18 18
19 // The AudioPlayerImpl class will play a set of samples till it is told to stop. 19 // The AudioPlayerImpl class will play a set of samples till it is told to stop.
20 class AudioPlayer { 20 class AudioPlayer {
21 public: 21 public:
22 // Initializes the object. Do not use this object before calling this method. 22 // Initializes the object. Do not use this object before calling this method.
23 virtual void Initialize() = 0; 23 virtual void Initialize() = 0;
24 24
25 // Play the given samples. These samples will keep on being played in a loop 25 // Play the given samples. These samples will keep on being played in a loop
26 // till we explicitly tell the player to stop playing. If we are already 26 // till we explicitly tell the player to stop playing. If we are already
27 // playing, this call will be ignored. 27 // playing, this call will be ignored.
28 virtual void Play( 28 virtual void Play(
29 const scoped_refptr<media::AudioBusRefCounted>& samples) = 0; 29 const scoped_refptr<media::AudioBusRefCounted>& samples) = 0;
30 30
31 // Stop playing. If we're already stopped, this call will be ignored. 31 // Stop playing. If we're already stopped, this call will be ignored.
32 virtual void Stop() = 0; 32 virtual void Stop() = 0;
33 33
34 // Cleans up and deletes this object. Do not use object after this call. 34 // Cleans up and deletes this object. Do not use object after this call.
35 virtual void Finalize() = 0; 35 virtual void Finalize() = 0;
36 36
37 protected: 37 protected:
38 virtual ~AudioPlayer() {} 38 virtual ~AudioPlayer() {}
39 }; 39 };
40 40
41 } // namespace copresence 41 } // namespace audio_modem
42 42
43 #endif // COMPONENTS_COPRESENCE_MEDIUMS_AUDIO_AUDIO_PLAYER_H_ 43 #endif // COMPONENTS_AUDIO_MODEM_AUDIO_PLAYER_H_
OLDNEW
« no previous file with comments | « components/audio_modem/audio_modem_switches.cc ('k') | components/audio_modem/audio_player_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698