forums.PPSSPP.org
Audio gets cut abruptly - Printable Version

+- forums.PPSSPP.org (https://forums.ppsspp.org)
+-- Forum: PPSSPP - Playstation Portable Simulator Suitable for Playing Portably (/forumdisplay.php?fid=1)
+--- Forum: Development (/forumdisplay.php?fid=3)
+--- Thread: Audio gets cut abruptly (/showthread.php?tid=2222)



Audio gets cut abruptly - VIRGIN KLM - 03-30-2013 10:20 PM

Hey everybody I just wanted to make a point about some games that their audio actually works (guess they are MP3 format) the audio most of the times gets cut abruptly.
It came to my attention that this happens only with audio that have loop points so I guess it's an issue with the function related to MP3 looping.
It sounds like this:

Let's say that we have a track consisting of 8 sections-
1,2,3,4,5,6,7,8
-And we want to loop from (start of loop) point 2 and the end of the loop point in 7.
What should happen is that the game will start playing the track normaly from part 1 the first time it starts and it will loop between part 2 to 7, until atleast the game is coded to end the loop after a point so it will reach 8.
For some reason "I guess" PPSSPP starts playing back the MP3 file but when it will reach the first loop point (in this example "2") it will stop playing since the loop start-end has a negative value for duration or something around the lines of that.

Hope I helped.


RE: Audio gets cut abruptly - Henrik - 03-30-2013 11:11 PM

It's probably not MP3 but VAG (a crappy Sony ADPCM format) but yes that's an interesting thought. Will keep it in mind next time I try to look at the audio code...


RE: Audio gets cut abruptly - VIRGIN KLM - 05-01-2013 06:34 PM

So apparently it affects all games that have VAG audio. Everything (I guess that loops) will cut at 2 seconds. Weird, I hope it can get fixed. All ambience loops from games that use VAG audio for them gets cut (examples, Final Fantasy Type-0, Tekken DR, God Of War: Chains Of Olympus)


RE: Audio gets cut abruptly - VIRGIN KLM - 05-10-2013 09:58 PM

OK, I can confirm this affects ALL games with no exception that have VAG audio (watched Youtube videos and tested all of my games that I know they have VAG audio and which samples are VAG). There are games that is less noticable because the samples may be short but eventually most of the stuff will stop playing after 3 seconds or even in the rare case they won't stop they won't loop when they should (Ridge Racer 2). My second idea what could be possibly be happening is that for some reason PPSSPP sends a stream end and the audio gets cyt before it should or possibly a voice is not being "kept alive" when it should (if PSP's SPU works that way).


RE: Audio gets cut abruptly - [Unknown] - 05-11-2013 03:10 AM

Hmm. Is there any library of samples or way to generate samples that have predictable, clear cut loops like these to test against?

Or any documentation on the file format?

-[Unknown]


RE: Audio gets cut abruptly - VIRGIN KLM - 05-11-2013 06:58 AM

I have a couple of samples in SSCF format directly ripped from games and they have the common SEDBSSCF header, possibly the header could have more intresting data which could lead to fixing the issue.
Also I don't know in what way VAG audio is different from Microsoft ADPCM, is the RAW stream any different at all?
VAG audio has been used since PSOne days and nothing got changed to the format at all so technicaly you could search for documentation in any PSOne/PS2/PSP/PS3 related wiki or something or atleast check JPCSP's code about it.


RE: Audio gets cut abruptly - VIRGIN KLM - 05-14-2013 12:03 AM

Outrun 2006 Coast 2 Coast does EXACTLY what I predicted it would happen in the first post. It loops from the start till the first loop point (it's like 2 seconds of audio) over and over. The audio track though is ATRAC3 so I guess it's a general issue with loop points, not just VAG.