| 441 sink = gst_element_factory_make("nassink", "sink"); |
441 sink = gst_element_factory_make("nassink", "sink"); |
| 442 } |
442 } |
| 443 |
443 |
| 444 uri = g_strdup_printf("file://%s", filename); |
444 uri = g_strdup_printf("file://%s", filename); |
| 445 play = gst_element_factory_make("playbin", "play"); |
445 play = gst_element_factory_make("playbin", "play"); |
| 446 |
446 |
| 447 g_object_set(G_OBJECT(play), "uri", uri, |
447 g_object_set(G_OBJECT(play), "uri", uri, |
| 448 "volume", volume, |
448 "volume", volume, |
| 449 "audio-sink", sink, NULL); |
449 "audio-sink", sink, NULL); |
| 450 |
450 |
| 451 gst_bus_add_watch(gst_pipeline_get_bus(GST_PIPELINE(play)), |
451 gst_bus_add_watch(gst_pipeline_get_bus(GST_PIPELINE(play)), |
| 452 bus_call, play); |
452 bus_call, play); |
| 453 gst_element_set_state(play, GST_STATE_PLAYING); |
453 gst_element_set_state(play, GST_STATE_PLAYING); |
| 454 |
454 |
| 455 g_free(uri); |
455 g_free(uri); |
| 456 |
456 |
| 457 #else /* USE_GSTREAMER */ |
457 #else /* USE_GSTREAMER */ |
| 458 gdk_beep(); |
458 gdk_beep(); |
| 459 return; |
459 return; |
| 460 #endif /* USE_GSTREAMER */ |
460 #endif /* USE_GSTREAMER */ |
| 461 #else /* _WIN32 */ |
461 #else /* _WIN32 */ |
| 497 |
497 |
| 498 /* check NULL for sounds that don't have an option, ie buddy pounce */ |
498 /* check NULL for sounds that don't have an option, ie buddy pounce */ |
| 499 if (gaim_prefs_get_bool(enable_pref)) { |
499 if (gaim_prefs_get_bool(enable_pref)) { |
| 500 char *filename = g_strdup(gaim_prefs_get_string(file_pref)); |
500 char *filename = g_strdup(gaim_prefs_get_string(file_pref)); |
| 501 if(!filename || !strlen(filename)) { |
501 if(!filename || !strlen(filename)) { |
| 502 if(filename) g_free(filename); |
502 g_free(filename); |
| 503 filename = g_build_filename(DATADIR, "sounds", "gaim", sounds[event].def, NULL); |
503 filename = g_build_filename(DATADIR, "sounds", "gaim", sounds[event].def, NULL); |
| 504 } |
504 } |
| 505 |
505 |
| 506 gaim_sound_play_file(filename, NULL); |
506 gaim_sound_play_file(filename, NULL); |
| 507 g_free(filename); |
507 g_free(filename); |