-
Notifications
You must be signed in to change notification settings - Fork 2.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SasAudio: Always reinitialize the VAG decoder on sceSasSetVoice, even if already playing #18076
Conversation
Oops, breaks the engine noise in Ridge Racer. There is something to this check.. What seems to happen in After Burner is that the VagDecoder and the Voice address parameters get out of sync. |
Should it still set playing = on if it's not VAG, like noise or etc.? Maybe the engine noise uses that? And should it really restart VAG on every pitch change? That seems wrong. -[Unknown] |
It is indeed wrong to reset the VAG on just a pitch change, but, the fact that After Burner sounds right with this change kinda confirms that some detail of this is likely the cause of its problem, at least. I think this will just need a small extension of the old check to work correctly. |
Is it enough to ignore Maybe it's just that every set voice restarts it? That would make more sense than resetting on pitch. And that pitch thing looks pretty suspect too: I guess this is really asking for more VAG tests... -[Unknown] |
Oh I didn't even notice that ChangedParams was called from SetPitch as well. That's likely part of why Ridge Racer broke - reinitializing the vag decoder on solely a pitch change is just wrong indeed. It seems that the part of ChangedParams that is useful from there is basically And there are indeed lots of possibilites in the current code for things to go wrong when changing voice type. Yeah, tests would indeed be good, heh. |
86acc72
to
d884bb9
Compare
I simply got rid of the confusing ChangedParams thing. Now both Ridge Racer and After Burner work great. Will test some more games. |
d884bb9
to
8b32a1e
Compare
Core/HLE/sceSas.cpp
Outdated
v.loop = loop ? true : false; | ||
v.ChangedParams(vagAddr == prevVagAddr); | ||
v.loop = loop != 0; | ||
v.playing = true; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should still care about on
? You can key on or off a voice before or after setting the VAG, I'm pretty sure tests do show that already...
-[Unknown]
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh yeah, I suppose so. I'll add that in.
Added the check. The difference from before here is that on sceSasSetVoice, VAG parameters are now always updated - while still obeying the .on flag with regards to playing. So far all seems fine. I'm hoping that this might also fix the occasionally reported stuck sounds in GTA, but who knows. |
Fixes terrible noises in After Burner.
EDIT: Also breaks the engine noise in Ridge Racer, so this needs more work.Not sure why the logic was like it was, blame history wasn't much clue either.
Will of course test a large number of other games before merging.