summaryrefslogtreecommitdiff
path: root/libs/fluidsynth/src/fluid_midi.c
diff options
context:
space:
mode:
Diffstat (limited to 'libs/fluidsynth/src/fluid_midi.c')
-rw-r--r--libs/fluidsynth/src/fluid_midi.c16
1 files changed, 5 insertions, 11 deletions
diff --git a/libs/fluidsynth/src/fluid_midi.c b/libs/fluidsynth/src/fluid_midi.c
index 73551a6d8c..5b2efe0b9b 100644
--- a/libs/fluidsynth/src/fluid_midi.c
+++ b/libs/fluidsynth/src/fluid_midi.c
@@ -99,13 +99,7 @@ int fluid_is_midifile(const char *filename)
do
{
- if(!fluid_file_test(filename, G_FILE_TEST_IS_REGULAR))
- {
- return retcode;
- }
-
- // file seems to exist and is a regular file or a symlink to such
- if((fp = FLUID_FOPEN(filename, "rb")) == NULL)
+ if((fp = fluid_file_open(filename, NULL)) == NULL)
{
return retcode;
}
@@ -1677,7 +1671,7 @@ new_fluid_player(fluid_synth_t *synth)
player->currentfile = NULL;
player->division = 0;
player->send_program_change = 1;
- player->miditempo = 480000;
+ player->miditempo = 500000;
player->deltatime = 4.0;
player->cur_msec = 0;
player->cur_ticks = 0;
@@ -1761,7 +1755,7 @@ fluid_player_reset(fluid_player_t *player)
player->ntracks = 0;
player->division = 0;
player->send_program_change = 1;
- player->miditempo = 480000;
+ player->miditempo = 500000;
player->deltatime = 4.0;
return 0;
}
@@ -1892,14 +1886,14 @@ fluid_player_load(fluid_player_t *player, fluid_playlist_item *item)
buffer = fluid_file_read_full(fp, &buffer_length);
+ FLUID_FCLOSE(fp);
+
if(buffer == NULL)
{
- FLUID_FCLOSE(fp);
return FLUID_FAILED;
}
buffer_owned = 1;
- FLUID_FCLOSE(fp);
}
else
{