◆ init()
bool OPL::DOSBox::OPL::init |
( |
| ) |
|
|
virtual |
Initializes the OPL emulator.
- Returns
- true on success, false on failure
Implements OPL::OPL.
◆ reset()
void OPL::DOSBox::OPL::reset |
( |
| ) |
|
|
virtual |
◆ write()
void OPL::DOSBox::OPL::write |
( |
int |
a, |
|
|
int |
v |
|
) |
| |
|
virtual |
Writes a byte to the given I/O port.
- Parameters
-
a | port address |
v | value, which will be written |
Implements OPL::OPL.
◆ read()
byte OPL::DOSBox::OPL::read |
( |
int |
a | ) |
|
|
virtual |
Reads a byte from the given I/O port.
- Parameters
-
- Returns
- value read
Implements OPL::OPL.
◆ writeReg()
void OPL::DOSBox::OPL::writeReg |
( |
int |
r, |
|
|
int |
v |
|
) |
| |
|
virtual |
Function to directly write to a specific OPL register. This writes to both chips for a Dual OPL2. We allow writing to secondary OPL registers by using register values >= 0x100.
- Parameters
-
r | hardware register number to write to |
v | value, which will be written |
Implements OPL::OPL.
◆ isStereo()
bool OPL::DOSBox::OPL::isStereo |
( |
| ) |
const |
|
inlinevirtual |
◆ generateSamples()
void OPL::DOSBox::OPL::generateSamples |
( |
int16 * |
buffer, |
|
|
int |
numSamples |
|
) |
| |
|
protectedvirtual |
Read up to 'length' samples.
Data will be in native endianess, 16 bit per sample, signed. For stereo OPL, buffer will be filled with interleaved left and right channel samples, starting with a left sample. Furthermore, the samples in the left and right are summed up. So if you request 4 samples from a stereo OPL, you will get a total of two left channel and two right channel samples.
Implements OPL::EmulatedOPL.
The documentation for this class was generated from the following file: