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

[BUGFIX] Fix Audio/Visual Offset causing skips on song start #3732

Open
wants to merge 5 commits into
base: develop
Choose a base branch
from

Conversation

xenkap
Copy link

@xenkap xenkap commented Oct 19, 2024

Starting the song previously utilized combinedOffset to offset where in the song the instrumental starts in.
This is no longer the case, instead using instrumentalOffset for starting.

The Conductor and Countdown classes have been altered to reflect this behavior.

function startSong also no longer uses resyncVocals().
It was kind of pointless being there, and needing to play the instrumental before calling it makes the audio double up sometimes and it sounds awful

Does this PR close any issues? If so, link them below.

[TBA, but quick searches about offset don't show much]

Briefly describe the issue(s) fixed.

Audio used to skip forward when negative values of Audio/Visual Offset were present. This is now fixed, along with ugly audio doubling behavior on start.

Include any relevant screenshots or videos.

BEFORE:

2024-10-19.17-06-43.mp4

AFTER:

2024-10-19.17-04-39.mp4

(recorded on -210ms audio/visual offset. yes my headphones are that bad, yes they are bluetooth)

Don't use combined offset here-- using it will cause the instrumental to skip forwards due to your offset. Just use instrumental offset, and don't play it when the song starts-- let resyncVocals do that
Conductor's minimum songPosition when music is playing is now combinedOffset.

resyncVocals is also altered a smidge due to the fact that we don't want to apply offsets when resyncing at the start + we don't want to play the music and THEN resync because it makes the sound double up when lag happens on start and it sounds ugly
Throw resyncVocals out of startSong because it complicates matters
@github-actions github-actions bot added medium A medium pull request with 100 or fewer changes haxe Issue/PR modifies game code and removed medium A medium pull request with 100 or fewer changes labels Oct 19, 2024
@xenkap xenkap changed the title Audio visual offset start [BUGFIX] Fix Audio/Visual Offset causing skipping on song start Oct 19, 2024
@xenkap
Copy link
Author

xenkap commented Oct 19, 2024

Currently a weird awkward pause after the countdown before the song plays. Currently investigating

@xenkap xenkap changed the title [BUGFIX] Fix Audio/Visual Offset causing skipping on song start [BUGFIX] Fix Audio/Visual Offset causing skips on song start Oct 19, 2024
@xenkap
Copy link
Author

xenkap commented Oct 19, 2024

okay all good :yippe:

@github-actions github-actions bot added the medium A medium pull request with 100 or fewer changes label Oct 19, 2024
@xenkap
Copy link
Author

xenkap commented Oct 19, 2024

added footage :D

source/funkin/Conductor.hx Outdated Show resolved Hide resolved
thank you https://github.com/cyn0x8 for reminding me FlxMath.bound exists

Co-authored-by: cyn <cyn0x8+git@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
haxe Issue/PR modifies game code medium A medium pull request with 100 or fewer changes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants