1
0
mirror of https://github.com/TomHarte/CLK.git synced 2026-03-11 04:42:20 +00:00

Splits OPLL and OPL2 classes.

Logic is: they have different mixers (additive in the OPL2, time-division multiplexing in the OPLL) as well as different register sets. So I'll put operator and channel logic directly into those structs.
This commit is contained in:
Thomas Harte
2020-04-07 23:15:26 -04:00
parent 027af5acca
commit dd6769bfbc
3 changed files with 244 additions and 219 deletions

View File

@@ -99,7 +99,7 @@ class ConcreteMachine:
(target.model == Target::Model::SG1000) ? TI::SN76489::Personality::SN76489 : TI::SN76489::Personality::SMS,
audio_queue_,
sn76489_divider),
opll_(Yamaha::OPL2::Personality::OPLL, audio_queue_),
opll_(audio_queue_),
mixer_(sn76489_, opll_),
speaker_(mixer_),
keyboard_({Inputs::Keyboard::Key::Enter, Inputs::Keyboard::Key::Escape}, {}) {
@@ -453,8 +453,8 @@ class ConcreteMachine:
Concurrency::DeferringAsyncTaskQueue audio_queue_;
TI::SN76489 sn76489_;
Yamaha::OPL2 opll_;
Outputs::Speaker::CompoundSource<TI::SN76489, Yamaha::OPL2> mixer_;
Yamaha::OPL::OPLL opll_;
Outputs::Speaker::CompoundSource<decltype(sn76489_), decltype(opll_)> mixer_;
Outputs::Speaker::LowpassSpeaker<decltype(mixer_)> speaker_;
uint8_t opll_detection_word_ = 0xff;