mirror of
https://github.com/brl/mutter.git
synced 2024-12-24 12:02:04 +00:00
sound: ask libcanberra to cache alert/desktop switch sounds
These sounds are good candidates for caching in the sound server, to save a bit of CPU and make reaction faster. Hence, tell libcanberra to cache them. https://bugzilla.gnome.org/show_bug.cgi?id=609585
This commit is contained in:
parent
b610b2ecc7
commit
1253e6c64e
@ -297,6 +297,7 @@ meta_bell_notify (MetaDisplay *display,
|
|||||||
ca_proplist_create (&p);
|
ca_proplist_create (&p);
|
||||||
ca_proplist_sets (p, CA_PROP_EVENT_ID, "bell-window-system");
|
ca_proplist_sets (p, CA_PROP_EVENT_ID, "bell-window-system");
|
||||||
ca_proplist_sets (p, CA_PROP_EVENT_DESCRIPTION, _("Bell event"));
|
ca_proplist_sets (p, CA_PROP_EVENT_DESCRIPTION, _("Bell event"));
|
||||||
|
ca_proplist_sets (p, CA_PROP_CANBERRA_CACHE_CONTROL, "permanent");
|
||||||
|
|
||||||
window = meta_display_lookup_x_window (display, xkb_bell_event->window);
|
window = meta_display_lookup_x_window (display, xkb_bell_event->window);
|
||||||
if (!window && (display->focus_window) && (display->focus_window->frame))
|
if (!window && (display->focus_window) && (display->focus_window->frame))
|
||||||
|
@ -494,6 +494,7 @@ workspace_switch_sound(MetaWorkspace *from,
|
|||||||
ca_context_play(ca_gtk_context_get(), 1,
|
ca_context_play(ca_gtk_context_get(), 1,
|
||||||
CA_PROP_EVENT_ID, e,
|
CA_PROP_EVENT_ID, e,
|
||||||
CA_PROP_EVENT_DESCRIPTION, "Desktop switched",
|
CA_PROP_EVENT_DESCRIPTION, "Desktop switched",
|
||||||
|
CA_PROP_CANBERRA_CACHE_CONTROL, "permanent",
|
||||||
NULL);
|
NULL);
|
||||||
|
|
||||||
finish:
|
finish:
|
||||||
|
Loading…
Reference in New Issue
Block a user