1 /* ScummVM - Graphic Adventure Engine 2 * 3 * ScummVM is the legal property of its developers, whose names 4 * are too numerous to list here. Please refer to the COPYRIGHT 5 * file distributed with this source distribution. 6 * 7 * This program is free software; you can redistribute it and/or 8 * modify it under the terms of the GNU General Public License 9 * as published by the Free Software Foundation; either version 2 10 * of the License, or (at your option) any later version. 11 * 12 * This program is distributed in the hope that it will be useful, 13 * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 * GNU General Public License for more details. 16 * 17 * You should have received a copy of the GNU General Public License 18 * along with this program; if not, write to the Free Software 19 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 20 * 21 */ 22 /* 23 * VGMTrans (c) 2002-2019 24 * Licensed under the zlib license, 25 * refer to the included VGMTrans_LICENSE.txt file 26 */ 27 #ifndef AUDIO_SOUNDFONT_VAB_H 28 #define AUDIO_SOUNDFONT_VAB_H 29 30 #include "audio/soundfont/common.h" 31 #include "common/str.h" 32 #include "audio/soundfont/vgminstrset.h" 33 #include "audio/soundfont/vgmsamp.h" 34 35 class Vab : public VGMInstrSet { 36 public: 37 Vab(RawFile *file, uint32 offset); 38 virtual ~Vab(void); 39 40 virtual bool GetHeaderInfo(); 41 virtual bool GetInstrPointers(); 42 }; 43 44 // ******** 45 // VabInstr 46 // ******** 47 48 class VabInstr : public VGMInstr { 49 public: 50 VabInstr(VGMInstrSet *instrSet, uint32 offset, uint32 length, uint32 theBank, 51 uint32 theInstrNum, const Common::String &name = "Instrument"); 52 virtual ~VabInstr(); 53 54 virtual bool LoadInstr(); 55 56 public: 57 uint8 _tones; 58 uint8 _masterVol; 59 }; 60 61 // ****** 62 // VabRgn 63 // ****** 64 65 class VabRgn : public VGMRgn { 66 public: 67 VabRgn(VabInstr *instr, uint32 offset); 68 69 virtual bool LoadRgn(); 70 71 public: 72 uint16 _ADSR1; // raw ps2 ADSR1 value (articulation data) 73 uint16 _ADSR2; // raw ps2 ADSR2 value (articulation data) 74 }; 75 76 #endif // AUDIO_SOUNDFONT_VAB_H 77