| 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_FILTERS_NULL_AUDIO_RENDERER_H_ | 5 #ifndef MEDIA_FILTERS_NULL_AUDIO_RENDERER_H_ |
| 6 #define MEDIA_FILTERS_NULL_AUDIO_RENDERER_H_ | 6 #define MEDIA_FILTERS_NULL_AUDIO_RENDERER_H_ |
| 7 | 7 |
| 8 // NullAudioSink effectively uses an extra thread to "throw away" the | 8 // NullAudioSink effectively uses an extra thread to "throw away" the |
| 9 // audio data at a rate resembling normal playback speed. It's just like | 9 // audio data at a rate resembling normal playback speed. It's just like |
| 10 // decoding to /dev/null! | 10 // decoding to /dev/null! |
| (...skipping 17 matching lines...) Expand all Loading... |
| 28 | 28 |
| 29 // AudioRendererSink implementation. | 29 // AudioRendererSink implementation. |
| 30 virtual void Initialize(const AudioParameters& params, | 30 virtual void Initialize(const AudioParameters& params, |
| 31 RenderCallback* callback) OVERRIDE; | 31 RenderCallback* callback) OVERRIDE; |
| 32 virtual void Start() OVERRIDE; | 32 virtual void Start() OVERRIDE; |
| 33 virtual void Stop() OVERRIDE; | 33 virtual void Stop() OVERRIDE; |
| 34 virtual void Pause(bool flush) OVERRIDE; | 34 virtual void Pause(bool flush) OVERRIDE; |
| 35 virtual void Play() OVERRIDE; | 35 virtual void Play() OVERRIDE; |
| 36 virtual void SetPlaybackRate(float rate) OVERRIDE; | 36 virtual void SetPlaybackRate(float rate) OVERRIDE; |
| 37 virtual bool SetVolume(double volume) OVERRIDE; | 37 virtual bool SetVolume(double volume) OVERRIDE; |
| 38 virtual void GetVolume(double* volume) OVERRIDE; | |
| 39 | 38 |
| 40 // Enables audio frame hashing and reinitializes the MD5 context. Must be | 39 // Enables audio frame hashing and reinitializes the MD5 context. Must be |
| 41 // called prior to Initialize(). | 40 // called prior to Initialize(). |
| 42 void StartAudioHashForTesting(); | 41 void StartAudioHashForTesting(); |
| 43 | 42 |
| 44 // Returns the MD5 hash of all audio frames seen since the last reset. | 43 // Returns the MD5 hash of all audio frames seen since the last reset. |
| 45 std::string GetAudioHashForTesting(); | 44 std::string GetAudioHashForTesting(); |
| 46 | 45 |
| 47 protected: | 46 protected: |
| 48 virtual ~NullAudioSink(); | 47 virtual ~NullAudioSink(); |
| (...skipping 21 matching lines...) Expand all Loading... |
| 70 // Controls whether or not a running MD5 hash is computed for audio frames. | 69 // Controls whether or not a running MD5 hash is computed for audio frames. |
| 71 bool hash_audio_for_testing_; | 70 bool hash_audio_for_testing_; |
| 72 scoped_array<base::MD5Context> md5_channel_contexts_; | 71 scoped_array<base::MD5Context> md5_channel_contexts_; |
| 73 | 72 |
| 74 DISALLOW_COPY_AND_ASSIGN(NullAudioSink); | 73 DISALLOW_COPY_AND_ASSIGN(NullAudioSink); |
| 75 }; | 74 }; |
| 76 | 75 |
| 77 } // namespace media | 76 } // namespace media |
| 78 | 77 |
| 79 #endif // MEDIA_FILTERS_NULL_AUDIO_RENDERER_H_ | 78 #endif // MEDIA_FILTERS_NULL_AUDIO_RENDERER_H_ |
| OLD | NEW |