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

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

Issue 7003053: Moves audio files from content\renderer\ to content\renderer\media. (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: Created 9 years, 6 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 #include "content/renderer/audio_device.h" 5 #include "content/renderer/media/audio_device.h"
6 6
7 #include "base/memory/singleton.h" 7 #include "base/memory/singleton.h"
8 #include "base/message_loop.h" 8 #include "base/message_loop.h"
9 #include "content/common/audio_messages.h" 9 #include "content/common/audio_messages.h"
10 #include "content/common/child_process.h" 10 #include "content/common/child_process.h"
11 #include "content/common/view_messages.h" 11 #include "content/common/view_messages.h"
12 #include "content/renderer/render_thread.h" 12 #include "content/renderer/render_thread.h"
13 #include "media/audio/audio_util.h" 13 #include "media/audio/audio_util.h"
14 14
15 scoped_refptr<AudioMessageFilter> AudioDevice::filter_; 15 scoped_refptr<AudioMessageFilter> AudioDevice::filter_;
(...skipping 229 matching lines...) Expand 10 before | Expand all | Expand 10 after
245 void AudioDevice::FireRenderCallback() { 245 void AudioDevice::FireRenderCallback() {
246 if (callback_) { 246 if (callback_) {
247 // Update the audio-delay measurement then ask client to render audio. 247 // Update the audio-delay measurement then ask client to render audio.
248 callback_->Render(audio_data_, buffer_size_, audio_delay_milliseconds_); 248 callback_->Render(audio_data_, buffer_size_, audio_delay_milliseconds_);
249 249
250 // Interleave, scale, and clip to int16. 250 // Interleave, scale, and clip to int16.
251 int16* output_buffer16 = static_cast<int16*>(shared_memory_data()); 251 int16* output_buffer16 = static_cast<int16*>(shared_memory_data());
252 media::InterleaveFloatToInt16(audio_data_, output_buffer16, buffer_size_); 252 media::InterleaveFloatToInt16(audio_data_, output_buffer16, buffer_size_);
253 } 253 }
254 } 254 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698