mirror of
https://github.com/RaySollium99/picodrive.git
synced 2025-09-04 23:07:46 -04:00
pico, fix psg sound and fast forward
This commit is contained in:
parent
c9d5f41b0a
commit
e44c606f39
2 changed files with 22 additions and 20 deletions
|
@ -430,10 +430,18 @@ static int PsndRender(int offset, int length)
|
|||
|
||||
pprof_start(sound);
|
||||
|
||||
// Add in parts of the PSG output not yet done
|
||||
if (length-psglen > 0 && PicoIn.sndOut) {
|
||||
s16 *psgbuf = PicoIn.sndOut + (psglen << stereo);
|
||||
Pico.snd.psg_pos += (length-psglen) << 20;
|
||||
if (PicoIn.opt & POPT_EN_PSG)
|
||||
SN76496Update(psgbuf, length-psglen, stereo);
|
||||
}
|
||||
|
||||
if (PicoIn.AHW & PAHW_PICO) {
|
||||
// XXX ugly hack, need to render sound for interrupts
|
||||
s16 *buf16 = PicoIn.sndOut ? PicoIn.sndOut : (s16 *)PsndBuffer;
|
||||
PicoPicoPCMUpdate(buf16+(offset<<stereo), length-offset, stereo);
|
||||
// always need to render sound for interrupts
|
||||
s16 *buf16 = PicoIn.sndOut ? PicoIn.sndOut + (offset<<stereo) : NULL;
|
||||
PicoPicoPCMUpdate(buf16, length-offset, stereo);
|
||||
return length;
|
||||
}
|
||||
|
||||
|
@ -450,14 +458,6 @@ static int PsndRender(int offset, int length)
|
|||
Pico.snd.dac_val2 = Pico.snd.dac_val;
|
||||
}
|
||||
|
||||
// Add in parts of the PSG output not yet done
|
||||
if (length-psglen > 0 && PicoIn.sndOut) {
|
||||
s16 *psgbuf = PicoIn.sndOut + (psglen << stereo);
|
||||
Pico.snd.psg_pos += (length-psglen) << 20;
|
||||
if (PicoIn.opt & POPT_EN_PSG)
|
||||
SN76496Update(psgbuf, length-psglen, stereo);
|
||||
}
|
||||
|
||||
// Add in parts of the FM buffer not yet done
|
||||
if (length-fmlen > 0 && PicoIn.sndOut) {
|
||||
s32 *fmbuf = buf32 + ((fmlen-offset) << stereo);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue