Superpowered  1.0.1
Pain-free Audio Development for iOS and Android.
Public Member Functions | List of all members
SuperpoweredAndroidAudioIO Class Reference

Easy handling of OpenSL ES audio input and/or output.

Public Member Functions

 SuperpoweredAndroidAudioIO (int samplerate, int buffersize, bool enableInput, bool enableOutput, audioProcessingCallback callback, void *clientdata, int inputStreamType=-1, int outputStreamType=-1, int latencySamples=0)
 Creates an audio I/O instance. Audio input and/or output immediately starts after calling this. More...
void onForeground ()
void onBackground ()
void start ()
void stop ()

Constructor & Destructor Documentation

SuperpoweredAndroidAudioIO::SuperpoweredAndroidAudioIO ( int  samplerate,
int  buffersize,
bool  enableInput,
bool  enableOutput,
audioProcessingCallback  callback,
void *  clientdata,
int  inputStreamType = -1,
int  outputStreamType = -1,
int  latencySamples = 0 
samplerateThe requested sample rate in Hz.
buffersizeThe requested buffer size (number of samples).
enableInputEnable audio input.
enableOutputEnable audio output.
callbackThe audio processing callback function to call periodically.
clientdataA custom pointer the callback receives.
inputStreamTypeOpenSL ES stream type, such as SL_ANDROID_RECORDING_PRESET_GENERIC. -1 means default. SLES/OpenSLES_AndroidConfiguration.h has them.
outputStreamTypeOpenSL ES stream type, such as SL_ANDROID_STREAM_MEDIA or SL_ANDROID_STREAM_VOICE. -1 means default. SLES/OpenSLES_AndroidConfiguration.h has them.
latencySamplesHow many samples to have in the internal fifo buffer minimum. Works only when both input and output are enabled. Might help if you have many dropouts.