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

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

Issue 10830268: Allow audio system to handle synchronized low-latency audio I/O (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 3 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 #include "content/renderer/media/audio_message_filter.h" 5 #include "content/renderer/media/audio_message_filter.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/message_loop.h" 8 #include "base/message_loop.h"
9 #include "base/time.h" 9 #include "base/time.h"
10 #include "content/common/child_process.h" 10 #include "content/common/child_process.h"
(...skipping 17 matching lines...) Expand all
28 28
29 int AudioMessageFilter::AddDelegate(media::AudioOutputIPCDelegate* delegate) { 29 int AudioMessageFilter::AddDelegate(media::AudioOutputIPCDelegate* delegate) {
30 return delegates_.Add(delegate); 30 return delegates_.Add(delegate);
31 } 31 }
32 32
33 void AudioMessageFilter::RemoveDelegate(int id) { 33 void AudioMessageFilter::RemoveDelegate(int id) {
34 delegates_.Remove(id); 34 delegates_.Remove(id);
35 } 35 }
36 36
37 void AudioMessageFilter::CreateStream(int stream_id, 37 void AudioMessageFilter::CreateStream(int stream_id,
38 const media::AudioParameters& params) { 38 const media::AudioParameters& params,
39 Send(new AudioHostMsg_CreateStream(stream_id, params)); 39 int input_channels) {
40 Send(new AudioHostMsg_CreateStream(stream_id, params, input_channels));
40 } 41 }
41 42
42 void AudioMessageFilter::PlayStream(int stream_id) { 43 void AudioMessageFilter::PlayStream(int stream_id) {
43 Send(new AudioHostMsg_PlayStream(stream_id)); 44 Send(new AudioHostMsg_PlayStream(stream_id));
44 } 45 }
45 46
46 void AudioMessageFilter::PauseStream(int stream_id) { 47 void AudioMessageFilter::PauseStream(int stream_id) {
47 Send(new AudioHostMsg_PauseStream(stream_id)); 48 Send(new AudioHostMsg_PauseStream(stream_id));
48 } 49 }
49 50
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
146 147
147 void AudioMessageFilter::OnStreamStateChanged( 148 void AudioMessageFilter::OnStreamStateChanged(
148 int stream_id, media::AudioOutputIPCDelegate::State state) { 149 int stream_id, media::AudioOutputIPCDelegate::State state) {
149 media::AudioOutputIPCDelegate* delegate = delegates_.Lookup(stream_id); 150 media::AudioOutputIPCDelegate* delegate = delegates_.Lookup(stream_id);
150 if (!delegate) { 151 if (!delegate) {
151 DLOG(WARNING) << "No delegate found for state change. " << state; 152 DLOG(WARNING) << "No delegate found for state change. " << state;
152 return; 153 return;
153 } 154 }
154 delegate->OnStateChanged(state); 155 delegate->OnStateChanged(state);
155 } 156 }
OLDNEW
« no previous file with comments | « content/renderer/media/audio_message_filter.h ('k') | content/renderer/media/renderer_webaudiodevice_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698