We are currently calling PlaySound directly in widget/src/wimndows/nsWindow.cpp here: http://mxr.mozilla.org/mozilla-central/source/widget/src/windows/nsWindow.cpp#6140 The problem with this is that Win32's ASYNC flag isn't exactly async. This may slow down or seem to temporarily hang some computers that minimize. Instead we should be using nsISound which has support for this via threading.
Regarding the problem mentioned with Win32's ASYNC flag, please see Bug 498079
Created attachment 557078 [details] [diff] [review] Patch for calling nsISound
Comment on attachment 557078 [details] [diff] [review] Patch for calling nsISound We should probably cache sound so we only have to create it once.
We are currently doing that everywhere we play sound. Bug 683184 will address this by making it a service. So is it OK as is until Bug 683184?
Jim mentioned that Comment 4 sounded good by the way on irc.
Pushed to mozilla-inbound: http://hg.mozilla.org/integration/mozilla-inbound/rev/9401940db9d2