diff options
author | Walter van Niftrik | 2015-03-17 10:23:25 +0100 |
---|---|---|
committer | Matthew Hoops | 2015-07-07 20:19:47 -0400 |
commit | 40820eebf561d1a7c35f07151d534253ad2a7ea5 (patch) | |
tree | 06e9e358d300180cea4c3ac0eced37b9439acb70 /audio/fmopl.cpp | |
parent | a45ff5a6a94e6ace8528ac6bb157f7045f43c3b4 (diff) | |
download | scummvm-rg350-40820eebf561d1a7c35f07151d534253ad2a7ea5.tar.gz scummvm-rg350-40820eebf561d1a7c35f07151d534253ad2a7ea5.tar.bz2 scummvm-rg350-40820eebf561d1a7c35f07151d534253ad2a7ea5.zip |
AUDIO: Add experimental hardware OPL support using ALSA
Diffstat (limited to 'audio/fmopl.cpp')
-rw-r--r-- | audio/fmopl.cpp | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/audio/fmopl.cpp b/audio/fmopl.cpp index b0b3273e82..ded450629d 100644 --- a/audio/fmopl.cpp +++ b/audio/fmopl.cpp @@ -34,12 +34,21 @@ namespace OPL { +// Factory functions + +#ifdef USE_ALSA +namespace ALSA { + OPL *create(Config::OplType type); +} // End of namespace ALSA +#endif // USE_ALSA + // Config implementation enum OplEmulator { kAuto = 0, kMame = 1, - kDOSBox = 2 + kDOSBox = 2, + kALSA = 3 }; OPL::OPL() { @@ -54,6 +63,9 @@ const Config::EmulatorDescription Config::_drivers[] = { #ifndef DISABLE_DOSBOX_OPL { "db", _s("DOSBox OPL emulator"), kDOSBox, kFlagOpl2 | kFlagDualOpl2 | kFlagOpl3 }, #endif +#ifdef USE_ALSA + { "alsa", _s("ALSA Direct FM"), kALSA, kFlagOpl2 | kFlagDualOpl2 }, +#endif { 0, 0, 0, 0 } }; @@ -166,6 +178,11 @@ OPL *Config::create(DriverId driver, OplType type) { return new DOSBox::OPL(type); #endif +#ifdef USE_ALSA + case kALSA: + return ALSA::create(type); +#endif + default: warning("Unsupported OPL emulator %d", driver); // TODO: Maybe we should add some dummy emulator too, which just outputs |