misc.h File Reference

Miscellaneous utility functions and defines. More...

Defines

#define FLUID_OK   (0)
 Value that indicates success, used by most libfluidsynth functions.
#define FLUID_FAILED   (-1)
 Value that indicates failure, used by most libfluidsynth functions.

Functions

FLUIDSYNTH_API int fluid_is_soundfont (const char *filename)
 Check if a file is a SoundFont file.
FLUIDSYNTH_API int fluid_is_midifile (const char *filename)
 Check if a file is a MIDI file.

Detailed Description

Miscellaneous utility functions and defines.


Define Documentation

#define FLUID_OK   (0)

Value that indicates success, used by most libfluidsynth functions.

Since:
1.1.0

NOTE: This was not publicly defined prior to libfluidsynth 1.1.0. When writing code which should also be compatible with older versions, something like the following can be used:

   #include <fluidsynth.h>

   #ifndef FLUID_OK
   #define FLUID_OK      (0)
   #define FLUID_FAILED  (-1)
   #endif

Referenced by delete_fluid_midi_event(), delete_fluid_midi_router(), delete_fluid_player(), delete_fluid_ramsample(), delete_fluid_synth(), fluid_cmd_handler_register(), fluid_file_renderer_process_block(), fluid_gen_set_default_values(), fluid_midi_event_set_channel(), fluid_midi_event_set_control(), fluid_midi_event_set_key(), fluid_midi_event_set_pitch(), fluid_midi_event_set_program(), fluid_midi_event_set_sysex(), fluid_midi_event_set_type(), fluid_midi_event_set_value(), fluid_midi_event_set_velocity(), fluid_midi_router_add_rule(), fluid_midi_router_clear_rules(), fluid_midi_router_handle_midi_event(), fluid_midi_router_set_default_rules(), fluid_player_add(), fluid_player_join(), fluid_player_play(), fluid_player_set_loop(), fluid_player_set_midi_tempo(), fluid_player_stop(), fluid_ramsfont_add_izone(), fluid_ramsfont_remove_izone(), fluid_ramsfont_set_name(), fluid_sample_set_name(), fluid_sample_set_sound_data(), fluid_synth_activate_key_tuning(), fluid_synth_activate_octave_tuning(), fluid_synth_activate_tuning(), fluid_synth_alloc_voice(), fluid_synth_bank_select(), fluid_synth_deactivate_tuning(), fluid_synth_get_cc(), fluid_synth_get_channel_info(), fluid_synth_get_pitch_bend(), fluid_synth_get_pitch_wheel_sens(), fluid_synth_get_program(), fluid_synth_nwrite_float(), fluid_synth_process(), fluid_synth_program_reset(), fluid_synth_set_bank_offset(), fluid_synth_set_gen(), fluid_synth_set_gen2(), fluid_synth_set_interp_method(), fluid_synth_sfont_select(), fluid_synth_sfreload(), fluid_synth_sfunload(), fluid_synth_stop(), fluid_synth_sysex(), fluid_synth_tune_notes(), fluid_synth_tuning_dump(), fluid_synth_write_float(), and fluid_voice_optimize_sample().

#define FLUID_FAILED   (-1)

Value that indicates failure, used by most libfluidsynth functions.

Since:
1.1.0

NOTE: See FLUID_OK for more details.

Referenced by delete_fluid_midi_router(), fluid_file_renderer_process_block(), fluid_log(), fluid_midi_router_add_rule(), fluid_midi_router_clear_rules(), fluid_midi_router_handle_midi_event(), fluid_midi_router_set_default_rules(), fluid_player_play(), fluid_ramsfont_add_izone(), fluid_ramsfont_izone_set_gen(), fluid_ramsfont_izone_set_loop(), fluid_ramsfont_remove_izone(), fluid_sample_set_sound_data(), fluid_sequencer_add_midi_event_to_buffer(), fluid_sequencer_get_client_id(), fluid_sequencer_register_client(), fluid_sequencer_register_fluidsynth(), fluid_synth_activate_key_tuning(), fluid_synth_activate_octave_tuning(), fluid_synth_activate_tuning(), fluid_synth_add_sfont(), fluid_synth_bank_select(), fluid_synth_cc(), fluid_synth_channel_pressure(), fluid_synth_deactivate_tuning(), fluid_synth_get_active_voice_count(), fluid_synth_get_cc(), fluid_synth_get_channel_info(), fluid_synth_get_gen(), fluid_synth_get_pitch_bend(), fluid_synth_get_pitch_wheel_sens(), fluid_synth_get_polyphony(), fluid_synth_get_program(), fluid_synth_handle_midi_event(), fluid_synth_noteoff(), fluid_synth_noteon(), fluid_synth_pitch_bend(), fluid_synth_pitch_wheel_sens(), fluid_synth_program_change(), fluid_synth_program_select(), fluid_synth_program_select_by_sfont_name(), fluid_synth_set_bank_offset(), fluid_synth_set_gen(), fluid_synth_set_gen2(), fluid_synth_set_interp_method(), fluid_synth_set_polyphony(), fluid_synth_sfload(), fluid_synth_sfont_select(), fluid_synth_sfreload(), fluid_synth_sfunload(), fluid_synth_start(), fluid_synth_stop(), fluid_synth_sysex(), fluid_synth_system_reset(), fluid_synth_tune_notes(), fluid_synth_tuning_dump(), and fluid_synth_unset_program().


Function Documentation

FLUIDSYNTH_API int fluid_is_soundfont ( const char *  filename  ) 

Check if a file is a SoundFont file.

Parameters:
filename Path to the file to check
Returns:
TRUE if it could be a SoundFont, FALSE otherwise

The current implementation only checks for the "RIFF" header in the file. It is useful only to distinguish between SoundFont and MIDI files.

References fluid_is_soundfont().

Referenced by fluid_is_soundfont().

FLUIDSYNTH_API int fluid_is_midifile ( const char *  filename  ) 

Check if a file is a MIDI file.

Parameters:
filename Path to the file to check
Returns:
TRUE if it could be a MIDI file, FALSE otherwise

The current implementation only checks for the "MThd" header in the file. It is useful only to distinguish between SoundFont and MIDI files.

References fluid_is_midifile().

Referenced by fluid_is_midifile().

Generated on Mon Sep 6 12:29:27 2010 for libfluidsynth by  doxygen 1.6.3