Conversation
Signed-off-by: cuishuang <imcusg@gmail.com>
Member
|
Please complete the checklist. Per our contribution guidelines (that you checked to have read) you can check items that do not apply. |
Author
@PatTheMav Done, thank you for the clarification. |
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.
Description
The Streamlabs importer stores the calculated audio sync offset in an
int:This truncates the nanosecond offset to 32 bits. Sync offsets above approximately 2.147 seconds, or below approximately -2.147 seconds, can therefore be converted incorrectly before being written to the imported scene collection.
Calculate the offset using int64_t instead.
Motivation and Context
OBS stores source audio sync offsets as 64-bit nanosecond values through obs_source_set_sync_offset() and obs_data_get_int().
The OBS audio settings UI permits sync offsets up to 20,000 ms, so valid Streamlabs offsets such as 3, 5, 10, or 20 seconds must be preserved during import.
This change keeps the calculation in 64-bit arithmetic. json11 does not provide an int64_t constructor, so the final intermediate JSON value is explicitly represented as double; the supported range is well within the exact integer range of an IEEE-754 double.
How Has This Been Tested?
Types of changes
Bug fix (non-breaking change which fixes an issue)
Checklist: