aboutsummaryrefslogtreecommitdiff
path: root/backends/midi/adlib.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'backends/midi/adlib.cpp')
-rw-r--r--backends/midi/adlib.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/backends/midi/adlib.cpp b/backends/midi/adlib.cpp
index 120462f6aa..4f35f0322e 100644
--- a/backends/midi/adlib.cpp
+++ b/backends/midi/adlib.cpp
@@ -737,6 +737,8 @@ int MidiDriver_ADLIB::open ()
int i;
MidiChannelAdl *mc;
+ int env_bits = g_system->property(OSystem::PROP_GET_FMOPL_ENV_BITS, NULL);
+ int eg_ent = g_system->property(OSystem::PROP_GET_FMOPL_EG_ENT, NULL);
for (i = 0, mc = _midi_channels; i != ARRAYSIZE(_midi_channels); i++, mc++) {
mc->_channel = i;
@@ -746,6 +748,8 @@ int MidiDriver_ADLIB::open ()
_adlib_reg_cache = (byte *)calloc(256, 1);
+ OPLBuildTables((env_bits ? env_bits : FMOPL_ENV_BITS_HQ), (eg_ent ? eg_ent : FMOPL_EG_ENT_HQ));
+
_opl = OPLCreate(OPL_TYPE_YM3812, 3579545, g_system->property(OSystem::PROP_GET_SAMPLE_RATE, 0));
adlib_write(1, 0x20);