On Mon, 16 Nov 2009 00:04:17 -0800, [email protected] wrote:
> I just committed code to make preset querying use the most recent  
> assigned preset.  I also added the code below to the public API as per  
> previous discussions.
> 
> I'm not completely happy with the new API though, since it does seem  
> really close to fluid_synth_get_program() in functionality and is semi  
> overcomplicated by using a structure.  There is only the name and  
> assigned fields which are additional.  I'm tempted to just add a  
> simple fluid_synth_get_program_info() function with an added name  
> buffer pointer of fixed length and the return value could indicate if  
> there is an assigned preset or not.  That would be more like what the  
> current API is.  What do you think?
> 
<snip>
> 
> #define FLUID_PRESET_INFO_NAME_LENGTH   32
> 
> /**
>   * Preset information structure.
>   * @since 1.1.1
>   */
> struct _fluid_preset_info_t
> {
>    int assigned;         /**< TRUE if a preset is assigned, FALSE
>    otherwise */
>    int sfont_id;         /**< ID of parent SoundFont */
>    int bank;             /**< MIDI bank number (0-16383) */
>    int program;          /**< MIDI program number (0-127) */
>    char name[FLUID_PRESET_INFO_NAME_LENGTH];     /**< Preset name */
> };
> 
> int fluid_synth_get_channel_preset_info
> (fluid_synth_t *synth, int chan, fluid_preset_info_t *info);
> 

looks good enough. 

re. assigned field, just one question: is there any official way (api) to
keep, force or (re)set one channel preset as unassigned ?

byee
-- 
rncbc aka Rui Nuno Capela
[email protected]


_______________________________________________
fluid-dev mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/fluid-dev

Reply via email to