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

Side by Side Diff: media/base/audio_renderer_sink.h

Issue 12102004: Renderer side audio device change wip... Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 10 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 | Annotate | Revision Log
« no previous file with comments | « media/base/audio_renderer_mixer_input.cc ('k') | media/base/media_switches.h » ('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_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 17 matching lines...) Expand all
28 virtual int Render(AudioBus* dest, int audio_delay_milliseconds) = 0; 28 virtual int Render(AudioBus* dest, int audio_delay_milliseconds) = 0;
29 29
30 // Synchronized audio I/O - see InitializeIO() below. 30 // Synchronized audio I/O - see InitializeIO() below.
31 virtual void RenderIO(AudioBus* source, 31 virtual void RenderIO(AudioBus* source,
32 AudioBus* dest, 32 AudioBus* dest,
33 int audio_delay_milliseconds) {} 33 int audio_delay_milliseconds) {}
34 34
35 // Signals an error has occurred. 35 // Signals an error has occurred.
36 virtual void OnRenderError() = 0; 36 virtual void OnRenderError() = 0;
37 37
38 // Optional method for handling device change notifications from the
39 // browser.
40 virtual void OnDeviceChange() {};
41
38 protected: 42 protected:
39 virtual ~RenderCallback() {} 43 virtual ~RenderCallback() {}
40 }; 44 };
41 45
42 // Sets important information about the audio stream format. 46 // Sets important information about the audio stream format.
43 // It must be called before any of the other methods. 47 // It must be called before any of the other methods.
44 virtual void Initialize(const AudioParameters& params, 48 virtual void Initialize(const AudioParameters& params,
45 RenderCallback* callback) = 0; 49 RenderCallback* callback) = 0;
46 50
47 // InitializeIO() may be called instead of Initialize() for clients who wish 51 // InitializeIO() may be called instead of Initialize() for clients who wish
(...skipping 24 matching lines...) Expand all
72 virtual bool SetVolume(double volume) = 0; 76 virtual bool SetVolume(double volume) = 0;
73 77
74 protected: 78 protected:
75 friend class base::RefCountedThreadSafe<AudioRendererSink>; 79 friend class base::RefCountedThreadSafe<AudioRendererSink>;
76 virtual ~AudioRendererSink() {} 80 virtual ~AudioRendererSink() {}
77 }; 81 };
78 82
79 } // namespace media 83 } // namespace media
80 84
81 #endif // MEDIA_BASE_AUDIO_RENDERER_SINK_H_ 85 #endif // MEDIA_BASE_AUDIO_RENDERER_SINK_H_
OLDNEW
« no previous file with comments | « media/base/audio_renderer_mixer_input.cc ('k') | media/base/media_switches.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698