[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: Why do we disable esd in libgnome?

On Tue, Feb 3, 2009 at 8:24 AM, Bastien Nocera <bnocera redhat com> wrote:
> On Mon, 2009-02-02 at 17:31 -0800, Dan Nicholson wrote:
> <snip>
>> That's exactly my point. Since ESD support has been removed in fedora,
>> anyone trying to do gnome_sound_connection_get() will just get -1 back
>> anyway. Furthermore, the gnome_sound_play() docs say that the sound
>> may or may not play. So, why not just make it play a file with
>> libcanberra? If it fails, oh well. You're in exactly the same
>> situation you're in now. It seems pretty easy to me:
>> void gnome_sound_play(const char *filename)
>> {
>>     ca_context_play(ca_gtk_context_get(), 0, CA_PROP_MEDIA_FILENAME,
>> filename, NULL);
>> #endif
>> }
> It's easy but broken because it's missing all the other properties that
> libcanberra can use and give to other applications. For example, we
> don't know whether it's a sound event (click/pop/whatever), or a help to
> pronunciation in a dictionary.

That's exactly the gnome_sound_play API: play this sound file, please.
You don't care about any other metadata. If they did care about more
metadata, they probably wouldn't have been using gnome_sound_play in
the first place.

>> I understand not wanting to write new apps to use gnome_sound_play
>> since it's deprecated. But it's existing API that can't be removed.
>> Why not have it work for apps that haven't been ported yet
> Because it's hardly more work to fix the applications themselves.
>>  (or can't
>> be ported)?
> Those were always in trouble.
>> > I'd rather spend time answering questions on how to make libcanberra
>> > work with your app rather than spending time doing a half-working
>> > work-around in libgnome.
>> Sure. I would not suggest that new apps use gnome_sound*.
> And I don't see how adding a broken work-around to gnome_sound_* would
> help us fix the applications properly.

I didn't say anything about fixing applications properly. I'm talking
about making an API that exists in the platform continue to work until
it can be removed. gnome_sound_play is a crappy API for getting sound
in an application, but it exists and is in use. Why not just make it
continue to work since it's so simple?


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]