Closed Bug 263040 Opened 16 years ago Closed 15 years ago

Sound does not play on Mac using nsSound


(Core Graveyard :: GFX: Mac, defect)

Not set


(Not tracked)



(Reporter: tony, Assigned: sfraser_bugs)


User-Agent:       Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.7) Gecko/20040803 Firefox/0.9.3
Build Identifier: Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.7) Gecko/20040803 Firefox/0.9.3

Trying to play sounds in Javascript, using the nsISound interface, I found I was
unable to play a sound from a file. In nsSound.cpp, in the body of
nsMovieSoundRequest::PlaySound(), the call to ::NewMovie results in a -2020
(movieToolboxUninitialized) error. This is because ::EnterMovies needs to be
called before QuickTime movie functions are available. The following change to
nsMoviePortOwner::EnsureMoviePort fixed the problem for me:

  if (!sMoviePort)
    Rect        gWorldBounds = {0, 0, 12, 12};
    (void)::NewGWorld(&sMoviePort, 8, &gWorldBounds, nil, nil, 0);
+   ::EnterMovies();

Reproducible: Always
Steps to Reproduce:
1. Get an nsIFileURL (e.g., url) with nsIFilePicker
2. Create an nsSound object (e.g., sound)
3. sound->Play(url);

Actual Results:  
No sound is played.

Expected Results:  
A sound should be played.
there's also an ExitMovies, it looks like you're only really supposed to call
EnterMovies once. the docs also clearly indicate that you're supposed to check
the return value from EnterMovies.
Assignee: jag → sfraser
Component: XP Toolkit/Widgets → GFX: Mac
QA Contact: jrgmorrison
At some point EnterMovies was called during browser init (in appshell or
something). That code seems to have been lost.
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:
This bug has been automatically resolved after a period of inactivity (see above
comment). If anyone thinks this is incorrect, they should feel free to reopen it.
Closed: 15 years ago
Resolution: --- → EXPIRED
Resolution: EXPIRED → ---

*** This bug has been marked as a duplicate of 194632 ***
Closed: 15 years ago15 years ago
Resolution: --- → DUPLICATE
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.