mirror of
https://github.com/TomHarte/CLK.git
synced 2024-11-22 12:33:29 +00:00
Improve clocking.
This commit is contained in:
parent
3da3401125
commit
bcd4a2216a
@ -54,7 +54,14 @@ struct PCSpeaker {
|
||||
}
|
||||
|
||||
void set_level() {
|
||||
toggle.set_output(pit_mask_ ? pit_input_ : level_);
|
||||
// TODO: eliminate complete guess of mixing function here.
|
||||
const bool new_output = (pit_mask_ & pit_input_) ^ level_;
|
||||
|
||||
if(new_output != output_) {
|
||||
update();
|
||||
toggle.set_output(new_output);
|
||||
output_ = new_output;
|
||||
}
|
||||
}
|
||||
|
||||
Concurrency::AsyncTaskQueue<false> queue;
|
||||
@ -65,6 +72,7 @@ struct PCSpeaker {
|
||||
bool pit_input_ = false;
|
||||
bool pit_mask_ = false;
|
||||
bool level_ = false;
|
||||
bool output_ = false;
|
||||
};
|
||||
|
||||
class PITObserver {
|
||||
|
Loading…
Reference in New Issue
Block a user