Audio Effects SDK for Windows, macOS and Linux
Integrate the C++ Audio Effects SDK: link the library, authorize, create a pipeline and process PCM audio.
The desktop Audio SDK is a C++ library for Windows 10+ (x64 and x86), macOS 11.0+ and Linux x86_64 with glibc 2.35+ (Ubuntu 22.04+). Audio is mono.
Before you start#
Register in the Developer Portal, start an Audio SDK trial and download the SDK from the releases.
Link the library#
| OS | Link | Ship with the app |
|---|---|---|
| Windows | lib/AudioEffectsSDK.lib |
bin/AudioEffectsSDK.dll next to the .exe |
| macOS | lib/libAudioEffectsSDK.dylib |
in YourApp.app/Contents/Frameworks |
| Linux | lib/libAudioEffectsSDK.so |
on the library path |
Add include/ to the include directories. The repository README has a ready CMake snippet.
Initialize#
#include <audio_effects_sdk/sdk_factory.h>
bool initializeAudioEffectsSDK()
{
sdkFactory = createAudioEffectsSDKFactory();
audio_effects_sdk::IAuthResult* authResult = sdkFactory->auth("YOUR_CUSTOMER_ID", nullptr, nullptr);
bool authorized = authResult->status() == audio_effects_sdk::AuthStatus::active;
authResult->release();
if (!authorized) {
sdkFactory->release();
return false;
}
sdkPipeline = sdkFactory->createPipeline(
audio_effects_sdk::AudioFormatType::pcmFloat32,
sampleRate,
1, // channels: mono only
0);
sdkPipeline->setNoiseSuppressionEnabled(true);
return true;
}
Process audio#
sdkPipeline->process(inputFrames, inputFrameCount, outputFrames, outputFrameCount);
IPipeline::process() can be called from two threads at once: a producer (for example, the microphone callback) that passes only input, and a consumer that reads only output.
Release#
sdkPipeline->release();
sdkFactory->waitUntilAsyncWorkFinished();
sdkFactory->release();
Next steps#
View as Markdown · Found a problem? Tell us.