Reference of IAudioManager
Description of IAudioManager. It is to support an external audio device. One of examples is Watch.
Methods
isInitialized
int isInitialized() |
Return | 1: initialized, 0< uninitialized |
Description | Check initialization |
Android SDK | 2.1.1 |
iOS SDK | 2.1.1 |
Windows SDK | 2.1.1 |
Linux SDK | Not supported yet |
setEventHandler
int setEventHandler(IAudioManagerEvent event) |
event | IAudioManagerEvent callback |
Return | 0:Success, 0<ErrorCode |
Description | set IAudioManager event callback |
Android SDK | 2.1.1 |
iOS SDK | 2.1.1 |
Windows SDK | 2.1.1 |
Linux SDK | Not supported yet |
getType
int getType() |
Return | 0 : capturer, 1 : player, 2 : capturer+player iOS and Android can support only capturer. Windows don't support all |
Expected Events | |
Description | get audio manager's type |
Android SDK | 2.1.1 |
iOS SDK | 2.1.1 |
Windows SDK | 2.1.1 |
Linux SDK | Not supported yet |
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 |
Android SDK | 2.1.1 |
iOS SDK | 2.1.1 |
Windows SDK | 2.1.1 |
Linux SDK | Not supported yet |
start
int start() |
Return | 0:Success, 0<ErrorCode |
Expected Events | |
Description | Start stream |
Android SDK | 2.1.1 |
iOS SDK | 2.1.1 |
Windows SDK | 2.1.1 |
Linux SDK | Not supported yet |
write
int write(byte[] DataBuffer, int DataLength, unsigned int TimeStamp) |
DataBuffer | Received data |
DataLength | Received data length |
TimeStamp | Stream time |
Return | 0:Success, 0<ErrorCode |
Expected Events | |
Description | Write audio to device. |
Android SDK | 2.1.1 |
iOS SDK | 2.1.1 |
Windows SDK | 2.1.1 |
Linux SDK | Not supported yet |
stop
int stop() |
Return | 0:Success, 0<ErrorCode |
Expected Events | |
Description | Stop stream |
Android SDK | 2.1.1 |
iOS SDK | 2.1.1 |
Windows SDK | 2.1.1 |
Linux SDK | Not supported yet |
Events
onError
void onError(IAudioManager manager, int ErrorCode) |
manager | AudioManager instance |
ErrorCode | Error code |
Description | Errer event |
Android SDK | 2.1.1 |
iOS SDK | 2.1.1 |
Windows SDK | 2.1.1 |
Linux SDK | Not supported yet |
onRead
void onRead(IAudioManager manager, byte[] DataBuffer, int DataLength, unsigned int TimeStamp) |
manager | AudioManager instance |
DataBuffer | Received data |
DataLength | Received data length |
TimeStamp | Stream time |
Description | Data received |
Android SDK | 2.1.1 |
iOS SDK | 2.1.1 |
Windows SDK | 2.1.1 |
Linux SDK | Not supported yet |