Skip to main content

API

initWithLicense:SampleRate:​

License 키를 통해 Denoiser SDK를 인증하는 함수입니다. 인증 과정에서 인스턴스를 내부적으로 초기화하기 때문에 Sample Rate를 지정해주어야 합니다.

Objective-C
DHDenoiser* denoiser = [[DHDenioser alloc] initWithLicense:@"LICENSE" sampleRate:16000];

Parameter

  • initWithLicense : NSString
  • sampleRate : int

Return

  • DHDenoiser 인스턴스

processWithInput:output:frameSize:​

Denoiser SDK에서 노이즈 제거를 처리하도록 하는 함수입니다. 노이즈 제거를 위해 input과 output의 buffer를 받으며 frame의 개수를 지정해주어야 합니다.

Objective-C
float inputBuffer[numFrames];
float outputBuffer[numFrames];

[denoiser processWithInput:inputBuffer output:outputBuffer frameSize:numFrames];

Parameter

  • processWithInput : float*
  • output : float*
  • frameSize : int

Return

  • numFrames: int32_t

노이즈 제거 중 오류가 났을 경우 -1을 반환 값으로 가지며, 정상적으로 작동하는 경우 파라미터로 넣은 frame의 개수를 반환합니다.

정보

여기서 numFrames는 AURenderCallbackStruct에 capture callback process를 통해 받아오는 frame의 개수를 의미합니다.

isExpired​

Denoiser SDK에 등록한 License 키가 유효한지 확인하는 함수입니다.

만약 반환값이 false인 경우 노이즈 제거가 되지 않고 Bypass로 소리를 내보내게 됩니다.

Objective-C
NSLog(@"Denoiser expiration status : %s", [denoiseHandle isExpired] ? "YES" : "NO");

Return

  • BOOL