MediaPlayer
using MediaPlayer#setAudioSpectrumListener.
MediaPlayer
| Modifier and Type | Method and Description |
|---|---|
| public void | spectrumDataUpdate(double
timestamp of the event in seconds. timestamp, double duration for which the spectrum was computed in seconds. duration, float[] array containing the non-positive spectrum magnitude in decibels
(dB) for each band.
The size of the array equals the number of bands and should be considered
to be read-only. magnitudes, float[] array containing the phase in the range
[ phases)Math.PI, Math.PI] for each band.
The size of the array equals the number of bands and should be considered
to be read-only.Notifies the observer about new data available for the audio spectrum. |
| spectrumDataUpdate | back to summary |
|---|---|
| public void spectrumDataUpdate(double timestamp, double duration, float[] magnitudes, float[] phases) Notifies the observer about new data available for the audio spectrum. The notification period for updates may be set using
The arrays passed to the listener should be considered to be read-only as the underlying implementation may re-use them.
| |