ScummVM API documentation
MusicPluginObject Class Referenceabstract

#include <musicplugin.h>

Inheritance diagram for MusicPluginObject:
PluginObject NullMusicPlugin

Public Member Functions

virtual const char * getId () const =0
 
virtual MusicDevices getDevices () const =0
 
virtual bool checkDevice (MidiDriver::DeviceHandle) const
 
virtual Common::Error createInstance (MidiDriver **mididriver, MidiDriver::DeviceHandle=0) const =0
 
- Public Member Functions inherited from PluginObject
virtual const char * getName () const =0
 

Detailed Description

A MusicPluginObject is essentially a factory for MidiDriver instances with the added ability of listing the available devices and their capabilities.

Member Function Documentation

◆ getId()

virtual const char* MusicPluginObject::getId ( ) const
pure virtual

Returns a unique string identifier which will be used to save the selected MIDI driver to the config file.

Implemented in NullMusicPlugin.

◆ getDevices()

virtual MusicDevices MusicPluginObject::getDevices ( ) const
pure virtual

Returns a list of the available devices.

Implemented in NullMusicPlugin.

◆ checkDevice()

virtual bool MusicPluginObject::checkDevice ( MidiDriver::DeviceHandle  ) const
inlinevirtual

Checks whether a device can actually be used. Currently this is only implemented for the MT-32 emulator to check whether the required rom files are present.

◆ createInstance()

virtual Common::Error MusicPluginObject::createInstance ( MidiDriver **  mididriver,
MidiDriver::DeviceHandle  = 0 
) const
pure virtual

Tries to instantiate a MIDI Driver instance based on the device previously detected via MidiDriver::detectDevice()

Parameters
mididriverPointer to a pointer which the MusicPluginObject sets to the newly create MidiDriver, or 0 in case of an error
devPointer to a device to be used then creating the driver instance. Default value of zero for driver types without devices.
Returns
a Common::Error describing the error which occurred, or kNoError

Implemented in NullMusicPlugin.


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