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