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

Side by Side Diff: media/filters/audio_renderer_impl.h

Issue 10823175: Switch AudioRenderSink::Callback to use AudioBus. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Gotta catch'em all! Created 8 years, 4 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 an AudioRendererSink to output data. 5 // Audio rendering unit utilizing an AudioRendererSink to output data.
6 // 6 //
7 // This class lives inside three threads during it's lifetime, namely: 7 // This class lives inside three threads during it's lifetime, namely:
8 // 1. Render thread. 8 // 1. Render thread.
9 // This object is created on the render thread. 9 // This object is created on the render thread.
10 // 2. Pipeline thread 10 // 2. Pipeline thread
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
113 // Estimate earliest time when current buffer can stop playing. 113 // Estimate earliest time when current buffer can stop playing.
114 void UpdateEarliestEndTime(int bytes_filled, 114 void UpdateEarliestEndTime(int bytes_filled,
115 base::TimeDelta request_delay, 115 base::TimeDelta request_delay,
116 base::Time time_now); 116 base::Time time_now);
117 117
118 // Methods called on pipeline thread ---------------------------------------- 118 // Methods called on pipeline thread ----------------------------------------
119 void DoPlay(); 119 void DoPlay();
120 void DoPause(); 120 void DoPause();
121 121
122 // media::AudioRendererSink::RenderCallback implementation. 122 // media::AudioRendererSink::RenderCallback implementation.
123 virtual int Render(const std::vector<float*>& audio_data, 123 virtual int Render(AudioBus* audio_bus,
124 int number_of_frames, 124 int number_of_frames,
125 int audio_delay_milliseconds) OVERRIDE; 125 int audio_delay_milliseconds) OVERRIDE;
126 virtual void OnRenderError() OVERRIDE; 126 virtual void OnRenderError() OVERRIDE;
127 127
128 // Helper method that schedules an asynchronous read from the decoder and 128 // Helper method that schedules an asynchronous read from the decoder and
129 // increments |pending_reads_|. 129 // increments |pending_reads_|.
130 // 130 //
131 // Safe to call from any thread. 131 // Safe to call from any thread.
132 void ScheduleRead_Locked(); 132 void ScheduleRead_Locked();
133 133
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
215 bool underflow_disabled_; 215 bool underflow_disabled_;
216 216
217 AudioDecoder::ReadCB read_cb_; 217 AudioDecoder::ReadCB read_cb_;
218 218
219 DISALLOW_COPY_AND_ASSIGN(AudioRendererImpl); 219 DISALLOW_COPY_AND_ASSIGN(AudioRendererImpl);
220 }; 220 };
221 221
222 } // namespace media 222 } // namespace media
223 223
224 #endif // MEDIA_FILTERS_AUDIO_RENDERER_IMPL_H_ 224 #endif // MEDIA_FILTERS_AUDIO_RENDERER_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698