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

Audio processing interface that applies noise suppression. More...

#include <pipeline.h>

Inheritance diagram for audio_effects_sdk::IPipeline:
audio_effects_sdk::IRelease

Public Member Functions

virtual bool isNoiseSuppressionEnabled () const =0
virtual void setNoiseSuppressionEnabled (bool enabled)=0
 Enables/disables noise suppression in the pipeline.
virtual float noiseSuppressionPower () const =0
virtual void setNoiseSuppressionPower (float value)=0
 Controls the intensity of noise suppression applied to the audio stream.
virtual void setLatencyMode (LatencyMode mode)=0
 Sets latency mode.
virtual LatencyMode latencyMode () const =0
virtual void setNotificationHandler (INotificationHandler *handler)=0
 Sets the notification handler.
virtual uint32_t process (const void *input, uint32_t inputFrameNum, void *output, uint32_t outputFrameNum)=0
 Performs audio processing and applies enabled audio effects.
virtual uint32_t flush (void *output, uint32_t outputFrameNum)=0
 Flushes residual audio frames from the pipeline and resets its internal state.
Public Member Functions inherited from audio_effects_sdk::IRelease
virtual void release ()=0
 Releases the object and its resources.

Detailed Description

Audio processing interface that applies noise suppression.

Member Function Documentation

◆ flush()

virtual uint32_t audio_effects_sdk::IPipeline::flush ( void * output,
uint32_t outputFrameNum )
pure virtual

Flushes residual audio frames from the pipeline and resets its internal state.

During processing, the pipeline buffers audio frames internally. This method:

  • Retrieves any remaining frames (if output buffer provided)
  • Resets the pipeline's internal state

Subsequent calls to IPipeline::process will process audio from a fresh state after flushing.

Parameters
outputPointer to output audio buffer (pass nil to reset without frame retrieval)
frameNumMaximum writable capacity of output buffer (in frames)
Returns
Actual number of frames written to output buffer (can be less frameNum). A return value less than frameNum indicates all buffered audio has been drained.

◆ process()

virtual uint32_t audio_effects_sdk::IPipeline::process ( const void * input,
uint32_t inputFrameNum,
void * output,
uint32_t outputFrameNum )
pure virtual

Performs audio processing and applies enabled audio effects.

Supports three usage modes:

  • Push (write) - audio frames (input is not null and output is null)
  • Pull (read) - audio frames (input is null and output is not null)
  • Simultaneous Push/Pull operations (both are not null).

Can process audio in place (same buffer for input and output), but with some requirements:

  • Full overlap (input == output) is supported
  • Partial overlap is prohibited and may cause audio artifacts

Thread-safe for concurrent push/pull operations when:

  • One thread exclusively pushes audio
  • Another thread exclusively pulls audio
Note
: The pipeline maintains an internal buffer to handle imbalances between frame production and consumption. While short-term imbalances are tolerated, sustained imbalance will cause frame drops when buffer limits are exceeded.
Parameters
inputPointer to input audio buffer (may be same as output buffer).
inputFrameNumAvailable frames in input buffer.
outputOutput audio buffer (may be same as input buffer).
outputFrameNumOutput buffer capacity (in frames).
Returns
Actual number of frames written to output buffer (may be less outputFrameNum).

◆ setLatencyMode()

virtual void audio_effects_sdk::IPipeline::setLatencyMode ( LatencyMode mode)
pure virtual

Sets latency mode.

Must be set prior to the first call to IPipeline::process(). If changed afterward, the new setting will only take effect after pipeline reset (following the next flush operation).

This property is thread-safe,

◆ setNoiseSuppressionEnabled()

virtual void audio_effects_sdk::IPipeline::setNoiseSuppressionEnabled ( bool enabled)
pure virtual

Enables/disables noise suppression in the pipeline.

When disabled, returns unmodified audio frames. This property is thread-safe. Changes may take effect after a short delay if modified during processing.

◆ setNoiseSuppressionPower()

virtual void audio_effects_sdk::IPipeline::setNoiseSuppressionPower ( float value)
pure virtual

Controls the intensity of noise suppression applied to the audio stream.

This property is thread-safe.

Parameters
valueHigher number = stronger filtering. Range: 0 to 1 (inclusive).

◆ setNotificationHandler()

virtual void audio_effects_sdk::IPipeline::setNotificationHandler ( INotificationHandler * handler)
pure virtual

Sets the notification handler.

The pipeline calls INotificationHandler::release() when replacing or destroying handlers. Replaces any previously set handler.

Note
Notifications might be received after pipeline destruction if dispatched earlier.
Call ISDKFactory::waitUntilAsyncWorkFinished() to ensure all notifications complete.

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