mirror of https://github.com/mgba-emu/mgba.git
GB Audio: Fix square sample range (fixes #546)
This commit is contained in:
parent
700ab0bd36
commit
4eece81b8c
|
@ -709,7 +709,7 @@ bool _writeEnvelope(struct GBAudioEnvelope* envelope, uint8_t value) {
|
|||
}
|
||||
|
||||
static void _updateSquareSample(struct GBAudioSquareChannel* ch) {
|
||||
ch->sample = (ch->control.hi * ch->envelope.currentVolume - 8) * 0x10;
|
||||
ch->sample = (ch->control.hi * 2 - 1) * ch->envelope.currentVolume * 0x8;
|
||||
}
|
||||
|
||||
static int32_t _updateSquareChannel(struct GBAudioSquareChannel* ch) {
|
||||
|
|
Loading…
Reference in New Issue