1
0
mirror of https://github.com/TomHarte/CLK.git synced 2024-06-18 13:29:41 +00:00

Make some intimation towards audio.

This commit is contained in:
Thomas Harte 2024-04-09 21:53:40 -04:00
parent e2e951ad0b
commit d62ea95889

View File

@ -8,6 +8,9 @@
#pragma once
#include "../../../Concurrency/AsyncTaskQueue.hpp"
#include "../../../Outputs/Speaker/Implementation/LowpassSpeaker.hpp"
#include <cstdint>
namespace Archimedes {
@ -15,7 +18,10 @@ namespace Archimedes {
/// Models the Archimedes sound output; in a real machine this is a joint efort between the VIDC and the MEMC.
template <typename InterruptObserverT>
struct Sound {
Sound(InterruptObserverT &observer, const uint8_t *ram) : ram_(ram), observer_(observer) {}
Sound(InterruptObserverT &observer, const uint8_t *ram) : ram_(ram), observer_(observer) {
speaker_.set_input_rate(1'000'000);
speaker_.set_high_frequency_cutoff(10'000.0f); // Complete guess as to frequency.
}
void set_next_end(uint32_t value) {
next_.end = value;
@ -115,6 +121,8 @@ private:
} positions_[8];
InterruptObserverT &observer_;
Outputs::Speaker::PushLowpass<true> speaker_;
Concurrency::AsyncTaskQueue<true> queue_;
};
}