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

Side by Side Diff: media/audio/null_audio_sink.h

Issue 1184473002: Add support for the audio-output-device switching IPC mechanism to the renderer lower layers (media… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix build dependencies for audio_unittests Created 5 years, 6 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
« no previous file with comments | « media/audio/clockless_audio_sink.cc ('k') | media/audio/null_audio_sink.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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_
OLDNEW
« no previous file with comments | « media/audio/clockless_audio_sink.cc ('k') | media/audio/null_audio_sink.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698