Engine.java
package libsidplay.common;
import libsidplay.config.IEmulationSection;
import libsidplay.sidtune.AudioTune;
import libsidplay.sidtune.SidTune;
public enum Engine {
/**
* Software (emulation using RESID or RESIDfp)
*/
EMULATION,
/**
* Software (Network SID Device via socket connection)
*/
NETSID,
/**
* Hardware (HardSID4U, HardSID Uno and HardSID UPlay - USB devices)
*/
HARDSID,
/**
* Hardware (SIDBlaster - USB device)
*/
SIDBLASTER,
/**
* Hardware (ExSID, ExSID+ - USB devices)
*/
EXSID,
/**
* USBSID-Pico
*/
USBSID,
/**
* HardSID compatible (implementing common HardSID library specification)
*/
HARDSID_DLL;
/**
* Choose the engine to be used (MP3 requires EMULATION).
*
* @return engine to be used
*/
public static Engine getEngine(IEmulationSection emulationSection, SidTune tune) {
if (tune instanceof AudioTune) {
return EMULATION;
}
return emulationSection.getEngine();
}
public boolean isHardwareBased() {
return this == HARDSID || this == SIDBLASTER || this == EXSID || this == USBSID || this == HARDSID_DLL;
}
}