fluidsynth.c
branchSDL-1.2
changeset 887 e49459791ae8
parent 881 6bf9b92cfad9
equal deleted inserted replaced
886:cb08fb0976e6 887:e49459791ae8
    32 
    32 
    33 static Uint16 format;
    33 static Uint16 format;
    34 static Uint8 channels;
    34 static Uint8 channels;
    35 static int freq;
    35 static int freq;
    36 
    36 
    37 int fluidsynth_check_soundfont(const char *path, void *data)
    37 int SDLCALL fluidsynth_check_soundfont(const char *path, void *data)
    38 {
    38 {
    39 	FILE *file = fopen(path, "r");
    39 	FILE *file = fopen(path, "r");
    40 
    40 
    41 	if (file) {
    41 	if (file) {
    42 		fclose(file);
    42 		fclose(file);
    45 		Mix_SetError("Failed to access the SoundFont %s", path);
    45 		Mix_SetError("Failed to access the SoundFont %s", path);
    46 		return 0;
    46 		return 0;
    47 	}
    47 	}
    48 }
    48 }
    49 
    49 
    50 int fluidsynth_load_soundfont(const char *path, void *data)
    50 int SDLCALL fluidsynth_load_soundfont(const char *path, void *data)
    51 {
    51 {
    52 	/* If this fails, it's too late to try Timidity so pray that at least one works. */
    52 	/* If this fails, it's too late to try Timidity so pray that at least one works. */
    53 	fluidsynth.fluid_synth_sfload((fluid_synth_t*) data, path, 1);
    53 	fluidsynth.fluid_synth_sfload((fluid_synth_t*) data, path, 1);
    54 	return 1;
    54 	return 1;
    55 }
    55 }