1
0
mirror of https://github.com/TomHarte/CLK.git synced 2024-10-01 13:58:20 +00:00

Made an attempt to clock the AY.

This commit is contained in:
Thomas Harte 2017-08-02 07:20:59 -04:00
parent 4d5d5041df
commit bda9441620

View File

@ -87,6 +87,7 @@ class Speaker {
Ensures any deferred processing occurs now.
*/
void flush() {
if(!queued_functions_) return;
std::shared_ptr<std::list<std::function<void(void)>>> queued_functions = queued_functions_;
queued_functions_.reset();
_queue->enqueue([queued_functions] {
@ -143,7 +144,9 @@ template <class T> class Filter: public Speaker {
void run_for(const Cycles cycles) {
enqueue([=]() {
printf("... %d ...\n", (unsigned int)cycles.as_int());
unsigned int cycles_remaining = (unsigned int)cycles.as_int();
printf("!!!\n", (unsigned int)cycles.as_int());
if(coefficients_are_dirty_) update_filter_coefficients();
// if input and output rates exactly match, just accumulate results and pass on