mirror of
https://github.com/ZDoom/fluidsynth.git
synced 2025-05-30 00:40:38 +00:00
remove deprecated fluid_synth_get_channel_info()
it provided functionality in between of fluid_synth_get_program() and fluid_synth_get_channel_preset(), which however was not visible from the user perspective
This commit is contained in:
parent
9f366f3320
commit
62df9178ae
4 changed files with 1 additions and 78 deletions
|
@ -74,7 +74,7 @@ FluidSynths SOVERSION was bumped. The API was reworked, deprecated functions wer
|
|||
|
||||
Changes in FluidSynth 2.0.0 concerning developers:
|
||||
|
||||
- remove deprecated fluid_synth_get_program() and fluid_synth_get_channel_preset(), use fluid_synth_get_channel_info() instead
|
||||
- remove deprecated fluid_synth_get_channel_info() in favour of fluid_synth_get_program() and fluid_synth_get_channel_preset()
|
||||
- remove deprecated fluid_settings_getstr()
|
||||
- remove deprecated fluid_synth_set_midi_router()
|
||||
- remove deprecated fluid_get_hinstance() and fluid_set_hinstance() (dsound driver now uses the desktop window)
|
||||
|
|
|
@ -45,22 +45,6 @@ extern "C" {
|
|||
* fluid_synth_noteon(), fluid_synth_noteoff(), ...
|
||||
*/
|
||||
|
||||
#define FLUID_SYNTH_CHANNEL_INFO_NAME_SIZE 32 /**< Length of channel info name field (including zero terminator) */
|
||||
|
||||
/**
|
||||
* Channel information structure for fluid_synth_get_channel_info().
|
||||
* @since 2.0.0
|
||||
*/
|
||||
struct _fluid_synth_channel_info_t
|
||||
{
|
||||
int assigned : 1; /**< TRUE if a preset is assigned, FALSE otherwise */
|
||||
/* Reserved flag bits (at the least 31) */
|
||||
int sfont_id; /**< ID of parent SoundFont */
|
||||
int bank; /**< MIDI bank number (0-16383) */
|
||||
int program; /**< MIDI program number (0-127) */
|
||||
char name[FLUID_SYNTH_CHANNEL_INFO_NAME_SIZE]; /**< Channel preset name */
|
||||
char reserved[32]; /**< Reserved data for future expansion */
|
||||
};
|
||||
|
||||
FLUIDSYNTH_API fluid_synth_t* new_fluid_synth(fluid_settings_t* settings);
|
||||
FLUIDSYNTH_API void delete_fluid_synth(fluid_synth_t* synth);
|
||||
|
@ -95,9 +79,6 @@ FLUIDSYNTH_API
|
|||
int fluid_synth_get_program(fluid_synth_t* synth, int chan, unsigned int* sfont_id,
|
||||
unsigned int* bank_num, unsigned int* preset_num);
|
||||
FLUIDSYNTH_API int fluid_synth_unset_program (fluid_synth_t *synth, int chan);
|
||||
FLUIDSYNTH_API
|
||||
FLUID_DEPRECATED
|
||||
int fluid_synth_get_channel_info (fluid_synth_t *synth, int chan, fluid_synth_channel_info_t *info);
|
||||
FLUIDSYNTH_API int fluid_synth_program_reset(fluid_synth_t* synth);
|
||||
FLUIDSYNTH_API int fluid_synth_system_reset(fluid_synth_t* synth);
|
||||
|
||||
|
|
|
@ -35,7 +35,6 @@ extern "C" {
|
|||
|
||||
typedef struct _fluid_hashtable_t fluid_settings_t; /**< Configuration settings instance */
|
||||
typedef struct _fluid_synth_t fluid_synth_t; /**< Synthesizer instance */
|
||||
typedef struct _fluid_synth_channel_info_t fluid_synth_channel_info_t; /**< SoundFont channel info */
|
||||
typedef struct _fluid_voice_t fluid_voice_t; /**< Synthesis voice instance */
|
||||
typedef struct _fluid_sfloader_t fluid_sfloader_t; /**< SoundFont loader plugin */
|
||||
typedef struct _fluid_sfont_t fluid_sfont_t; /**< SoundFont */
|
||||
|
|
|
@ -3810,63 +3810,6 @@ fluid_synth_get_channel_preset(fluid_synth_t* synth, int chan)
|
|||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get information on the currently selected preset on a MIDI channel.
|
||||
* @param synth FluidSynth instance
|
||||
* @param chan MIDI channel number (0 to MIDI channel count - 1)
|
||||
* @param info Caller supplied structure to fill with preset information
|
||||
* @return #FLUID_OK on success, #FLUID_FAILED otherwise
|
||||
* @deprecated Provides redundant functionality that can be achieved with
|
||||
* fluid_synth_get_channel_preset() or fluid_synth_get_program().
|
||||
* @since 1.1.1
|
||||
*/
|
||||
int
|
||||
fluid_synth_get_channel_info (fluid_synth_t *synth, int chan,
|
||||
fluid_synth_channel_info_t *info)
|
||||
{
|
||||
fluid_channel_t *channel;
|
||||
fluid_preset_t *preset;
|
||||
const char *name;
|
||||
|
||||
if (info)
|
||||
{
|
||||
info->assigned = FALSE;
|
||||
info->name[0] = '\0';
|
||||
}
|
||||
|
||||
fluid_return_val_if_fail (info != NULL, FLUID_FAILED);
|
||||
FLUID_API_ENTRY_CHAN(FLUID_FAILED);
|
||||
|
||||
channel = synth->channel[chan];
|
||||
preset = channel->preset;
|
||||
|
||||
if (preset)
|
||||
{
|
||||
info->assigned = TRUE;
|
||||
name = fluid_preset_get_name (preset);
|
||||
|
||||
if (name)
|
||||
{
|
||||
strncpy (info->name, name, FLUID_SYNTH_CHANNEL_INFO_NAME_SIZE);
|
||||
info->name[FLUID_SYNTH_CHANNEL_INFO_NAME_SIZE - 1] = '\0';
|
||||
}
|
||||
else info->name[0] = '\0';
|
||||
|
||||
info->sfont_id = preset->sfont->id;
|
||||
info->bank = fluid_preset_get_banknum (preset);
|
||||
info->program = fluid_preset_get_num (preset);
|
||||
}
|
||||
else
|
||||
{
|
||||
info->assigned = FALSE;
|
||||
fluid_channel_get_sfont_bank_prog (channel, &info->sfont_id, &info->bank, &info->program);
|
||||
info->name[0] = '\0';
|
||||
}
|
||||
|
||||
fluid_synth_api_exit(synth);
|
||||
return FLUID_OK;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get list of currently playing voices.
|
||||
* @param synth FluidSynth instance
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue