# 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](https://effectssdk.ai/cp/registration#audio), start an Audio SDK trial and download the SDK from the [releases](https://github.com/EffectsSDK/audio-effects-sdk-cpp-win-mac-linux/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

```cpp
#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

```cpp
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

```cpp
sdkPipeline->release();
sdkFactory->waitUntilAsyncWorkFinished();
sdkFactory->release();
```

## Next steps

- [API reference](/sdk/audio/desktop/docs/)
- [Desktop sample app](https://github.com/EffectsSDK/audio-effects-sdk-desktop-sample)
- [Release notes](/releases?sdk=audio-desktop)
