comparison src/alarm/alarm.c @ 2149:cf20f1bd2f1e

- updated German translation - cleaned up alarm, mtp_up and song_change plugins
author mf0102 <0102@gmx.at>
date Thu, 01 Nov 2007 21:20:20 +0100
parents b8da6a0b0da2
children 4d6045c20cc5
comparison
equal deleted inserted replaced
2148:5b5c450a6a37 2149:cf20f1bd2f1e
685 } 685 }
686 686
687 static void *alarm_fade(void *arg) 687 static void *alarm_fade(void *arg)
688 { 688 {
689 fader *vols = (fader *)arg; 689 fader *vols = (fader *)arg;
690 guint i, v; 690 guint i;
691 gint v;
691 gint inc, diff, adiff; 692 gint inc, diff, adiff;
692 693
693 /* lock */ 694 /* lock */
694 pthread_mutex_lock(&fader_lock); 695 pthread_mutex_lock(&fader_lock);
695 696
716 for(i=0;i<adiff;i++) 717 for(i=0;i<adiff;i++)
717 { 718 {
718 //threadsleep((gfloat)fading / (vols->end - vols->start)); 719 //threadsleep((gfloat)fading / (vols->end - vols->start));
719 threadsleep((gfloat)fading / (gfloat)adiff); 720 threadsleep((gfloat)fading / (gfloat)adiff);
720 audacious_drct_get_volume_main(&v); 721 audacious_drct_get_volume_main(&v);
721 audacious_drct_set_volume_main((gint)(v + inc)); 722 audacious_drct_set_volume_main(v + inc);
722 } 723 }
723 /* Setting the volume to the end volume sort of defeats the point if having 724 /* Setting the volume to the end volume sort of defeats the point if having
724 * the code in there to allow other apps to control volume too :) 725 * the code in there to allow other apps to control volume too :)
725 */ 726 */
726 //audacious_drct_set_volume_main((gint)vols->end); 727 //audacious_drct_set_volume_main((gint)vols->end);
989 if(stop_tid) 990 if(stop_tid)
990 pthread_cancel(stop_tid); 991 pthread_cancel(stop_tid);
991 stop_tid = 0; 992 stop_tid = 0;
992 } 993 }
993 994
994 /*
995 * for xmms to get the function names
996 */
997 static GeneralPlugin alarm_plugin = 995 static GeneralPlugin alarm_plugin =
998 { 996 {
999 .description = "Alarm "VERSION, 997 .description = "Alarm "VERSION,
1000 .init = alarm_init, 998 .init = alarm_init,
1001 .about = alarm_about, 999 .about = alarm_about,