mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-04-24 21:56:10 +03:00
[GH-ISSUE #2075] Delay with playing atrac3plus radiostations in GTA Liberty City Stories & GTA Vice City Stories #717
Labels
No labels
Atrac3+
Audio
CPU emulation
D3D11
D3D9 (removed)
Depth / Z
Feature Request
Font Atlas
GE emulation
Guardband / Range Culling
HLE/Kernel
I/O
Input/Controller
MP3
Multithreading
Needs hardware testing
Networking/adhoc/infrastructure
No Feedback / Outdated?
OpenGL
PGF / sceFont
PSMF / MPEG
Platform-specific (Android)
Platform-specific (Windows)
Platform-specific (iOS)
PowerVR GPU
SDL2
Saving issue
User Interface
Vulkan
arm64jit
armjit
armv6
x86jit
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/ppsspp#717
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @majesticR3 on GitHub (Jun 4, 2013).
Original GitHub issue: https://github.com/hrydgard/ppsspp/issues/2075
if atrac3+ audio file have longer duration then it starts to play with delay about 1-5 secs, and FPS reduced at that delay time.
Sorry for horrible English
@Squall-Leonhart commented on GitHub (Jun 7, 2013):
Expand on the scenario where you see this occuring
@dbz400 commented on GitHub (Jun 7, 2013):
Still happening in latest git build ?
@majesticR3 commented on GitHub (Jun 7, 2013):
Squall-Leonhart
This problem exists in GTA Liberty City Stories and GTA Vice City Stories. Delay occurs when game trying to load radio stations which in atrac3plus format. Cutscene audio starts to play without delay. I think delay occurs when atrac3plus library trying to decode long duration audio files (all radios duration are about 30-40 min of music) and that takes a time and processor resources and causes lowering game FPS
raven02
Yeah. :(
@Squall-Leonhart commented on GitHub (Jun 7, 2013):
I'm not sure if you recall, but the console and PC versions both had the same problem.
@majesticR3 commented on GitHub (Jun 7, 2013):
Original PSP has maximum 1 sec delay before radio starts to play, but emulator has about 4-7 secs. PS2 version of GTA on PCSX2 don't have that problem - youtube videos proove that
@hrydgard commented on GitHub (Jun 7, 2013):
It's definitely an issue, really not sure about the cause though.
@Squall-Leonhart commented on GitHub (Jun 7, 2013):
is ppsspp doing a full seek of the file prior to playing or just playing as streamed through the decoder?
@oioitff commented on GitHub (Jun 8, 2013):
@majesticR3 Could you show a detail logs? Thanks.
The decoding step for atrac3plus is just on the fly, so it means following codes takes about 4-7 secs:
That's really crazy and unbelievable!
@EZtouch commented on GitHub (Jun 8, 2013):
If it takes time to decode the at3+ audios , can we add an option under audio to decode the whole at3+ files from a selected game and save it in ppsspp directory so next time it will play instantly without the need to be decoded?
There is a way to decode and batch at3+ for jpcsp, it loads the already decoded audio files from a folder not the game cant we do this?
*************************** :: Method A :: JPCSP Connector *************************** supported formats = Atrac3, Atrac3+, pmf
ATRAC3 audio is saved under tmp
\ATRAC
To decode the audio, copy the files to your REAL
PSP memcard under ms0/tmp and run JPCSPConnector on your REAL PSP then follow the
onscreen instructions.
After decoding on the PSP, move the files back to
Jpcsp under" tmp\ATRAC" you can
delete the files on the PSP.
JPCSP Connector can be found under ms0\PSP \GAME\JpcspConnector\ in the Jpcsp Release.
@oioitff commented on GitHub (Jun 8, 2013):
@EZtouch Actually the decoding step for atrac3plus only take little time, because it just need to decode current frame ( less than 1Kb ). It might be ever faster than load wav files from disk.
@hrydgard commented on GitHub (Jun 8, 2013):
Yes, it's fast, exporting to wav files is useless.
This sound delay must have another cause - if those two lines really took 5s, then the game would be completely frozen for those 5s, it wouldn't just slow down, like @majesticR3 describes it.
@EZtouch commented on GitHub (Jun 8, 2013):
Maybe it has something to do with #2104 ?
@majesticR3 commented on GitHub (Jun 8, 2013):
Log from Liberty City Stories:

Log from Vice City Stories:

@unknownbrackets commented on GitHub (Jun 8, 2013):
Could easily be some syscall not rescheduling when it should or something.
-[Unknown]
@oioitff commented on GitHub (Jun 8, 2013):
Hmm, probably sceAtracAddStreamData needs hleDelayResult.
@majesticR3 commented on GitHub (Jun 8, 2013):
I think I know why that delay appears.
As we know, GTA have timer for all radiostations and when we switch radiostations music starts to play not from start position, but from position according to that timer
After few experiments I noticed what time of delay depends of current position in atrac3plus file from which game starts to play music - if that position is near of beginning of atrac3plus file - delay is very small, if position is near of end of file - delay is very big, because atrac3plus library needs to skip many samples from beginning of file to reach position according to timer.
Sorry for my English :)
@hrydgard commented on GitHub (Jun 8, 2013):
@majesticR3 , good thinking! I think that's the best theory yet - that would mean that ResetPlayPosition might be a bit off, or something.
@majesticR3 commented on GitHub (Jun 8, 2013):
Probably this is more global issue, and solving it take effect in other games with similar problem
It is hard to fix this?
@Squall-Leonhart commented on GitHub (Jul 12, 2013):
im sorry, but it is absolutely imposible to measure 0.1 seconds of latency.
even the most sensitive of people cannot feel the delay till about 0.7s
@hrydgard commented on GitHub (Jul 12, 2013):
That's absolutely not true (talking general audio latency). If I connect a MIDI keyboard to my PC and use it play a softsynth, and have a draggable latency setting (like in Propellerheads Reason), I can feel latency down to 10ms.
Of course, hearing exactly when a background music radio station starts in GTA is another thing entirely, and it doesn't really matter. But in Patapon where the Atrac music is integrated to other rhythmic audio events, it's really easy to hear when it's wrong if you've heard how it's supposed to sound when it's right before. So I believe him.
@majesticR3 commented on GitHub (Jul 12, 2013):
It is possible to fix current issue? This delay is still exists.
@majesticR3 commented on GitHub (Oct 20, 2013):
With new atrac3+ codec radio stations starts to play immediately without delay as meant to be (I tested GTA Liberty City Stories) but there are rare random short-term FPS slowdowns when I switch radio stations. Anyway thanks for developers for their awesome work :-)