@Override
	public void spectrumDataUpdate(double timestamp, double duration, float[] magnitudes, float[] phases) {
		SpectrumListener listener = getSpectrumListener();
		if (listener != null) {
			if (eventInstance == null || eventInstance.magnitudes().length != magnitudes.length)
				eventInstance = new SpectrumEvent(magnitudes);
			else
				System.arraycopy(magnitudes, 0, eventInstance.magnitudes(), 0, magnitudes.length);
			listener.onSpectrum(eventInstance);
		}
		playbackListeners.forEach(Runnable::run);
	}
A media-player using JavaFX's {@link MediaPlayer} with the use of {@link RecafURLStreamHandlerProvider}
which allows pulling audio from 'memory' via the current {@link Workspace}.

@author Matt Coley
recaf-ui/src/main/java/software/coley/recaf/ui/media/FxPlayer.java