Public Types | |
enum | EmuType { kTypeTowns = 0, kType26 = 1, kType86 = 2 } |
Public Member Functions | |
TownsPC98_FmSynth (Audio::Mixer *mixer, EmuType type) | |
virtual bool | init () |
virtual void | reset () |
void | writeReg (uint8 part, uint8 regAddress, uint8 value) |
uint8 | readReg (uint8 part, uint8 regAddress) |
int | readBuffer (int16 *buffer, const int numSamples) |
bool | isStereo () const |
bool | endOfData () const |
int | getRate () const |
Public Member Functions inherited from Audio::AudioStream | |
virtual bool | endOfStream () const |
Protected Attributes | |
const int | _numChan |
const int | _numSSG |
const bool | _hasPercussion |
Common::Mutex & | _mutex |
int | _mixerThreadLockCounter |
|
virtual |
Fill the given buffer with up to numSamples
samples.
Data must be in native endianness, 16 bits per sample, signed. For stereo stream, the buffer will be filled with interleaved left and right channel samples, starting with the left sample. Furthermore, the samples in the left and right are summed up. So if you request 4 samples from a stereo stream, you will get a total of two left channel and two right channel samples.
Implements Audio::AudioStream.
|
virtual |
Check whether this is a stereo stream.
Implements Audio::AudioStream.
|
virtual |
Check whether end of data has been reached.
If this returns true, it indicates that at this time there is no data available in the stream. However, there might be more data in the future.
This is used by e.g. a rate converter to decide whether to keep on converting data or to stop.
Implements Audio::AudioStream.
|
virtual |
Sample rate of the stream.
Implements Audio::AudioStream.