Audio Effects SDK
AI-powered SDK for real-time audio enhancement.
Loading...
Searching...
No Matches
audio_effects_sdk::ISDKFactory Class Referenceabstract

SDK entry point for creating pipelines and handling authorization. More...

#include <sdk_factory.h>

Inheritance diagram for audio_effects_sdk::ISDKFactory:
audio_effects_sdk::IRelease

Public Member Functions

virtual IAuthResultauth (const char *customerID, pfnOnAuthCompletedCallback callback, void *ctx)=0
 Authenticates SDK instance online.
virtual IAuthResultauthWithAPIUrl (const char *customerID, const char *customApiUrl, pfnOnAuthCompletedCallback callback, void *ctx)=0
 Authenticates SDK instance online with custom server.
virtual IAuthResultauthWithKey (const char *key)=0
 Offline authorization with a secret key.
virtual IPipelinecreatePipeline (AudioFormatType format, uint32_t sampleRate, uint32_t channels, float pcmScale)=0
 Creates audio processing pipeline instance.
virtual void waitUntilAsyncWorkFinished ()=0
 Wait until all started async tasks are finished.
Public Member Functions inherited from audio_effects_sdk::IRelease
virtual void release ()=0
 Releases the object and its resources.

Detailed Description

SDK entry point for creating pipelines and handling authorization.

An instance of ISDKFactory is lightweight when no IPipeline instances exist and can be used to create multiple IPipeline instances.

Member Function Documentation

◆ auth()

virtual IAuthResult * audio_effects_sdk::ISDKFactory::auth ( const char * customerID,
pfnOnAuthCompletedCallback callback,
void * ctx )
pure virtual

Authenticates SDK instance online.

Internet connection is required. Initiates the authorization process. During this process, the SDK checks the license status and returns the result. Upon completion, the callback is triggered if provided. Can be used synchronously or asynchronously. Pass nullptr as callback to use synchronously.

If authorization completes successfully, IAuthResult::status() returns AuthStatus::active. Otherwise, the SDK cannot be used.

Parameters
customerIDUnique client identifier.
callbackCallback to be called on completion.
ctxThe pointer that will be passes into callback.
Returns
IAuthResult instance if synchronous mode (callback is nullptr), otherwise nullptr. If synchronous mode, the caller is responsible for calling IAuthResult::release().

◆ authWithAPIUrl()

virtual IAuthResult * audio_effects_sdk::ISDKFactory::authWithAPIUrl ( const char * customerID,
const char * customApiUrl,
pfnOnAuthCompletedCallback callback,
void * ctx )
pure virtual

Authenticates SDK instance online with custom server.

Same as ISDKFactory::auth() but allows use custom authorization server.

Parameters
customerIDSame as ISDKFactory::auth()
customApiUrlCustom authorization server URL.
callbackSame as ISDKFactory::auth()
ctxSame as ISDKFactory::auth()
Returns
Same as ISDKFactory::auth()

◆ authWithKey()

virtual IAuthResult * audio_effects_sdk::ISDKFactory::authWithKey ( const char * key)
pure virtual

Offline authorization with a secret key.

Internet connection is NOT required.

Parameters
keyClient's unique secret key (DO NOT expose)

◆ createPipeline()

virtual IPipeline * audio_effects_sdk::ISDKFactory::createPipeline ( AudioFormatType format,
uint32_t sampleRate,
uint32_t channels,
float pcmScale )
pure virtual

Creates audio processing pipeline instance.

Before creating the first instance of IPipeline authorization is needed. For authorization see IPipeline::auth(), IPipeline::authWithAPIUrl() or IPipeline::authWithKey().

Parameters
formatformat of input/output samples.
sampleRateframes per seconds.
channelsChannel count (currently only mono [1] supported).
pcmScalePCM range for float32 (0 = default [-1, 1], e.g., 100 = [-100.0, 100.0]).
Returns
An instance of ISDKPipeline or nullptr.

◆ waitUntilAsyncWorkFinished()

virtual void audio_effects_sdk::ISDKFactory::waitUntilAsyncWorkFinished ( )
pure virtual

Wait until all started async tasks are finished.

Including authorization and notifications.


The documentation for this class was generated from the following file: