Closed
Bug 683188
Opened 10 years ago
Closed 10 years ago
nsISound should be used in Win32 widget code, not PlaySound directly
Categories
(Core :: Widget: Win32, defect)
Tracking
()
RESOLVED
FIXED
mozilla9
People
(Reporter: bbondy, Assigned: bbondy)
Details
Attachments
(1 file)
1.69 KB,
patch
|
jimm
:
review+
|
Details | Diff | Splinter Review |
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.
Assignee | ||
Comment 1•10 years ago
|
||
Regarding the problem mentioned with Win32's ASYNC flag, please see Bug 498079
Assignee | ||
Updated•10 years ago
|
Summary: PlaySound should not be used directly in Win32 widget code, nsISound should be used instead → nsISound should be used in Win32 widget code, not PlaySound directly
Assignee | ||
Comment 2•10 years ago
|
||
Attachment #557078 -
Flags: review?(jmathies)
![]() |
||
Comment 3•10 years ago
|
||
Comment on attachment 557078 [details] [diff] [review] Patch for calling nsISound We should probably cache sound so we only have to create it once.
Attachment #557078 -
Flags: review?(jmathies) → review+
Assignee | ||
Comment 4•10 years ago
|
||
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?
Assignee | ||
Comment 5•10 years ago
|
||
Pushed to try: https://tbpl.mozilla.org/?tree=Try&usebuildbot=1&rev=38dc50c1c180
Assignee | ||
Comment 7•10 years ago
|
||
Pushed to mozilla-inbound: http://hg.mozilla.org/integration/mozilla-inbound/rev/9401940db9d2
Comment 8•10 years ago
|
||
http://hg.mozilla.org/mozilla-central/rev/9401940db9d2
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla9
You need to log in
before you can comment on or make changes to this bug.
Description
•