/[gluid]/callbacks.c
ViewVC logotype

Diff of /callbacks.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 34 by ben, Tue Sep 29 20:52:10 2009 UTC revision 36 by ben, Wed Sep 30 16:30:02 2009 UTC
# Line 81  int midi_ev_cb (void *data, fluid_midi_e Line 81  int midi_ev_cb (void *data, fluid_midi_e
81  /* handler for the "Play" menu item */  /* handler for the "Play" menu item */
82  void menu_item_on_startstop(GtkMenuItem* instance, gpointer app_data) {  void menu_item_on_startstop(GtkMenuItem* instance, gpointer app_data) {
83          AppData* d = (AppData*) app_data;          AppData* d = (AppData*) app_data;
84            gchar* temp;
85    
86          if (!d->synth) { /* is stopped : start it */          if (!d->synth) { /* is stopped : start it */
87                  d->settings = new_fluid_settings();                  d->settings = new_fluid_settings();
88                  fluid_settings_setstr(d->settings, "audio.driver", d->audio);                  fluid_settings_setstr(d->settings, "audio.driver", d->audio);
89                    temp = g_strdup_printf("gluid_audio_%d", d->id);
90                    fluid_settings_setstr(d->settings, "audio.jack.id", temp);
91                    g_free(temp);
92                  fluid_settings_setstr(d->settings, "midi.driver", d->midi);                  fluid_settings_setstr(d->settings, "midi.driver", d->midi);
93                    temp = g_strdup_printf("gluid_midi_%d", d->id);
94                    fluid_settings_setstr(d->settings, "midi.alsa_seq.id", temp);
95                    fluid_settings_setstr(d->settings, "midi.jack.id", temp);
96                    g_free(temp);
97                  fluid_settings_setstr(d->settings, "synth.reverb.active", d->reverb);                  fluid_settings_setstr(d->settings, "synth.reverb.active", d->reverb);
98                  fluid_settings_setstr(d->settings, "synth.chorus.active", d->chorus);                  fluid_settings_setstr(d->settings, "synth.chorus.active", d->chorus);
99    
# Line 109  void menu_item_on_startstop(GtkMenuItem* Line 118  void menu_item_on_startstop(GtkMenuItem*
118                  d->mdriver = new_fluid_midi_driver(d->settings, fluid_midi_router_handle_midi_event, (void*)d->router);                  d->mdriver = new_fluid_midi_driver(d->settings, fluid_midi_router_handle_midi_event, (void*)d->router);
119                  if (!d->mdriver) /* backend already used */                  if (!d->mdriver) /* backend already used */
120                          goto stop;                          goto stop;
121                                    temp = g_strdup_printf (_("fluidsynth %d running"), d->id);
122                  gtk_status_icon_set_tooltip(d->status_icon, _("fluidsynth running"));                  gtk_status_icon_set_tooltip(d->status_icon, temp);
123                  gtk_menu_item_set_label(instance, _("Stop"));                  gtk_menu_item_set_label(instance, _("Stop"));
124          } else { /* is started : stop it*/          } else { /* is started : stop it*/
125  stop:  stop:

Legend:
Removed from v.34  
changed lines
  Added in v.36

  ViewVC Help
Powered by ViewVC 1.1.26