Update of /cvsroot/gaim/gaim/src
In directory usw-pr-cvs1:/tmp/cvs-serv20149/src
Modified Files:
sound.c
Log Message:
Lex Spoon--perhaps the coolest name I've ever seen submit a patch (it's
between him and Chris Blizzard) made it so commands can play sounds!
Brilliant!
Index: sound.c
===================================================================
RCS file: /cvsroot/gaim/gaim/src/sound.c,v
retrieving revision 1.58
retrieving revision 1.59
diff -u -d -r1.58 -r1.59
--- sound.c 29 May 2002 01:23:38 -0000 1.58
+++ sound.c 31 May 2002 02:26:53 -0000 1.59
@@ -481,7 +481,19 @@
}
else if ((sound_options & OPT_SOUND_CMD) && sound_cmd[0]) {
- debug_printf("can't play internal sound with external command -- skipping\n");
+ char command[4096];
+ FILE *child;
+
+ g_snprintf(command, sizeof(command), sound_cmd, "-");
+
+ child=popen(command, "w");
+ if(child == NULL) {
+ perror("popen");
+ return;
+ }
+
+ fwrite(data, size, 1, child);
+ pclose(child);
return;
}
|