Superpowered  1.0.4
Pain-free Audio Infrastructure for iOS, Android, Mac OSX and Linux
Public Member Functions | List of all members
SuperpoweredAndroidAudioIO Class Reference

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

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...
 
 ~SuperpoweredAndroidAudioIO ()
 
void onForeground ()
 
void onBackground ()
 
void start ()
 
void stop ()
 

Detailed Description

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

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 
)

Creates an audio I/O instance. Audio input and/or output immediately starts after calling this.

Parameters
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.
SuperpoweredAndroidAudioIO::~SuperpoweredAndroidAudioIO ( )

Member Function Documentation

void SuperpoweredAndroidAudioIO::onBackground ( )
void SuperpoweredAndroidAudioIO::onForeground ( )
void SuperpoweredAndroidAudioIO::start ( )
void SuperpoweredAndroidAudioIO::stop ( )

The documentation for this class was generated from the following file: