Subscribing to Notifications of Reporting Audio Stream Frame Data
Function
A notification is sent when audio stream frame data starts to be reported. (For Windows, only 32-bit Windows is supported.)
Function Prototype
setOnAudioFrameNotifyCB(onAudioFrameNotify: (audioFrameData: AudioFrameData) => void): voidsetOnAudioFrameNotifyCB(onAudioFrameNotify: (audioFrameData: AudioFrameData) => void): void
Request Parameters
Parameter | Mandatory | Type | Description |
---|---|---|---|
onAudioFrameNotify | Yes | (audioFrameData: AudioFrameData) => void | Notifies you when audio stream frame data starts to be reported. (For Windows, only 32-bit Windows is supported.) |
Return Values
void
Notification Method Parameters
(audioFrameData: AudioFrameData) => void
Parameter | Type | Description |
---|---|---|
audioFrameData | AudioFrameData | Audio stream frame data. |
Parameter | Type | Description |
---|---|---|
eFrameType | AudioFrameType | Audio frame type. |
iSamples | number | Number of sampling points of each audio channel. iSamples = iSamplesPerSec x 10 ms/1,000 |
iSamplesPerSec | number | Sampling ratio. |
iBytesPerSample | number | Number of bytes of each sampling point. Generally, the PCM audio is 16 bits. |
iChannels | number | Number of audio channels. |
uiBufferLen | number | Buffer length. The encoded data is encrypted by a third party. The data length increases to prevent overflow. |
pBuffer | HWM_CHAR * | Data buffer. Length = iSamples x iBytesPerSample x iChannels |
uiDataLen | number | Data length, which is used after encoding or before decoding. The value of this parameter needs to be updated after encryption or decryption. |
Enumeration Name | Enumerated Value | Description |
---|---|---|
HWM_AUDIO_FRAME_TYPE_PCM16 | 0 | 16-bit PCM. |
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot