26 #include "residfp-config.h"
50 const char* getMessage() {
return message; }
70 static const int BUS_TTL;
118 unsigned char delayedValue;
121 unsigned char busValue;
132 void writeImmediate(
int offset,
unsigned char value);
139 void ageBusValue(
int n);
154 void voiceSync(
bool sync);
167 ChipModel getChipModel()
const {
return model; }
182 void input(
int value);
204 unsigned char read(
int offset);
212 void write(
int offset,
unsigned char value);
220 void mute(
int channel,
bool enable) { muted[channel] = enable; }
246 void setSamplingParameters(
double clockFrequency, SamplingMethod method,
double samplingFrequency,
double highestAccurateFrequency);
255 int clock(
int cycles,
short* buf);
286 #if RESID_INLINING || defined(SID_CPP)
291 #include "ExternalFilter.h"
293 #include "resample/Resampler.h"
298 int SID::output()
const
300 return externalFilter->
clock(
302 voice[0]->output(voice[2]->wave()),
303 voice[1]->output(voice[0]->wave()),
304 voice[2]->output(voice[1]->wave())
318 int delta_t = std::min(nextVoiceSync, cycles);
322 if (delayedOffset != -1)
327 for (
int i = 0; i < delta_t; i++)
329 if (resampler->
input(output()))
335 voice[0]->wave()->
clock();
336 voice[1]->wave()->
clock();
337 voice[2]->wave()->
clock();
340 voice[0]->envelope()->
clock();
341 voice[1]->envelope()->
clock();
342 voice[2]->envelope()->
clock();
345 if (delayedOffset != -1)
347 writeImmediate(delayedOffset, delayedValue);
352 nextVoiceSync -= delta_t;
355 if (nextVoiceSync == 0)
Definition: Filter8580.h:48
Definition: Potentiometer.h:37
void clockSilent(int cycles)
Definition: SID.cpp:370
short getOutput() const
Definition: Resampler.h:57
void clock()
Definition: EnvelopeGenerator.h:211
void input(int value)
Definition: SID.cpp:290
Filter6581 * getFilter6581() const
Definition: SID.h:274
virtual int clock(int v1, int v2, int v3)=0
int clock(int cycles, short *buf)
Definition: SID.h:311
Definition: ExternalFilter.h:51
Definition: Resampler.h:34
void setSamplingParameters(double clockFrequency, SamplingMethod method, double samplingFrequency, double highestAccurateFrequency)
Definition: SID.cpp:347
Filter8580 * getFilter8580() const
Definition: SID.h:281
Definition: Filter6581.h:47
virtual bool input(int sample)=0
unsigned char read(int offset)
Definition: SID.cpp:296
void write(int offset, unsigned char value)
Definition: SID.cpp:331
void mute(int channel, bool enable)
Definition: SID.h:220
void setChipModel(ChipModel model)
Definition: SID.cpp:238
void reset()
Definition: SID.cpp:268
int clock(int Vi)
Definition: ExternalFilter.h:102