# HG changeset patch # User Sean Egan # Date 1022812013 0 # Node ID 7b867d79da96ad3e9c15e055a1290c955ef23d67 # Parent f4f4232f4e83b27ad7d20ff6fe47371085dfc325 [gaim-migrate @ 3302] 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! committer: Tailor Script diff -r f4f4232f4e83 -r 7b867d79da96 ChangeLog --- a/ChangeLog Fri May 31 02:00:41 2002 +0000 +++ b/ChangeLog Fri May 31 02:26:53 2002 +0000 @@ -23,6 +23,7 @@ * Zephyr fixes (thanks, Arun A. Tharuvai) * Aliases in buddy ticker * Perl scripts can play Gaim sounds (thanks Andrew Rodland) + * Internal sounds can be played by commands (thanks Lex Spoon) version 0.58 (05/13/2002): * Bulgarian translation added (Thanks, Igel Itzo) diff -r f4f4232f4e83 -r 7b867d79da96 src/sound.c --- a/src/sound.c Fri May 31 02:00:41 2002 +0000 +++ b/src/sound.c Fri May 31 02:26:53 2002 +0000 @@ -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; }