gpSP audio silliness


agwellin

Still Fresh
Joined
Apr 30, 2011
Messages
61
Location
NC, USA
I'm experiencing some weird sound issues with gpSP. After about twenty minutes of playing, the different tracks of the background music will lose sync with each other. It literally sounds like someone hired a middle-school percussionist and he starts dragging the tempo every bar.


I've tried changing the audio buffer, going so far as to set it as low as it'll go and as high as it'll go, but the same problems arise.


any way to fix this?
 
Last edited by a moderator:
I'm no expert, but does this happen with all games, or just particular ones?


The reason I ask is because I recall at least one game that, as of a few years ago, had exactly that problem under emulation (this was with desktop stuff, not gpSP, though) and it was simply an inaccuracy relating to that title, rather than in general.


I could be barking up the wrong tree entirely, though!
 
It's probably the GBC and direct sound channels losing sync. I've noticed it before, but I didn't really figure out why it happened. I don't think it's something that occurred on its own over time, but something that happened during specific resynchronization points. It could be related to how dead samples are inserted into the buffer between when the audio is turned off and turned back on for the direct sound stuff. I fought pretty hard getting this to work right, but I guess I may not have gotten it completely.


It might be helpful to see if the audio really does get progressively more out of sync when you don't do anything game-wise, although it's possible that the game will automatically turn off audio when restarting a track for instance..
 
It looks more like 16.16 ints used to store frequency steps for samples are introducing errors that accumulate over time, I'm changing that to 8.24, maybe that'll help.


Edit: why not just use current gbc buffer position when starting digital channel?
 
Last edited by a moderator:
Back
Top