mirror of https://github.com/mgba-emu/mgba.git
DS Audio: Defer mixer updates until needed
This commit is contained in:
parent
5730b50ecb
commit
517dfe12ee
1
CHANGES
1
CHANGES
|
@ -29,6 +29,7 @@ Bugfixes:
|
|||
- DS Memory: Fix crash when overflowing misaligned WRAM jump
|
||||
Misc:
|
||||
- ARM: Add F-block instruction decoding
|
||||
- DS Audio: Defer mixer updates until needed
|
||||
- DS GX: Clean up and unify texture mapping
|
||||
- DS Core: Add symbol loading
|
||||
- DS Video: Simplify VRAM mapping
|
||||
|
|
|
@ -276,7 +276,6 @@ static void _updateChannel(struct mTiming* timing, void* user, uint32_t cyclesLa
|
|||
}
|
||||
ch->sample = (0xFFFF * ch->high) - 0x8000;
|
||||
}
|
||||
_updateMixer(ch->p);
|
||||
if (ch->format == 3 && ch->index < 14) {
|
||||
int32_t period = ch->period;
|
||||
if (ch->high) {
|
||||
|
@ -323,6 +322,7 @@ static int _applyBias(struct DSAudio* audio, int sample) {
|
|||
static void _sample(struct mTiming* timing, void* user, uint32_t cyclesLate) {
|
||||
struct DSAudio* audio = user;
|
||||
|
||||
_updateMixer(audio);
|
||||
int16_t sampleLeft = _applyBias(audio, audio->sampleLeft);
|
||||
int16_t sampleRight = _applyBias(audio, audio->sampleRight);
|
||||
|
||||
|
|
Loading…
Reference in New Issue