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

Side by Side Diff: chrome/renderer/media/audio_renderer_impl.h

Issue 357004: SetVolume and GetVolume take one volume instead of separate left and right vo... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 1 month 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) 2009 The Chromium Authors. All rights reserved. Use of this 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. Use of this
2 // source code is governed by a BSD-style license that can be found in the 2 // source code is governed by a BSD-style license that can be found in the
3 // LICENSE file. 3 // 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 // AudioRendererHost AudioRendererImpl 10 // AudioRendererHost AudioRendererImpl
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
113 AudioMessageFilter*>(filter); 113 AudioMessageFilter*>(filter);
114 } 114 }
115 static bool IsMediaFormatSupported(const media::MediaFormat& format); 115 static bool IsMediaFormatSupported(const media::MediaFormat& format);
116 116
117 // Methods called on IO thread ---------------------------------------------- 117 // Methods called on IO thread ----------------------------------------------
118 // AudioMessageFilter::Delegate methods, called by AudioMessageFilter. 118 // AudioMessageFilter::Delegate methods, called by AudioMessageFilter.
119 void OnRequestPacket(size_t bytes_in_buffer, 119 void OnRequestPacket(size_t bytes_in_buffer,
120 const base::Time& message_timestamp); 120 const base::Time& message_timestamp);
121 void OnStateChanged(ViewMsg_AudioStreamState state); 121 void OnStateChanged(ViewMsg_AudioStreamState state);
122 void OnCreated(base::SharedMemoryHandle handle, size_t length); 122 void OnCreated(base::SharedMemoryHandle handle, size_t length);
123 void OnVolume(double left, double right); 123 void OnVolume(double volume);
124 124
125 // Methods called on pipeline thread ---------------------------------------- 125 // Methods called on pipeline thread ----------------------------------------
126 // media::MediaFilter implementation. 126 // media::MediaFilter implementation.
127 virtual void SetPlaybackRate(float rate); 127 virtual void SetPlaybackRate(float rate);
128 128
129 // media::AudioRenderer implementation. 129 // media::AudioRenderer implementation.
130 virtual void SetVolume(float volume); 130 virtual void SetVolume(float volume);
131 131
132 protected: 132 protected:
133 // Methods called on audio renderer thread ---------------------------------- 133 // Methods called on audio renderer thread ----------------------------------
(...skipping 18 matching lines...) Expand all
152 152
153 // Methods call on IO thread ------------------------------------------------ 153 // Methods call on IO thread ------------------------------------------------
154 // The following methods are tasks posted on the IO thread that needs to 154 // The following methods are tasks posted on the IO thread that needs to
155 // be executed on that thread. They interact with AudioMessageFilter and 155 // be executed on that thread. They interact with AudioMessageFilter and
156 // sends IPC messages on that thread. 156 // sends IPC messages on that thread.
157 void OnCreateStream(AudioManager::Format format, int channels, 157 void OnCreateStream(AudioManager::Format format, int channels,
158 int sample_rate, int bits_per_sample, 158 int sample_rate, int bits_per_sample,
159 size_t packet_size, size_t buffer_capacity); 159 size_t packet_size, size_t buffer_capacity);
160 void OnPlay(); 160 void OnPlay();
161 void OnPause(); 161 void OnPause();
162 void OnSetVolume(double left, double right); 162 void OnSetVolume(double volume);
163 void OnNotifyPacketReady(); 163 void OnNotifyPacketReady();
164 void OnDestroy(); 164 void OnDestroy();
165 165
166 // Information about the audio stream. 166 // Information about the audio stream.
167 int channels_; 167 int channels_;
168 int sample_rate_; 168 int sample_rate_;
169 int sample_bits_; 169 int sample_bits_;
170 size_t bytes_per_second_; 170 size_t bytes_per_second_;
171 171
172 scoped_refptr<AudioMessageFilter> filter_; 172 scoped_refptr<AudioMessageFilter> filter_;
(...skipping 30 matching lines...) Expand all
203 // State variables for prerolling. 203 // State variables for prerolling.
204 bool prerolling_; 204 bool prerolling_;
205 205
206 // Remaining bytes for prerolling to complete. 206 // Remaining bytes for prerolling to complete.
207 size_t preroll_bytes_; 207 size_t preroll_bytes_;
208 208
209 DISALLOW_COPY_AND_ASSIGN(AudioRendererImpl); 209 DISALLOW_COPY_AND_ASSIGN(AudioRendererImpl);
210 }; 210 };
211 211
212 #endif // CHROME_RENDERER_MEDIA_AUDIO_RENDERER_IMPL_H_ 212 #endif // CHROME_RENDERER_MEDIA_AUDIO_RENDERER_IMPL_H_
OLDNEW
« no previous file with comments | « chrome/renderer/audio_message_filter_unittest.cc ('k') | chrome/renderer/media/audio_renderer_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698