mirror of
https://github.com/ZDoom/ZMusic.git
synced 2025-03-19 09:01:48 +00:00
- embedded the default OPN bank directly in the binary so that it works, even if no custom bank is set.
This commit is contained in:
parent
c4fc5789b9
commit
fb0d3ac183
3 changed files with 1559 additions and 3 deletions
1556
source/data/xg.h
Normal file
1556
source/data/xg.h
Normal file
File diff suppressed because it is too large
Load diff
BIN
source/data/xg.wopn
Normal file
BIN
source/data/xg.wopn
Normal file
Binary file not shown.
|
@ -80,6 +80,7 @@ enum
|
|||
// OPNMIDIDevice Constructor
|
||||
//
|
||||
//==========================================================================
|
||||
#include "data/xg.h"
|
||||
|
||||
OPNMIDIDevice::OPNMIDIDevice(const char *bank)
|
||||
:SoftSynthMIDIDevice(44100)
|
||||
|
@ -91,10 +92,9 @@ OPNMIDIDevice::OPNMIDIDevice(const char *bank)
|
|||
{
|
||||
if(opnConfig.default_bank.size() == 0)
|
||||
{
|
||||
opn2_close(Renderer);
|
||||
throw std::runtime_error("No OPN bank found");
|
||||
opn2_openBankData(Renderer, xg_default, 62080);
|
||||
}
|
||||
opn2_openBankData(Renderer, opnConfig.default_bank.data(), (long)opnConfig.default_bank.size());
|
||||
else opn2_openBankData(Renderer, opnConfig.default_bank.data(), (long)opnConfig.default_bank.size());
|
||||
}
|
||||
|
||||
opn2_switchEmulator(Renderer, (int)opnConfig.opn_emulator_id);
|
||||
|
|
Loading…
Reference in a new issue