1
0
mirror of https://github.com/TomHarte/CLK.git synced 2025-08-09 05:25:01 +00:00

Enable extra functionality.

This commit is contained in:
Thomas Harte
2025-01-01 22:34:30 -05:00
parent c42e231e99
commit 0b98f21443

View File

@@ -28,7 +28,7 @@ public:
void apply_samples(std::size_t size, Outputs::Speaker::MonoSample *const target) { void apply_samples(std::size_t size, Outputs::Speaker::MonoSample *const target) {
const auto count_frequency = [&](int index) { const auto count_frequency = [&](int index) {
++counts_[index]; ++counts_[index];
if(counts_[index] == (frequencies_[index] /* ^ 1023 */) * frequency_multiplier_) { if(counts_[index] == (frequencies_[index] ^ 1023) * frequency_multiplier_) {
states_[index] ^= 1; states_[index] ^= 1;
counts_[index] = 0; counts_[index] = 0;
} else if(counts_[index] == 1024 * frequency_multiplier_) { } else if(counts_[index] == 1024 * frequency_multiplier_) {
@@ -36,9 +36,9 @@ public:
} }
}; };
// if(sound_dc_) { if(sound_dc_) {
// Outputs::Speaker::fill<action>(target, target + size, Outputs::Speaker::MonoSample(volume_ * 2)); Outputs::Speaker::fill<action>(target, target + size, Outputs::Speaker::MonoSample(volume_ * 2));
// } else { } else {
// TODO: noise generation. // TODO: noise generation.
for(size_t c = 0; c < size; c++) { for(size_t c = 0; c < size; c++) {
@@ -54,7 +54,7 @@ public:
) * volume_ ) * volume_
)); ));
} }
// } }
r_ += size; r_ += size;
} }