Clear MainVolume and improve port code
This commit is contained in:
@@ -2,11 +2,21 @@
|
||||
#include <PSX/System/IOPorts/IOPort.hpp>
|
||||
|
||||
namespace SPU {
|
||||
using namespace Port;
|
||||
|
||||
static void clear_key() {
|
||||
Key::off.write(UI32_MAX);
|
||||
}
|
||||
|
||||
static void clear_main_volume() {
|
||||
static constexpr auto StartVol = SweepVolume().clear_bit(SweepVolume::ModeBit).set_value(static_cast<int16_t>(I16_MAX >> 2), SweepVolume::VolumeRange);
|
||||
|
||||
MainVolume::left.write(StartVol);
|
||||
MainVolume::right.write(StartVol);
|
||||
}
|
||||
|
||||
void setup() {
|
||||
clear_key();
|
||||
clear_main_volume();
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user