GNOME Bugzilla – Bug 368304
sound effect api
Last modified: 2008-07-14 23:09:43 UTC
Couldn't find an existing bug... Would be really nice to have a simple API for adding sound effects. There are many scenarios where having an audio cue can be useful rather and just annoying. If any of the following occur and you aren't looking at the screen then you may benefit from an audio cue: * battery power is critical * a long running process has just completed (dvd burn etc) * a new IM or email * a phone call * input is required to continue some task There are various solutions for this outside of GTK+ but they seem to fail in at least the following ways: * Don't have standard sounds * Don't use the system sounds where applicable (Windows, OS X, etc.) * API requires specifying a filename rather than a sound type/name Some other APIs: * http://developer.apple.com/technotes/tn2002/tn2102.html * http://gaim.sourceforge.net/api/sound_8h.html
There's 2 parts to this. One is application-triggered sounds (such as new mail, DVD burning finished, low on battery), the other is widget set sounds (pressing a button makes that sound, selecting a menu item makes that sound). The latter (probably) needs to be overridable by the former (although I can find any decent examples that wouldn't make me cringe). GTK+ would need widget specific details to implement the widget set sounds. See initialize_gtk_signal_relay() and initialize_gnome_signal_relay(), and the incredible hacks to know whether a menu item deserves a sound. A list of stock sounds in MacOS X: http://homepage.mac.com/mnishikata/objective-c_memo/play_system_sound_systemsou.html
I wonder if we may consider this bug closed now that we have libcanberra.
Yep, sounds fine by me.