ExtensionInstallDialogView: fix scrolling behavior on Views (Win,Linux)
[chromium-blink-merge.git] / components / audio_modem / audio_player.h
blob53f838d77174a4d80a30fb39cebbb92c47375f0e
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
3 // found in the LICENSE file.
5 #ifndef COMPONENTS_AUDIO_MODEM_AUDIO_PLAYER_H_
6 #define COMPONENTS_AUDIO_MODEM_AUDIO_PLAYER_H_
8 #include <vector>
10 #include "base/macros.h"
11 #include "base/memory/ref_counted.h"
13 namespace media {
14 class AudioBusRefCounted;
17 namespace audio_modem {
19 // The AudioPlayerImpl class will play a set of samples till it is told to stop.
20 class AudioPlayer {
21 public:
22 // Initializes the object. Do not use this object before calling this method.
23 virtual void Initialize() = 0;
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
27 // playing, this call will be ignored.
28 virtual void Play(
29 const scoped_refptr<media::AudioBusRefCounted>& samples) = 0;
31 // Stop playing. If we're already stopped, this call will be ignored.
32 virtual void Stop() = 0;
34 // Cleans up and deletes this object. Do not use object after this call.
35 virtual void Finalize() = 0;
37 protected:
38 virtual ~AudioPlayer() {}
41 } // namespace audio_modem
43 #endif // COMPONENTS_AUDIO_MODEM_AUDIO_PLAYER_H_