mirror of
https://github.com/scummvm/scummvm.git
synced 2026-05-21 05:40:43 +00:00
AUDIO: Introduce DISABLE_MAME_OPL
Similar to DISABLE_DOSBOX_OPL and DISABLE_NUKED_OPL. Now with the null driver available, weaker backends can be completely OPL emulation free.
This commit is contained in:
committed by
Filippos Karapetis
parent
25024d5188
commit
182ad45eae
@@ -81,7 +81,9 @@ OPL::OPL() {
|
||||
const Config::EmulatorDescription Config::_drivers[] = {
|
||||
{ "auto", "<default>", kAuto, kFlagOpl2 | kFlagDualOpl2 | kFlagOpl3 },
|
||||
{ "null", _s("None"), kNull, kFlagOpl2 | kFlagDualOpl2 | kFlagOpl3 },
|
||||
#ifndef DISABLE_MAME_OPL
|
||||
{ "mame", _s("MAME OPL emulator"), kMame, kFlagOpl2 },
|
||||
#endif
|
||||
#ifndef DISABLE_DOSBOX_OPL
|
||||
{ "db", _s("DOSBox OPL emulator"), kDOSBox, kFlagOpl2 | kFlagDualOpl2 | kFlagOpl3 },
|
||||
#endif
|
||||
@@ -201,12 +203,14 @@ OPL *Config::create(DriverId driver, OplType type) {
|
||||
}
|
||||
|
||||
switch (driver) {
|
||||
#ifndef DISABLE_MAME_OPL
|
||||
case kMame:
|
||||
if (type == kOpl2)
|
||||
return new MAME::OPL();
|
||||
else
|
||||
warning("MAME OPL emulator only supports OPL2 emulation");
|
||||
return nullptr;
|
||||
#endif
|
||||
|
||||
#ifndef DISABLE_DOSBOX_OPL
|
||||
case kDOSBox:
|
||||
|
||||
@@ -22,6 +22,8 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef DISABLE_MAME_OPL
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
@@ -1253,3 +1255,5 @@ FM_OPL *makeAdLibOPL(int rate) {
|
||||
|
||||
} // End of namespace MAME
|
||||
} // End of namespace OPL
|
||||
|
||||
#endif // !DISABLE_MAME_OPL
|
||||
|
||||
@@ -26,6 +26,8 @@
|
||||
#ifndef AUDIO_SOFTSYNTH_OPL_MAME_H
|
||||
#define AUDIO_SOFTSYNTH_OPL_MAME_H
|
||||
|
||||
#ifndef DISABLE_MAME_OPL
|
||||
|
||||
#include "common/scummsys.h"
|
||||
#include "common/random.h"
|
||||
|
||||
@@ -196,4 +198,6 @@ protected:
|
||||
} // End of namespace MAME
|
||||
} // End of namespace OPL
|
||||
|
||||
#endif // !DISABLE_MAME_OPL
|
||||
|
||||
#endif
|
||||
|
||||
@@ -180,7 +180,13 @@ static const char HELP_STRING4[] =
|
||||
" --enable-gs Enable Roland GS mode for MIDI playback\n"
|
||||
" --output-channels=CHANNELS Select output channel count (e.g. 2 for stereo)\n"
|
||||
" --output-rate=RATE Select output sample rate in Hz (e.g. 22050)\n"
|
||||
" --opl-driver=DRIVER Select AdLib (OPL) emulator (db, mame"
|
||||
" --opl-driver=DRIVER Select AdLib (OPL) emulator ("
|
||||
#ifndef DISABLE_MAME_OPL
|
||||
"mame"
|
||||
#endif
|
||||
#ifndef DISABLE_DOSBOX_OPL
|
||||
", db"
|
||||
#endif
|
||||
#ifndef DISABLE_NUKED_OPL
|
||||
", nuked"
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user