Mercurial > pidgin
comparison finch/gntsound.c @ 29354:56ea87a90cba
propagate from branch 'im.pidgin.pidgin' (head 37ee5cce9aeb51268bee637a770a97b72e301bf2)
to branch 'im.pidgin.pidgin.next.minor' (head cdf15f6882f239414b919d4acf667aa7e9a096c6)
author | Paul Aurich <paul@darkrain42.org> |
---|---|
date | Sun, 07 Feb 2010 00:34:22 +0000 |
parents | d6dff41a6d4c |
children | a87764155fa5 |
comparison
equal
deleted
inserted
replaced
28989:1b040b79da38 | 29354:56ea87a90cba |
---|---|
557 return; | 557 return; |
558 #endif /* USE_GSTREAMER */ | 558 #endif /* USE_GSTREAMER */ |
559 #else /* _WIN32 */ | 559 #else /* _WIN32 */ |
560 purple_debug_info("sound", "Playing %s\n", filename); | 560 purple_debug_info("sound", "Playing %s\n", filename); |
561 | 561 |
562 if (G_WIN32_HAVE_WIDECHAR_API ()) { | 562 { |
563 wchar_t *wc_filename = g_utf8_to_utf16(filename, | 563 wchar_t *wc_filename = g_utf8_to_utf16(filename, |
564 -1, NULL, NULL, NULL); | 564 -1, NULL, NULL, NULL); |
565 if (!PlaySoundW(wc_filename, NULL, SND_ASYNC | SND_FILENAME)) | 565 if (!PlaySoundW(wc_filename, NULL, SND_ASYNC | SND_FILENAME)) |
566 purple_debug(PURPLE_DEBUG_ERROR, "sound", "Error playing sound.\n"); | 566 purple_debug(PURPLE_DEBUG_ERROR, "sound", "Error playing sound.\n"); |
567 g_free(wc_filename); | 567 g_free(wc_filename); |
568 } else { | |
569 char *l_filename = g_locale_from_utf8(filename, | |
570 -1, NULL, NULL, NULL); | |
571 if (!PlaySoundA(l_filename, NULL, SND_ASYNC | SND_FILENAME)) | |
572 purple_debug(PURPLE_DEBUG_ERROR, "sound", "Error playing sound.\n"); | |
573 g_free(l_filename); | |
574 } | 568 } |
575 #endif /* _WIN32 */ | 569 #endif /* _WIN32 */ |
576 } | 570 } |
577 | 571 |
578 static void | 572 static void |