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 | 3.0.1 |
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 | 3.0.1 |
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 | 3.0.1 |
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 | 3.0.1 |
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 | 3.0.1 |
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 | 3.0.1 |
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 | 3.0.1 |
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 | 3.0.1 |
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 | 3.0.1 |