Package ptolemy.media.javasound
Class LiveSoundEvent
- java.lang.Object
-
- ptolemy.media.javasound.LiveSoundEvent
-
public class LiveSoundEvent extends java.lang.Object
A LiveSoundEvent represents a change in an audio parameter of LiveSound. This event will be generated by LiveSound when an audio parameter change (e.g., a change in the sample rate) occurs, and is passed to the live sound event listeners to notify them about the change.- Since:
- Ptolemy II 1.0
- Version:
- $Id$
- Author:
- Brian K. Vogel
- See Also:
LiveSoundListener
- Pt.AcceptedRating:
- Red
- Pt.ProposedRating:
- Red (vogel)
-
-
Field Summary
Fields Modifier and Type Field Description static int
BITS_PER_SAMPLE
The value indicates a bits per channel change event.static int
BUFFER_SIZE
The value indicates a buffer size change event.static int
CHANNELS
The value indicates a channel number change event.static int
SAMPLE_RATE
The value indicates a sample rate change event.
-
Constructor Summary
Constructors Constructor Description LiveSoundEvent(int parameter)
Construct a LiveSoundEvent, with the specified parameter.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getSoundParameter()
Return the parameter of LiveSound that has changed.
-
-
-
Field Detail
-
SAMPLE_RATE
public static final int SAMPLE_RATE
The value indicates a sample rate change event.- See Also:
- Constant Field Values
-
CHANNELS
public static final int CHANNELS
The value indicates a channel number change event.- See Also:
- Constant Field Values
-
BUFFER_SIZE
public static final int BUFFER_SIZE
The value indicates a buffer size change event.- See Also:
- Constant Field Values
-
BITS_PER_SAMPLE
public static final int BITS_PER_SAMPLE
The value indicates a bits per channel change event.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
LiveSoundEvent
public LiveSoundEvent(int parameter)
Construct a LiveSoundEvent, with the specified parameter.- Parameters:
parameter
- The audio parameter of LiveSound that has changed. The value of parameter should be one of LiveSoundEvent.SAMPLE_RATE, LiveSoundEvent.CHANNELS, LiveSoundEvent.BUFFER_SIZE, or LiveSoundEvent.BITS_PER_SAMPLE.
-
-
Method Detail
-
getSoundParameter
public int getSoundParameter()
Return the parameter of LiveSound that has changed. The corresponding method of LiveSound may then be invoked do discover the new value of the parameter. For example, if a sample rate change occurs, then this method will return LiveSoundEvent.SAMPLE_RATE. The getSampleRate() method of LiveSound may then be invoked to discover the new value of the sample rate.- Returns:
- SAMPLE_RATE, CHANNELS, BUFFER_SIZE, or BITS_PER_SAMPLE.
-
-