aja: Subtract packet time from audio timestamp#6359
Merged
jp9000 merged 1 commit intoobsproject:masterfrom Apr 23, 2022
Merged
Conversation
When calling `obs_source_output_audio`, timestamp should be the starting time of the audio packet.
Member
|
What's the average duration of an audio segment for aja? |
Contributor
Author
|
On my setup, it sends 800 frames for each packet at 48000 Hz in average, so 16.7 ms, it varies 784 to 816 samples. |
Contributor
Author
|
It looks the segment time of the audio equals to the video frame time. If I configure my camera to 25 fps, the size of the segment becomes 1920 frames, 40ms. |
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
Subtract the audio packet time from the timestamp for audio.
The code is copied from
pulse-input.c.Motivation and Context
When calling
obs_source_output_audio, timestamp should be the starting time of the audio packet.How Has This Been Tested?
OS: Fedora 34.
Hardware: AJA Video Kona 4 (connected to the top PCIe slot)
CPU: Intel Core i7-11700
MB: ASRock Z590 Extreme (no GPU card is installed)
Camera: Sony SRG-120HD (configured to send 1080p59.94)
I found the bug during implementing another PR #6351.
The implementation was tested with debug information in the change of the PR.
Types of changes
Checklist: