ScummVM API documentation
Resid::SID Class Referencefinal
Inheritance diagram for Resid::SID:
SID::SID Audio::EmulatedChip Audio::Chip Audio::Chip Audio::AudioStream

Public Member Functions

 SID (::SID::Config::SidType videoSystem)
 
void enable_filter (bool enable)
 
void enable_external_filter (bool enable)
 
bool set_sampling_parameters (double clock_freq, double sample_freq, double pass_freq=-1, double filter_scale=0.97)
 
void updateClock (cycle_count delta_t)
 
int updateClock (cycle_count &delta_t, short *buf, int n, int interleave=1)
 
bool init () override
 
void reset () override
 
reg8 read (reg8 offset)
 
void writeReg (int offset, int value) override
 
int output ()
 
bool isStereo () const override
 
- Public Member Functions inherited from Audio::Chip
void start (TimerCallback *callback, int timerFrequency)
 
void stop ()
 
- Public Member Functions inherited from Audio::EmulatedChip
void setCallbackFrequency (int timerFrequency) override
 
int readBuffer (int16 *buffer, const int numSamples) override
 
int getRate () const override
 
bool endOfData () const override
 

Protected Member Functions

void generateSamples (int16 *buffer, int numSamples) override
 
- Protected Member Functions inherited from Audio::EmulatedChip
void startCallbacks (int timerFrequency) override final
 
void stopCallbacks () override final
 
- Protected Member Functions inherited from Audio::AudioStream
virtual bool endOfStream () const
 

Protected Attributes

Voice voice [3]
 
Filter filter
 
ExternalFilter extfilt
 
reg8 bus_value
 
cycle_count bus_value_ttl
 
double clock_frequency
 
cycle_count cycles_per_sample
 
cycle_count sample_offset
 
short sample_prev
 
::SID::Config::SidType _videoSystem
 
cycle_count _cpuCyclesLeft
 
- Protected Attributes inherited from Audio::Chip
Common::ScopedPtr< TimerCallback_callback
 

Static Protected Attributes

static const int FIXP_SHIFT
 
static const int FIXP_MASK
 
- Static Protected Attributes inherited from Audio::EmulatedChip
static const int FIXP_SHIFT = 16
 

Additional Inherited Members

- Public Types inherited from Audio::Chip
typedef Common::Functor0< void > TimerCallback
 

Member Function Documentation

◆ init()

bool Resid::SID::init ( )
overridevirtual

Initializes the SID emulator.

Returns
true on success, false on failure

Implements SID::SID.

◆ reset()

void Resid::SID::reset ( )
overridevirtual

Reinitializes the SID emulator

Implements SID::SID.

◆ writeReg()

void Resid::SID::writeReg ( int  r,
int  v 
)
overridevirtual

Function to directly write to a specific SID register.

Parameters
rhardware register number to write to
vvalue, which will be written

Implements SID::SID.

◆ isStereo()

bool Resid::SID::isStereo ( ) const
inlineoverridevirtual

Check whether this is a stereo stream.

Implements Audio::AudioStream.

◆ generateSamples()

void Resid::SID::generateSamples ( int16 *  buffer,
int  numSamples 
)
overrideprotectedvirtual

Read up to 'length' samples.

Data will be in native endianess, 16 bit per sample, signed. For stereo chips, 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 chip, you will get a total of two left channel and two right channel samples.

Implements Audio::EmulatedChip.


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