| 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_AUDIO_NULL_AUDIO_SINK_H_ | 5 #ifndef MEDIA_AUDIO_NULL_AUDIO_SINK_H_ |
| 6 #define MEDIA_AUDIO_NULL_AUDIO_SINK_H_ | 6 #define MEDIA_AUDIO_NULL_AUDIO_SINK_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
| (...skipping 14 matching lines...) Expand all Loading... |
| 25 NullAudioSink(const scoped_refptr<base::SingleThreadTaskRunner>& task_runner); | 25 NullAudioSink(const scoped_refptr<base::SingleThreadTaskRunner>& task_runner); |
| 26 | 26 |
| 27 // AudioRendererSink implementation. | 27 // AudioRendererSink implementation. |
| 28 void Initialize(const AudioParameters& params, | 28 void Initialize(const AudioParameters& params, |
| 29 RenderCallback* callback) override; | 29 RenderCallback* callback) override; |
| 30 void Start() override; | 30 void Start() override; |
| 31 void Stop() override; | 31 void Stop() override; |
| 32 void Pause() override; | 32 void Pause() override; |
| 33 void Play() override; | 33 void Play() override; |
| 34 bool SetVolume(double volume) override; | 34 bool SetVolume(double volume) override; |
| 35 void SwitchOutputDevice(const std::string& device_id, |
| 36 const GURL& security_origin, |
| 37 const SwitchOutputDeviceCB& callback) override; |
| 35 | 38 |
| 36 // Enables audio frame hashing. Must be called prior to Initialize(). | 39 // Enables audio frame hashing. Must be called prior to Initialize(). |
| 37 void StartAudioHashForTesting(); | 40 void StartAudioHashForTesting(); |
| 38 | 41 |
| 39 // Returns the hash of all audio frames seen since construction. | 42 // Returns the hash of all audio frames seen since construction. |
| 40 std::string GetAudioHashForTesting(); | 43 std::string GetAudioHashForTesting(); |
| 41 | 44 |
| 42 protected: | 45 protected: |
| 43 ~NullAudioSink() override; | 46 ~NullAudioSink() override; |
| 44 | 47 |
| (...skipping 11 matching lines...) Expand all Loading... |
| 56 scoped_refptr<base::SingleThreadTaskRunner> task_runner_; | 59 scoped_refptr<base::SingleThreadTaskRunner> task_runner_; |
| 57 scoped_ptr<FakeAudioWorker> fake_worker_; | 60 scoped_ptr<FakeAudioWorker> fake_worker_; |
| 58 scoped_ptr<AudioBus> audio_bus_; | 61 scoped_ptr<AudioBus> audio_bus_; |
| 59 | 62 |
| 60 DISALLOW_COPY_AND_ASSIGN(NullAudioSink); | 63 DISALLOW_COPY_AND_ASSIGN(NullAudioSink); |
| 61 }; | 64 }; |
| 62 | 65 |
| 63 } // namespace media | 66 } // namespace media |
| 64 | 67 |
| 65 #endif // MEDIA_AUDIO_NULL_AUDIO_SINK_H_ | 68 #endif // MEDIA_AUDIO_NULL_AUDIO_SINK_H_ |
| OLD | NEW |