Closed Bug 635918 Opened 13 years ago Closed 12 years ago

Does not play user defined sound for incoming mail.

Categories

(Core :: Widget: Gtk, defect)

x86
Linux
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla12

People

(Reporter: wd5jhi, Assigned: chrisccoulson)

References

(Depends on 1 open bug)

Details

Attachments

(4 files, 6 obsolete files)

3.00 KB, patch
kinetik
: review+
Details | Diff | Splinter Review
18.51 KB, patch
karlt
: feedback+
Details | Diff | Splinter Review
3.48 KB, text/plain
Details
2.32 KB, text/plain
Details
User-Agent:       Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.13) Gecko/20101206 Ubuntu/10.10 (maverick) Firefox/3.6.13
Build Identifier: 3.1.7

In Thunderbird Preferences - General Page:
Under "When new message arrive:"
I have selected:
Show an alert
Play a sound - Use the following sound file.

The file I have selected is: Thunderbird/Postal.wav

The file plays from my file browser and in Thunderbird on Ubuntu 10.04.

Does not play in current Thunderbird under Ubuntu 10.10.

Reproducible: Always

Steps to Reproduce:
1. In Thunderbird Preferences - General Page:

2. Under "When new message arrive:"
I have selected:
Show an alert
Play a sound - Use the following sound file.

3. The file I have selected is: Thunderbird/Postal.wav

4. The file does not play when I press the <Play> button.  Also does not play when mail arrives.
Actual Results:  
No sound when mail arrives.

Expected Results:  
To play my sound file when mail arrives.

System default sound does not play either.
How is your sound configured (ie do you use Alsa or something else ) ?
Alsa
System is a System 76 Bonobo Desktop Replacement (Laptop).
Hum I'm asking because you aren't the first one where sound doesn't work on linux, but we haven't been able to figure out why. so more investigation is needed. unfortunately I'm  a bit clueless on how sound is architectured on linux these days and I can't really help on how to investigate.
Hi, just figured out a fix in my case.  System 76 offers their own drivers for their systems.  I just went to their website: http://knowledge76.com/index.php/MaverickUpgrade and downloaded the drivers.  E-mail sound now works after a reboot.

You might check with them and see what they do to fix this.  It might give insight to other systems not from this company.
Status: UNCONFIRMED → RESOLVED
Closed: 13 years ago
Resolution: --- → INVALID
System 76 main page: http://www.system76.com/

Their phone number is at the top of the page.
Status: RESOLVED → UNCONFIRMED
Resolution: INVALID → ---
(In reply to comment #6)
> System 76 main page: http://www.system76.com/
> 
> Their phone number is at the top of the page.

so it's not a Thunderbird issue.
Status: UNCONFIRMED → RESOLVED
Closed: 13 years ago13 years ago
Resolution: --- → INVALID
Thunderbird is the only software that exhibited this issue before adding the other drivers.  I had sound with Youtube via Firefox and sound worked on Movie Player as well as PiTiVi Video Editor, plus other software.

There does seem to be a Thunderbird issue there.  It's just fixed on my laptop when I apply the drivers from System 76.

If there are other, more pressing, issues you might put this one further down on your list.

Thanks!
I took a brief look at this. Basically, normal system sounds are played via libcanberra, which is installed by default on most Linux distro's. However, custom event sounds with .wav files are played via esound, and require you to install libesd in order to work. esound has been deprecated for a long time though, and it's not installed by default on most distro's.

I'll try and think of a different way to do this which doesn't require esound :/
Status: RESOLVED → REOPENED
Ever confirmed: true
Resolution: INVALID → ---
Assignee: nobody → chrisccoulson
Status: REOPENED → ASSIGNED
Assignee: chrisccoulson → nobody
Component: General → Widget: Gtk
Product: Thunderbird → Core
QA Contact: general → gtk
Moved to Core::Widget: Gtk, as the issue is with the gtk nsISound implementation
Sounds like you found the root issue.  Thanks for working it.
Assignee: nobody → chrisccoulson
Would anyone object if I removed the esound code? Does anybody still use that?
This patch adds support for using Pulseaudio in nsISound.play() with gtk. I initially wrote this to use libcanberra (ca_context_play with CA_PROP_MEDIA_FILENAME). However, this only works for local file paths and I realized that nsISound.play takes a URI, so I ended up just feeding the stream directly to Pulseaudio instead.
Attachment #550239 - Flags: review?(karlt)
Comment on attachment 550239 [details] [diff] [review]
Add pulseaudio support for GTK nsISound.play impl

The general approach looks good to me.
Matthew, can you check the pulseaudio usage, please?
Attachment #550239 - Flags: review?(kinetik)
Attachment #550239 - Flags: review?(karlt)
Attachment #550239 - Flags: review+
Comment on attachment 550239 [details] [diff] [review]
Add pulseaudio support for GTK nsISound.play impl

Review of attachment 550239 [details] [diff] [review]:
-----------------------------------------------------------------

::: widget/src/gtk2/nsSound.cpp
@@ +129,5 @@
> +typedef struct pa_sample_spec {
> +    pa_sample_format_t format;
> +    uint32_t rate;
> +    uint8_t channels;
> +} pa_sample_spec;

This is okay for now, but I'd prefer to include the headers.  Please file a follow up bug to deal with this when bug 662417 is fixed.

@@ +417,5 @@
> +        pa_simple* s = pa_simple_new(NULL, name.get(), PA_STREAM_PLAYBACK, NULL, "mozillaSound", &ss, NULL, NULL, NULL);
> +        if (!s)
> +            return NS_ERROR_OUT_OF_MEMORY;
> +
> +        pa_simple_write(s, audio, audio_len, NULL);

You need to call pa_simple_drain here, otherwise playback may end prematurely when |s| is freed.
(In reply to comment #15)
> Comment on attachment 550239 [details] [diff] [review] [diff] [details] [review]
> Add pulseaudio support for GTK nsISound.play impl
> 
> Review of attachment 550239 [details] [diff] [review] [diff] [details] [review]:
> -----------------------------------------------------------------
> 
> ::: widget/src/gtk2/nsSound.cpp
> @@ +129,5 @@
> > +typedef struct pa_sample_spec {
> > +    pa_sample_format_t format;
> > +    uint32_t rate;
> > +    uint8_t channels;
> > +} pa_sample_spec;
> 
> This is okay for now, but I'd prefer to include the headers.  Please file a
> follow up bug to deal with this when bug 662417 is fixed.
> 

Sure, will do. Will that mean that we can also make it a run-time dependency? (ie, can we eventually get rid of the dlopen/dlsym hackery?)

> @@ +417,5 @@
> > +        pa_simple* s = pa_simple_new(NULL, name.get(), PA_STREAM_PLAYBACK, NULL, "mozillaSound", &ss, NULL, NULL, NULL);
> > +        if (!s)
> > +            return NS_ERROR_OUT_OF_MEMORY;
> > +
> > +        pa_simple_write(s, audio, audio_len, NULL);
> 
> You need to call pa_simple_drain here, otherwise playback may end
> prematurely when |s| is freed.

Good catch, thanks! I'll fix this now
Hmmm, I just realized that the pa_simple_* API is a blocking API, which is not ideal from the main thread (and it does block for the duration of the audio sample). I shall rework this to use the async pa_stream_* API directly instead, and handle the callbacks ourselves.
I agree that esound usage should be phased out as it's already deprecated for some time.
What I don't agree with is replacing it with pulseaudio at this point in time. Still there are Linux systems which do not default to PA. (We have examples that we still rely on gnome-vfs instead of gio for some stuff while gio is working in Linux dists since years; PA is not)

Even more on PA systems the current way still works fine by using pulseaudio-esound-compat AFAICS.
We discussed this on IRC a bit.  I suggested looking at using libcanberra for this, as it provides a simple API with an async completion callback.  It's not ideal as it requires writing the sound to a tmpfile because libcanberra's API requires either a predefined event (which we're already using for canned sounds) or a path to a file.  The advantage of this approach is that libcanberra supports multiple sound backends, relieving us of dealing with that.

If that approach doesn't work or doesn't make sense, then we're going to need at least an ALSA implementation (which can then work with OSS, ALSA, and PulseAudio via ALSA plugins).  Depending on how much code and complexity is required to implement this, it may make sense to wait for my work in bug 623444 to land.  That bug will provide a simple API for non-blocking sound playback and completion.
Comment on attachment 550239 [details] [diff] [review]
Add pulseaudio support for GTK nsISound.play impl

Clearing review request pending an updated patch.

I'm also marking this patch obsolete to avoid confusion since it has r+ but was later determined to be unsuitable for landing (see comment 17).
Attachment #550239 - Attachment is obsolete: true
Attachment #550239 - Flags: review?(kinetik)
Yeah, I started on a libcanberra implementation. Hopefully I'll have something working by the end of the week
Sorry, I got sidetracked on other things and then went on vacation.

Here is an implementation using only libcanberra, and dropping esound entirely
Attachment #566854 - Flags: review?
Attachment #566854 - Flags: review? → review?(kinetik)
This is an additional change to set some extra properties on the canberra context, which are highly recommended in the documentation
Attachment #566855 - Flags: review?(kinetik)
Vincent when this lands can you go to all the linux not playing sound bugs and ask if this fixes things for people ?
Attachment #566855 - Flags: review?(kinetik) → review+
Comment on attachment 566854 [details] [diff] [review]
Bug 635918 Part 1 - Make nsISound::Play use libcanberra on Linux rather than esound

Review of attachment 566854 [details] [diff] [review]:
-----------------------------------------------------------------

This looks great, thank you.  Removing esd makes me very happy.

I'm adding karlt to feedback? to get a second set of eyes on this.

::: widget/src/gtk2/nsSound.cpp
@@ +65,1 @@
>  #define WAV_MIN_LENGTH 44

This can be removed now.

@@ +114,5 @@
>  
> +typedef struct {
> +    PRFileDesc *mFD;
> +    nsCString mPath;
> +} CanberraPlayCBData;

No need for a typedef, this is C++.  More comments on CanberyyaPlayCBData below.

@@ +167,5 @@
> +             uint32_t id,
> +             int error_code,
> +             void *userdata)
> +{
> +    CanberraPlayCBData *data = (CanberraPlayCBData *) userdata;

reinterpret_cast please.

@@ +203,1 @@
>      if (!libasound) {

All of the libasound stuff can be removed.  Its only purpose was to install a silent error handler on behalf of esound, which is no longer necessary.

@@ +251,5 @@
>                                          nsresult aStatus,
>                                          PRUint32 dataLen,
>                                          const PRUint8 *data)
>  {
> +    nsresult rv;

Declare this where it's first used.

@@ +334,4 @@
>  
> +    CanberraPlayCBData *cbdata = new CanberraPlayCBData();
> +    cbdata->mFD = fd;
> +    cbdata->mPath = path;

Add a constructor, this could then be:
  CanberraPlayCBData *cbdata = new CanberraPlayCBData(fd, path);

It might be better to wrap all of this in an nsAutoRef so that you don't need to remember to PR_Delete/PR_Close in every error path.

@@ +375,5 @@
> +
> +        ca_context_play(ctx, 0, "media.filename", path.get(), NULL);
> +    } else {
> +        nsCOMPtr<nsIStreamLoader> loader;
> +        rv = NS_NewStreamLoader(getter_AddRefs(loader), aURL, this);

rv isn't checked.
Attachment #566854 - Flags: feedback?(karlt)
Attachment #570562 - Flags: review?(kinetik)
Attachment #570562 - Flags: feedback?(karlt)
Here is part 2 un-bitrotted
Attachment #566855 - Attachment is obsolete: true
Attachment #570563 - Flags: review?(kinetik)
Attachment #566854 - Attachment is obsolete: true
Attachment #566854 - Flags: review?(kinetik)
Attachment #566854 - Flags: feedback?(karlt)
Attachment #570563 - Flags: review?(kinetik) → review+
Comment on attachment 570562 [details] [diff] [review]
Bug 635918 Part 1 - Make nsISound::Play use libcanberra on Linux rather than esound (v2)

Review of attachment 570562 [details] [diff] [review]:
-----------------------------------------------------------------

Thanks, looks good.  I do think an nsAutoPtr should be used for the callback data, comments below.

::: widget/src/gtk2/nsSound.cpp
@@ +152,5 @@
> +    if (!data) {
> +        return;
> +    }
> +    PR_Close(data->mFD);
> +    PR_Delete(data->mPath.get());

These two lines can also be removed, since the destructor will take care of this when delete is called.

@@ +269,2 @@
>      }
>  

Allocate the CanberraPlayCBData here, like so:
  nsAutoPtr<CanberraPlayCBData> cbdata(new CanberraPlayCBData(fd, path));

@@ +273,5 @@
> +    while (length > 0) {
> +        PRInt32 amount = PR_Write(fd, data, length);
> +        if (amount < 0) {
> +            PR_Close(fd);
> +            PR_Delete(path.get());

Move the close and delete into a destructor for CanberraPlayCBData, then remove the code from here and the  two error paths below.

@@ +300,3 @@
>  
> +    ca_proplist_sets(p, "media.filename", path.get());
> +    ca_context_play_full(ctx, 0, p, ca_finish_cb, cbdata);

Pass cbdata here using |cbdata.forget()|.
Comment on attachment 570562 [details] [diff] [review]
Bug 635918 Part 1 - Make nsISound::Play use libcanberra on Linux rather than esound (v2)

Moving away from esound is looking very good, thanks.

My main comment is that the file descriptor can be closed before
calling ca_context_play_full(), and before ca_context_get_default() even.  (I guess NSPR I/O is synchronous and unbuffered, so this may not be essential, but there is no need to keep the descriptor open.)

AutoFDClose exists for PRFileDesc, if that is useful.
http://hg.mozilla.org/mozilla-central/annotate/392fa68084a8/xpcom/glue/FileUtils.h#l55

I wondered about using nsI(Local)File::Remove() instead of PR_Delete() to get
rid of some NSPR usage and clear up the filename encoding expectations that
I'm not sure about.  However, I assume the nsIFile can't be simply ref-counted
on another thread and so that would all get complicated.

> /* used to find and play common system event sounds.
>    this interfaces with libcanberra.
>  */
> typedef struct _ca_context ca_context;
>+typedef struct _ca_proplist ca_proplist;

I guess this comment could be updated, as this is not just system sounds now.

>+    ca_context_play_full(ctx, 0, p, ca_finish_cb, cbdata);

I assume the return code should be checked to avoid leaking when it fails.

>-    if (!elib) 
>-	    return NS_ERROR_NOT_AVAILABLE;
>+    if (!libcanberra)
>+        return NS_OK;

Wouldn't NS_ERROR_NOT_AVAILABLE be more suitable here?
Attachment #570562 - Flags: feedback?(karlt) → feedback+
(In reply to Karl Tomlinson (:karlt) from comment #30)

Hi, thanks for the review.

> Comment on attachment 570562 [details] [diff] [review] [diff] [details] [review]
> Bug 635918 Part 1 - Make nsISound::Play use libcanberra on Linux rather than
> esound (v2)
> 
> Moving away from esound is looking very good, thanks.
> 
> My main comment is that the file descriptor can be closed before
> calling ca_context_play_full(), and before ca_context_get_default() even. 
> (I guess NSPR I/O is synchronous and unbuffered, so this may not be
> essential, but there is no need to keep the descriptor open.)
> 
> AutoFDClose exists for PRFileDesc, if that is useful.
> http://hg.mozilla.org/mozilla-central/annotate/392fa68084a8/xpcom/glue/
> FileUtils.h#l55
> 

Ah, I wasn't aware of AutoFDClose. I've started using it now, so that the descriptor is just closed when OnStreamComplete is done (although, this still ends up being after ca_context_play_full, but it is before the canberra callback runs and does tidy up the various error paths)

> I wondered about using nsI(Local)File::Remove() instead of PR_Delete() to get
> rid of some NSPR usage and clear up the filename encoding expectations that
> I'm not sure about.  However, I assume the nsIFile can't be simply
> ref-counted
> on another thread and so that would all get complicated.
> 

I've updated it to use nsILocalFile::Remove. I also just pass the nsILocalFile raw pointer as the callback data for ca_context_play_full now, and renamed CanberraPlayCBData to something more appropriate now (ScopedCanberraFile), as it only exists now to automatically remove the file when it goes out of scope.

> > /* used to find and play common system event sounds.
> >    this interfaces with libcanberra.
> >  */
> > typedef struct _ca_context ca_context;
> >+typedef struct _ca_proplist ca_proplist;
> 
> I guess this comment could be updated, as this is not just system sounds now.
> 
> >+    ca_context_play_full(ctx, 0, p, ca_finish_cb, cbdata);
> 
> I assume the return code should be checked to avoid leaking when it fails.
> 

Ok, I've fixed that too

> >-    if (!elib) 
> >-	    return NS_ERROR_NOT_AVAILABLE;
> >+    if (!libcanberra)
> >+        return NS_OK;
> 
> Wouldn't NS_ERROR_NOT_AVAILABLE be more suitable here?

Yeah, makes sense. Fixed as well
Attachment #570562 - Attachment is obsolete: true
Attachment #570562 - Flags: review?(kinetik)
Attachment #575899 - Flags: review?(kinetik)
Attachment #575899 - Flags: feedback?(karlt)
Attachment #575900 - Flags: review?(kinetik) → review+
Attachment #575899 - Flags: review?(kinetik) → review+
Comment on attachment 575899 [details] [diff] [review]
Bug 635918 Part 1 - Make nsISound::Play use libcanberra on Linux rather than esound (v3)

I didn't know the nsLocalFile implementation was thread safe, but yay it is:
http://mxr.mozilla.org/mozilla-central/source/xpcom/io/nsLocalFileUnix.cpp#287

>+    nsILocalFile* forget() {
>+        nsILocalFile *tmp;
>+        mFile.forget(&tmp);
>+        return tmp;
>+    }

Usually we have already_AddRefed<T> return values for forget() methods in
scoped refcounting systems so this is a bit different if the result is ever
assigned to another similar auto-refcount object.  The return value is in fact
not used, so use "mFile.forget()" to simplify things and either return its
result directly or make the function return type void.

>+    operator void*() { return mFile; }

Making this "operator nsILocalFile*()" would be more explicit.
Attachment #575899 - Flags: feedback?(karlt) → feedback+
Thanks for the feedback (Sorry, I only just noticed that you left some comments).

Here is an updated version with the 2 previous suggestions implemented.
Attachment #575899 - Attachment is obsolete: true
Attachment #587271 - Flags: feedback?(karlt)
Comment on attachment 587271 [details] [diff] [review]
Bug 635918 Part 1 - Make nsISound::Play use libcanberra on Linux rather than esound (v4)

Thanks!
Attachment #587271 - Flags: feedback?(karlt) → feedback+
https://hg.mozilla.org/mozilla-central/rev/9a6371bdb362
https://hg.mozilla.org/mozilla-central/rev/912022fc0741
Status: ASSIGNED → RESOLVED
Closed: 13 years ago12 years ago
Resolution: --- → FIXED
This works for my last build of SM 2.9a1. On Gentoo esound is now masked, so i had it removed. And got an uncaught exception when trying to play a custom sound file in Preferences->Mail & Newsgroups->Notification. libcanberra is installed here.
(In reply to Hartmut Figge from comment #39)
> And got an uncaught exception when trying to play a custom
> sound file in Preferences->Mail & Newsgroups->Notification. libcanberra is
> installed here.

Please file a new bug for this with steps to reproduce (if known) and details of the error.  Thanks.
(In reply to Matthew Gregan [:kinetik] from comment #40)
> (In reply to Hartmut Figge from comment #39)

> > And got an uncaught exception when trying to play a custom
> > sound file in Preferences->Mail & Newsgroups->Notification. libcanberra is
> > installed here.
> 
> Please file a new bug for this with steps to reproduce (if known) and
> details of the error.  Thanks.

Hm? I wrote in Comment 39 that the fix of Bug 635918 worked for me, so there is now no way to reproduce it any more.

At least i had meant to write that. I just wanted to confirm that the fix worked for me.
The exception when trying to use a custom sound seems like a (new?) bug, did I misinterpret what you meant there?
(In reply to Matthew Gregan [:kinetik] from comment #42)

> The exception when trying to use a custom sound seems like a (new?) bug, did
> I misinterpret what you meant there?

http://groups.google.com/group/mozilla.support.seamonkey/browse_thread/thread/de944ab6c5f201fb/76bd9ce1e549fb04?#76bd9ce1e549fb04, especially https://bugzilla.mozilla.org/show_bug.cgi?id=717202#c3
(In reply to Ed Morley [:edmorley] from comment #38)
> https://hg.mozilla.org/mozilla-central/rev/9a6371bdb362
> https://hg.mozilla.org/mozilla-central/rev/912022fc0741

I'm using Fedora 16 x64 and since these patches landed, sound has stopped working and I now get the following message when starting up my trunk build:
Gtk-Message: Failed to load module "canberra-gtk-module"
I do have the x64 canberra libraries installed and have libcanberra.so.0 in /usr/lib64
rpm -q -a |grep canb
libcanberra-gtk2-0.28-3.fc16.x86_64
libcanberra-debuginfo-0.28-3.fc16.x86_64
libcanberra-devel-0.28-3.fc16.x86_64
libcanberra-gtk3-0.28-3.fc16.x86_64
libcanberra-0.28-3.fc16.x86_64

ls -al libcanberra*.so*
lrwxrwxrwx. 1 root root    25 Dec 17 12:44 libcanberra-gtk3.so -> libcanberra-gtk3.so.0.1.8
lrwxrwxrwx. 1 root root    25 Dec 17 12:38 libcanberra-gtk3.so.0 -> libcanberra-gtk3.so.0.1.8
-rwxr-xr-x. 1 root root 22888 Jul 13  2011 libcanberra-gtk3.so.0.1.8
lrwxrwxrwx. 1 root root    24 Dec 17 12:44 libcanberra-gtk.so -> libcanberra-gtk.so.0.1.8
lrwxrwxrwx. 1 root root    24 Dec 17 12:39 libcanberra-gtk.so.0 -> libcanberra-gtk.so.0.1.8
-rwxr-xr-x. 1 root root 22864 Jul 13  2011 libcanberra-gtk.so.0.1.8
lrwxrwxrwx. 1 root root    20 Dec 17 12:44 libcanberra.so -> libcanberra.so.0.2.5
lrwxrwxrwx. 1 root root    20 Dec 17 12:37 libcanberra.so.0 -> libcanberra.so.0.2.5
-rwxr-xr-x. 1 root root 71680 Jul 13  2011 libcanberra.so.0.2.5
Which sounds don't work? And in Thunderbird or Firefox? The error you're getting actually comes from GTK when it loads the required GTK modules at initialization (as specified on the xsettings manager window), long before we do anything else with sound.
(In reply to Chris Coulson from comment #45)
> Which sounds don't work? And in Thunderbird or Firefox? The error you're
> getting actually comes from GTK when it loads the required GTK modules at
> initialization (as specified on the xsettings manager window), long before
> we do anything else with sound.

On both Thunderbird and SeaMonkey I get the Gtk-Message, but not on Firefox.
As far as I can tell:
Firefox works for both .play and .playEventSound
Thunderbird and SeaMonkey silently fail for .playEventSound and give for .play the following message in the error console:
Timestamp: 15/01/12 21:08:23
Error: uncaught exception: [Exception... "Component returned failure code: 0x80040111 (NS_ERROR_NOT_AVAILABLE) [nsISound.play]"  nsresult: "0x80040111 (NS_ERROR_NOT_AVAILABLE)"  location: "JS frame :: javascript:%20Components.classes["@mozilla.org/sound;1"].createInstance(Components.interfaces.nsISound).play(Components.classes["@mozilla.org/network/io-service;1"].getService(Components.interfaces.nsIIOService2).newURI("file:///usr/share/sounds/pop.wav",null,null)) :: <TOP_LEVEL> :: line 1"  data: no]

So it seems that comm-central based projects are maybe not initialising something that Firefox is...

I've built SeaMonkey, Thunderbird and SeaMonkey from the same source tree.
nsISound.play() will throw that error if libcanberra can't be loaded. Not being able to load libcanberra is also what causes the 'Gtk-Message: Failed to load module "canberra-gtk-module"' error from GTK when it initializes.

Are you sure you're not doing something like running a 32-bit build on 64-bit arch. Perhaps try running it in strace to see what is going on?
Attached file strace output from TB
This is from running:
thunderbird 2>&1 |grep libcanberra
This is from running:
firefox 2>&1 |grep libcanberra
I'm not sure what is happening in your case, but it's working for me in both Thunderbird and Firefox. Could you please try with a x86_64 build from ftp://ftp.mozilla.org/pub/thunderbird/nightly/latest-comm-central/ instead of your own build?
(In reply to Chris Coulson from comment #50)
> I'm not sure what is happening in your case, but it's working for me in both
> Thunderbird and Firefox. Could you please try with a x86_64 build from
> ftp://ftp.mozilla.org/pub/thunderbird/nightly/latest-comm-central/ instead
> of your own build?

Get exactly the same error from using ftp://ftp.mozilla.org/pub/thunderbird/nightly/latest-comm-central/thunderbird-12.0a1.en-US.linux-x86_64.tar.bz2

Perhaps it is some sort of distro issue then, I have a Fedora 14 x86_64 system which I have tried it against and that doesn't give any error.
The Fedora 14 system has libcanberra-0.25-4 installed vs on Fedora 16 libcanberra-0.28-3
I wonder if you're hitting a variant of bug 717906.
(In reply to Matthew Gregan [:kinetik] from comment #52)
> I wonder if you're hitting a variant of bug 717906.

A possibility, I will try applying the patch and see what happens.
(In reply to Ian Neal from comment #53)
> (In reply to Matthew Gregan [:kinetik] from comment #52)
> > I wonder if you're hitting a variant of bug 717906.
> 
> A possibility, I will try applying the patch and see what happens.

Yes, applying those patches did fix sound for me, sorry for the noise on this bug.
Hello...lowly Ubuntu 11.10/Thunderbird 11.0.1 User here...who wants to hear his "<gong> mail's in" Addams Family clip whenever Thunderbird receives email.

It says this issue is fixed (at the top of this thread) but I don't see how or where to get/apply this fix.  Am I missing something?
It's fixed for Thunderbird 12 (which is planned to be released sometime next week) as can be seen in "Target milestone".
Oh, yeah..,right...the layman is going to know what "mozilla12" means.
(In reply to Ludovic Hirlimann [:Usul] (away until may 7th) from comment #25)
> Vincent when this lands can you go to all the linux not playing sound bugs
> and ask if this fixes things for people ?

Sound still doesn't work for me after this bug is fixed. See bug 749739 comment 3.
Depends on: 749739
Patrick Jutbauge added the following comment to Launchpad bug report 732572:

Hi Dan,

I had the same problem but got it sorted by doing this: install esound in synaptic then move your sound file you want Thunderbird to play in to your home folder (not in any folder just direct in to home folder) then start Thunderbird and go to preferences and browse for your sound file in your home folder.
That worked for me.

Hope that was helpful for you 

Cheers Patrick

-- 
http://launchpad.net/bugs/732572
Geoff added the following comment to Launchpad bug report 732572:

I also found that the issue appears to be when the .wav is not in the users home folder.  Perhaps a permissions thing ?
I copied the sound file to my home folder and it now plays correctly in TB.

-- 
http://launchpad.net/bugs/732572
This is definitely not fixed for me (SeaMonkey-2.10.1, Gentoo Build). My box uses KDE/Phonon over ALSA; I don't use, and neither want to try, any other sound daemon; workaround from Comment #61 doesn't solve the issue. 

Since ALSA is the de facto standard for sound in Linux, and *any* other sound daemon relies on it, I suggest to interface directly to ALSA. Using higher level interfaces such as esound or pulseaudio (or, as far as I'm concerned, Phonon), is IMHO overkill and adds useless dependencies to Mozilla applications.
Depends on: 843288
Running Thunderbird 38.4.0 / Ubuntu Linux 14.04.3

Custom mail notifier sound doesn't work here either ; I have all the dependencies mentioned installed (libcanberra, libesd).

The standard sound plays.
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: