C64: fix per-channel osc for 6581
This commit is contained in:
parent
522fecc635
commit
e39a923b23
4 changed files with 19 additions and 3 deletions
|
|
@ -60,6 +60,13 @@ SID::~SID()
|
|||
delete[] fir;
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// Get DC offset of channel.
|
||||
// ----------------------------------------------------------------------------
|
||||
sound_sample SID::get_dc(int ch) {
|
||||
return voice[ch].getDC();
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// Mute/unmute channel.
|
||||
// ----------------------------------------------------------------------------
|
||||
|
|
|
|||
|
|
@ -34,6 +34,7 @@ public:
|
|||
|
||||
sound_sample last_chan_out[3];
|
||||
|
||||
sound_sample get_dc(int ch);
|
||||
void set_is_muted(int ch, bool val);
|
||||
void set_chip_model(chip_model model);
|
||||
void enable_filter(bool enable);
|
||||
|
|
|
|||
|
|
@ -38,6 +38,7 @@ public:
|
|||
// Amplitude modulated waveform output.
|
||||
// Range [-2048*255, 2047*255].
|
||||
RESID_INLINE sound_sample output();
|
||||
RESID_INLINE sound_sample getDC();
|
||||
|
||||
protected:
|
||||
WaveformGenerator wave;
|
||||
|
|
@ -72,6 +73,12 @@ sound_sample Voice::output()
|
|||
return (wave.output() - wave_zero)*envelope.output() + voice_DC;
|
||||
}
|
||||
|
||||
RESID_INLINE
|
||||
sound_sample Voice::getDC()
|
||||
{
|
||||
return voice_DC;
|
||||
}
|
||||
|
||||
#endif // RESID_INLINING || defined(__VOICE_CC__)
|
||||
|
||||
#endif // not __VOICE_H__
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue