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) |
Type | 0 : capturer, 1 : player, 2 : capturer+player |
Return | 0:Success, 0<ErrorCode |
Description | Initialize audio manager.
Deprecated at 1.3.0. SDK don't use this internally. |
SDK version | 1.3.0 |
IsInitialized
int IsInitialized() |
Return | 1: initialized, 0< uninitialized |
Description | Check initialization |
SDK version | 1.3.0 |
SetEventHandler
int SetEventHandler(IAudioManagerEvent event) |
event | IAudioManagerEvent callback |
Return | 0:Success, 0<ErrorCode |
Description | Set IAudioManager event callback |
SDK version | 1.3.0 |
GetType
int getType() |
Return | 0 : capturer, 1 : player, 2 : capturer+player |
Expected Events | |
Description | Get audio manager's type |
SDK version | 1.3.0 |
Configure
int Configure(int Samplerate, int ChannelCount, int BitPerSample) |
Samplerate | Samplerate, 8000/16000 |
ChannelCount | ChannelCount, 1 |
BitPerSample | BitPerSample, 16 |
Return | 0:Success, 0<ErrorCode |
Expected Events | |
Description | Configure device |
SDK version | 1.3.0 |
Start
int Start() |
Return | 0:Success, 0<ErrorCode |
Expected Events | |
Description | Start stream |
SDK version | 1.3.0 |
Write
int Write(byte[] DataBuffer, int DataLength, unsigned int TimeStamp) |
DataBuffer | Received data |
DataLength | Received data length |
TimeStamp | Stream time |
Return | 0:Success, 0 |
Expected Events | |
Description | Write audio to device. |
SDK version | 1.3.0 |
Stop
int Stop() |
Return | 0:Success, 0<ErrorCode |
Expected Events | |
Description | Stop stream |
SDK version | 1.3.0 |
Events
OnError
OnError(int ErrorCode) |
ErrorCode | Error code |
Description | Errer event |
SDK version | 1.3.0 |
onRead
onRead(byte[] DataBuffer, int DataLength, unsigned int TimeStamp) |
DataBuffer | Received data |
DataLength | Received data length |
TimeStamp | Stream time |
Description | Data received |
SDK version | 1.3.0 |