[gnome-screenshot] screenshot: cache the effect to the sound server



commit 41c07725d7229ae45ce38d660c70fd596f32b43f
Author: Cosimo Cecchi <cosimoc gnome org>
Date:   Thu Jan 26 15:55:19 2012 -0500

    screenshot: cache the effect to the sound server
    
    So that playback won't be truncated in the middle by the application
    quitting.

 src/screenshot-utils.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/src/screenshot-utils.c b/src/screenshot-utils.c
index 929354a..bfa3d08 100644
--- a/src/screenshot-utils.c
+++ b/src/screenshot-utils.c
@@ -294,6 +294,10 @@ screenshot_play_sound_effect (const gchar *event_id,
   if (res < 0)
     goto done;
 
+  res = ca_proplist_sets (p, CA_PROP_CANBERRA_CACHE_CONTROL, "permanent");
+  if (res < 0)
+    goto done;
+
   ca_context_play_full (c, 0, p, NULL, NULL);
 
  done:



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