aboutsummaryrefslogtreecommitdiff
path: root/src/adlmidi_load.cpp
diff options
context:
space:
mode:
authorVitaly Novichkov <admin@wohlnet.ru>2018-06-21 08:58:49 +0300
committerVitaly Novichkov <admin@wohlnet.ru>2018-06-21 08:58:49 +0300
commit8917fd60694ef2a0757d6e250faea37482b34956 (patch)
tree56df6193d58e14d0f3952abcfd1bab24a69a58a7 /src/adlmidi_load.cpp
parent85b4a6621ec960314b568cc767e77a20e178c5de (diff)
downloadlibADLMIDI-8917fd60694ef2a0757d6e250faea37482b34956.tar.gz
libADLMIDI-8917fd60694ef2a0757d6e250faea37482b34956.tar.bz2
libADLMIDI-8917fd60694ef2a0757d6e250faea37482b34956.zip
Small clean-up in a custom bank loading function
Diffstat (limited to 'src/adlmidi_load.cpp')
-rw-r--r--src/adlmidi_load.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/adlmidi_load.cpp b/src/adlmidi_load.cpp
index d7b1e52..41f1837 100644
--- a/src/adlmidi_load.cpp
+++ b/src/adlmidi_load.cpp
@@ -173,9 +173,8 @@ bool MIDIplay::LoadBank(FileAndMemReader &fr)
}
// Read complete bank file into the memory
- fr.seek(0, SEEK_END);
- fsize = fr.tell();
- fr.seek(0, SEEK_SET);
+ fsize = fr.fileSize();
+ fr.seek(0, FileAndMemReader::SET);
// Allocate necessary memory block
raw_file_data = (char*)malloc(fsize);
if(!raw_file_data)