Closed Bug 110385 Opened 23 years ago Closed 10 years ago

Sound is not asynchronous on linux

Categories

(Core :: Widget: Gtk, defect)

x86
Linux
defect
Not set
major

Tracking

()

RESOLVED WORKSFORME
mozilla1.9.3a1

People

(Reporter: akkzilla, Assigned: masayuki)

References

Details

(Keywords: access)

Attachments

(1 file, 1 obsolete file)

If you do anything involving sound beyond the system beep (e.g. set sounds for
new mail notification or for chatzilla msgs), the UI locks up for several
seconds before it plays the sound.

This is mentioned in bug 94522 and bug 104174, but there doesn't seem to be a
bug that covers the issue, so I'm filing it.  There's discussion of some
possible implementations in bug 104174.
Marking helpwanted -- I know this isn't a high priority, I just wanted a bug
tracking the issue in case anyone decided to work on it.  Hyatt's not the right
owner for this, but I don't know who is (nobody?)
Keywords: helpwanted
Status: NEW → ASSIGNED
Target Milestone: --- → mozilla1.1
--> default owner
Assignee: hyatt → jaggernaut
Status: ASSIGNED → NEW
Target Milestone: mozilla1.1alpha → ---
Blocks: 176602
Anyone want to be the hero and fix this so we can use sound on Linux/UNIX?
Blocks: atfmeta
cc simford
Assignee: jag → hhoetzel
just wanted to report that this bug is still active in Mozilla1.7b on
Linux/Mandrake9.1 with oss sounddrivers.

but what happens on my system differs a little bit from the above discribed: the
UI (and all other Mozilla releated windows/applications) locks up from the
moment on a wav-file is played till one second before it stops playing. so if
you play a 1-minute sound Mozilla almost is locked up for this minute!
Blocks: aix-access
(In reply to comment #5)

I'm seeing something very similar to what geraldo describes, but with 1.8a2 on
Windows ME, and it has started sometime since early June 2004.  Not sure if
Mozilla is at fault, as other wav files are affected too.  I have Googled for
this problem on the net and have found nothing, so I'm leaving a note here in
case anyone else has seen this on Windows.
Implementing this should be easy enough if you just take a look at our nsISound
impl for Mac.
*** Bug 337702 has been marked as a duplicate of this bug. ***
Assignee: hhoetzel → jag
QA Contact: jrgmorrison → xptoolkit.widgets
Maybe this should be marked as a duplicate of bug 250186 which has a patch.

(bug 250186 should also move to Core/Widget as this is not mailnews specific)
By the way, if I understand correctly, PR_LoadLibrary("libesd.so.0")...
is a kind of method to avoid linking to GPL things explicitly. The
copyright terms of the original nsSound are "(C) 2000", and Esound's
license is shifted from GPL to GPL/LGPL dual on 2003/09/03.

i.e. I can have mozilla include "esd.h" and link to "libesd.so", right?

Anyway, I don't like to call the sound's shutdown() on GTK's shutdown,
now that they are on different threads.
Blocks: 210209
Whats the status of this patch? Does this also work for alsa-based systems?
Assignee: jag → nobody
Keywords: access
Whiteboard: [has draft patch]
Oops, please wait a moment.

Before discussing my obsolete patch, probably we should
look into HTML5's audio implementation. We don't need
nsISound any more, or we can reuse the code.

At least we should adopt the same backend to make
the system requirement minimum.
I worked similar bug on Win32 at bug 498079. But perhaps, I should create an async nsISound methods caller class in XP level in the future...

And perhaps, the nsISound implementation shouldn't be created per each sound playing, so the wrapper service might fix many problems I think.
I filed bug 520417, it makes the sounds are played on another thread.
By the fix of bug 520417, the wav file playing is executed on another thread. However, canberra still plays the system event sound (e.g., popup a menu sound, open a dialog sound) on main thread. But we don't find any problems by this. If you have problems, please file a new bug and cc me. The canberra implementation was implemented in gecko 1.9.1, so, it's not a scope of this bug.
Assignee: nobody → masayuki
Status: NEW → RESOLVED
Closed: 15 years ago
Component: XUL → Widget: Gtk
Keywords: helpwanted
QA Contact: xptoolkit.widgets → gtk
Resolution: --- → FIXED
Whiteboard: [has draft patch]
Target Milestone: --- → mozilla1.9.3a1
bug 520417 is backed out.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
(In reply to comment #20)
> However, canberra still plays the system event sound (e.g., popup a menu sound,
> open a dialog sound) on main thread.

It looks like canberra uses a separate thread:
"This function will start playback in the background. It will not wait until playback completed."
http://0pointer.de/lennart/projects/libcanberra/gtkdoc/libcanberra-canberra.html#ca-context-play
Blocks: 528880
this causes >"normal" severity issue in thunderbird, so setting severity to major.

sorry for the commentary
Severity: normal → major
Is this still an issue?
Flags: needinfo?(akkzilla)
Broomer68 added the following comment to Launchpad bug report 194573:

no, not anymore.


2013/8/19 Bugzilla-mozilla-org-rolf <194573@bugs.launchpad.net>

> Is this still an issue?
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/194573
>
> Title:
>   sound in thunderbird
>
> Status in Mozilla Thunderbird Mail and News:
>   Confirmed
> Status in “thunderbird” package in Ubuntu:
>   Triaged
>
> Bug description:
>   Binary package hint: thunderbird
>
>   bug could also be in alsa or pulse or something
>
>   Instead of the new mail sound, thunderbird just freezes, screen
> darkens,and several minutes later unfreezes.
>   This is with ubuntu 8.4 with all latest upgrades.
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/thunderbird/+bug/194573/+subscriptions
>


-- 
http://launchpad.net/bugs/194573
Status: REOPENED → RESOLVED
Closed: 15 years ago10 years ago
Resolution: --- → WORKSFORME
Flags: needinfo?(akkzilla)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: