| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 MEDIA_BASE_AUDIO_RENDERER_SINK_H_ | 5 #ifndef MEDIA_BASE_AUDIO_RENDERER_SINK_H_ |
| 6 #define MEDIA_BASE_AUDIO_RENDERER_SINK_H_ | 6 #define MEDIA_BASE_AUDIO_RENDERER_SINK_H_ |
| 7 | 7 |
| 8 #include <vector> | 8 #include <vector> |
| 9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
| 10 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 56 virtual void Play() = 0; | 56 virtual void Play() = 0; |
| 57 | 57 |
| 58 // Called to inform the sink of a change in playback rate. Override if | 58 // Called to inform the sink of a change in playback rate. Override if |
| 59 // subclass needs the playback rate. | 59 // subclass needs the playback rate. |
| 60 virtual void SetPlaybackRate(float rate) {} | 60 virtual void SetPlaybackRate(float rate) {} |
| 61 | 61 |
| 62 // Sets the playback volume, with range [0.0, 1.0] inclusive. | 62 // Sets the playback volume, with range [0.0, 1.0] inclusive. |
| 63 // Returns |true| on success. | 63 // Returns |true| on success. |
| 64 virtual bool SetVolume(double volume) = 0; | 64 virtual bool SetVolume(double volume) = 0; |
| 65 | 65 |
| 66 // Gets the playback volume, with range [0.0, 1.0] inclusive. | |
| 67 virtual void GetVolume(double* volume) = 0; | |
| 68 | |
| 69 protected: | 66 protected: |
| 70 friend class base::RefCountedThreadSafe<AudioRendererSink>; | 67 friend class base::RefCountedThreadSafe<AudioRendererSink>; |
| 71 virtual ~AudioRendererSink() {} | 68 virtual ~AudioRendererSink() {} |
| 72 }; | 69 }; |
| 73 | 70 |
| 74 } // namespace media | 71 } // namespace media |
| 75 | 72 |
| 76 #endif // MEDIA_BASE_AUDIO_RENDERER_SINK_H_ | 73 #endif // MEDIA_BASE_AUDIO_RENDERER_SINK_H_ |
| OLD | NEW |