fix audio
This commit is contained in:
parent
197270cbcf
commit
afdb139b31
|
@ -54,7 +54,6 @@ apu_render(Apu *c, Sint16 *sample, Sint16 *end)
|
|||
c->i %= c->len;
|
||||
}
|
||||
s = (Sint8)(c->addr[c->i] + 0x80) * envelope(c, c->age++);
|
||||
s = s;
|
||||
*sample++ += s * c->volume[0] / 0x180;
|
||||
*sample++ += s * c->volume[1] / 0x180;
|
||||
}
|
||||
|
|
|
@ -224,7 +224,7 @@ void audio_callback(const void** start, size_t *size) {
|
|||
*start = audio_buf;
|
||||
*size = AUDIO_BUF_SIZE;
|
||||
memzero8(audio_buf, AUDIO_BUF_SIZE);
|
||||
apu_render(&apu[0], audio_buf, audio_buf + AUDIO_BUF_SIZE / 2);
|
||||
apu_render(&apu[0], audio_buf, audio_buf + AUDIO_BUF_SIZE);
|
||||
}
|
||||
|
||||
static Uint8
|
||||
|
|
Loading…
Reference in New Issue