Mercurial > pidgin
comparison src/sound.c @ 3072:359b4cd0e766
[gaim-migrate @ 3086]
Sound bugfix; thanks Robot101.
committer: Tailor Script <tailor@pidgin.im>
author | Sean Egan <seanegan@gmail.com> |
---|---|
date | Sun, 17 Mar 2002 18:29:17 +0000 |
parents | 4f2f12bf4408 |
children | a7e03c5d2205 |
comparison
equal
deleted
inserted
replaced
3071:55fa49dc545e | 3072:359b4cd0e766 |
---|---|
56 * per pounce. NULL option means it doesn't get displayed in the sound * | 56 * per pounce. NULL option means it doesn't get displayed in the sound * |
57 * preferences box */ | 57 * preferences box */ |
58 struct sound_struct sounds[NUM_SOUNDS] = { | 58 struct sound_struct sounds[NUM_SOUNDS] = { |
59 N_("Buddy logs in"), OPT_SOUND_LOGIN, BuddyArrive, sizeof(BuddyArrive), | 59 N_("Buddy logs in"), OPT_SOUND_LOGIN, BuddyArrive, sizeof(BuddyArrive), |
60 N_("Buddy logs out"), OPT_SOUND_LOGOUT, BuddyLeave, sizeof(BuddyLeave), | 60 N_("Buddy logs out"), OPT_SOUND_LOGOUT, BuddyLeave, sizeof(BuddyLeave), |
61 N_("Message recieved"), OPT_SOUND_RECV, Receive, sizeof(Receive), | |
61 N_("Message recieved begins conversation"), OPT_SOUND_FIRST_RCV, Receive, sizeof(Receive), | 62 N_("Message recieved begins conversation"), OPT_SOUND_FIRST_RCV, Receive, sizeof(Receive), |
62 N_("Message recieved"), OPT_SOUND_RECV, Receive, sizeof(Receive), | |
63 N_("Message sent"), OPT_SOUND_SEND, Send, sizeof(Send), | 63 N_("Message sent"), OPT_SOUND_SEND, Send, sizeof(Send), |
64 N_("Person enters chat"), OPT_SOUND_CHAT_JOIN, BuddyArrive, sizeof(BuddyArrive), | 64 N_("Person enters chat"), OPT_SOUND_CHAT_JOIN, BuddyArrive, sizeof(BuddyArrive), |
65 N_("Person leaves chat"), OPT_SOUND_CHAT_PART, BuddyLeave, sizeof(BuddyLeave), | 65 N_("Person leaves chat"), OPT_SOUND_CHAT_PART, BuddyLeave, sizeof(BuddyLeave), |
66 N_("You talk in chat"), OPT_SOUND_CHAT_YOU_SAY, Send, sizeof(Send), | 66 N_("You talk in chat"), OPT_SOUND_CHAT_YOU_SAY, Send, sizeof(Send), |
67 N_("Others talk in chat"), OPT_SOUND_CHAT_SAY, Receive, sizeof(Receive), | 67 N_("Others talk in chat"), OPT_SOUND_CHAT_SAY, Receive, sizeof(Receive), |
68 NULL, NULL, &RedAlert, sizeof(RedAlert) | 68 NULL, 0, RedAlert, sizeof(RedAlert) |
69 }; | 69 }; |
70 | 70 |
71 static int check_dev(char *dev) | 71 static int check_dev(char *dev) |
72 { | 72 { |
73 struct stat stat_buf; | 73 struct stat stat_buf; |
411 gdk_beep(); | 411 gdk_beep(); |
412 return; | 412 return; |
413 } | 413 } |
414 | 414 |
415 else if (sound_options & OPT_SOUND_NORMAL) { | 415 else if (sound_options & OPT_SOUND_NORMAL) { |
416 debug_printf("attempting to play audio file with internal method -- this is unlikely to work"); | 416 debug_printf("attempting to play audio file with internal method -- this is unlikely to work\n"); |
417 } | 417 } |
418 | 418 |
419 pid = fork(); | 419 pid = fork(); |
420 | 420 |
421 if (pid < 0) | 421 if (pid < 0) |
547 | 547 |
548 if ((sound == SND_BUDDY_ARRIVE) && !logins_not_muted) | 548 if ((sound == SND_BUDDY_ARRIVE) && !logins_not_muted) |
549 return; | 549 return; |
550 | 550 |
551 if (sound >= NUM_SOUNDS) { | 551 if (sound >= NUM_SOUNDS) { |
552 debug_printf("sorry old fruit... can't say I know that sound: ", sound); | 552 debug_printf("sorry old fruit... can't say I know that sound: ", sound, "\n"); |
553 return; | 553 return; |
554 } | 554 } |
555 | 555 |
556 /* check NULL for sounds that don't have an option, ie buddy pounce */ | 556 /* check NULL for sounds that don't have an option, ie buddy pounce */ |
557 if ((sound_options & sounds[sound].opt) || (sounds[sound].opt == NULL)) { | 557 if ((sound_options & sounds[sound].opt) || (sounds[sound].opt == 0)) { |
558 if (sound_file[sound]) { | 558 if (sound_file[sound]) { |
559 play_file(sound_file[sound]); | 559 play_file(sound_file[sound]); |
560 } else { | 560 } else { |
561 play(sounds[sound].snd, sounds[sound].snd_size); | 561 play(sounds[sound].snd, sounds[sound].snd_size); |
562 } | 562 } |