30 #include "sidbuilder.h"
41 static const int MIXER_EVENT_RATE = 5000;
57 int m_fastForwardFactor;
59 int_least32_t m_leftVolume;
60 int_least32_t m_rightVolume;
64 uint_least32_t m_sampleCount;
65 uint_least32_t m_sampleIndex;
66 short *m_sampleBuffer;
69 int triangularDithering()
71 const int prevValue = oldRandomValue;
73 return oldRandomValue - prevValue;
84 event_context(*context),
86 m_fastForwardFactor(1),
94 void reset() { event_context.
schedule(*
this, MIXER_EVENT_RATE, EVENT_CLOCK_PHI2); }
96 void begin(
short *buffer, uint_least32_t count);
99 bool setFastForward(
int ff);
100 void setVolume(int_least32_t left, int_least32_t right);
101 void setStereo(
bool stereo) { m_stereo = stereo; }
103 bool notFinished()
const {
return m_sampleIndex != m_sampleCount; }
104 uint_least32_t samplesGenerated()
const {
return m_sampleIndex; }
105 uint_least32_t sampleCount()
const {
return m_sampleCount; }