Skip to content
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

Trying to fix sceAtracGetBufferInfoForResetting #4303

Closed
wants to merge 5 commits into from
Closed

Trying to fix sceAtracGetBufferInfoForResetting #4303

wants to merge 5 commits into from

Conversation

papel
Copy link

@papel papel commented Oct 23, 2013

I analysed the input values of sceAtracGetBufferInfoForResetting to choose the output.
It works with both Trails in the Sky (#4003) and Ys Seven (#2391). I do not have enough games to test. Henrik asked to open a pull request to discuss about it.

@unknownbrackets, does this change make sense?

@solarmystic, could you test the GTA games?

@@ -730,7 +736,7 @@ u32 sceAtracGetBufferInfoForResetting(int atracID, int sample, u32 bufferInfoAdd
bufferInfo->first.filePos = Sampleoffset;

// TODO: It seems like this is always the same as the first buffer's pos?
bufferInfo->second.writePosPtr = atrac->first.addr;
bufferInfo->second.writePosPtr = atrac->second.addr;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Read the comment. Test results show it uses the first value. Did this change affect games? It didn't for me. Didn't even seem like games used it.

-[Unknown]

@solarmystic
Copy link
Contributor

@papel

GTA VIce City Stories undergoes a further audio regression as compared to the current master with this commit. All ingame BGM playback (excluding the FMV cutscenes which still sound normal, just like the current master) is just reduced to a repeated beeping sound that loops ad infinitum

Here's a sample of what it sounds like, taken ingame:
http://www.mediafire.com/?gim8afl1bduygs0

GTA Chinatown Wars is unchanged with this commit. The game does not crash after the white jet flies through the screen in the opening sequence, but the audio is still cutoff after that point, just like in the current master.

@papel
Copy link
Author

papel commented Oct 24, 2013

Does this change improve the game?

@solarmystic
Copy link
Contributor

@papel

GTA Chinatown Wars is definitely improved with this last update you made to the commit. The BGM doesn't cutoff anymore during the entire jet opening sequence where you're introduced to the main character and his background; no crashes either. Good work here.

GTA VIce City Stories however, is a bit of a mixed bag. On one hand, the BGM is back to sounding normal (no more beeping noises), but on the other hand, the BGM it self is a lot more stuttery and performance definitely takes a hit as compared to before. This is easily experienced by riding on a bike/any other fast moving vehicle and driving around town with the radio switched on.

Still, its an overall improvement to the current situation, but I'm not sure if it's correct, off to work I go.

@hrydgard
Copy link
Owner

@solarmystic , stutteryness seems like an unlikely consequence of this change. Are you sure?

@solarmystic
Copy link
Contributor

@hrydgard

I was rather taken aback by that finding myself in that particular GTA game (tested with GTA VCS), and so I proceeded to boot up the latest master for comparison to see whether or not it was already present there. The current master (v0.9.1-2122-g36d433c) does not have that particular issue, but on the other hand, the BGM just cuts off and on randomly while playing audio tracks in a vehicle.

The commit by @papel resolves that to a larger extent (no more BGM cutoffs like the current master has), but introduces increased stutteryness when switching between radio stations and/or heading to/loading newer areas while in a fast vehicle, with regards to the performance (greater occurances of momentary speed hitches)

-Posted from my mobile device-

@hrydgard
Copy link
Owner

Does this introduce problems in any other games?

I'm trying to decide whether or not to merge this before 0.9.5.

@papel
Copy link
Author

papel commented Oct 25, 2013

A last attempt. It reverts #3772, but does not break Ys Seven, because it handles what is different in Ys7 variables (https://github.com/papel/ppsspp/compare/test).
The pspautotest was worsened. I asked a test with another audio file in #4248 (comment) to see what may be different.

hrydgard and others added 4 commits November 10, 2013 03:49
Fix stencil testing in the softgpu, and also some small things along the way
Windows: Remove MemUsage (from Dolphin) as it was unused.
Fix some tabbing.
Was breaking non-fastmem lwl/lwr/etc.
@papel papel closed this Nov 10, 2013
@papel papel deleted the atrac branch November 10, 2013 20:18
@papel papel reopened this Nov 10, 2013
@papel papel closed this Nov 10, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants