obs-filters: RTX denoiser initialization fix and code cleanup#4458
Merged
Conversation
This fixes issue obsproject#4441. The issue occurs when adding the noise suppression filter for the first time. Rnnoise or speex are the default noise suppression methods. Line 344 returns which prevents initialization and allocation for nvafx (rtx denoiser). With the fix, initialization of nvafx occurs when swapping methods.
derrod
reviewed
Apr 5, 2021
Member
|
Seems to fix it for me. |
This minor code cleanup commit does the following: - sets defaults intensity of RTX denoiser to max. - adds an initialization check of nvafx. - splits nvafx initialization from channel allocation for better readibility of the code. - moves the intensity update from the filter_audio process function to the plugin update function. - logs the error code in case nvafx returns an error when running. (useful for devs; I haven't translated the error codes which are available in the sdk).
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
This fixes #4441 (first commit).
The second commit is a minor code cleanup:
readability of the code.
to the plugin update function.
(useful for devs; I haven't translated the error codes which are
available in the sdk).
Motivation and Context
How Has This Been Tested?
Tested that the issue is fixed and that the plugin works fien after the code cleanup.
Types of changes
Checklist: