Reference of IAudioManager

Description of IAudioManager. It is to support an external audio device. One of examples is Watch.

Methods
Events

Methods

isInitialized

int isInitialized()
Return1: initialized, 0< uninitialized
DescriptionCheck initialization
Android SDK2.1.1
iOS SDK2.1.1
Windows SDK2.1.1
Linux SDK3.0.1

setEventHandler

int setEventHandler(IAudioManagerEvent event)
eventIAudioManagerEvent callback
Return0:Success, 0<ErrorCode
Descriptionset IAudioManager event callback
Android SDK2.1.1
iOS SDK2.1.1
Windows SDK2.1.1
Linux SDK3.0.1

getType

int getType()
Return0 : capturer, 1 : player, 2 : capturer+player
iOS and Android can support only capturer.
Windows don't support all
Expected Events
Descriptionget audio manager's type
Android SDK2.1.1
iOS SDK2.1.1
Windows SDK2.1.1
Linux SDK3.0.1

configure

int configure(int Samplerate, int ChannelCount, int BitPerSample)
SamplerateSamplerate, 8000/16000
ChannelCountChannelCount, 1
BitPerSampleBitPerSample, 16
Return0:Success, 0<ErrorCode
Expected Events
DescriptionConfigure device
Android SDK2.1.1
iOS SDK2.1.1
Windows SDK2.1.1
Linux SDK3.0.1

start

int start()
Return0:Success, 0<ErrorCode
Expected Events
DescriptionStart stream
Android SDK2.1.1
iOS SDK2.1.1
Windows SDK2.1.1
Linux SDK3.0.1

write

int write(byte[] DataBuffer, int DataLength, unsigned int TimeStamp)
DataBufferReceived data
DataLengthReceived data length
TimeStampStream time
Return0:Success, 0<ErrorCode
Expected Events
DescriptionWrite audio to device.
Android SDK2.1.1
iOS SDK2.1.1
Windows SDK2.1.1
Linux SDK3.0.1

stop

int stop()
Return0:Success, 0<ErrorCode
Expected Events
DescriptionStop stream
Android SDK2.1.1
iOS SDK2.1.1
Windows SDK2.1.1
Linux SDK3.0.1

Events

onError

void onError(IAudioManager manager, int ErrorCode)
managerAudioManager instance
ErrorCodeError code
DescriptionErrer event
Android SDK2.1.1
iOS SDK2.1.1
Windows SDK2.1.1
Linux SDK3.0.1

onRead

void onRead(IAudioManager manager, byte[] DataBuffer, int DataLength, unsigned int TimeStamp)
managerAudioManager instance
DataBufferReceived data
DataLengthReceived data length
TimeStampStream time
DescriptionData received
Android SDK2.1.1
iOS SDK2.1.1
Windows SDK2.1.1
Linux SDK3.0.1