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

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 copyright years 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
« no previous file with comments | « content/content_common.gypi ('k') | content/renderer/media/audio_device.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 // 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 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
180 // guard to control stopping and starting the audio thread. 174 // guard to control stopping and starting the audio thread.
181 base::Lock audio_thread_lock_; 175 base::Lock audio_thread_lock_;
182 AudioDeviceThread audio_thread_; 176 AudioDeviceThread audio_thread_;
183 scoped_ptr<AudioDevice::AudioThreadCallback> audio_callback_; 177 scoped_ptr<AudioDevice::AudioThreadCallback> audio_callback_;
184 178
185 179
186 DISALLOW_COPY_AND_ASSIGN(AudioDevice); 180 DISALLOW_COPY_AND_ASSIGN(AudioDevice);
187 }; 181 };
188 182
189 #endif // CONTENT_RENDERER_MEDIA_AUDIO_DEVICE_H_ 183 #endif // CONTENT_RENDERER_MEDIA_AUDIO_DEVICE_H_
OLDNEW
« no previous file with comments | « content/content_common.gypi ('k') | content/renderer/media/audio_device.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698