io.agora.rtc

## Class AudioSpectrumData

- java.lang.Object
- - io.agora.rtc.AudioSpectrumData

-     public class AudioSpectrumData
      extends java.lang.Object

  Audio spectrum data.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `private float[]` | `audioSpectrumData` Audio spectrum data array
    `private int` | `dataLength` Length of the spectrum data

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `AudioSpectrumData()` Default constructor for AudioSpectrumData.
    `AudioSpectrumData(float[] audioSpectrumData, int dataLength)` Constructs AudioSpectrumData with spectrum data and length.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `float[]` | `getAudioSpectrumData()` Gets the audio spectrum data array.
    `int` | `getDataLength()` Gets the length of the spectrum data.
    `void` | `setAudioSpectrumData(float[] audioSpectrumData)` Sets the audio spectrum data array.
    `void` | `setDataLength(int dataLength)` Sets the length of the spectrum data.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### audioSpectrumData

          private float[] audioSpectrumData

      Audio spectrum data array

    - #### dataLength

          private int dataLength

      Length of the spectrum data

  - ### Constructor Detail

    - #### AudioSpectrumData

          public AudioSpectrumData()

      Default constructor for AudioSpectrumData.

    - #### AudioSpectrumData

          public AudioSpectrumData(float[] audioSpectrumData,
                                   int dataLength)

      Constructs AudioSpectrumData with spectrum data and length.
      Parameters:
        `audioSpectrumData` - Audio spectrum data array
        `dataLength` - Length of the spectrum data

  - ### Method Detail

    - #### getAudioSpectrumData

          public float[] getAudioSpectrumData()

      Gets the audio spectrum data array.
      Returns:
        Audio spectrum data array

    - #### setAudioSpectrumData

          public void setAudioSpectrumData(float[] audioSpectrumData)

      Sets the audio spectrum data array.
      Parameters:
        `audioSpectrumData` - Audio spectrum data array

    - #### getDataLength

          public int getDataLength()

      Gets the length of the spectrum data.
      Returns:
        Length of the spectrum data

    - #### setDataLength

          public void setDataLength(int dataLength)

      Sets the length of the spectrum data.
      Parameters:
        `dataLength` - Length of the spectrum data