Low-Latency-Android-iOS-Linux-Windows-tvOS-macOS-Interactive-Audio-Platform
🇸Superpowered Audio, Networking and Cryptographics SDKs. High performance and cross platform on Android, iOS, macOS, tvOS, Linux, Windows and modern web browsers.
Top Related Projects
Pure Data embeddable audio synthesis library
Audio synthesis, processing, & analysis platform for iOS, macOS and tvOS
Cross-platform, customizable ML solutions for live and streaming media.
C++ library for audio and music analysis, description and synthesis, including Python bindings
Quick Overview
The SuperpoweredSDK is a low-latency, interactive audio platform that supports Android, iOS, Linux, Windows, tvOS, and macOS. It provides a comprehensive set of tools and APIs for building high-performance audio applications, including real-time audio processing, MIDI support, and audio file playback.
Pros
- Low Latency: The SDK is designed for low-latency audio processing, making it suitable for real-time applications like music production, gaming, and virtual/augmented reality.
- Cross-Platform Compatibility: The SDK supports a wide range of platforms, allowing developers to create audio applications that can run on multiple devices and operating systems.
- Comprehensive Feature Set: The SDK includes a variety of features, such as audio file playback, MIDI support, and real-time audio processing, making it a versatile tool for audio-based applications.
- Active Development: The project is actively maintained, with regular updates and bug fixes, ensuring that the SDK remains up-to-date and reliable.
Cons
- Proprietary License: The SDK is released under a proprietary license, which may limit its use in certain open-source or commercial projects.
- Steep Learning Curve: The SDK has a relatively steep learning curve, especially for developers who are new to audio programming or real-time audio processing.
- Limited Documentation: While the SDK does have documentation, it may not be as comprehensive or user-friendly as some developers would prefer.
- Performance Overhead: The SDK may introduce some performance overhead, especially on lower-end devices, which could be a concern for certain applications.
Code Examples
Here are a few code examples demonstrating the usage of the SuperpoweredSDK:
Audio Playback
#include <SuperpoweredAdvancedAudioPlayer.h>
SuperpoweredAdvancedAudioPlayer player;
player.open("path/to/audio/file.mp3");
player.play();
This code demonstrates how to use the SuperpoweredAdvancedAudioPlayer
class to play an audio file.
Real-Time Audio Processing
#include <SuperpoweredSimple.h>
float input[512];
float output[512];
SuperpoweredFX_reverb reverb;
reverb.process(input, output, 512, 44100);
This code demonstrates how to use the SuperpoweredFX_reverb
class to apply a reverb effect to an audio buffer in real-time.
MIDI Support
#include <SuperpoweredMIDIReceiver.h>
SuperpoweredMIDIReceiver midiReceiver;
midiReceiver.onMIDIEvent = [](int status, int data1, int data2) {
// Handle MIDI events
};
midiReceiver.start();
This code demonstrates how to use the SuperpoweredMIDIReceiver
class to receive and handle MIDI events in real-time.
Getting Started
To get started with the SuperpoweredSDK, follow these steps:
- Download the SDK from the official website.
- Extract the downloaded archive and add the
include
andlib
directories to your project's include and library paths, respectively. - Link your project against the appropriate Superpowered library (e.g.,
libSuperpowered.a
for iOS,libSuperpowered.so
for Android). - Include the necessary Superpowered header files in your code, such as
SuperpoweredAdvancedAudioPlayer.h
orSuperpoweredFX_reverb.h
. - Initialize the Superpowered SDK and start using the provided classes and functions to build your audio application.
Refer to the official documentation for more detailed information on the SDK's features, API, and usage.
Competitor Comparisons
Pure Data embeddable audio synthesis library
Pros of libpd
- Open-source and free to use, making it accessible for developers on a budget
- Extensive community support and documentation due to its popularity in the audio development world
- Leverages the power of Pure Data, allowing for visual programming and rapid prototyping of audio applications
Cons of libpd
- May have higher latency compared to Low-Latency-Android-iOS-Linux-Windows-tvOS-macOS-Interactive-Audio-Platform, which is specifically optimized for low-latency performance
- Limited to Pure Data's capabilities, which may not be as flexible or powerful as custom C++ audio processing
Code Comparison
libpd:
#include "z_libpd.h"
void setup() {
libpd_init();
libpd_openfile("mypath.pd", ".");
}
Low-Latency-Android-iOS-Linux-Windows-tvOS-macOS-Interactive-Audio-Platform:
#include "SuperpoweredAdvancedAudioPlayer.h"
SuperpoweredAdvancedAudioPlayer *player;
player = new SuperpoweredAdvancedAudioPlayer(NULL, playerEventCallback, samplerate, 0);
The code snippets show the initialization process for both libraries. libpd focuses on opening and running Pure Data patches, while Low-Latency-Android-iOS-Linux-Windows-tvOS-macOS-Interactive-Audio-Platform provides more direct control over audio playback and processing.
Audio synthesis, processing, & analysis platform for iOS, macOS and tvOS
Pros of AudioKit
- Open-source with a permissive MIT license
- Extensive documentation and community support
- Swift-friendly API design, making it ideal for iOS/macOS development
Cons of AudioKit
- Limited cross-platform support (primarily focused on Apple platforms)
- May have higher latency compared to Superpowered SDK
- Potentially steeper learning curve for non-Swift developers
Code Comparison
AudioKit:
let oscillator = AKOscillator()
AudioKit.output = oscillator
try AudioKit.start()
oscillator.start()
Superpowered SDK:
SuperpoweredOscillator *oscillator = new SuperpoweredOscillator();
oscillator->enable(true);
SuperpoweredOutput::start(outputCallback, oscillator);
Key Differences
-
Platform Support: Superpowered SDK offers broader cross-platform support, including Android, iOS, Linux, Windows, tvOS, and macOS, while AudioKit primarily targets Apple platforms.
-
Language: AudioKit is designed with Swift in mind, making it more accessible for iOS/macOS developers, while Superpowered SDK uses C++ for better cross-platform compatibility.
-
Performance: Superpowered SDK emphasizes low-latency audio processing, which may be advantageous for real-time audio applications.
-
Licensing: AudioKit is open-source with an MIT license, whereas Superpowered SDK is proprietary with a commercial license.
-
Community and Documentation: AudioKit has a larger community and more extensive documentation, potentially making it easier for beginners to get started.
Cross-platform, customizable ML solutions for live and streaming media.
Pros of MediaPipe
- Broader focus on multimedia processing, including video, audio, and ML
- Extensive documentation and examples for various use cases
- Strong integration with TensorFlow and other Google AI technologies
Cons of MediaPipe
- May have higher latency for real-time audio processing
- Less specialized for low-latency audio applications
- Potentially more complex setup for simple audio projects
Code Comparison
MediaPipe (Python):
import mediapipe as mp
mp_hands = mp.solutions.hands
hands = mp_hands.Hands()
results = hands.process(image)
Low-Latency-Audio-Platform (C++):
#include "SuperpoweredAdvancedAudioPlayer.h"
SuperpoweredAdvancedAudioPlayer *player = new SuperpoweredAdvancedAudioPlayer(NULL, playerEventCallback, samplerate, 0);
player->open(filePath);
Summary
MediaPipe offers a comprehensive multimedia processing solution with strong ML integration, while Low-Latency-Audio-Platform specializes in low-latency audio processing across multiple platforms. MediaPipe may be better suited for projects requiring diverse multimedia capabilities, whereas Low-Latency-Audio-Platform excels in audio-specific, low-latency applications. The choice between the two depends on the specific requirements of your project, balancing between versatility and specialized audio performance.
C++ library for audio and music analysis, description and synthesis, including Python bindings
Pros of Essentia
- Extensive library of audio analysis algorithms and music information retrieval tools
- Open-source with active community development and contributions
- Supports Python bindings, making it accessible for data scientists and researchers
Cons of Essentia
- Primarily focused on audio analysis rather than real-time audio processing
- May have higher latency compared to Low-Latency-Android-iOS-Linux-Windows-tvOS-macOS-Interactive-Audio-Platform
- Less optimized for mobile and cross-platform development
Code Comparison
Essentia:
import essentia.standard as es
audio = es.MonoLoader(filename='audio.wav')()
spectrum = es.Spectrum()(audio)
mfcc = es.MFCC()(spectrum)
Low-Latency-Android-iOS-Linux-Windows-tvOS-macOS-Interactive-Audio-Platform:
SuperpoweredAdvancedAudioPlayer player;
player.open(filePath);
player.play();
// Process audio in real-time
float *outputBuffer = new float[numFrames * 2];
player.processStereo(outputBuffer, numFrames);
The code snippets highlight the different focus areas of the two libraries. Essentia emphasizes audio analysis and feature extraction, while Low-Latency-Android-iOS-Linux-Windows-tvOS-macOS-Interactive-Audio-Platform prioritizes real-time audio processing and playback across multiple platforms.
Convert designs to code with AI
Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.
Try Visual CopilotREADME
Superpowered Inc develops the leading portable C++ Audio SDK, C++ Networking SDK, and C++ Crypto SDK featuring low-power and real-time latency. With builds for Desktop, Mobile, IoT and Embedded Devices, portable and cross-platform on Android, iOS, macOS, tvOS, Linux and Windows as well as processor-specific builds for ARM32, ARM64, x86, and x64.
Technology, SDKs and Code
Superpowered Inc develops the following interactive audio, networking and cryptographics SDKs and infrastructure:
1. Superpowered C++ Audio Library and SDK for Android, iOS, macOS, tvOS, Linux and Windows.
Superpowered C++ Audio Library and SDK is the leading C++ Audio Library featuring low-power, real-time latency and cross-platform audio players, audio decoders, Fx (effects), audio I/O, streaming, music analysis and spatialization.
For the most up-to-date feature list, see: https://superpowered.com/audio-library-sdk For the latest API reference check the docsite: https://docs.superpowered.com/reference/latest?lang=cpp
2. Superpowered C++ Networking Library and SDK for Android, iOS, macOS, tvOS, Linux and Windows.
The Superpowered C++ Networking Library and SDK was designed from the ground-up to provide the easiest cross-platform way for a client to communicate with the back-end. It implements HTTP and HTTPS communication with custom data and header support, progress handling, file uploads/downloads and more. It reduces implementation, debug and maintenance time of typical tasks such as REST API requests, OAuth and bearer token authorization, or digital media streaming. It operates identically on all platforms, removing the pain of writing wrappers and finding quirks around the operating system's networking API, while it's fully self-contained and independent from it. The SDK also has a JSON parser to offer a complete package for your everyday networking and parsing needs.
For the most up-to-date feature list, see: https://superpowered.com/networking-library-sdk
3. Superpowered C++ Cryptographics Library and SDK for Android, iOS, macOS, tvOS, Linux and Windows.
Superpowered Crypto offers the easiest cross-platform way to implement RSA public and private key cryptography, AES encryption and hashing functions (SHA, MD5). Unlike other cryptographics libraries designed for crypto enthusiasts with myriads of options and complex APIs, Superpowered Crypto has direct one-liner calls for signing, verification, encryption and decryption, solving the most common use-cases in the quickest way.
For the most up-to-date feature list, see: https://superpowered.com/crypto-library-sdk
4. Superpowered HLS (HTTP Live Streaming) audio for Android, iOS, macOS, tvOS, Linux and Windows.
- VOD, live or event streams.
- AAC-LC or MP3 audio encoding.
- ADTS AAC, MP3 or MPEG-TS containers.
- Supports byte range requests and AES-128 encryption.
- Bandwidth measurement and selectable automatic stream switching.
- Selectable download strategies.
Background information: https://superpowered.com/http-live-streaming-for-android-superpowered-android-audio-io-and-audio-resampler
5. Superpowered USB Audio and USB MIDI for Android
The Superpowered USB Audio and MIDI features for Android takes over MIDI device handling, providing low latency and low jitter (below 2 ms) access to MIDI devices for 1.4 billion Android devices, that is, 90+% of all Android devices on Google Play. Itâs the Android equivalent of iOS Core Audio and Core MIDI for USB devices.
For additional info, please see: https://superpowered.com/android-usb-audio-android-midi
6. Superpowered has developed a system-space solution for Android's 10 ms Problem.
Interested parties should read:
https://superpowered.com/android-audio-low-latency-primer https://superpowered.com/superpowered-android-media-server
Supported Platforms
Superpowered is cross-platform: ALL SUPERPOWERED C++ CODE CAN BE COPY-PASTED between Android, iOS, macOS, tvOS, Linux and Windows.
Folders
-
/Superpowered
The SDKs (static libraries and headers).
-
/License
Contains the license document and Superpowered logo assets.
-
/Examples_Android
Example projects for Android.
-
/Examples_iOS
Example projects for iOS.
-
/Examples_Linux
Example projects for Linux.
-
/Examples_tvOS
Example projects for tvOS.
-
/Examples_Windows
Example projects for Windows.
-
/Examples_macOS
Ambisonics (b-format) implementation based on the Superpowered Spatializer.
-
/Examples_Flutter
Example projects for Flutter.
-
/Examples_ReactNative
Example projects for React Native.
-
/Examples_VisionOS
Example projects for visionOS.
Example Projects
/Examples_Windows/SuperpoweredExample.sln
Four simple Universal Windows Platform example projects in a single Visual Studio solution. Shows how to:
- Set up audio I/O.
- Use a single player to play an MP3 bundled with an app.
- Use a single player to play HLS content.
- Record the microphone input using Superpowered Recorder.
- Use a single effect (input -> fx -> output).
/Examples_iOS/SuperpoweredCrossExample, /Examples_Android/CrossExample
A fully-functional DJ app project example. Shows how to:
- Set up audio I/O.
- Set up two players.
- Sync them together.
- Apply some effects on the master mix.
- Use Objective-C++.
/Examples_iOS/SuperpoweredFrequencyDomain, /Examples_Android/FrequencyDomain
Simple time domain to frequency domain transformation with buffering and windowing. Shows how to:
- Set up audio I/O.
- Use the SuperpoweredFrequencyDomain class.
- Process the magnitudes and phases of the audio input.
/Examples_iOS/uperpoweredHLSExample, /Examples_Linux/src/hls.cpp
HTTP Live Streaming example project.
/Examples_iOS/SuperpoweredOfflineProcessingExample, /Examples_Linux/src/offlineX.cpp
Advanced example. Decodes an audio file, applies an effect or time stretching and saves the result in WAV. Shows how to:
- Set up the Superpowered Decoder.
- Apply a simple effect.
- Use the time stretcher with an efficient dynamic memory pool.
- Save the result in WAV.
- Directly read from the iPod music library.
- Use the offline analyzer to detect bpm and other information.
/Examples_iOS/SuperpoweredFrequencies
Simple 8-band frequency analyzer. Shows how to:
- Mix Swift and Objective-C++ in a project.
- Use the Superpowered BandpassFilterbank.
/SuperpoweredPerformance (iOS)
It compares several Superpowered features to Core Audio.
-
Shows the differences between Superpowered and Core Audio.
-
Syncs effects to the player's bpm.
-
Shows how to use Objective-C++ in an Objective-C project.
Swift note: We have also tried creating this project in Swift, but it's not complete for audio and several features were impossible to implement (such as proper performance measurement). Swift is not designed for real-time audio. Fortunately, Objective-C++ files work great in Swift projects.
/Examples_Android/SuperpoweredEffect
Shows how to use a single effect (input -> fx -> output).
/Examples_Android/SuperpoweredPlayer
Shows how to use a player (for local, progressive download or HLS playback).
/Examples_Android/SuperpoweredRecorder
Shows how to record the microphone input using Superpowered Recorder.
/Examples_macOS/ambi (OSX)
Simple ambisonics implementation based on the Superpowered Spatializer.
/Examples_Android/SuperpoweredUSBExample
This project comes with two example apps, a simple and a complex example app.
Simple USB Example App:
The simple example app demonstrates an easy audio setup, similar to how iOS handles USB audio devices. It also receives and displays MIDI. The audio functionality of the simple example app will cover most mobile audio use cases.
Complex USB Example App:
The complex example app demonstrates full USB audio discovery, for the use case of sophisticated DAW and recording apps. It displays the various input and output options, audio paths and hardware controls of a USB audio device. Hardware controls can be manipulated and advanced thru audio paths can be enabled.
If an audio output is selected without an audio input, the complex example sends a sine wave to every output channel. If both audio output and audio input are selected, then loopback or round-trip latency measurement are available.
This means that the complex example app is also a testing tool to discover a USB audio deviceâs advanced features, test audio quality, glitches and latency.
/Examples_Flutter/SuperpoweredPlayerWithEffects
Shows how to use a player and apply a single effect.
/Examples_ReactNative/SuperpoweredPlayerWithEffects
Shows how to use a player and apply a single effect.
/Examples_VisionOS/SuperpoweredVisionOSExample
Shows how to generate a sine wave.
Remarks:
Superpowered USB Audio classes for Android are compatible from Android 19 (KitKat 4.4) onwards. Thatâs the first Android version where proper scheduling priorities were implemented for low latency audio. This covers more than 75% active Android devices today.
Android Studio
Before running any Android example project, please install the Android NDK version 25.1.8937393 (Tools â SDK Manager â SDK Tools â NDK (Side by side)). Furthermore, turn off Instant Run in the settings, because the Instant Run feature of Android Studio is not compatible with native C++ Android projects.
How to create a Superpowered project with Android Studio
Prerequisites: latest Android SDK, Android NDK, Android Studio installed. Steps:
- Create a new project in Android Studio.
- Create the cpp folder inside the project's folder: app/src/main/jni
- Copy the contents of the following files from one of the example projects: gradle/wrapper/gradle-wrapper.properties, build.gradle, app/build.gradle, app/CMakeLists.txt
- Open build.gradle (Module: app), and change the applicationId
Support
Superpowered offers multiple support options.
Developer Documentation (C++ and JavaScript): https://docs.superpowered.com
Email: support@superpowered.zendesk.com
Knowledge base: https://superpowered.zendesk.com/hc/en-us
StackOverflow: https://stackoverflow.com/search?tab=newest&q=superpowered
YouTube: https://www.youtube.com/playlist?list=PLtRKsB6a4xFMXJrZ9wjscOow3nASBoEbU
Paid support options: https://superpowered.com/support
Licensing
For details, please see: https://superpowered.com/licensing
For licensing inquiries, please email licensing@superpowered.com.
Custom Application Development Services
Superpowered offers custom development services focusing on low-latency, interactive audio applications for mobile, web, desktop and embedded.
For development inquiries, please email hello@superpowered.com.
Contact
If you want to be informed about new code releases, bug fixes, general news and information about Superpowered, please email hello@superpowered.com.
For licensing inquiries, please email licensing@superpowered.com.
Notes
Superpowered FFT benefits from ideas in Construction of a High-Performance FFT by Eric Postpischil (http://edp.org/resume.htm).
The Superpowered MP3 and AAC decoder benefits from optimizations by Ken Cooke.
Superpowered version 2.6.8
Top Related Projects
Pure Data embeddable audio synthesis library
Audio synthesis, processing, & analysis platform for iOS, macOS and tvOS
Cross-platform, customizable ML solutions for live and streaming media.
C++ library for audio and music analysis, description and synthesis, including Python bindings
Convert designs to code with AI
Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.
Try Visual Copilot