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

cellAudioPortOpen/Timestamp fix #10763

Merged
merged 2 commits into from Sep 20, 2021
Merged

cellAudioPortOpen/Timestamp fix #10763

merged 2 commits into from Sep 20, 2021

Conversation

elad335
Copy link
Contributor

@elad335 elad335 commented Aug 25, 2021

Fix timestamps exported to the PS3 appplication, we forgot to stretch them out based on system-time offset abd clock-s scaling setting.

Fixes #10757.

@elad335
Copy link
Contributor Author

elad335 commented Aug 25, 2021

Ahh very annoying, I unfortunately removed a years old hack which makes audio speed stay the same no matter what clock's scale is.

@elad335
Copy link
Contributor Author

elad335 commented Aug 25, 2021

Probably fixed now. The reason was that get_system_time was used where it shouldn't affecting cellAudioGetPortConfig timestamp.

@elad335
Copy link
Contributor Author

elad335 commented Aug 25, 2021

Restored precious hack, fixed in cellAudioPortOpen.

@elad335 elad335 changed the title cellAudio fix cellAudioPortOpen fix Aug 25, 2021
@elad335
Copy link
Contributor Author

elad335 commented Aug 25, 2021

@Whatcookie

@Whatcookie
Copy link
Member

Audio is periodically stuttering on this build

{
return get_system_time() * g_cfg.core.clocks_scale / 100;
return (time ? time : get_system_time()) * g_cfg.core.clocks_scale / 100 - timebase_offset / (g_timebase_freq / 1000000);
Copy link
Member

Choose a reason for hiding this comment

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

Doesn't it make sense to move all the math on the timebase offset out of here? If not for performance but for readability. It could easily be calculated in part of initalize_timebased_time.

Copy link
Member

@Whatcookie Whatcookie left a comment

Choose a reason for hiding this comment

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

Turns out the audio stuttering issue actually occurs for me on all appimage builds (not just this PR) when using the pulseaudio backend. When locally built or when using other audio backends, the audio is fine on this PR.

With that out of the way, it's LGTM.

@elad335 elad335 changed the title cellAudioPortOpen fix cellAudioPortOpen/Timestamp fix Sep 20, 2021
@Megamouse Megamouse merged commit 38d5f68 into RPCS3:master Sep 20, 2021
@Satumariko
Copy link

Samurai Warriors 2 HD
Samurai Warriors 3Z
Samurai Warriors 4
Samurai Warriors 4-II
Pirate Warriors
Pirate Warriors 2
Pirate Warriors 3
Gundam Musou
Gundam Musou 2
Gundam Musou 3
Shin Gundam Musou
Shin Sangoku Musou 5
Dragon Quest Heroes 2
Nights of Azure
etc ...

I was able to confirm that the playback speed of these movies is normal.
appreciate!

@elad335 elad335 deleted the patch-29 branch September 19, 2022 06:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Samurai Warriors 3 Z or 4 and 4-II
5 participants