Final clean up of IOPort
This commit is contained in:
parent
beb3d6cb86
commit
2893acae19
|
@ -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
|
||||||
|
|
|
@ -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);
|
||||||
|
|
Loading…
Reference in New Issue