diff options
author | raymes@chromium.org <raymes@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-05-15 21:32:25 +0000 |
---|---|---|
committer | raymes@chromium.org <raymes@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-05-15 21:32:25 +0000 |
commit | 0e8d17b102f7aa99639fae7c95a2119126c753fd (patch) | |
tree | 5920c5083afe027351c00189ac067c668e050145 /ppapi/shared_impl/ppb_audio_shared.h | |
parent | 59ba0417421dd13cdcd87f029df5b98776bd6808 (diff) | |
download | chromium_src-0e8d17b102f7aa99639fae7c95a2119126c753fd.zip chromium_src-0e8d17b102f7aa99639fae7c95a2119126c753fd.tar.gz chromium_src-0e8d17b102f7aa99639fae7c95a2119126c753fd.tar.bz2 |
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
Diffstat (limited to 'ppapi/shared_impl/ppb_audio_shared.h')
-rw-r--r-- | ppapi/shared_impl/ppb_audio_shared.h | 5 |
1 files changed, 4 insertions, 1 deletions
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<base::SyncSocket> socket_; + scoped_ptr<base::CancelableSyncSocket> socket_; // Sample buffer in shared memory. This pointer is created in // StreamCreated(). The memory is only mapped when the audio thread is |