Audio API. More...
#include <mo_audio.h>
Static Public Member Functions | |
static bool | init (Float64 srate, UInt32 frameSize, UInt32 numChannels) |
static bool | start (MoCallback callback, void *bindle) |
static void | stop () |
static void | shutdown () |
static Float64 | getSampleRate () |
static void | vibrate () |
static void | checkInput () |
Static Public Attributes | |
static MoAudioUnitInfo * | m_info = NULL |
static MoCallback | m_callback = NULL |
static AudioUnit | m_au |
static bool | m_isMute = false |
static bool | m_handleInput = false |
static Float64 | m_hwSampleRate = 44100.0 |
static Float64 | m_srate = 44100.0 |
static UInt32 | m_frameSize = 0 |
static UInt32 | m_numChannels = 2 |
static void * | m_bindle = NULL |
static AURenderCallbackStruct | m_renderProc |
Static Protected Member Functions | |
static bool | initOut () |
static bool | initIn () |
Static Protected Attributes | |
static bool | m_hasInit = false |
static bool | m_isRunning = false |
Audio API.
To implement full-duplex audio, create a callback function with the MoCallback type definition, initialize the audio, and register the callback using start. Originally SMALL (SMule Audio Layer & Library).
Sample Code:
MoAudio::init( 44100, 512, 2 );
MoAudio::start( audioCallback, NULL );
void MoAudio::checkInput | ( | ) | [static] |
static Float64 MoAudio::getSampleRate | ( | ) | [inline, static] |
bool MoAudio::init | ( | Float64 | srate, | |
UInt32 | frameSize, | |||
UInt32 | numChannels | |||
) | [static] |
static bool MoAudio::initIn | ( | ) | [static, protected] |
static bool MoAudio::initOut | ( | ) | [static, protected] |
void MoAudio::shutdown | ( | ) | [static] |
bool MoAudio::start | ( | MoCallback | callback, | |
void * | bindle | |||
) | [static] |
void MoAudio::stop | ( | ) | [static] |
void MoAudio::vibrate | ( | ) | [static] |
AudioUnit MoAudio::m_au [static] |
void * MoAudio::m_bindle = NULL [static] |
MoCallback MoAudio::m_callback = NULL [static] |
UInt32 MoAudio::m_frameSize = 0 [static] |
bool MoAudio::m_handleInput = false [static] |
bool MoAudio::m_hasInit = false [static, protected] |
Float64 MoAudio::m_hwSampleRate = 44100.0 [static] |
MoAudioUnitInfo * MoAudio::m_info = NULL [static] |
bool MoAudio::m_isMute = false [static] |
bool MoAudio::m_isRunning = false [static, protected] |
UInt32 MoAudio::m_numChannels = 2 [static] |
AURenderCallbackStruct MoAudio::m_renderProc [static] |
Float64 MoAudio::m_srate = 44100.0 [static] |