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

Side by Side Diff: content/common/media/audio_messages.h

Issue 9702019: Adds Analog Gain Control (AGC) to the WebRTC client. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Added audio_input_stream_impl.h/.cc 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
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 // IPC messages for the audio. 5 // IPC messages for the audio.
6 // Multiply-included message file, hence no include guard. 6 // Multiply-included message file, hence no include guard.
7 7
8 #include <string>
9
8 #include "base/basictypes.h" 10 #include "base/basictypes.h"
9 #include "base/shared_memory.h" 11 #include "base/shared_memory.h"
10 #include "base/sync_socket.h" 12 #include "base/sync_socket.h"
11 #include "content/common/content_export.h" 13 #include "content/common/content_export.h"
12 #include "content/common/media/audio_stream_state.h" 14 #include "content/common/media/audio_stream_state.h"
13 #include "ipc/ipc_message_macros.h" 15 #include "ipc/ipc_message_macros.h"
14 #include "media/audio/audio_buffers_state.h" 16 #include "media/audio/audio_buffers_state.h"
15 #include "media/audio/audio_parameters.h" 17 #include "media/audio/audio_parameters.h"
16 18
17 #undef IPC_MESSAGE_EXPORT 19 #undef IPC_MESSAGE_EXPORT
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 std::string /* device_id */) 96 std::string /* device_id */)
95 97
96 // Messages sent from the renderer to the browser. 98 // Messages sent from the renderer to the browser.
97 99
98 // Request that got sent to browser for creating an audio output stream 100 // Request that got sent to browser for creating an audio output stream
99 IPC_MESSAGE_CONTROL2(AudioHostMsg_CreateStream, 101 IPC_MESSAGE_CONTROL2(AudioHostMsg_CreateStream,
100 int /* stream_id */, 102 int /* stream_id */,
101 AudioParameters /* params */) 103 AudioParameters /* params */)
102 104
103 // Request that got sent to browser for creating an audio input stream 105 // Request that got sent to browser for creating an audio input stream
104 IPC_MESSAGE_CONTROL3(AudioInputHostMsg_CreateStream, 106 IPC_MESSAGE_CONTROL4(AudioInputHostMsg_CreateStream,
105 int /* stream_id */, 107 int /* stream_id */,
106 AudioParameters /* params */, 108 AudioParameters /* params */,
107 std::string /* device_id */) 109 std::string /* device_id */,
110 bool /* automatic_gain_control */)
108 111
109 // Start buffering and play the audio stream specified by stream_id. 112 // Start buffering and play the audio stream specified by stream_id.
110 IPC_MESSAGE_CONTROL1(AudioHostMsg_PlayStream, 113 IPC_MESSAGE_CONTROL1(AudioHostMsg_PlayStream,
111 int /* stream_id */) 114 int /* stream_id */)
112 115
113 // Start recording the audio input stream specified by stream_id. 116 // Start recording the audio input stream specified by stream_id.
114 IPC_MESSAGE_CONTROL1(AudioInputHostMsg_RecordStream, 117 IPC_MESSAGE_CONTROL1(AudioInputHostMsg_RecordStream,
115 int /* stream_id */) 118 int /* stream_id */)
116 119
117 // Pause the audio stream specified by stream_id. 120 // Pause the audio stream specified by stream_id.
118 IPC_MESSAGE_CONTROL1(AudioHostMsg_PauseStream, 121 IPC_MESSAGE_CONTROL1(AudioHostMsg_PauseStream,
119 int /* stream_id */) 122 int /* stream_id */)
120 123
121 // Discard all buffered audio data for the specified audio stream. 124 // Discard all buffered audio data for the specified audio stream.
122 IPC_MESSAGE_CONTROL1(AudioHostMsg_FlushStream, 125 IPC_MESSAGE_CONTROL1(AudioHostMsg_FlushStream,
123 int /* stream_id */) 126 int /* stream_id */)
124 127
125 // Close an audio stream specified by stream_id. 128 // Close an audio stream specified by stream_id.
126 IPC_MESSAGE_CONTROL1(AudioHostMsg_CloseStream, 129 IPC_MESSAGE_CONTROL1(AudioHostMsg_CloseStream,
127 int /* stream_id */) 130 int /* stream_id */)
128 131
129 // Close an audio input stream specified by stream_id. 132 // Close an audio input stream specified by stream_id.
130 IPC_MESSAGE_CONTROL1(AudioInputHostMsg_CloseStream, 133 IPC_MESSAGE_CONTROL1(AudioInputHostMsg_CloseStream,
131 int /* stream_id */) 134 int /* stream_id */)
132 135
133 // Get audio volume of the input stream specified by
134 // (render_view_id, stream_id).
135 IPC_MESSAGE_CONTROL1(AudioInputHostMsg_GetVolume,
136 int /* stream_id */)
137
138 // Set audio volume of the stream specified by stream_id. 136 // Set audio volume of the stream specified by stream_id.
139 // TODO(hclam): change this to vector if we have channel numbers other than 2. 137 // TODO(hclam): change this to vector if we have channel numbers other than 2.
140 IPC_MESSAGE_CONTROL2(AudioHostMsg_SetVolume, 138 IPC_MESSAGE_CONTROL2(AudioHostMsg_SetVolume,
141 int /* stream_id */, 139 int /* stream_id */,
142 double /* volume */) 140 double /* volume */)
143 141
144 // Set audio volume of the input stream specified by stream_id. 142 // Set audio volume of the input stream specified by stream_id.
145 IPC_MESSAGE_CONTROL2(AudioInputHostMsg_SetVolume, 143 IPC_MESSAGE_CONTROL2(AudioInputHostMsg_SetVolume,
146 int /* stream_id */, 144 int /* stream_id */,
147 double /* volume */) 145 double /* volume */)
148 146
149 // Start the device referenced by the session_id for the input stream specified 147 // Start the device referenced by the session_id for the input stream specified
150 // by stream_id. 148 // by stream_id.
151 IPC_MESSAGE_CONTROL2(AudioInputHostMsg_StartDevice, 149 IPC_MESSAGE_CONTROL2(AudioInputHostMsg_StartDevice,
152 int /* stream_id */, 150 int /* stream_id */,
153 int /* session_id */) 151 int /* session_id */)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698