Reference of IAudioManager

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

Methods

Initialize

int Initialize(int Type)
Type0 : capturer, 1 : player, 2 : capturer+player
Return0:Success, 0<ErrorCode
DescriptionInitialize audio manager.

Deprecated at 1.3.0. SDK don't use this internally.

SDK version1.3.0

IsInitialized

int IsInitialized()
Return1: initialized, 0< uninitialized
DescriptionCheck initialization
SDK version1.3.0

SetEventHandler

int SetEventHandler(IAudioManagerEvent event)
eventIAudioManagerEvent callback
Return0:Success, 0<ErrorCode
DescriptionSet IAudioManager event callback
SDK version1.3.0

GetType

int getType()
Return0 : capturer, 1 : player, 2 : capturer+player
Expected Events
DescriptionGet audio manager's type
SDK version1.3.0

Configure

int Configure(int Samplerate, int ChannelCount, int BitPerSample)
SamplerateSamplerate, 8000/16000
ChannelCountChannelCount, 1
BitPerSampleBitPerSample, 16
Return0:Success, 0<ErrorCode
Expected Events
DescriptionConfigure device
SDK version1.3.0

Start

int Start()
Return0:Success, 0<ErrorCode
Expected Events
DescriptionStart stream
SDK version1.3.0

Write

int Write(byte[] DataBuffer, int DataLength, unsigned int TimeStamp)
DataBufferReceived data
DataLengthReceived data length
TimeStampStream time
Return0:Success, 0
Expected Events
DescriptionWrite audio to device.
SDK version1.3.0

Stop

int Stop()
Return0:Success, 0<ErrorCode
Expected Events
DescriptionStop stream
SDK version1.3.0

Events

OnError

OnError(int ErrorCode)
ErrorCodeError code
DescriptionErrer event
SDK version1.3.0

onRead

onRead(byte[] DataBuffer, int DataLength, unsigned int TimeStamp)
DataBufferReceived data
DataLengthReceived data length
TimeStampStream time
DescriptionData received
SDK version1.3.0