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

Side by Side Diff: content/renderer/media/audio_device.h

Issue 9655018: Make AudioParameters a class instead of a struct (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix tests Created 8 years, 9 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
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 // Audio rendering unit utilizing audio output stream provided by browser 5 // Audio rendering unit utilizing audio output stream provided by browser
6 // process through IPC. 6 // process through IPC.
7 // 7 //
8 // Relationship of classes. 8 // Relationship of classes.
9 // 9 //
10 // AudioOutputController AudioDevice 10 // AudioOutputController AudioDevice
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
79 class CONTENT_EXPORT AudioDevice 79 class CONTENT_EXPORT AudioDevice
80 : NON_EXPORTED_BASE(public media::AudioRendererSink), 80 : NON_EXPORTED_BASE(public media::AudioRendererSink),
81 public AudioMessageFilter::Delegate, 81 public AudioMessageFilter::Delegate,
82 NON_EXPORTED_BASE(public ScopedLoopObserver) { 82 NON_EXPORTED_BASE(public ScopedLoopObserver) {
83 public: 83 public:
84 // Methods called on main render thread ------------------------------------- 84 // Methods called on main render thread -------------------------------------
85 85
86 // Minimal constructor where Initialize() must be called later. 86 // Minimal constructor where Initialize() must be called later.
87 AudioDevice(); 87 AudioDevice();
88 88
89 AudioDevice(size_t buffer_size, 89 AudioDevice(const AudioParameters& params, RenderCallback* callback);
90 int channels,
91 double sample_rate,
92 RenderCallback* callback);
93 90
94 // AudioRendererSink implementation. 91 // AudioRendererSink implementation.
95 92
96 virtual void Initialize(size_t buffer_size, 93 virtual void Initialize(const AudioParameters& params,
97 int channels,
98 double sample_rate,
99 AudioParameters::Format latency_format,
100 RenderCallback* callback) OVERRIDE; 94 RenderCallback* callback) OVERRIDE;
101 // Starts audio playback. 95 // Starts audio playback.
102 virtual void Start() OVERRIDE; 96 virtual void Start() OVERRIDE;
103 97
104 // Stops audio playback. 98 // Stops audio playback.
105 virtual void Stop() OVERRIDE; 99 virtual void Stop() OVERRIDE;
106 100
107 // Resumes playback if currently paused. 101 // Resumes playback if currently paused.
108 virtual void Play() OVERRIDE; 102 virtual void Play() OVERRIDE;
109 103
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
177 class AudioThreadCallback; 171 class AudioThreadCallback;
178 172
179 AudioDeviceThread audio_thread_; 173 AudioDeviceThread audio_thread_;
180 scoped_ptr<AudioDevice::AudioThreadCallback> audio_callback_; 174 scoped_ptr<AudioDevice::AudioThreadCallback> audio_callback_;
181 175
182 176
183 DISALLOW_COPY_AND_ASSIGN(AudioDevice); 177 DISALLOW_COPY_AND_ASSIGN(AudioDevice);
184 }; 178 };
185 179
186 #endif // CONTENT_RENDERER_MEDIA_AUDIO_DEVICE_H_ 180 #endif // CONTENT_RENDERER_MEDIA_AUDIO_DEVICE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698