summary refs log tree commit diff stats
path: root/src/common/text.c
diff options
context:
space:
mode:
authorTingPing <tngpng@gmail.com>2013-04-27 20:29:28 -0300
committerTingPing <tngpng@gmail.com>2013-04-27 20:29:28 -0300
commit78f9f3f87ce0593a2ee28426a562f715c045f173 (patch)
treeb8ecd9a7969b130b2f2ec8d33eef6a743c0bf31e /src/common/text.c
parentbc1169e9793229a749b5c5878a4bab1d5c423768 (diff)
clean up canberra code
Diffstat (limited to 'src/common/text.c')
-rw-r--r--src/common/text.c25
1 files changed, 11 insertions, 14 deletions
diff --git a/src/common/text.c b/src/common/text.c
index 98f0bfba..6351d713 100644
--- a/src/common/text.c
+++ b/src/common/text.c
@@ -2205,7 +2205,7 @@ sound_beep (session *sess)
 void
 sound_play (const char *file, gboolean quiet)
 {
-	char *buf;
+  char *buf;
 	char *wavfile;
 #ifndef WIN32
 	char *cmd;
@@ -2243,21 +2243,18 @@ sound_play (const char *file, gboolean quiet)
 #ifdef USE_LIBCANBERRA
 		ca_context_create (&con);
 		/* TODO: Volume setting? */
-		if (ca_context_play (con, 0,
-						CA_PROP_MEDIA_FILENAME, wavfile, NULL) == 0)
-		{
-			g_free (wavfile);
-			return;
-		}
+		if (ca_context_play (con, 0, CA_PROP_MEDIA_FILENAME, wavfile, NULL) != 0)
 #endif
-		cmd = g_find_program_in_path ("play");
-
-		if (cmd)
 		{
-			buf = g_strdup_printf ("%s \"%s\"", cmd, wavfile);
-			hexchat_exec (buf);
-			g_free (buf);
-			g_free (cmd);
+			cmd = g_find_program_in_path ("play");
+	
+			if (cmd)
+			{
+				buf = g_strdup_printf ("%s \"%s\"", cmd, wavfile);
+				hexchat_exec (buf);
+				g_free (buf);
+				g_free (cmd);
+			}
 		}
 #endif
 	}