Merge pull request #603 from ahnlak/unicorn-volume-fix

Unicorn volume fix
pull/606/head
Philip Howard 2022-12-16 21:03:04 +00:00 zatwierdzone przez GitHub
commit ec0077ae71
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 4AEE18F83AFDEB23
2 zmienionych plików z 2 dodań i 1 usunięć

Wyświetl plik

@ -517,6 +517,7 @@ namespace pimoroni {
value = value < 0.0f ? 0.0f : value;
value = value > 1.0f ? 1.0f : value;
this->volume = floor(value * 255.0f);
this->synth.volume = this->volume * 255.0f;
}
float GalacticUnicorn::get_volume() {

Wyświetl plik

@ -106,7 +106,7 @@ namespace pimoroni {
class PicoSynth {
public:
const uint16_t volume = 0x2fff;
uint16_t volume = 0x2fff;
static const uint CHANNEL_COUNT = 8;
AudioChannel channels[CHANNEL_COUNT];