aboutsummaryrefslogtreecommitdiff
path: root/backends
diff options
context:
space:
mode:
authorNicolas Bacca2003-01-29 21:28:37 +0000
committerNicolas Bacca2003-01-29 21:28:37 +0000
commit2c755a1f3129ff14d44262ab7979dc7945303b6b (patch)
treef1edeb5c123a25a551e1f96a5d16ba703a89882c /backends
parent32be9261fc742cef7792b112e585abdfe699f5af (diff)
downloadscummvm-rg350-2c755a1f3129ff14d44262ab7979dc7945303b6b.tar.gz
scummvm-rg350-2c755a1f3129ff14d44262ab7979dc7945303b6b.tar.bz2
scummvm-rg350-2c755a1f3129ff14d44262ab7979dc7945303b6b.zip
Change AdLib emulation quality for slower devices - added PROP_GET_FMOPL_ENV_BITS and PROP_GET_FMOPL_EG_ENT
svn-id: r6573
Diffstat (limited to 'backends')
-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);