Updated on 2023-03-23 GMT+08:00

Audio Data Stream Notification

Notification Description

A notification is sent when an audio data stream is sent.

Method Definition

- (void)onAudioFrameDataNotify:(HWMAudioFrameDataModel *)pFrame;

Sample Code

- (void)onAudioFrameDataNotify:(HWMAudioFrameDataModel *)pFrame{
    NSLog(@"In-meeting audio stream report:%@", [pFrame yy_modelDescription]);
}

Precautions

  1. Subscribe to the HWMBizNotificationHandler proxy during SDK initialization or set the proxy on the target page.
  2. You need to call the API for obtaining audio data streams and set the parameter to YES. Then, data can be reported in the notification.

Parameter Description

Table 1 Parameter description

Parameter

Type

Description

pFrame

HWMAudioFrameDataModel *

Audio stream information.

Table 2 HWMAudioFrameDataModel parameters

Parameter

Type

Description

iSamples

NSInteger

Number of sampling points of each audio channel. iSamples=iSamplesPerSec x 10 ms/1000

iSamplesPerSec

NSInteger

Sampling ratio.

iBytesPerSample

NSInteger

Number of bytes of each sampling point. Generally, the PCM audio is 16 bits.

iChannels

NSInteger

Number of audio channels.

pBuffer

NSData

Data buffer. Length = iSamples x iBytesPerSample x iChannels

uiDataLen

NSInteger

Data length, which is used after encoding or before decoding. The value of this parameter needs to be updated after encryption or decryption.

eFrameType

HWMAudioRowDataFrameType

Audio frame type.

Table 3 Enumerated values of HWMAudioRowDataFrameType

Enumerated Value

Description

HWMAudioRowDataFrameTypePcm16 = 0

Pcm16