public static interface AudioWaver.WaveDataObserver
The observer is required when your application needs to collect the audio data.
SystemCapability.Multimedia#AUDIO| 限定符和类型 | 方法 | 说明 |
|---|---|---|
void |
onWaveData(byte[] data,
int sampleRate) |
Called to obtain the time-domain audio data and the sampling rate.
|
void onWaveData(byte[] data,
int sampleRate)
Before calling this method, register the observer via AudioWaver#setWaveDataObserver.
data - Indicates the time-domain audio data.sampleRate - Indicates the audio sampling rate.