Last Comment Bug 294056 - User-specified sound, when activated in Preferences, fails to play after file download completes
: User-specified sound, when activated in Preferences, fails to play after file...
: fixed1.8, regression
Product: SeaMonkey
Classification: Client Software
Component: Download & File Handling (show other bugs)
: unspecified
: x86 Windows 98
: -- normal with 1 vote (vote)
: seamonkey1.0beta
Assigned To: Chris Thomas (CTho) [formerly]
Depends on:
  Show dependency treegraph
Reported: 2005-05-13 10:05 PDT by Debbie Kraft
Modified: 2005-10-27 16:48 PDT (History)
2 users (show)
See Also:
Crash Signature:
QA Whiteboard:
Iteration: ---
Points: ---

patch (backs out fix from bug 277852) (1.37 KB, patch)
2005-10-21 15:46 PDT, Chris Thomas (CTho) [formerly]
no flags Details | Diff | Splinter Review
patch (4.41 KB, patch)
2005-10-21 17:03 PDT, Chris Thomas (CTho) [formerly]
cbiesinger: review+
neil: superreview+
Details | Diff | Splinter Review
patch v2 (4.46 KB, patch)
2005-10-22 17:26 PDT, Chris Thomas (CTho) [formerly]
cbiesinger: review+
csthomas: superreview+
asa: approval1.8rc1+
Details | Diff | Splinter Review

Description Debbie Kraft 2005-05-13 10:05:50 PDT
User-Agent:       Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.8b2) Gecko/20050510 Mnenhy/
Build Identifier: Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.8b2) Gecko/20050510 Mnenhy/

Under Preferences | Downloads | "When a download completes," a user can choose
"Play a sound" or "Show an alert," both checkbox options.  If the former is
chosen, a sound file (usually .wav) needs (?) to be specified.  (AFAIK, there is
no "default" sound for this option:  it must be user-specified if "Play a sound"
is chosen.)

This option last worked as expected, in conjunction with "Show an alert" or by
itself, as of 1.8a5.  Starting with the 1.8bx branch, the sound no longer plays.
 The "Show an alert" option does not appear to be affected.

This behavior occurs with a new or used profile.

Reproducible: Always

Steps to Reproduce:
1. Under Preferences | Downloads | "When a download completes," check the box
next to "Play a sound."  Browse to the location of the sound file you wish to
use and choose it.  Test the sound file by clicking the Preview button; sound
plays as expected

2. Download a file (any file) using the browser.

3. Sound should play upon completion of download.

Using Win 98 SE (up to date on all patches), Mostly Crystal Small theme (a
constant; also used with 1.8a5; theme does not appear to affect behavior),
Mnenhy 0.7.2.

Two Notations:

1) The sound notification for new mail remains unaffected.

2) The specified sound file for download completion is listed in the option box
with the syntax:  file:///[drive]/[folder]/[file].  This is the same syntax as
used with 1.8a6, and is also the same for the new mail sound notification (as
found via about:config).
Comment 1 Debbie Kraft 2005-05-13 10:14:56 PDT
(In reply to comment #0)

Addendum: I was in error.  With the 1.8bx branch, the mail.biff.play_sound.url
is listed as a string under about:config, but is blank in my 5/10/05 nightly. 
Only the pref has the sound file listed as a
string with the aforementioned syntax.
Comment 2 Gervase Markham [:gerv] 2005-09-27 01:59:18 PDT
This is an automated message, with ID "auto-resolve01".

This bug has had no comments for a long time. Statistically, we have found that
bug reports that have not been confirmed by a second user after three months are
highly unlikely to be the source of a fix to the code.

While your input is very important to us, our resources are limited and so we
are asking for your help in focussing our efforts. If you can still reproduce
this problem in the latest version of the product (see below for how to obtain a
copy) or, for feature requests, if it's not present in the latest version and
you still believe we should implement it, please visit the URL of this bug
(given at the top of this mail) and add a comment to that effect, giving more
reproduction information if you have it.

If it is not a problem any longer, you need take no action. If this bug is not
changed in any way in the next two weeks, it will be automatically resolved.
Thank you for your help in this matter.

The latest beta releases can be obtained from:
Comment 3 Debbie Kraft 2005-09-27 13:58:46 PDT
(In reply to comment #2)
Bug persists in SeaMonkey 1.0a, which was installed with a new profile on Win
98SE OS.
Comment 4 Steve Chapel 2005-09-27 19:29:47 PDT
Confirming with SeaMonkey 1.0 branch build 2005092310 on Windows XP SP2. The
Preview button to the right of the Browse button where you set the sound in the
Preferences also doesn't work.
Comment 5 Steve Chapel 2005-09-27 19:34:53 PDT
Sorry... the Preview button *does* work, but the sound still does not play after
the download is complete.
Comment 6 Benoît 2005-09-28 14:08:43 PDT
I'll give a helping hand. :)

Here's the regression window:
20050113 hours: 08 (build ID), 10 (directory listing)
20050114 hours: 09 (build ID), 10 (directory listing)
Comment 7 Chris Thomas (CTho) [formerly] 2005-10-21 15:46:10 PDT
Created attachment 200393 [details] [diff] [review]
patch (backs out fix from bug 277852)

Switch back to GetService.
Comment 8 Boris Zbarsky [:bz] (still a bit busy) 2005-10-21 15:54:22 PDT
Comment on attachment 200393 [details] [diff] [review]
patch (backs out fix from bug 277852)

File a followup to make this work right, please.
Comment 9 Chris Thomas (CTho) [formerly] 2005-10-21 15:54:37 PDT
Comment on attachment 200393 [details] [diff] [review]
patch (backs out fix from bug 277852)

I'm confused.
Comment 10 Chris Thomas (CTho) [formerly] 2005-10-21 17:03:42 PDT
Created attachment 200404 [details] [diff] [review]

The download manager lives longer than anything in the nsDownload, so the sound
gets to finish now.
Comment 11 Christian :Biesinger (don't email me, ping me on IRC) 2005-10-22 13:05:30 PDT
Comment on attachment 200404 [details] [diff] [review]

please add a newline before:

+  nsCOMPtr<nsISound> mSoundInterface;
Comment 12 2005-10-22 13:58:02 PDT
Comment on attachment 200404 [details] [diff] [review]

> nsDownloadManager::nsDownloadManager() : mBatches(0)
> {
>+  mSoundInterface = do_CreateInstance(";1");
> }
I'd prefer the use of the initializer list for initializers. Either way though
you might never use it...

>+#include "nsISound.h"
Presumably you don't need to include this in the .cpp any more?
Comment 13 Chris Thomas (CTho) [formerly] 2005-10-22 17:26:45 PDT
Created attachment 200477 [details] [diff] [review]
patch v2

carrying forward sr=neil
Comment 14 Chris Thomas (CTho) [formerly] 2005-10-23 11:20:03 PDT
Comment on attachment 200477 [details] [diff] [review]
patch v2

SeaMonkey-only patch.
Comment 15 Benoît 2005-10-27 16:48:39 PDT
Verified fixed in 2005102613.

Note You need to log in before you can comment on or make changes to this bug.