SuperpoweredSDK  v2.0.1
Superpowered Audio SDK
Superpowered Namespace Reference

Classes

class  AdvancedAudioPlayer
 High performance advanced audio player with: More...
 
struct  AES
 A structure to perform AES encryption. The size of the structure is 548 bytes. More...
 
class  Analyzer
 Performs bpm and key detection, loudness/peak analysis. More...
 
class  AndroidUSB
 This class manages USB device connections. More...
 
class  AndroidUSBAudio
 This class implements a custom low latency USB audio stack for Android, fully bypassing the Android system audio stack. More...
 
struct  AndroidUSBAudioIOInfo
 Information about an audio input or output. More...
 
class  AndroidUSBMIDI
 This class implements a custom low latency USB MIDI stack for Android, fully bypassing the Android system MIDI stack. More...
 
class  AudiobufferPool
 Manages a global audio buffer pool, reducing the number of memory allocation requests, increasing efficiency of audio applications. More...
 
class  AudiopointerList
 Manages an audio buffer list. More...
 
struct  AudiopointerlistElement
 An audio buffer list item. More...
 
class  BandpassFilterbank
 Efficient bandpass filter bank for real-time zero latency frequency analysis. Each band is a separated bandpass filter with custom width and center frequency. More...
 
class  Bitcrusher
 Bit crusher with adjustable frequency and bit depth. More...
 
class  Clipper
 Hard knee clipping with 0 latency. More...
 
class  Compressor
 Compressor with 0 latency. More...
 
class  CompressorProto
 The new Superpowered Compressor prototype. It can be used in production, but we're still collecting feedback on its feature set, therefore the documentation is not complete on this one. More...
 
class  CPU
 Utility class to keep the CPU running near the maximum frequency for all cores ("sustained performance mode"). More...
 
class  Decoder
 Audio file decoder. More...
 
class  Delay
 Simple delay with minimum memory operations. More...
 
class  Echo
 Simple echo ("delay effect"). More...
 
class  Filter
 Filter is an IIR filter based on the typical direct form 1 formula: y[n] = (b0/a0)*x[n] + (b1/a0)*x[n-1] + (b2/a0)*x[n-2] - (a1/a0)*y[n-1] - (a2/a0)*y[n-2] It doesn't allocate any internal buffers and needs just a few bytes of memory. More...
 
class  Flanger
 Flanger with aggressive sound ("jet"). More...
 
class  FrequencyDomain
 Transforms between time-domain and frequency-domain audio, including buffering, windowing (HanningZ) and window overlap handling (default: 4:1). More...
 
class  FX
 This is the base class for Superpowered effects. More...
 
class  Gate
 Simple gate effect. More...
 
struct  hasher
 A structure for high-performance hashing. More...
 
struct  httpData
 A key/value pair used for custom data or headers in requests. More...
 
class  httpRequest
 HTTP request. More...
 
class  httpResponse
 Represents an in-progress or finished HTTP response. More...
 
struct  json
 Represents one JSON item, that can be a parent of other items (deep hierarchies are possible), a member of a linked list or just a simple data item (such as a string). More...
 
class  Limiter
 Limiter with 32 samples latency. More...
 
class  LiveAnalyzer
 Performs bpm and key detection continuously. More...
 
class  MonoMixer
 Mixes up to 4 mono inputs. Every input and the output has individual gain control. One instance allocates just a few bytes of memory, therefore combining multiple instances of the MonoMixer is the recommended way to support more than 4 channels. More...
 
class  Recorder
 Records audio into 16-bit WAV file, with an optional tracklist. More...
 
class  Resampler
 Linear or 6-point resampler, audio reverser and 16-bit to 32-bit audio converter. More...
 
class  Reverb
 CPU-friendly reverb. More...
 
class  Roll
 Bpm/beat based loop roll effect. More...
 
class  RSAPrivateKey
 RSA private key object. More...
 
class  RSAPublicKey
 Forward declaration. More...
 
class  Spatializer
 CPU-friendly 3D audio spatializer. More...
 
class  StereoMixer
 Mixes up to 4 stereo inputs. From the traditional mixer hardware point of view, every input and the output has dedicated metering, gain and pan controls. One instance allocates just a few bytes of memory, therefore combining multiple instances of the StereoMixer is the recommended way to support more than 4 channels. More...
 
class  ThreeBandEQ
 Classic three-band equalizer with unique characteristics and total kills. More...
 
class  TimeStretching
 Time stretching and pitch shifting. More...
 
class  Waveform
 Provides waveform data in 150 points/sec resolution. More...
 
class  Whoosh
 White noise + filter. More...
 

Typedefs

typedef void(* AndroidUSBAudioDeviceConnectedCallback) (void *clientdata, int deviceID, const char *manufacturer, const char *product, const char *info)
 Called when a USB audio device is connected. More...
 
typedef void(* AndroidUSBAudioDeviceDisconnectedCallback) (void *clientdata, int deviceID)
 Called when a USB audio device is disconnected. More...
 
typedef struct Superpowered::AndroidUSBAudioIOInfo AndroidUSBAudioIOInfo
 Information about an audio input or output. More...
 
typedef bool(* AndroidUSBAudioProcessingCallback) (void *clientdata, int deviceID, float *audioIO, int numberOfFrames, int samplerate, int numberOfInputChannels, int numberOfOutputChannels)
 This is the prototype of an audio processing callback function. More...
 
typedef void(* AndroidUSBMIDIDeviceConnectedCallback) (void *clientdata, int deviceID, const char *manufacturer, const char *product)
 Called when a USB MIDI device is connected. More...
 
typedef void(* AndroidUSBMIDIDeviceDisconnectedCallback) (void *clientdata, int deviceID)
 Called when a USB MIDI device is disconnected. More...
 
typedef void(* AndroidUSBMIDIReceivedCallback) (void *clientdata, int deviceID, unsigned char *data, int bytes)
 This is the prototype of a MIDI callback function. More...
 
typedef struct Superpowered::AudiopointerlistElement AudiopointerlistElement
 An audio buffer list item. More...
 
typedef enum Superpowered::Decoder_Format Decoder_Format
 File/decoder format. More...
 
typedef enum Superpowered::FilterType FilterType
 Superpowered filter types and their effective parameters: More...
 
typedef struct Superpowered::httpData httpData
 A key/value pair used for custom data or headers in requests. More...
 
typedef enum Superpowered::httpDataMode httpDataMode
 The mode for passing key/value data. More...
 
typedef void(* httpLogCallback) (void *clientData, const char *str)
 Human readable HTTP transfer log. More...
 
typedef bool(* httpRequestCallback) (void *clientData, httpRequest *request, httpResponse *response)
 Receive the progress of a httpRequest or the result of an asynchronous request with this callback. More...
 
typedef enum Superpowered::JogMode JogMode
 Jog Wheel Mode, to be used with the jogT... methods. More...
 
typedef enum Superpowered::PlayerEvent PlayerEvent
 Player events. More...
 
typedef enum Superpowered::SyncMode SyncMode
 Synchronization modes. More...
 

Enumerations

enum  AndroidUSBAudioBufferSize {
  AndroidUSBAudioBufferSize_VeryLow = 128,
  AndroidUSBAudioBufferSize_Low = 256,
  AndroidUSBAudioBufferSize_Mid = 512
}
 Audio latency settings. More...
 
enum  Decoder_Format {
  Decoder_Format_MP3,
  Decoder_Format_AAC,
  Decoder_Format_AIFF,
  Decoder_Format_WAV,
  Decoder_Format_MediaServer
}
 File/decoder format. More...
 
enum  FilterType {
  Resonant_Lowpass = 0,
  Resonant_Highpass = 1,
  Bandlimited_Bandpass = 2,
  Bandlimited_Notch = 3,
  LowShelf = 4,
  HighShelf = 5,
  Parametric = 6,
  CustomCoefficients = 7
}
 Superpowered filter types and their effective parameters: More...
 
enum  hashType {
  NOHASH = 0,
  MD5,
  SHA1,
  SHA224,
  SHA256,
  SHA384,
  SHA512
}
 Hash type. More...
 
enum  httpDataMode {
  Constant,
  Free,
  AlignedFree,
  Copy
}
 The mode for passing key/value data. More...
 
enum  JogMode {
  JogMode_Scratch,
  JogMode_PitchBend,
  JogMode_Parameter
}
 Jog Wheel Mode, to be used with the jogT... methods. More...
 
enum  OnConnectReturn {
  AudioAndMIDISuccess,
  AudioSuccess,
  MIDISuccess,
  NotRecognized
}
 Audio latency settings. More...
 
enum  PlayerEvent {
  PlayerEvent_None = 0,
  PlayerEvent_Opening = 1,
  PlayerEvent_OpenFailed = 2,
  PlayerEvent_Opened = 10,
  PlayerEvent_ConnectionLost = 3,
  PlayerEvent_ProgressiveDownloadFinished = 11
}
 Player events. More...
 
enum  SyncMode {
  SyncMode_None,
  SyncMode_Tempo,
  SyncMode_TempoAndBeat
}
 Synchronization modes. More...
 

Functions

void Add1 (float *input, float *output, unsigned int numberOfItems)
 Adds the values in input to the values in output: output[n] += input[n]. More...
 
void Add2 (float *inputA, float *inputB, float *output, unsigned int numberOfItems)
 Adds the values in two inputs to the values in output: output[n] += inputA[n] + inputB[n]. More...
 
void Add4 (float *inputA, float *inputB, float *inputC, float *inputD, float *output, unsigned int numberOfItems)
 Adds the values in four inputs to the values in output: output[n] += inputA[n] + inputB[n] + inputC[n] + inputD[n]. More...
 
int base64Decode (const char *input, char *output, const unsigned char *customTable=0)
 Base64 decoding. More...
 
int base64Encode (const char *input, int inputLengthBytes, char *output, bool linebreakEvery64=false)
 Base64 encoding. More...
 
int base64EncodeGetMaxOutputBytes (int length)
 Returns with the maximum bytes needed to store a base64 result. More...
 
void Bit24ToFloat (void *input, float *output, unsigned int numberOfFrames, unsigned int numChannels=2)
 Converts 24-bit audio to 32-bit floating point. More...
 
void ChangeVolume (float *input, float *output, float volumeStart, float volumeChange, unsigned int numberOfFrames)
 Applies volume on a single stereo interleaved buffer: output = input * gain. More...
 
void ChangeVolumeAdd (float *input, float *output, float volumeStart, float volumeChange, unsigned int numberOfFrames)
 Applies volume on a single stereo interleaved buffer and adds it to the audio in the output buffer: output = output + input * gain. More...
 
void CharToFloat (signed char *input, float *output, unsigned int numberOfFrames, unsigned int numChannels=2)
 Converts 8-bit audio to 32-bit floating point. More...
 
void closeWAV (FILE *fd)
 Closes a 16-bit stereo WAV file. More...
 
FILE * createWAV (const char *path, unsigned int samplerate, unsigned char numChannels)
 Creates a 16-bit WAV file. More...
 
void CrossMono (float *inputA, float *inputB, float *output, float inputAGainStart, float inputAGainEnd, float inputBGainStart, float inputBGainEnd, unsigned int numberOfFrames)
 Crossfades two mono input channels into a mono output: output = inputA * gain + inputB + gain. More...
 
void CrossStereo (float *inputA, float *inputB, float *output, float inputAGainStart, float inputAGainEnd, float inputBGainStart, float inputBGainEnd, unsigned int numberOfFrames)
 Crossfades two stereo inputs into a stereo output: output = inputA * gain + inputB + gain. More...
 
void DeInterleave (float *input, float *left, float *right, unsigned int numberOfFrames)
 Deinterleaves an interleaved stereo input to two mono output channels: left = [L, L, L, L, ...], right = [R, R, R, R, ...]. More...
 
void DeInterleaveAdd (float *input, float *left, float *right, unsigned int numberOfFrames)
 Deinterleaves an interleaved stereo input and adds the results to the two mono output channels: left = left + [L, L, L, L, ...], right = right + [R, R, R, R, ...]. More...
 
void DeInterleaveMultiply (float *input, float *left, float *right, unsigned int numberOfFrames, float multiplier)
 Deinterleaves an interleaved stereo input to two mono output channels and multiplies the output (gain): left = [L, L, L, L, ...] * gain, right = [R, R, R, R, ...] * gain. More...
 
void DeInterleaveMultiplyAdd (float *input, float *left, float *right, unsigned int numberOfFrames, float multiplier)
 Deinterleaves an interleaved stereo input to two mono output channels, multiplies the result (gain) and and adds the results to the two mono output channels: left = left + [L, L, L, L, ...] * gain, right = right + [R, R, R, R, ...] * gain. More...
 
char * DERtoPEM (const char *der, int inputLengthBytes, bool privateKey)
 Creates a new string in PEM format from DER data. More...
 
float DotProduct (float *inputA, float *inputB, unsigned int numValues)
 Calculates the dot product of two vectors. More...
 
void FFTComplex (float *real, float *imag, int logSize, bool forward)
 Complex in-place FFT. More...
 
void FFTReal (float *real, float *imag, int logSize, bool forward)
 Real in-place FFT. More...
 
void FloatTo24bit (float *input, void *output, unsigned int numberOfFrames, unsigned int numChannels=2)
 Converts 32-bit floating point audio to 24-bit. More...
 
void FloatToChar (float *input, signed char *output, unsigned int numberOfFrames, unsigned int numChannels=2)
 Converts 32-bit floating point audio 8-bit audio. More...
 
void FloatToInt (float *input, int *output, unsigned int numberOfFrames, unsigned int numChannels=2)
 Converts 32-bit floating point audio to 32-bit integer. More...
 
void FloatToShortInt (float *input, short int *output, unsigned int numberOfFrames, unsigned int numChannels=2)
 Converts 32-bit float input to 16-bit signed integer output. More...
 
void FloatToShortIntInterleave (float *inputLeft, float *inputRight, short int *output, unsigned int numberOfFrames)
 Converts two 32-bit mono float input channels to stereo interleaved 16-bit signed integer output. More...
 
float frequencyOfNote (int note)
 
unsigned char hashGetSizeBytes (hashType type)
 The hash size in bytes based on the hash type. More...
 
bool HasNonFinite (float *buffer, unsigned int numberOfValues)
 Checks if the audio samples has non-valid values, such as infinity or NaN (not a number). More...
 
void Initialize (const char *licenseKey, bool enableAudioAnalysis, bool enableFFTAndFrequencyDomain, bool enableAudioTimeStretching, bool enableAudioEffects, bool enableAudioPlayerAndDecoder, bool enableCryptographics, bool enableNetworking)
 Initializes the Superpowered SDKs. More...
 
void Interleave (float *left, float *right, float *output, unsigned int numberOfFrames)
 Makes an interleaved stereo output from two mono input channels: output = [L, R, L, R, ...]. More...
 
void InterleaveAdd (float *left, float *right, float *output, unsigned int numberOfFrames)
 
void InterleaveAndGetPeaks (float *left, float *right, float *output, unsigned int numberOfFrames, float *peaks)
 Makes an interleaved output from two input channels and measures the volume: output = [L, R, L, R, ...]. More...
 
void IntToFloat (int *input, float *output, unsigned int numberOfFrames, unsigned int numChannels=2)
 Converts 32-bit integer audio to 32-bit floating point. More...
 
void MidSideToStereo (float *input, float *output, unsigned int numberOfFrames)
 Converts a mid-side signal to stereo. More...
 
float Peak (float *input, unsigned int numberOfValues)
 
int PEMtoDER (char *inputOutput)
 Converts a memory buffer with PEM format string to DER format. More...
 
void PolarFFT (float *mag, float *phase, int logSize, bool forward, float valueOfPi=0)
 Polar FFT. More...
 
bool printToString (char **str, int maxBytesNeeded, const char *format,...)
 Helper function to create a string with the same text that would be printed if format was used on printf, but instead of being printed, the content is stored as a C string. More...
 
void ShortIntToFloat (short int *input, float *output, unsigned int numberOfFrames, float *peaks)
 Converts stereo interleaved 16-bit signed integer input to stereo interleaved 32-bit float output, and provides peak measurement. More...
 
void ShortIntToFloat (short int *input, float *output, unsigned int numberOfFrames, unsigned int numChannels=2)
 Converts 16-bit signed integer input to 32-bit float output. More...
 
unsigned char simpleHash (hashType type, unsigned int inputLengthBytes, const unsigned char *input, unsigned char *hash)
 Performs a simple hashing operation in one convenient line. More...
 
void simpleHMAC (hashType type, const unsigned char *key, int keyLengthBytes, const unsigned char *input, int inputLengthBytes, unsigned char *output)
 Performs a simple hash-based message authentication code operation in one convenient line. More...
 
const char * statusCodeToString (int code, const char *defaultString)
 User readable error string from a status code (including HTTP status codes). More...
 
void StereoToMidSide (float *input, float *output, unsigned int numberOfFrames)
 Converts a stereo signal to mid-side. More...
 
void StereoToMono (float *input, float *output, float leftGainStart, float leftGainEnd, float rightGainStart, float rightGainEnd, unsigned int numberOfFrames)
 Makes mono output from stereo interleaved input: output = [L + R], [L + R], [L + R], ... More...
 
char * urlDecode (char *input, char *output)
 URL decode. More...
 
char * urlEncode (char *input, char *output, bool spaceIsPlus=false)
 URL encode. More...
 
int urlEncodeGetMaxOutputBytes (int length)
 Returns with the maximum bytes needed to store a URL encoded result. More...
 
unsigned int Version ()
 
void Volume (float *input, float *output, float volumeStart, float volumeEnd, unsigned int numberOfFrames)
 Applies volume on a single stereo interleaved buffer: output = input * gain. More...
 
void VolumeAdd (float *input, float *output, float volumeStart, float volumeEnd, unsigned int numberOfFrames)
 Applies volume on a single stereo interleaved buffer and adds it to the audio in the output buffer: output = output + input * gain. More...
 
bool writeWAV (FILE *fd, short int *audio, unsigned int numberOfBytes)
 Writes audio into a WAV file. More...
 

Typedef Documentation

◆ AndroidUSBAudioDeviceConnectedCallback

typedef void(* Superpowered::AndroidUSBAudioDeviceConnectedCallback) (void *clientdata, int deviceID, const char *manufacturer, const char *product, const char *info)

Called when a USB audio device is connected.

Parameters
clientdataSome custom pointer you set at AndroidUSB::initialize().
deviceIDDevice identifier.
manufacturerManufacturer name.
productProduct name.
infoDetailed, user-readable USB information about the device.

◆ AndroidUSBAudioDeviceDisconnectedCallback

typedef void(* Superpowered::AndroidUSBAudioDeviceDisconnectedCallback) (void *clientdata, int deviceID)

Called when a USB audio device is disconnected.

Parameters
clientdataSome custom pointer you set at AndroidUSB::initialize().
deviceIDDevice identifier.

◆ AndroidUSBAudioIOInfo

Information about an audio input or output.

◆ AndroidUSBAudioProcessingCallback

typedef bool(* Superpowered::AndroidUSBAudioProcessingCallback) (void *clientdata, int deviceID, float *audioIO, int numberOfFrames, int samplerate, int numberOfInputChannels, int numberOfOutputChannels)

This is the prototype of an audio processing callback function.

Audio input is available in audioIO, and the application should change it's contents for audio output.

Returns
Return with false for no audio output (silence), true otherwise.
Parameters
clientdataA custom pointer your callback receives.
deviceIDUSB device identifier.
audioIO32-bit interleaved audio input and/or output.
numberOfFramesThe number of frames.
samplerateThe current sample rate in Hz.
numberOfInputChannelsNumber of available input channels.
numberOfOutputChannelsNumber of available output channels.

◆ AndroidUSBMIDIDeviceConnectedCallback

typedef void(* Superpowered::AndroidUSBMIDIDeviceConnectedCallback) (void *clientdata, int deviceID, const char *manufacturer, const char *product)

Called when a USB MIDI device is connected.

Parameters
clientdataSome custom pointer you set at AndroidUSB::initialize().
deviceIDDevice identifier.
manufacturerManufacturer name.
productProduct name.

◆ AndroidUSBMIDIDeviceDisconnectedCallback

typedef void(* Superpowered::AndroidUSBMIDIDeviceDisconnectedCallback) (void *clientdata, int deviceID)

Called when a USB MIDI device is disconnected.

Parameters
clientdataSome custom pointer you set at AndroidUSB::initialize().
deviceIDDevice identifier.

◆ AndroidUSBMIDIReceivedCallback

typedef void(* Superpowered::AndroidUSBMIDIReceivedCallback) (void *clientdata, int deviceID, unsigned char *data, int bytes)

This is the prototype of a MIDI callback function.

Parameters
clientdataA custom pointer your callback receives.
deviceIDUSB device identifier.
dataRaw MIDI data.
bytesNumber of bytes.

◆ AudiopointerlistElement

◆ Decoder_Format

◆ FilterType

Superpowered filter types and their effective parameters:

◆ httpData

A key/value pair used for custom data or headers in requests.

◆ httpDataMode

The mode for passing key/value data.

◆ httpLogCallback

typedef void(* Superpowered::httpLogCallback) (void *clientData, const char *str)

Human readable HTTP transfer log.

Parameters
clientDataYour custom data.
strLog string.

◆ httpRequestCallback

typedef bool(* Superpowered::httpRequestCallback) (void *clientData, httpRequest *request, httpResponse *response)

Receive the progress of a httpRequest or the result of an asynchronous request with this callback.

Parameters
clientDataYour custom data.
requestThe initiating request instance.
responseHTTP response.
Returns
Return with true to continue the transfer or false to cancel immediately.

◆ JogMode

Jog Wheel Mode, to be used with the jogT... methods.

◆ PlayerEvent

◆ SyncMode

Synchronization modes.

Enumeration Type Documentation

◆ AndroidUSBAudioBufferSize

Audio latency settings.

Enumerator
AndroidUSBAudioBufferSize_VeryLow 
AndroidUSBAudioBufferSize_Low 
AndroidUSBAudioBufferSize_Mid 

◆ Decoder_Format

File/decoder format.

Enumerator
Decoder_Format_MP3 

MP3.

Decoder_Format_AAC 

AAC, HE-AAC.

Decoder_Format_AIFF 

AIFF.

Decoder_Format_WAV 

WAV.

Decoder_Format_MediaServer 

Other format decoded by iOS, macOS or tvOS.

◆ FilterType

Superpowered filter types and their effective parameters:

Enumerator
Resonant_Lowpass 

frequency, resonance

Resonant_Highpass 

frequency, resonance

Bandlimited_Bandpass 

frequency, octave

Bandlimited_Notch 

frequency, octave

LowShelf 

frequency, slope, decibel

HighShelf 

frequency, slope, decibel

Parametric 

frequency, octave, decibel

CustomCoefficients 

◆ hashType

Hash type.

Enumerator
NOHASH 
MD5 
SHA1 
SHA224 
SHA256 
SHA384 
SHA512 

◆ httpDataMode

The mode for passing key/value data.

Enumerator
Constant 

The key or value points to a constant in memory, such as constant string "hello".

Free 

The object will take ownership on the key or value and will free up the memory using free().

AlignedFree 

For Windows: the object will take ownership on the key or value and will free up the memory using _aligned_free().

Copy 

The object will NOT take ownership on the key or value, but will copy the contents and use the copy.

◆ JogMode

Jog Wheel Mode, to be used with the jogT... methods.

Enumerator
JogMode_Scratch 

Jog wheel controls scratching.

JogMode_PitchBend 

Jog wheel controls pitch bend.

JogMode_Parameter 

Jog wheel changes a parameter.

◆ OnConnectReturn

Audio latency settings.

Enumerator
AudioAndMIDISuccess 

Both audio and MIDI is recognized and connected.

AudioSuccess 

Audio is recognized and connected, MIDI not recognized.

MIDISuccess 

MIDI is recognized and connected, audio not recognized.

NotRecognized 

Found no audio or MIDI features for this device.

◆ PlayerEvent

Player events.

Enumerator
PlayerEvent_None 

Open was not called yet.

PlayerEvent_Opening 

Trying to open the content.

PlayerEvent_OpenFailed 

Failed to open the content.

PlayerEvent_Opened 

Successfully opened the content, playback can begin.

PlayerEvent_ConnectionLost 

Network connection lost to the HLS stream or progressive download. Can only be "recovered" by a new open(). May happen after PlayerEvent_Opened has been delivered.

PlayerEvent_ProgressiveDownloadFinished 

The content finished downloading and is fully available locally. May happen after PlayerEvent_Opened has been delivered.

◆ SyncMode

Synchronization modes.

Enumerator
SyncMode_None 

No synchronization.

SyncMode_Tempo 

Sync tempo only.

SyncMode_TempoAndBeat 

Sync tempo and beat.

Function Documentation

◆ Add1()

Superpowered::Add1 ( float *  input,
float *  output,
unsigned int  numberOfItems 
)

Adds the values in input to the values in output: output[n] += input[n].

Parameters
inputPointer to floating point numbers. Input data.
outputPointer to floating point numbers. Output data.
numberOfItemsThe length of input.

◆ Add2()

Superpowered::Add2 ( float *  inputA,
float *  inputB,
float *  output,
unsigned int  numberOfItems 
)

Adds the values in two inputs to the values in output: output[n] += inputA[n] + inputB[n].

Parameters
inputAPointer to floating point numbers. Input data.
inputBPointer to floating point numbers. Input data.
outputPointer to floating point numbers. Output data.
numberOfItemsThe length of input.

◆ Add4()

Superpowered::Add4 ( float *  inputA,
float *  inputB,
float *  inputC,
float *  inputD,
float *  output,
unsigned int  numberOfItems 
)

Adds the values in four inputs to the values in output: output[n] += inputA[n] + inputB[n] + inputC[n] + inputD[n].

Parameters
inputAPointer to floating point numbers. Input data.
inputBPointer to floating point numbers. Input data.
inputCPointer to floating point numbers. Input data.
inputDPointer to floating point numbers. Input data.
outputPointer to floating point numbers. Output data.
numberOfItemsThe length of input.

◆ base64Decode()

int Superpowered::base64Decode ( const char *  input,
char *  output,
const unsigned char *  customTable = 0 
)

Base64 decoding.

Parameters
inputBase64 encoded input string.
outputThe buffer for the decoded string. Must be big enough to store the output. Can be equal to input for in-place processing. Will be 0 terminated.
customTableReserved.
Returns
String length (strlen) of output.

◆ base64Encode()

int Superpowered::base64Encode ( const char *  input,
int  inputLengthBytes,
char *  output,
bool  linebreakEvery64 = false 
)

Base64 encoding.

Parameters
inputInput string.
inputLengthBytesSize of the input in bytes (not including trailing zero, can use strlen for this).
outputOutput buffer. Must be big enough to store the output (base64EncodeGetMaxOutputBytes can help). Can not be equal to input (in-place processing not supported). Will be 0 terminated.
linebreakEvery64Set it to true to put a line break after every 64th character.
Returns
String length (strlen) of output.

◆ base64EncodeGetMaxOutputBytes()

int Superpowered::base64EncodeGetMaxOutputBytes ( int  length)

Returns with the maximum bytes needed to store a base64 result.

Parameters
lengthInput length in bytes.
Returns
The maximum bytes needed to store a base64 result.

◆ Bit24ToFloat()

Superpowered::Bit24ToFloat ( void *  input,
float *  output,
unsigned int  numberOfFrames,
unsigned int  numChannels = 2 
)

Converts 24-bit audio to 32-bit floating point.

Parameters
inputInput buffer pointer.
outputPointer to floating point numbers. 32-bit output.
numberOfFramesThe number of frames to process.
numChannelsThe number of channels.

◆ ChangeVolume()

Superpowered::ChangeVolume ( float *  input,
float *  output,
float  volumeStart,
float  volumeChange,
unsigned int  numberOfFrames 
)

Applies volume on a single stereo interleaved buffer: output = input * gain.

Parameters
inputPointer to floating point numbers. 32-bit interleaved stereo input.
outputPointer to floating point numbers. 32-bit interleaved stereo output. Can be equal to input (in-place processing).
volumeStartVoume for the first frame.
volumeChangeChange volume by this amount for every frame.
numberOfFramesThe number of frames to process.

◆ ChangeVolumeAdd()

Superpowered::ChangeVolumeAdd ( float *  input,
float *  output,
float  volumeStart,
float  volumeChange,
unsigned int  numberOfFrames 
)

Applies volume on a single stereo interleaved buffer and adds it to the audio in the output buffer: output = output + input * gain.

Parameters
inputPointer to floating point numbers. 32-bit interleaved stereo input.
outputPointer to floating point numbers. 32-bit interleaved stereo output.
volumeStartVolume for the first frame.
volumeChangeChange volume by this amount for every frame.
numberOfFramesThe number of frames to process.

◆ CharToFloat()

Superpowered::CharToFloat ( signed char *  input,
float *  output,
unsigned int  numberOfFrames,
unsigned int  numChannels = 2 
)

Converts 8-bit audio to 32-bit floating point.

Parameters
inputPointer to signed bytes. 8-bit input.
outputPointer to floating point numbers. 32-bit output.
numberOfFramesThe number of frames to process.
numChannelsThe number of channels.

◆ closeWAV()

void Superpowered::closeWAV ( FILE *  fd)

Closes a 16-bit stereo WAV file.

fclose() is not enough to create a valid a WAV file, use this function to close it.

Parameters
fdThe file handle to close.

◆ createWAV()

FILE * Superpowered::createWAV ( const char *  path,
unsigned int  samplerate,
unsigned char  numChannels 
)

Creates a 16-bit WAV file.

After createWAV, write audio data using the writeWAV() function or fwrite(). Close the file with the closeWAV() function. Never use direct disk writing in a real-time audio processing thread, use the Superpowered Recorder class in that case.

Returns
A file handle (success) or NULL (error).
Parameters
pathThe full filesystem path of the file.
samplerateSample rate of the file in Hz.
numChannelsThe number of channels.

◆ CrossMono()

Superpowered::CrossMono ( float *  inputA,
float *  inputB,
float *  output,
float  inputAGainStart,
float  inputAGainEnd,
float  inputBGainStart,
float  inputBGainEnd,
unsigned int  numberOfFrames 
)

Crossfades two mono input channels into a mono output: output = inputA * gain + inputB + gain.

Parameters
inputAPointer to floating point numbers. First mono input.
inputBPointer to floating point numbers. Second mono input.
outputPointer to floating point numbers. Mono output. Can be equal with one of the inputs (in-place processing).
inputAGainStartGain of the first sample on the first input.
inputAGainEndGain for the last sample on the first input. Gain will be smoothly calculated between start end end.
inputBGainStartGain of the first sample on the second input.
inputBGainEndGain for the last sample on the second input. Gain will be smoothly calculated between start end end.
numberOfFramesThe number of frames to process.

◆ CrossStereo()

Superpowered::CrossStereo ( float *  inputA,
float *  inputB,
float *  output,
float  inputAGainStart,
float  inputAGainEnd,
float  inputBGainStart,
float  inputBGainEnd,
unsigned int  numberOfFrames 
)

Crossfades two stereo inputs into a stereo output: output = inputA * gain + inputB + gain.

Parameters
inputAPointer to floating point numbers. Interleaved stereo input (first).
inputBPointer to floating point numbers. Interleaved stereo input (second).
outputPointer to floating point numbers. Interleaved stereo output. Can be equal with one of the inputs (in-place processing).
inputAGainStartGain of the first sample on the first input.
inputAGainEndGain for the last sample on the first input. Gain will be smoothly calculated between start end end.
inputBGainStartGain of the first sample on the second input.
inputBGainEndGain for the last sample on the second input. Gain will be smoothly calculated between start end end.
numberOfFramesThe number of frames to process.

◆ DeInterleave()

Superpowered::DeInterleave ( float *  input,
float *  left,
float *  right,
unsigned int  numberOfFrames 
)

Deinterleaves an interleaved stereo input to two mono output channels: left = [L, L, L, L, ...], right = [R, R, R, R, ...].

Parameters
inputPointer to floating point numbers. Stereo interleaved input.
leftPointer to floating point numbers. Mono output for left channel.
rightPointer to floating point numbers. Mono output for right channel.
numberOfFramesThe number of frames to process.

◆ DeInterleaveAdd()

Superpowered::DeInterleaveAdd ( float *  input,
float *  left,
float *  right,
unsigned int  numberOfFrames 
)

Deinterleaves an interleaved stereo input and adds the results to the two mono output channels: left = left + [L, L, L, L, ...], right = right + [R, R, R, R, ...].

Parameters
inputPointer to floating point numbers. Stereo interleaved input.
leftPointer to floating point numbers. Mono output for left channel.
rightPointer to floating point numbers. Mono output for right channel.
numberOfFramesThe number of frames to process.

◆ DeInterleaveMultiply()

Superpowered::DeInterleaveMultiply ( float *  input,
float *  left,
float *  right,
unsigned int  numberOfFrames,
float  multiplier 
)

Deinterleaves an interleaved stereo input to two mono output channels and multiplies the output (gain): left = [L, L, L, L, ...] * gain, right = [R, R, R, R, ...] * gain.

Parameters
inputPointer to floating point numbers. Stereo interleaved input.
leftPointer to floating point numbers. Mono output for left channel.
rightPointer to floating point numbers. Mono output for right channel.
numberOfFramesThe number of frames to process.
multiplierMultiply each output sample with this value.

◆ DeInterleaveMultiplyAdd()

Superpowered::DeInterleaveMultiplyAdd ( float *  input,
float *  left,
float *  right,
unsigned int  numberOfFrames,
float  multiplier 
)

Deinterleaves an interleaved stereo input to two mono output channels, multiplies the result (gain) and and adds the results to the two mono output channels: left = left + [L, L, L, L, ...] * gain, right = right + [R, R, R, R, ...] * gain.

Parameters
inputPointer to floating point numbers. Stereo interleaved input.
leftPointer to floating point numbers. Mono output for left channel.
rightPointer to floating point numbers. Mono output for right channel.
numberOfFramesThe number of frames to process.
multiplierMultiply each output sample with this value.

◆ DERtoPEM()

char* Superpowered::DERtoPEM ( const char *  der,
int  inputLengthBytes,
bool  privateKey 
)

Creates a new string in PEM format from DER data.

Parameters
derInput data in DER format.
inputLengthBytesDER length bytes.
privateKeyTrue for private key, false for public key.
Returns
A new string in PEM format or NULL on memory allocation error. Don't forget to free() this at a later point to prevent memory leaks!

◆ DotProduct()

Superpowered::DotProduct ( float *  inputA,
float *  inputB,
unsigned int  numValues 
)

Calculates the dot product of two vectors.

Parameters
inputAPointer to floating point numbers. First input vector.
inputBPointer to floating point numbers. Second input vector.
numValuesNumber of value pairs to process.
Returns
The dot product.

◆ FFTComplex()

Superpowered::FFTComplex ( float *  real,
float *  imag,
int  logSize,
bool  forward 
)

Complex in-place FFT.

Data packing is same as Apple's vDSP. Check the "Using Fourier Transforms" page of Apple's vDSP documentation ("Data Packing for Real FFTs").

Parameters
realPointer to floating point numbers. Real part.
imagPointer to floating point numbers. Imaginary part.
logSizeShould be between 4 and 12 (FFT sizes 16 - 4096).
forwardForward or inverse.

◆ FFTReal()

Superpowered::FFTReal ( float *  real,
float *  imag,
int  logSize,
bool  forward 
)

Real in-place FFT.

Data packing is same as Apple's vDSP. Check the "Using Fourier Transforms" page of Apple's vDSP documentation ("Data Packing for Real FFTs").

Parameters
realPointer to floating point numbers. Real part.
imagPointer to floating point numbers. Imaginary part.
logSizeShould be 5 - 13 (FFT sizes 32 - 8192).
forwardForward or inverse.

◆ FloatTo24bit()

Superpowered::FloatTo24bit ( float *  input,
void *  output,
unsigned int  numberOfFrames,
unsigned int  numChannels = 2 
)

Converts 32-bit floating point audio to 24-bit.

Parameters
inputPointer to floating point numbers. 32-bit input.
outputOutput buffer pointer.
numberOfFramesThe number of frames to process.
numChannelsThe number of channels.

◆ FloatToChar()

Superpowered::FloatToChar ( float *  input,
signed char *  output,
unsigned int  numberOfFrames,
unsigned int  numChannels = 2 
)

Converts 32-bit floating point audio 8-bit audio.

Parameters
inputPointer to floating point numbers. 32-bit input.
outputPointer to signed bytes. 8-bit output.
numberOfFramesThe number of frames to process.
numChannelsThe number of channels.

◆ FloatToInt()

Superpowered::FloatToInt ( float *  input,
int *  output,
unsigned int  numberOfFrames,
unsigned int  numChannels = 2 
)

Converts 32-bit floating point audio to 32-bit integer.

Parameters
inputPointer to floating point numbers. 32-bit input.
outputPointer to integer numbers. 32-bit output.
numberOfFramesThe number of frames to process.
numChannelsThe number of channels.

◆ FloatToShortInt()

Superpowered::FloatToShortInt ( float *  input,
short int *  output,
unsigned int  numberOfFrames,
unsigned int  numChannels = 2 
)

Converts 32-bit float input to 16-bit signed integer output.

Parameters
inputPointer to floating point numbers. 32-bit input.
outputPointer to short integer numbers. 16-bit output.
numberOfFramesThe number of frames to process.
numChannelsThe number of channels.

◆ FloatToShortIntInterleave()

Superpowered::FloatToShortIntInterleave ( float *  inputLeft,
float *  inputRight,
short int *  output,
unsigned int  numberOfFrames 
)

Converts two 32-bit mono float input channels to stereo interleaved 16-bit signed integer output.

Parameters
inputLeftPointer to floating point numbers. 32-bit input for the left side. Should be numberOfFrames + 8 big minimum.
inputRightPointer to floating point numbers. 32-bit input for the right side. Should be numberOfFrames + 8 big minimum.
outputPointer to short integer numbers. Stereo interleaved 16-bit output. Should be numberOfFrames * 2 + 16 big minimum.
numberOfFramesThe number of frames to process.

◆ frequencyOfNote()

float Superpowered::frequencyOfNote ( int  note)
Returns
Returns the frequency of a specific note.
Parameters
noteThe number of the note. Note 0 is the standard A note at 440 Hz.

◆ hashGetSizeBytes()

unsigned char Superpowered::hashGetSizeBytes ( hashType  type)

The hash size in bytes based on the hash type.

It doesn't require any hasher structure to be initialized.

Parameters
typeThe hash type.
Returns
The hash size in bytes. Will be 0 for NOHASH.

◆ HasNonFinite()

Superpowered::HasNonFinite ( float *  buffer,
unsigned int  numberOfValues 
)

Checks if the audio samples has non-valid values, such as infinity or NaN (not a number).

Parameters
bufferPointer to floating point numbers to check.
numberOfValuesNumber of values in the buffer. Please note, this is NOT numberOfFrames. You need to provide the number of numbers in the buffer.

◆ Initialize()

Superpowered::Initialize ( const char *  licenseKey,
bool  enableAudioAnalysis,
bool  enableFFTAndFrequencyDomain,
bool  enableAudioTimeStretching,
bool  enableAudioEffects,
bool  enableAudioPlayerAndDecoder,
bool  enableCryptographics,
bool  enableNetworking 
)

Initializes the Superpowered SDKs.

Parameters
licenseKeyVisit https://superpowered.com/dev to register license keys.
enableAudioAnalysisEnables Analyzer, LiveAnalyzer, Waveform and BandpassFilterbank.
enableFFTAndFrequencyDomainEnables FrequencyDomain, FFTComplex, FFTReal and PolarFFT.
enableAudioTimeStretchingEnables TimeStretching.
enableAudioEffectsEnables all effects and every class based on the FX class.
enableAudioPlayerAndDecoderEnables AdvancedAudioPlayer and Decoder.
enableCryptographicsEnables RSAPublicKey,RSAPrivateKey, hasher and AES.
enableNetworkingEnables httpRequest.

◆ Interleave()

Superpowered::Interleave ( float *  left,
float *  right,
float *  output,
unsigned int  numberOfFrames 
)

Makes an interleaved stereo output from two mono input channels: output = [L, R, L, R, ...].

Makes an interleaved stereo output from two mono input channels and adds the result to the audio in the output buffer: output = output + [L, R, L, R, ...].

Parameters
leftPointer to floating point numbers. Mono input for left channel.
rightPointer to floating point numbers. Mono input for right channel.
outputPointer to floating point numbers. Stereo interleaved output.
numberOfFramesThe number of frames to process.

◆ InterleaveAdd()

void Superpowered::InterleaveAdd ( float *  left,
float *  right,
float *  output,
unsigned int  numberOfFrames 
)

◆ InterleaveAndGetPeaks()

Superpowered::InterleaveAndGetPeaks ( float *  left,
float *  right,
float *  output,
unsigned int  numberOfFrames,
float *  peaks 
)

Makes an interleaved output from two input channels and measures the volume: output = [L, R, L, R, ...].

Parameters
leftPointer to floating point numbers. Mono input for left channel.
rightPointer to floating point numbers. Mono input for right channel.
outputPointer to floating point numbers. Stereo interleaved output.
numberOfFramesThe number of frames to process.
peaksPointer to two floating point numbers. Peak value result (left, right).

◆ IntToFloat()

Superpowered::IntToFloat ( int *  input,
float *  output,
unsigned int  numberOfFrames,
unsigned int  numChannels = 2 
)

Converts 32-bit integer audio to 32-bit floating point.

Parameters
inputPointer to integer numbers. 32-bit input.
outputPointer to floating point numbers. 32-bit output.
numberOfFramesThe number of frames to process.
numChannelsThe number of channels.

◆ MidSideToStereo()

Superpowered::MidSideToStereo ( float *  input,
float *  output,
unsigned int  numberOfFrames 
)

Converts a mid-side signal to stereo.

Parameters
inputPointer to floating point numbers. Mid-side interleaved input.
outputPointer to floating point numbers. Interleaved stereo output. Can be equal to input (in-place processing).
numberOfFramesThe number of frames to process.

◆ Peak()

Superpowered::Peak ( float *  input,
unsigned int  numberOfValues 
)
Returns
Returns the peak absolute value. Useful for metering.
Parameters
inputPointer to floating point numbers.
numberOfValuesThe number of values to process. For a stereo input this value should be 2 * numberOfFrames. Must be a multiply of 8.

◆ PEMtoDER()

int Superpowered::PEMtoDER ( char *  inputOutput)

Converts a memory buffer with PEM format string to DER format.

Parameters
inputOutputInput/output data.
Returns
DER length bytes.

◆ PolarFFT()

Superpowered::PolarFFT ( float *  mag,
float *  phase,
int  logSize,
bool  forward,
float  valueOfPi = 0 
)

Polar FFT.

Data packing is same as Apple's vDSP. Check the "Using Fourier Transforms" page of Apple's vDSP documentation ("Data Packing for Real FFTs").

Parameters
magPointer to floating point numbers. Input: split real part. Output: magnitudes.
phasePointer to floating point numbers. Input: split real part. Output: phases.
logSizeShould be 5 - 13 (FFT sizes 32 - 8192).
forwardForward or inverse. Inverse PolarFFT will clear (zero) the DC offset.
valueOfPiThe function can translate pi to any value (Google: the tau manifesto). Use 0 for M_PI.

◆ printToString()

bool Superpowered::printToString ( char **  str,
int  maxBytesNeeded,
const char *  format,
  ... 
)

Helper function to create a string with the same text that would be printed if format was used on printf, but instead of being printed, the content is stored as a C string.

Parameters
strInput/output. If str is not NULL and the function returns with true, str will be deallocated with free() and replaced with the new string.
maxBytesNeededThe size of the str in bytes that will be allocated (including trailing zero).
formatC string that contains a format string that follows the same specifications as format in printf.
...Additional arguments. return True on success, false on memory allocation error.

◆ ShortIntToFloat() [1/2]

Superpowered::ShortIntToFloat ( short int *  input,
float *  output,
unsigned int  numberOfFrames,
float *  peaks 
)

Converts stereo interleaved 16-bit signed integer input to stereo interleaved 32-bit float output, and provides peak measurement.

Parameters
inputPointer to short integer numbers. Stereo interleaved 16-bit input. Should be numberOfFrames + 8 big minimum.
outputPointer to floating point numbers. Stereo interleaved 32-bit output. Should be numberOfFrames + 8 big minimum.
numberOfFramesThe number of frames to process.
peaksPointer to two floating point numbers. Peak value result (left, right).

◆ ShortIntToFloat() [2/2]

Superpowered::ShortIntToFloat ( short int *  input,
float *  output,
unsigned int  numberOfFrames,
unsigned int  numChannels = 2 
)

Converts 16-bit signed integer input to 32-bit float output.

Parameters
inputPointer to short integer numbers. Stereo interleaved 16-bit input.
outputPointer to floating point numbers. Stereo interleaved 32-bit output.
numberOfFramesThe number of frames to process.
numChannelsThe number of channels.

◆ simpleHash()

unsigned char Superpowered::simpleHash ( hashType  type,
unsigned int  inputLengthBytes,
const unsigned char *  input,
unsigned char *  hash 
)

Performs a simple hashing operation in one convenient line.

It doesn't require any hasher structure to be initialized.

Parameters
typeThe hash type.
inputLengthBytesSize of the input data in bytes.
inputPointer to the input data.
hashThe output. Must be big enough to store the hash (SHA512 has the maximum with 64 bytes).
Returns
The hash size in bytes.

◆ simpleHMAC()

void Superpowered::simpleHMAC ( hashType  type,
const unsigned char *  key,
int  keyLengthBytes,
const unsigned char *  input,
int  inputLengthBytes,
unsigned char *  output 
)

Performs a simple hash-based message authentication code operation in one convenient line.

It doesn't require any hasher structure to be initialized.

Parameters
typeThe hash type.
keyThe key.
keyLengthBytesThe size of the key in bytes.
inputPointer to the input data.
inputLengthBytesSize of the input data in bytes.
outputThe output. Must be big enough to store the result (SHA512 has the maximum with 64 bytes).

◆ statusCodeToString()

const char* Superpowered::statusCodeToString ( int  code,
const char *  defaultString 
)

User readable error string from a status code (including HTTP status codes).

Parameters
codeThe status code.
defaultStringGeneric error message if the status code has a value not covered.
Returns
String pointer to the error message. It's wired in the code, will be always valid, no memory management is required.

◆ StereoToMidSide()

Superpowered::StereoToMidSide ( float *  input,
float *  output,
unsigned int  numberOfFrames 
)

Converts a stereo signal to mid-side.

Parameters
inputPointer to floating point numbers. Interleaved stereo input.
outputPointer to floating point numbers. Mid-side interleaved output. Can be equal to input (in-place processing).
numberOfFramesThe number of frames to process.

◆ StereoToMono()

Superpowered::StereoToMono ( float *  input,
float *  output,
float  leftGainStart,
float  leftGainEnd,
float  rightGainStart,
float  rightGainEnd,
unsigned int  numberOfFrames 
)

Makes mono output from stereo interleaved input: output = [L + R], [L + R], [L + R], ...

Parameters
inputPointer to floating point numbers. Stereo interleaved input.
outputPointer to floating point numbers. Mono output.
leftGainStartGain of the first sample on the left channel.
leftGainEndGain for the last sample on the left channel. Gain will be smoothly calculated between start end end.
rightGainStartGain of the first sample on the right channel.
rightGainEndGain for the last sample on the right channel. Gain will be smoothly calculated between start end end.
numberOfFramesThe number of frames to process.

◆ urlDecode()

char* Superpowered::urlDecode ( char *  input,
char *  output 
)

URL decode.

Parameters
inputInput string.
outputOutput string. Must be big enough to store the output (an output will have equal or less length than input).
Returns
A pointer to the trailing zero in output.

◆ urlEncode()

char* Superpowered::urlEncode ( char *  input,
char *  output,
bool  spaceIsPlus = false 
)

URL encode.

Parameters
inputInput string.
outputOutput string. Must be big enough to store the output (urlEncodeGetMaxOutputBytes can help).
spaceIsPlusTrue to use a "+" character for space.
Returns
A pointer to the trailing zero in output.

◆ urlEncodeGetMaxOutputBytes()

int Superpowered::urlEncodeGetMaxOutputBytes ( int  length)

Returns with the maximum bytes needed to store a URL encoded result.

Parameters
lengthInput length in bytes.
Returns
The maximum bytes needed to store a URL encoded result.

◆ Version()

Superpowered::Version ( )
Returns
Returns the current version of the Superpowered SDK. The returned value is: major version * 10000 + minor version * 100 + revision Example: 10402 means 1.4.2

◆ Volume()

Superpowered::Volume ( float *  input,
float *  output,
float  volumeStart,
float  volumeEnd,
unsigned int  numberOfFrames 
)

Applies volume on a single stereo interleaved buffer: output = input * gain.

Parameters
inputPointer to floating point numbers. 32-bit interleaved stereo input.
outputPointer to floating point numbers. 32-bit interleaved stereo output. Can be equal to input (in-place processing).
volumeStartVolume for the first frame.
volumeEndVolume for the last frame. Volume will be smoothly calculated between the first and last frames.
numberOfFramesThe number of frames to process.

◆ VolumeAdd()

Superpowered::VolumeAdd ( float *  input,
float *  output,
float  volumeStart,
float  volumeEnd,
unsigned int  numberOfFrames 
)

Applies volume on a single stereo interleaved buffer and adds it to the audio in the output buffer: output = output + input * gain.

Parameters
inputPointer to floating point numbers. 32-bit interleaved stereo input.
outputPointer to floating point numbers. 32-bit interleaved stereo output.
volumeStartVolume for the first frame.
volumeEndVolume for the last frame. Volume will be smoothly calculated between the first and last frames.
numberOfFramesThe number of frames to process.

◆ writeWAV()

bool Superpowered::writeWAV ( FILE *  fd,
short int *  audio,
unsigned int  numberOfBytes 
)

Writes audio into a WAV file.

Returns
Returns true for success and false for error.
Parameters
fdThe file handle to write into.
audioPointer to signed short integer numbers. Audio to write.
numberOfBytesThe number of bytes to write.