From 0e8d17b102f7aa99639fae7c95a2119126c753fd Mon Sep 17 00:00:00 2001 From: "raymes@chromium.org" Date: Tue, 15 May 2012 21:32:25 +0000 Subject: Change ppb_audio(_input)_shared to Shutdown the sync socket when terminating playback. Previously, the socket was not being shut down. Under certain circumstances the sockets Receive() can hang indefinitely (refer to the bug for details). Calling Shutdown() on the socket will escape these hanging reads. BUG=128050 TEST=Audio tests Review URL: https://chromiumcodereview.appspot.com/10392095 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@137252 0039d316-1c4b-4281-b951-d872f2087c98 --- ppapi/shared_impl/ppb_audio_shared.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'ppapi/shared_impl/ppb_audio_shared.h') diff --git a/ppapi/shared_impl/ppb_audio_shared.h b/ppapi/shared_impl/ppb_audio_shared.h index b6ee1ee..3e8826e 100644 --- a/ppapi/shared_impl/ppb_audio_shared.h +++ b/ppapi/shared_impl/ppb_audio_shared.h @@ -58,6 +58,9 @@ class PPAPI_SHARED_EXPORT PPB_Audio_Shared // Starts execution of the audio thread. void StartThread(); + // Stop execution of the audio thread. + void StopThread(); + // DelegateSimpleThread::Delegate implementation. Run on the audio thread. virtual void Run(); @@ -66,7 +69,7 @@ class PPAPI_SHARED_EXPORT PPB_Audio_Shared // Socket used to notify us when audio is ready to accept new samples. This // pointer is created in StreamCreated(). - scoped_ptr socket_; + scoped_ptr socket_; // Sample buffer in shared memory. This pointer is created in // StreamCreated(). The memory is only mapped when the audio thread is -- cgit v1.1