denemo-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Denemo-devel] switching Midi/Audio out


From: Jeremiah Benham
Subject: [Denemo-devel] switching Midi/Audio out
Date: Fri, 6 Nov 2009 09:52:40 -0600

When switching from fluidsynth to jack. fluidsynth will need to
be stopped. Then if fluidsynth was not already using the jack driver
jack would need to be started. Should denemo start the jack server?
Should it start the jack server if the jack on startup is set in
preferences? ....Or should there be a pop up dialog telling the user
that "jack needs to be started in order for jack output to work. Would
you like me to start it for you. If you choose no then you will need
to start it yourself and then click on start/restart jack client in
preferences"   

I wrote kind of a flow chart to plan out how we are going to deal with
switching between midi/audio outputs. This is what it looks like:

     if portaudio->fluidsynth 
        if fluidsynth driver == jack
          if jackserver_on_startup
            startjackserver
            startfluidsynth
        else 
          startfluidsynth
     if portaudio->jack
       if jackserver_on_startup
         startjackserver
         startdenemojack
     if jack->portaudio
        stopdenemojack
        stopjackserver
     if jack->fluidsynth 
        stopdenemojack 
        if fluidsynth driver != jack
          stopjack      
        startfluid
     if fluidsynth->jack
        stop fluidsynth
          if fluidsynth driver == jack
            startdenemojack? 
          else
            if jackserver_on_startup 
              startjackserver
              startdenemojack

This can probably be reduced somehow in code. Fluidsynth will need to
be stopped in order for portaudio to output sound on many soundcards.
The same is true with jack. On my laptop I would need to stop jack to
do fluidsynth unless the jack driver was used in fluidsynth. So maybe
I should look to see 
  if (Denemo.prefs.midi_audio_output != variable_going_to_be_assigned){ 
     exit_routines(varaible_in_preferences);
     start_up_routines(variable_going_to_be_assigned);
     Denemo.prefs.midi_audio_output = variable_going_to_be_assigned;
  }

Jeremiah




reply via email to

[Prev in Thread] Current Thread [Next in Thread]