This commit is contained in:
tildearrow 2022-03-10 17:30:34 -05:00
parent 2f02e24a2f
commit 6d9befaf27
2 changed files with 7 additions and 2 deletions

View File

@ -124,7 +124,10 @@ pcm_render(struct VERA_PCM* pcm, int16_t* buf_l, int16_t* buf_r, unsigned num_sa
}
}
*(buf_l++) = ((int)pcm->cur_l * (int)volume_lut[pcm->ctrl & 0xF]) >> 6;
*(buf_r++) = ((int)pcm->cur_r * (int)volume_lut[pcm->ctrl & 0xF]) >> 6;
*(buf_l) += ((int)pcm->cur_l * (int)volume_lut[pcm->ctrl & 0xF]) >> 6;
*(buf_r) += ((int)pcm->cur_r * (int)volume_lut[pcm->ctrl & 0xF]) >> 6;
buf_l++;
buf_r++;
}
}

View File

@ -59,8 +59,10 @@ const char* DivPlatformVERA::getEffectName(unsigned char effect) {
return NULL;
}
// TODO: wire up PCM.
void DivPlatformVERA::acquire(short* bufL, short* bufR, size_t start, size_t len) {
psg_render(psg,bufL+start,bufR+start,len);
pcm_render(pcm,bufL+start,bufR+start,len);
}
void DivPlatformVERA::reset() {