Index: src/cheese-window.c
===================================================================
--- src/cheese-window.c	(wersja 871)
+++ src/cheese-window.c	(kopia robocza)
@@ -35,6 +35,7 @@
 
 #include <gst/interfaces/xoverlay.h>
 #include <gtk/gtk.h>
+#include <canberra-gtk.h>
 #include <libebook/e-book.h>
 
 #ifdef HILDON
@@ -48,7 +49,6 @@
 #include "cheese-thumb-view.h"
 #include "cheese-window.h"
 #include "ephy-spinner.h"
-#include "gst-audio-play.h"
 #include "gedit-message-area.h"
 #include "cheese-no-camera.h"
 #include "cheese-prefs-dialog.h"
@@ -144,8 +144,6 @@
   GtkActionGroup *actions_fullscreen;
 
   GtkUIManager *ui_manager;
-
-  int audio_play_counter;
 } CheeseWindow;
 
 
@@ -195,21 +193,6 @@
   g_free (uri);
 }
 
-static char *
-audio_play_get_filename (CheeseWindow *cheese_window)
-{
-  char *filename;
-  if (cheese_window->audio_play_counter > 21)
-   filename = g_strdup_printf ("%s/sounds/shutter%i.ogg", PACKAGE_DATADIR,
-                               g_random_int_range (0, SHUTTER_SOUNDS));
-  else
-   filename = g_strdup_printf ("%s/sounds/shutter0.ogg", PACKAGE_DATADIR);
-
-  cheese_window->audio_play_counter++;
-
-  return filename;
-}
-
 /* standard event handler */
 static int
 cheese_window_delete_event_cb (GtkWidget *widget, GdkEvent event, gpointer data)
@@ -1033,20 +1016,18 @@
 cheese_window_countdown_picture_cb (gpointer data)
 {
   CheeseWindow *cheese_window = (CheeseWindow *) data;
-  GError *error = NULL;
-  GstAudioPlay *audio_play;
-  char *file;
+  gboolean audio_error;
 
-  file = audio_play_get_filename (cheese_window);
-  audio_play = gst_audio_play_file (file, &error);
-  if (!audio_play) 
+  audio_error = ca_gtk_play_for_widget (cheese_window->window, 0,
+                                        CA_PROP_EVENT_ID, "camera-shutter",
+                                        CA_PROP_EVENT_DESCRIPTION, _("Photo taken"),
+                                        CA_PROP_APPLICATION_NAME, g_get_application_name (),
+                                        NULL);
+  if (audio_error != 0)
   {
-    g_warning ("%s", error ? error->message : "Unknown error");
-    g_error_free (error);
+    g_warning ("Unknown error while playing sound");
   }
 
-  g_free (file);
-
   cheese_window->photo_filename = cheese_fileutil_get_new_media_filename (cheese_window->fileutil, WEBCAM_MODE_PHOTO);
   cheese_webcam_take_photo (cheese_window->webcam, cheese_window->photo_filename);
 }
@@ -1668,7 +1649,6 @@
 
   cheese_window->startup_hal_dev_udi = hal_dev_udi;
   cheese_window->gconf = cheese_gconf_new ();
-  cheese_window->audio_play_counter = 0;
   cheese_window->fileutil = cheese_fileutil_new ();
   cheese_window->isFullscreen = FALSE;
 
Index: src/cheese-countdown.c
===================================================================
--- src/cheese-countdown.c	(wersja 871)
+++ src/cheese-countdown.c	(kopia robocza)
@@ -27,6 +27,7 @@
 #include <stdlib.h>
 #include <glib/gi18n.h>
 #include <gtk/gtk.h>
+#include <canberra-gtk.h>
 #include <librsvg/rsvg.h>
 #include <librsvg/rsvg-cairo.h>
 #include <math.h>
@@ -588,10 +589,20 @@
       return FALSE;
 
     case STATE_3:
+      ca_gtk_play_for_widget (countdown, 0,
+                              CA_PROP_EVENT_ID, "count-down",
+                              CA_PROP_EVENT_DESCRIPTION, _("Two"),
+                              CA_PROP_APPLICATION_NAME, g_get_application_name (),
+                              NULL);
       priv->iState = STATE_2;
       break;
 
     case STATE_2:
+      ca_gtk_play_for_widget (countdown, 0,
+                              CA_PROP_EVENT_ID, "count-down",
+                              CA_PROP_EVENT_DESCRIPTION, _("One"),
+                              CA_PROP_APPLICATION_NAME, g_get_application_name (),
+                              NULL);
       priv->iState = STATE_1;
       break;
 
@@ -617,6 +628,11 @@
   {
     g_print ("Should not happen, state is not off.\n");
   }
+  ca_gtk_play_for_widget (countdown, 0,
+                          CA_PROP_EVENT_ID, "count-down",
+                          CA_PROP_EVENT_DESCRIPTION, _("Three"),
+                          CA_PROP_APPLICATION_NAME, g_get_application_name (),
+                          NULL);
   priv->iState = STATE_3;
   priv->picture_callback = picture_cb;
   priv->hide_callback = hide_cb;
Index: src/wscript_build
===================================================================
--- src/wscript_build	(wersja 871)
+++ src/wscript_build	(kopia robocza)
@@ -14,7 +14,7 @@
 obj.find_sources_in_dirs('.') # take the sources in the current folder
 obj.includes='.'
 obj.uselib='''GLIB GOBJECT GTK LIBGLADE GDK HAL
-              GSTREAMER GSTREAMER_PLUGINS_BASE 
+              GSTREAMER GSTREAMER_PLUGINS_BASE LIBCANBERRA_GTK
               GNOME_VFS CAIRO PANGOCAIRO LIBRSVG
               LIBGNOMEUI LIBEBOOK XXF86VM'''
 
Index: wscript
===================================================================
--- wscript	(wersja 871)
+++ wscript	(kopia robocza)
@@ -44,6 +44,7 @@
 	conf.check_pkg('hal', destvar='HAL', vnum='0.5.9', mandatory=True)
 	conf.check_pkg('gstreamer-0.10', destvar='GSTREAMER', vnum='0.10.16', mandatory=True)
 	conf.check_pkg('gstreamer-plugins-base-0.10', destvar='GSTREAMER_PLUGINS_BASE', vnum='0.10.16', mandatory=True)
+	conf.check_pkg('libcanberra-gtk', destvar='LIBCANBERRA_GTK', vnum='0.4', mandatory=True)
 	conf.check_pkg('libgnomeui-2.0', destvar='LIBGNOMEUI', vnum='2.20.0', mandatory=True)
 	conf.check_pkg('libebook-1.2', destvar='LIBEBOOK', vnum='1.12.0', mandatory=True)
 	conf.env['LIB_GSTREAMER'] += ['gstinterfaces-0.10']
Index: configure.ac
===================================================================
--- configure.ac	(wersja 871)
+++ configure.ac	(kopia robocza)
@@ -62,6 +62,7 @@
 LIBGNOMEUI_REQUIRED=2.14.0
 GCONF_REQUIRED=2.16.0
 GSTREAMER_REQUIRED=0.10.16
+LIBCANBERRA_GTK_REQUIRED=0.4
 CAIRO_REQUIRED=1.2.4
 GNOME_VFS_REQUIRED=2.18.0
 LIBEBOOK_REQUIRED=1.12.0
@@ -79,6 +80,7 @@
   gconf-2.0 >= $GCONF_REQUIRED \
   gstreamer-0.10 >= $GSTREAMER_REQUIRED \
   gstreamer-plugins-base-0.10 >= $GSTREAMER_REQUIRED \
+  libcanberra-gtk >= $LIBCANBERRA_GTK_REQUIRED \
   gnome-vfs-2.0 >= $GNOME_VFS_REQUIRED \
   libebook-1.2 >= $LIBEBOOK_REQUIRED \
   cairo >= $CAIRO_REQUIRED \
