ScummVM API documentation
OPL::Config Class Reference

Classes

struct  EmulatorDescription
 

Public Types

enum  OplFlags { kFlagOpl2 = (1 << 0), kFlagDualOpl2 = (1 << 1), kFlagOpl3 = (1 << 2) }
 
enum  OplType { kOpl2, kDualOpl2, kOpl3 }
 
typedef int8 DriverId
 

Static Public Member Functions

static const EmulatorDescriptiongetAvailable ()
 
static DriverId parse (const Common::String &name)
 
static const EmulatorDescriptionfindDriver (DriverId id)
 
static DriverId detect (OplType type)
 
static OPLcreate (DriverId driver, OplType type)
 
static OPLcreate (OplType type=kOpl2)
 

Member Enumeration Documentation

◆ OplType

OPL type to emulate.

Member Function Documentation

◆ getAvailable()

static const EmulatorDescription* OPL::Config::getAvailable ( )
inlinestatic

Get a list of all available OPL emulators.

Returns
list of all available OPL emulators, terminated by a zero entry

◆ parse()

static DriverId OPL::Config::parse ( const Common::String name)
static

Returns the driver id of a given name.

◆ findDriver()

static const EmulatorDescription* OPL::Config::findDriver ( DriverId  id)
static
Returns
The driver description for the given id or 0 in case it is not available.

◆ detect()

static DriverId OPL::Config::detect ( OplType  type)
static

Detects a driver for the specific type.

Returns
Returns a valid driver id on success, -1 otherwise.

◆ create() [1/2]

static OPL* OPL::Config::create ( DriverId  driver,
OplType  type 
)
static

Creates the specific driver with a specific type setup.

◆ create() [2/2]

static OPL* OPL::Config::create ( OplType  type = kOpl2)
static

Wrapper to easily init an OPL chip, without specifing an emulator. By default it will try to initialize an OPL2 emulator, thus an AdLib card.


The documentation for this class was generated from the following file: