Cricket Audio
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Groups
CkConfig Struct Reference

Configuration options. More...

#include <config.h>

Public Attributes

JNIEnv * jni
 The JNIEnv pointer.
 
jobject activity
 A Java reference to your app's Activity.
 
bool useJavaAudio
 If true, always use Java AudioTrack for output of final mix, instead of OpenSL ES.
 
int audioSessionCategory
 Audio session category; this determines how audio from your app interacts with audio from other apps.
 
int enableOggVorbis
 If true, software support for Ogg Vorbis stream sounds is enabled.
 
CkAllocFunc allocFunc
 Memory allocation function.
 
CkFreeFunc freeFunc
 Memory deallocation function.
 
unsigned int logMask
 Bitmask for which types of messages are logged.
 
CkLogFunc logFunc
 Function to handle log messages.
 
const char * logFile
 Log file in which messages are saved.
 
float audioUpdateMs
 Audio processing frame duration, in ms.
 
float streamBufferMs
 Size of buffer for stream sounds, in ms.
 
float streamFileUpdateMs
 Interval between file reads for stream sounds, in ms.
 

Detailed Description

Configuration options.

Member Data Documentation

jobject CkConfig::activity

A Java reference to your app's Activity.

Only available on Android.
CkAllocFunc CkConfig::allocFunc

Memory allocation function.

Default is NULL (system new will be used). All calls to this function will be made from the same thread on which you call all Cricket Audio functions, unless you have enabled Ogg Vorbis stream support, in which case the allocator must be thread-safe.

int CkConfig::audioSessionCategory

Audio session category; this determines how audio from your app interacts with audio from other apps.

See Apple's "Audio Session Programming Guide" for more information on audio session categories. Default is kAudioSessionCategory_MediaPlayback.

Only available on iOS.
float CkConfig::audioUpdateMs

Audio processing frame duration, in ms.

Shorter times result in lower latency, but require more CPU. Default is 5 ms.

int CkConfig::enableOggVorbis

If true, software support for Ogg Vorbis stream sounds is enabled.

Default is false (no additional Ogg Vorbis support in software).

CkFreeFunc CkConfig::freeFunc

Memory deallocation function.

Default is NULL (system delete will be used). All calls to this function will be made from the same thread on which you call all Cricket Audio functions, unless you have enabled Ogg Vorbis stream support, in which case the allocator must be thread-safe.

JNIEnv* CkConfig::jni

The JNIEnv pointer.

Only available on Android.
const char* CkConfig::logFile

Log file in which messages are saved.

Default is NULL (log messages not saved to a file).

CkLogFunc CkConfig::logFunc

Function to handle log messages.

Default is NULL (printf or equivalent will be used).

unsigned int CkConfig::logMask

Bitmask for which types of messages are logged.

Default is kCkLog_All (all messages logged).

float CkConfig::streamBufferMs

Size of buffer for stream sounds, in ms.

Larger buffers require more memory, but are less likely to skip due to slow file reads. Default is 500 ms.

float CkConfig::streamFileUpdateMs

Interval between file reads for stream sounds, in ms.

Shorter times will allow for smaller stream buffer sizes, but require more CPU. This value should be set to significantly less than streamBufferMs, or your buffers will always underrun! Default is 100 ms.

bool CkConfig::useJavaAudio

If true, always use Java AudioTrack for output of final mix, instead of OpenSL ES.

Default is false (use Java AudioTrack only when OpenSL ES is not available, i.e. Android versions prior to 2.3).

Only available on Android.

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