| Index: content/renderer/pepper/pepper_platform_audio_input_impl.cc
|
| ===================================================================
|
| --- content/renderer/pepper/pepper_platform_audio_input_impl.cc (revision 186364)
|
| +++ content/renderer/pepper/pepper_platform_audio_input_impl.cc (working copy)
|
| @@ -66,7 +66,8 @@
|
| void PepperPlatformAudioInputImpl::OnStreamCreated(
|
| base::SharedMemoryHandle handle,
|
| base::SyncSocket::Handle socket_handle,
|
| - int length) {
|
| + int length,
|
| + int total_segments) {
|
| #if defined(OS_WIN)
|
| DCHECK(handle);
|
| DCHECK(socket_handle);
|
| @@ -75,6 +76,8 @@
|
| DCHECK_NE(-1, socket_handle);
|
| #endif
|
| DCHECK(length);
|
| + // TODO(yzshen): Make use of circular buffer scheme. crbug.com/181449.
|
| + DCHECK_EQ(1, total_segments);
|
|
|
| if (base::MessageLoopProxy::current() != main_message_loop_proxy_) {
|
| // No need to check |shutdown_called_| here. If shutdown has occurred,
|
| @@ -83,7 +86,7 @@
|
| main_message_loop_proxy_->PostTask(
|
| FROM_HERE,
|
| base::Bind(&PepperPlatformAudioInputImpl::OnStreamCreated, this,
|
| - handle, socket_handle, length));
|
| + handle, socket_handle, length, total_segments));
|
| } else {
|
| // Must dereference the client only on the main thread. Shutdown may have
|
| // occurred while the request was in-flight, so we need to NULL check.
|
| @@ -117,7 +120,7 @@
|
| this));
|
| } else {
|
| // We will be notified by OnStreamCreated().
|
| - ipc_->CreateStream(stream_id_, params_, device_id, false);
|
| + ipc_->CreateStream(stream_id_, params_, device_id, false, 1);
|
| }
|
| }
|
|
|
| @@ -196,7 +199,7 @@
|
| if (!session_id) {
|
| // We will be notified by OnStreamCreated().
|
| ipc_->CreateStream(stream_id_, params_,
|
| - media::AudioManagerBase::kDefaultDeviceId, false);
|
| + media::AudioManagerBase::kDefaultDeviceId, false, 1);
|
| } else {
|
| // We will be notified by OnDeviceReady().
|
| ipc_->StartDevice(stream_id_, session_id);
|
|
|