Mercurial > audlegacy
comparison src/audacious/main.c @ 4374:335f4ac3993a
save volume between sessions
author | Paula Stanciu <paula.stanciu@gmail.com> |
---|---|
date | Sun, 23 Mar 2008 20:31:28 +0200 |
parents | 1f900d7b737b |
children | 88d8f699359a |
comparison
equal
deleted
inserted
replaced
4373:20c70e3a8272 | 4374:335f4ac3993a |
---|---|
765 /* this needs to be called after all 3 windows are created and | 765 /* this needs to be called after all 3 windows are created and |
766 * input plugins are setup'ed | 766 * input plugins are setup'ed |
767 * but not if we're running headless --nenolod | 767 * but not if we're running headless --nenolod |
768 */ | 768 */ |
769 mainwin_setup_menus(); | 769 mainwin_setup_menus(); |
770 | 770 output_set_volume(((cfg.saved_volume & 0xff00) >> 8),(cfg.saved_volume & 0x00ff)); |
771 ui_main_set_initial_volume(); | 771 ui_main_set_initial_volume(); |
772 | 772 |
773 /* FIXME: delayed, because it deals directly with the plugin | 773 /* FIXME: delayed, because it deals directly with the plugin |
774 * interface to set menu items */ | 774 * interface to set menu items */ |
775 create_prefs_window(); | 775 create_prefs_window(); |
803 playlist_get_length(playlist) > 0) | 803 playlist_get_length(playlist) > 0) |
804 { | 804 { |
805 int i; | 805 int i; |
806 gint l = 0, r = 0; | 806 gint l = 0, r = 0; |
807 while (gtk_events_pending()) gtk_main_iteration(); | 807 while (gtk_events_pending()) gtk_main_iteration(); |
808 output_get_volume(&l, &r); | 808 l = (cfg.saved_volume & 0xff00)>>8; |
809 r = cfg.saved_volume & 0x00ff; | |
809 output_set_volume(0,0); | 810 output_set_volume(0,0); |
810 playback_initiate(); | 811 playback_initiate(); |
811 | 812 |
812 /* Busy wait; loop is fairly tight to minimize duration of | 813 /* Busy wait; loop is fairly tight to minimize duration of |
813 * "frozen" GUI. Feel free to tune. --chainsaw */ | 814 * "frozen" GUI. Feel free to tune. --chainsaw */ |