summaryrefslogtreecommitdiffstats
path: root/media/audio
diff options
context:
space:
mode:
authorhclam@chromium.org <hclam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-04-13 23:20:40 +0000
committerhclam@chromium.org <hclam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-04-13 23:20:40 +0000
commitc35fd3740098ce9caa0bf035c8e9133fbf4ffa21 (patch)
treed614b9951d22bff488d5fc2e58593c35700452ab /media/audio
parent7995896e6b4d4d9c2d294fa76df89c143ef445af (diff)
downloadchromium_src-c35fd3740098ce9caa0bf035c8e9133fbf4ffa21.zip
chromium_src-c35fd3740098ce9caa0bf035c8e9133fbf4ffa21.tar.gz
chromium_src-c35fd3740098ce9caa0bf035c8e9133fbf4ffa21.tar.bz2
Too many audio hangs Leopard
BUG=30242 TEST=Go to this page: http://weston.ruter.net/projects/test-cases/chrome-mp3-audio-crash/ Click play and it won't hang. Opening (not) too many audio streams in Leopard will cause a deadlock in AudioQueue, freezing the browser process. Unfortunately there isn't a way to detect that in the AudioQueue API. So this change limits the number of streams allowed. The limit for Leopard is set to 15 and other OSes are 50. Review URL: http://codereview.chromium.org/1559024 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@44419 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'media/audio')
-rw-r--r--media/audio/mac/audio_output_mac.cc1
1 files changed, 1 insertions, 0 deletions
diff --git a/media/audio/mac/audio_output_mac.cc b/media/audio/mac/audio_output_mac.cc
index 77c34df..f3cce4f 100644
--- a/media/audio/mac/audio_output_mac.cc
+++ b/media/audio/mac/audio_output_mac.cc
@@ -257,6 +257,7 @@ void PCMQueueOutAudioOutputStream::Start(AudioSourceCallback* callback) {
buffer_[ix]->mAudioDataByteSize = 0;
RenderCallback(this, NULL, buffer_[ix]);
}
+
// Queue the buffers to the audio driver, sounds starts now.
for (uint32 ix = 0; ix != kNumBuffers; ++ix) {
err = AudioQueueEnqueueBuffer(audio_queue_, buffer_[ix], 0, NULL);