libfluidsynth  2.0.4
Macros | Functions
misc.h File Reference

Miscellaneous utility functions and defines. More...

Macros

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

Functions

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

Detailed Description

Miscellaneous utility functions and defines.

Macro Definition Documentation

◆ FLUID_OK

#define FLUID_OK   (0)

◆ FLUID_FAILED

#define FLUID_FAILED   (-1)

Function Documentation

◆ fluid_is_soundfont()

FLUIDSYNTH_API int fluid_is_soundfont ( const char *  filename)

Check if a file is a SoundFont file.

Parameters
filenamePath to the file to check
Returns
TRUE if it could be a SoundFont, FALSE otherwise
Note
The current implementation only checks for the "RIFF" and "sfbk" headers in the file. It is useful to distinguish between SoundFont and other (e.g. MIDI) files.

◆ fluid_is_midifile()

FLUIDSYNTH_API int fluid_is_midifile ( const char *  filename)

Check if a file is a MIDI file.

Parameters
filenamePath 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.