Bug 76400 - Convolution has glitching in mac port on Lion
Summary: Convolution has glitching in mac port on Lion
Status: RESOLVED WORKSFORME
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Audio (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-01-16 12:26 PST by Chris Rogers
Modified: 2012-03-09 14:49 PST (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Rogers 2012-01-16 12:26:27 PST
Steps to reproduce:

1. Run WebKit nightly in Lion and visit:
http://chromium.googlecode.com/svn/trunk/samples/audio/convolution-effects.html

2. Try some of the different effects and listen for occasional glitches (may take a little while to hear)

This appears to be a regression which is happening on Lion, but *not* when I run on Snow Leopard.  So, maybe related to sand-boxing?

There are one or more worker threads created in ReverbConvolver.cpp:
http://svn.webkit.org/repository/webkit/trunk/Source/WebCore/platform/audio/ReverbConvolver.cpp

Currently the thread priority is not being boosted, and under normal conditions has worked fine for quite some time in mac port and chromium/mac.
Technically, it would probably be better to boost the priority to an intermediate higher priority (but not as high as the real-time audio thread).

Perhaps the sandboxing is harming the thread priorities - just a guess...  System trace in Shark (or whatever the latest profiling tool is) may be of help here as well
Comment 1 Alexey Proskuryakov 2012-01-17 10:32:40 PST
It would be a surprise to me if sandboxing had such an effect. 

I'm not sure if I can hear any glitches on my machine - there are always chirping sounds near the beginning of "spoken word", but it's stable, and sounds like a defect in recording.

It should be easy to confirm the theory though if you can reproduce - just build WebKit with WEB_PROCESS_SANDBOX disabled in Source/WebKit2/config.h
Comment 2 Chris Rogers 2012-02-19 00:58:58 PST
I can't reproduce on recent mac port builds on Lion.  It seems to be a transient problem, and I suggest we close the issue.