public class MusicVisualizer
extends java.lang.Object
implements java.lang.Runnable
| Constructor and Description |
|---|
MusicVisualizer(Lights lights)
This constructor creates a new visualizer.
|
MusicVisualizer(Lights lights,
javax.sound.sampled.TargetDataLine line)
This constructor creates a new visualizer.
|
| Modifier and Type | Method and Description |
|---|---|
static javax.sound.sampled.TargetDataLine |
getDefaultLine()
This function returns the default line to listen on.
|
Lights |
getLights()
This function returns the group of lights controlled by this visualizer.
|
javax.sound.sampled.TargetDataLine |
getLine()
This function returns the line to read the music input from.
|
void |
run()
This function runs the visualizer with the settings given in the constructor
resp.
|
void |
start()
This function starts the visualizer in a new thread.
|
void |
stop()
This function stops the thread running the visualizer.
|
public MusicVisualizer(Lights lights, javax.sound.sampled.TargetDataLine line)
lights - the group of lights to be controlledline - the line to read the music input frompublic MusicVisualizer(Lights lights)
lights - the group of lights to be controlledpublic Lights getLights()
public javax.sound.sampled.TargetDataLine getLine()
public static javax.sound.sampled.TargetDataLine getDefaultLine()
public void run()
run in interface java.lang.Runnablestart()public void stop()
start()public void start()