|
OpenTTD Source 20260304-master-g1baaa74679
|
A DLS file. More...
Data Structures | |
| struct | DLSRegion |
| An instrument region maps a note range to wave data. More... | |
| struct | DLSInstrument |
| Instrument definition read from a DLS file. More... | |
| struct | DLSWave |
| Wave data definition from a DLS file. More... | |
Public Member Functions | |
| bool | LoadFile (std::string_view file) |
| Try loading a DLS file into memory. | |
Data Fields | |
| std::vector< DLSInstrument > | instruments |
| std::vector< POOLCUE > | pool_cues |
| std::vector< DLSWave > | waves |
Private Member Functions | |
| bool | ReadDLSArticulation (FileHandle &f, DWORD list_length, std::vector< CONNECTION > &out) |
| Load an articulation structure from a DLS file. | |
| bool | ReadDLSRegionList (FileHandle &f, DWORD list_length, DLSInstrument &instrument) |
| Load a list of regions from a DLS file. | |
| bool | ReadDLSRegion (FileHandle &f, DWORD list_length, std::vector< DLSRegion > &out) |
| Load a single region from a DLS file. | |
| bool | ReadDLSInstrumentList (FileHandle &f, DWORD list_length) |
| Load a list of instruments from a DLS file. | |
| bool | ReadDLSInstrument (FileHandle &f, DWORD list_length) |
| Load a single instrument from a DLS file. | |
| bool | ReadDLSWaveList (FileHandle &f, DWORD list_length) |
| Load a list of waves from a DLS file. | |
| bool | ReadDLSWave (FileHandle &f, DWORD list_length, long offset) |
| Load a single wave from a DLS file. | |
A DLS file.
Definition at line 45 of file dmusic.cpp.
| bool DLSFile::LoadFile | ( | std::string_view | file | ) |
Try loading a DLS file into memory.
| file | The file to load. |
true iff the file was loaded without issues. Definition at line 472 of file dmusic.cpp.
References Debug, FileHandle::Open(), ReadDLSInstrumentList(), and ReadDLSWaveList().
|
private |
Load an articulation structure from a DLS file.
| f | The file to read the data from. |
| list_length | The length of the data chunk in the file. |
| out | The container to read the DLS articulation into. |
true iff the data was loaded without issues. Definition at line 201 of file dmusic.cpp.
Referenced by ReadDLSInstrument(), and ReadDLSRegion().
|
private |
Load a single instrument from a DLS file.
| f | The file to read the data from. |
| list_length | The length of the data chunk in the file. |
true iff the data was loaded without issues. Definition at line 311 of file dmusic.cpp.
References Debug, ReadDLSArticulation(), and ReadDLSRegionList().
Referenced by ReadDLSInstrumentList().
|
private |
Load a list of instruments from a DLS file.
| f | The file to read the data from. |
| list_length | The length of the data chunk in the file. |
true iff the data was loaded without issues. Definition at line 354 of file dmusic.cpp.
References Debug, and ReadDLSInstrument().
Referenced by LoadFile().
|
private |
Load a single region from a DLS file.
| f | The file to read the data from. |
| list_length | The length of the data chunk in the file. |
| out | The container to read the DLS region into. |
true iff the data was loaded without issues. Definition at line 227 of file dmusic.cpp.
References Debug, and ReadDLSArticulation().
Referenced by ReadDLSRegionList().
|
private |
Load a list of regions from a DLS file.
| f | The file to read the data from. |
| list_length | The length of the data chunk in the file. |
| instrument | The instrument to load the region list for. |
true iff the data was loaded without issues. Definition at line 285 of file dmusic.cpp.
References Debug, and ReadDLSRegion().
Referenced by ReadDLSInstrument().
|
private |
Load a single wave from a DLS file.
| f | The file to read the data from. |
| list_length | The length of the data chunk in the file. |
| offset | The offset within the file. |
true iff the data was loaded without issues. Definition at line 382 of file dmusic.cpp.
References Debug.
Referenced by ReadDLSWaveList().
|
private |
Load a list of waves from a DLS file.
| f | The file to read the data from. |
| list_length | The length of the data chunk in the file. |
true iff the data was loaded without issues. Definition at line 440 of file dmusic.cpp.
References Debug, and ReadDLSWave().
Referenced by LoadFile().
| std::vector<DLSInstrument> DLSFile::instruments |
Definition at line 75 of file dmusic.cpp.
| std::vector<POOLCUE> DLSFile::pool_cues |
Definition at line 76 of file dmusic.cpp.
| std::vector<DLSWave> DLSFile::waves |
Definition at line 77 of file dmusic.cpp.