denemo-devel
[Top][All Lists]
Advanced

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

[Denemo-devel] Midi/Audio out


From: Jeremiah Benham
Subject: [Denemo-devel] Midi/Audio out
Date: Thu, 22 Oct 2009 17:25:48 -0500

I created a separate branch for myself to work on embedding
fluidsynth. I want to merge this branch with master. I need help
integrating this without braking anything. 

My question is how are we going to create a switch to allow the user
to choose the various midi/audio output. I thought of this. We define
a variable in Denemo.prefs. I was thinking of types gchar* but am not
100% convinced of that. I will call it Denemo.prefs.audio_out for now. 

Then in configure.in I have fluidsynth be included by default but allow
it to be disabled. Jack is not by as well as portaudio sound out.

Then in prefops.c I will have something like this:

#ifdef _HAVE_PORTAUDIO_
  ret->audio_out = g_string_new ("PORTAUDIO");
#endif
#ifdef _HAVE_JACK_
  ret->audio_out = g_string_new ("JACK");
#endif
#ifdef _HAVE_FLUIDSYNTH_
  ret->audio_out = g_string_new ("FLUIDSYNTH");
#endif

This way a user could compile with all three and then there can be a
three way switch between the three similar to the input menu or
perhaps as a toggle in playback preferences. Then the code responsible
for immediate sounding, scripted playback, and playback will be routed
to the respective functions after doing a string comparison with
Denemo.prefs.audio_out. Do you think it would be better to use 

typedef enum {
  PORTAUDIO,
  JACK,
  FLUIDSYNTH
}audio_out_mode; 

Then ret->audio_out would be an integer? 

This also makes me wonder if the JACK tab in preferences should move
to the playback properties. If so then FLUIDSYNTH tab should probably
go in playback properties also. Then the immediate playback
toggle isn't this also a playback property? 

Jeremiah  









reply via email to

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