Final clean up of IOPort

This commit is contained in:
Jaby 2022-09-07 19:08:11 +02:00 committed by Jaby
parent d9919e3317
commit 7e1e8bde34
2 changed files with 7 additions and 6 deletions

View File

@ -42,6 +42,7 @@ namespace SPU {
// For Volume Mode // For Volume Mode
static constexpr Bit<int16_t> SweepEnable = 15; // 0 Volume Mode; 1 Sweep Mode static constexpr Bit<int16_t> SweepEnable = 15; // 0 Volume Mode; 1 Sweep Mode
static constexpr auto VolumeEnable = !SweepEnable;
static constexpr BitRange<int16_t> Volume = BitRange<int16_t>::from_to(0, 14); static constexpr BitRange<int16_t> Volume = BitRange<int16_t>::from_to(0, 14);
// For Sweep Mode // For Sweep Mode

View File

@ -10,7 +10,7 @@ namespace SPU {
} }
static void clear_main_volume() { static void clear_main_volume() {
static constexpr auto StartVol = SweepVolume::with(!SweepVolume::SweepEnable, SweepVolume::Volume.with(I16_MAX >> 2)); static constexpr auto StartVol = SweepVolume::with(SweepVolume::VolumeEnable, SweepVolume::Volume.with(I16_MAX >> 2));
MainVolume::left.write(StartVol); MainVolume::left.write(StartVol);
MainVolume::right.write(StartVol); MainVolume::right.write(StartVol);