mirror of
https://github.com/TomHarte/CLK.git
synced 2024-11-25 16:31:42 +00:00
Eliminate a macro.
This commit is contained in:
parent
6dcc13921f
commit
e06a66644c
@ -111,20 +111,19 @@ void AY38910SampleSource<is_stereo>::set_output_mixing(float a_left, float b_lef
|
|||||||
|
|
||||||
template <bool is_stereo>
|
template <bool is_stereo>
|
||||||
void AY38910SampleSource<is_stereo>::advance() {
|
void AY38910SampleSource<is_stereo>::advance() {
|
||||||
#define step_channel(c) \
|
const auto step_channel = [&](int c) {
|
||||||
if(tone_counters_[c]) tone_counters_[c]--;\
|
if(tone_counters_[c]) --tone_counters_[c];
|
||||||
else {\
|
else {
|
||||||
tone_outputs_[c] ^= 1;\
|
tone_outputs_[c] ^= 1;
|
||||||
tone_counters_[c] = tone_periods_[c] << 1;\
|
tone_counters_[c] = tone_periods_[c] << 1;
|
||||||
}
|
}
|
||||||
|
};
|
||||||
|
|
||||||
// Update the tone channels.
|
// Update the tone channels.
|
||||||
step_channel(0);
|
step_channel(0);
|
||||||
step_channel(1);
|
step_channel(1);
|
||||||
step_channel(2);
|
step_channel(2);
|
||||||
|
|
||||||
#undef step_channel
|
|
||||||
|
|
||||||
// Update the noise generator. This recomputes the new bit repeatedly but harmlessly, only shifting
|
// Update the noise generator. This recomputes the new bit repeatedly but harmlessly, only shifting
|
||||||
// it into the official 17 upon divider underflow.
|
// it into the official 17 upon divider underflow.
|
||||||
if(noise_counter_) noise_counter_--;
|
if(noise_counter_) noise_counter_--;
|
||||||
|
Loading…
Reference in New Issue
Block a user