26 #ifndef AUDIO_SOUNDFONT_VGMITEM_H 27 #define AUDIO_SOUNDFONT_VGMITEM_H 29 #include "common/scummsys.h" 30 #include "common/str.h" 31 #include "common/array.h" 33 #include "synthfile.h" 45 VGMItem(
VGMFile *thevgmfile, uint32 theOffset, uint32 theLength = 0,
54 uint32 GetBytes(uint32 nIndex, uint32 nCount,
void *pBuffer);
55 uint8 GetByte(uint32 offset);
56 uint16 GetShort(uint32 offset);
74 void AddSimpleItem(uint32 offset, uint32 length,
const Common::String &theName);
98 virtual bool Load() = 0;
102 size_t size()
const {
return _unLength; }
105 uint32 GetBytes(uint32 nIndex, uint32 nCount,
void *pBuffer);
107 inline uint8 GetByte(uint32 offset)
const {
return _rawfile->GetByte(offset); }
108 inline uint16 GetShort(uint32 offset)
const {
return _rawfile->GetShort(offset); }
109 inline uint32 GetWord(uint32 offset)
const {
return _rawfile->GetWord(offset); }
115 size_t GetEndOffset() {
return _rawfile->size(); }
117 const char *data()
const {
return _rawfile->data() + _dwOffset; }
146 virtual bool LoadRgn() {
return true; }
148 void AddGeneralItem(uint32 offset, uint32 length,
const Common::String &name);
149 void SetFineTune(int16 relativePitchCents) { _fineTune = relativePitchCents; }
150 void SetPan(uint8 pan);
151 void AddPan(uint8 pan, uint32 offset, uint32 length = 1);
152 void AddVolume(
double volume, uint32 offset, uint32 length = 1);
153 void AddUnityKey(int8 unityKey, uint32 offset, uint32 length = 1);
154 void AddKeyLow(uint8 keyLow, uint32 offset, uint32 length = 1);
155 void AddKeyHigh(uint8 keyHigh, uint32 offset, uint32 length = 1);
156 void AddSampNum(
int sampNum, uint32 offset, uint32 length = 1);
176 double _release_time;
177 double _sustain_level;
178 double _sustain_time;
180 uint16 _attack_transform;
181 uint16 _release_transform;
213 #endif // AUDIO_SOUNDFONT_VGMITEM_H
Definition: vgmitem.h:141
Definition: vgminstrset.h:66
Definition: vgmitem.h:190