Music module reliability#1315
Open
Eathox wants to merge 11 commits into
Open
Conversation
_remainingTime can result in a negative number right round the end of track Limited it to 0 since a negative number would be unexpected
3014c4a to
bc040f9
Compare
commy2
reviewed
Mar 30, 2020
commy2
reviewed
Mar 30, 2020
Now clamping _trackTime instead of _remainingTime so that _trackTime can never go over the _duration
CBA_missionTime takes accTime in to account which doesn't affect music
commy2
reviewed
Aug 29, 2020
No longer change the minimum wait time based on FPS isntead use one that accommodates the worst case scenario.
This is to keep the system in sync in case of false positives.
Remove comment stating that only `CBA_fnc_playMusic` is supported
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
As you might know the CBA Music module isn't reliable in its current state. This is because the function
CBA_fnc_isMusicPlayingis unable to detect when a song ended and cant handle music that was started without callingCBA_fnc_playMusic.This pull request fixes most of these issues by utilizing the vanilla music event handlers, however this leave's one special case. That being
playMusic ""since that doesn't trigger any of the currently present music events, this issue is fixed by incorporating an extra check inCBA_fnc_isMusicPlaying.When merged this pull request will:
CBA_fnc_isMusicPlayingincorrect return value (#1241, #1024)CBA_fnc_getMusicPlayinguseCBA_fnc_isMusicPlayinginstead of aisNilcheck_trackTimevalue returned fromCBA_fnc_getMusicPlaying(by using
getMusicPlayedTimeinstead of a time based calculation)