summaryrefslogtreecommitdiff
path: root/javax/sound
diff options
context:
space:
mode:
authorTom Tromey <tromey@redhat.com>2006-03-16 01:46:56 +0000
committerTom Tromey <tromey@redhat.com>2006-03-16 01:46:56 +0000
commit032dced22efe85e4c44b987a25cfe8a3cd16774d (patch)
treead5cc60e0c7c1b721fa528140911bc8f7a2d5ab3 /javax/sound
parentaf2ef677c33bc87f66157587c89611b6bed1d4b1 (diff)
downloadclasspath-032dced22efe85e4c44b987a25cfe8a3cd16774d.tar.gz
* javax/sound/midi/Track.java (Track): New constructor.
(events): Now package-private. * javax/sound/midi/MidiUnavailableException.java (MidiUnavailableException): Removed invalid constructors. * javax/sound/midi/MidiSystem.java (MidiSystem): New constructor. * javax/sound/midi/InvalidMidiDataException.java (InvalidMidiDataException): Removed invalid constructors. * javax/sound/midi/Sequencer.java (hashCode): Now final. * javax/sound/midi/SysexMessage.java (SysexMessage): Now protected. * javax/sound/midi/ShortMessage.java (ShortMessage): Now protected. (SYSTEM_EXCLUSIVE): Removed. (getDataLength): Updated. * javax/sound/midi/MidiDevice.java (Info): Now protected. (equals): Now final (getName): Now final. (getVendor): Now final. (getDescription): Likewise. (hashCode): Likewise. (getVersion): Likewise. (toString): Likewise. * javax/sound/midi/MetaMessage.java (MetaMessage): Now protected. * javax/sound/sampled/ReverbType.java (getDecayTime): Now final. (getEarlyReflectionDelay): Likewise. (getEarlyReflectionIntensity): Likewise. (getLateReflectionDelay): Likewise. (getLateReflectionIntensity): Likewise. (toString): Likewise. * javax/sound/sampled/Port.java (toString): Now final. * javax/sound/sampled/LineEvent.java (getFramePosition): Now final. (getLine): Likewise. (getType): Likewise. * javax/sound/sampled/Mixer.java (Info): Now protected. (getDescription): Now final. (getName): Likewise. (getVendor): Likewise. (getVersion): Likewise. (toString): Likewise. * javax/sound/sampled/Control.java: Now abstract. (Type.toString): Now final.
Diffstat (limited to 'javax/sound')
-rw-r--r--javax/sound/midi/InvalidMidiDataException.java21
-rw-r--r--javax/sound/midi/MetaMessage.java2
-rw-r--r--javax/sound/midi/MidiDevice.java16
-rw-r--r--javax/sound/midi/MidiSystem.java5
-rw-r--r--javax/sound/midi/MidiUnavailableException.java21
-rw-r--r--javax/sound/midi/Sequencer.java2
-rw-r--r--javax/sound/midi/ShortMessage.java10
-rw-r--r--javax/sound/midi/SysexMessage.java2
-rw-r--r--javax/sound/midi/Track.java9
-rw-r--r--javax/sound/sampled/Control.java4
-rw-r--r--javax/sound/sampled/LineEvent.java6
-rw-r--r--javax/sound/sampled/Mixer.java12
-rw-r--r--javax/sound/sampled/Port.java2
-rw-r--r--javax/sound/sampled/ReverbType.java12
14 files changed, 42 insertions, 82 deletions
diff --git a/javax/sound/midi/InvalidMidiDataException.java b/javax/sound/midi/InvalidMidiDataException.java
index d7f770757..9f5690069 100644
--- a/javax/sound/midi/InvalidMidiDataException.java
+++ b/javax/sound/midi/InvalidMidiDataException.java
@@ -66,25 +66,4 @@ public class InvalidMidiDataException extends Exception
{
super(s);
}
-
- /**
- * Create an InvalidMidiDataException object.
- *
- * @param s the exception message string
- * @param cause the root cause of the exception
- */
- public InvalidMidiDataException(String s, Throwable cause)
- {
- super(s, cause);
- }
-
- /**
- * Create an InvalidMidiDataException object.
- *
- * @param cause the root cause of the exception
- */
- public InvalidMidiDataException(Throwable cause)
- {
- super(cause);
- }
}
diff --git a/javax/sound/midi/MetaMessage.java b/javax/sound/midi/MetaMessage.java
index 2ca93accd..f7c4fb424 100644
--- a/javax/sound/midi/MetaMessage.java
+++ b/javax/sound/midi/MetaMessage.java
@@ -76,7 +76,7 @@ public class MetaMessage extends MidiMessage
* Create a MetaMessage object.
* @param data a complete system exclusive message
*/
- public MetaMessage(byte[] data)
+ protected MetaMessage(byte[] data)
{
super(data);
int index = 2;
diff --git a/javax/sound/midi/MidiDevice.java b/javax/sound/midi/MidiDevice.java
index 6f43c2548..387cceac2 100644
--- a/javax/sound/midi/MidiDevice.java
+++ b/javax/sound/midi/MidiDevice.java
@@ -134,7 +134,7 @@ public interface MidiDevice
* @param description the device description
* @param version the device version string
*/
- public Info(String name, String vendor, String description, String version)
+ protected Info(String name, String vendor, String description, String version)
{
this.name = name;
this.vendor = vendor;
@@ -150,7 +150,7 @@ public interface MidiDevice
* @return true if this is the same object
* @see java.lang.Object#equals(java.lang.Object)
*/
- public boolean equals(Object obj)
+ public final boolean equals(Object obj)
{
return super.equals(obj);
}
@@ -161,7 +161,7 @@ public interface MidiDevice
* @return the hash code for this object
* @see java.lang.Object#hashCode()
*/
- public int hashCode()
+ public final int hashCode()
{
return super.hashCode();
}
@@ -171,7 +171,7 @@ public interface MidiDevice
*
* @return the device name
*/
- public String getName()
+ public final String getName()
{
return name;
}
@@ -181,7 +181,7 @@ public interface MidiDevice
*
* @return the device vendor
*/
- public String getVendor()
+ public final String getVendor()
{
return vendor;
}
@@ -191,7 +191,7 @@ public interface MidiDevice
*
* @return the device description
*/
- public String getDescription()
+ public final String getDescription()
{
return description;
}
@@ -201,7 +201,7 @@ public interface MidiDevice
*
* @return the device version
*/
- public String getVersion()
+ public final String getVersion()
{
return version;
}
@@ -212,7 +212,7 @@ public interface MidiDevice
* @return the device name
* @see java.lang.Object#toString()
*/
- public String toString()
+ public final String toString()
{
return name;
}
diff --git a/javax/sound/midi/MidiSystem.java b/javax/sound/midi/MidiSystem.java
index 8ea12eb70..627dd95e9 100644
--- a/javax/sound/midi/MidiSystem.java
+++ b/javax/sound/midi/MidiSystem.java
@@ -64,6 +64,11 @@ import javax.sound.midi.spi.SoundbankReader;
*/
public class MidiSystem
{
+ private MidiSystem()
+ {
+ // Not instantiable.
+ }
+
/**
* Get an array of all available MIDI devices.
*
diff --git a/javax/sound/midi/MidiUnavailableException.java b/javax/sound/midi/MidiUnavailableException.java
index d4b85e810..a992c16a7 100644
--- a/javax/sound/midi/MidiUnavailableException.java
+++ b/javax/sound/midi/MidiUnavailableException.java
@@ -66,25 +66,4 @@ public class MidiUnavailableException extends Exception
{
super(s);
}
-
- /**
- * Create an MidiUnavailableException object.
- *
- * @param s the exception message string
- * @param cause the root cause of the exception
- */
- public MidiUnavailableException(String s, Throwable cause)
- {
- super(s, cause);
- }
-
- /**
- * Create an MidiUnavailableException object.
- *
- * @param cause the root cause of the exception
- */
- public MidiUnavailableException(Throwable cause)
- {
- super(cause);
- }
}
diff --git a/javax/sound/midi/Sequencer.java b/javax/sound/midi/Sequencer.java
index 894d876e9..24ee2505c 100644
--- a/javax/sound/midi/Sequencer.java
+++ b/javax/sound/midi/Sequencer.java
@@ -385,7 +385,7 @@ public interface Sequencer extends MidiDevice
/**
* SyncMode objects use the Object hashCode.
*/
- public int hashCode()
+ public final int hashCode()
{
return super.hashCode();
}
diff --git a/javax/sound/midi/ShortMessage.java b/javax/sound/midi/ShortMessage.java
index 43c0e25fe..ef01d1168 100644
--- a/javax/sound/midi/ShortMessage.java
+++ b/javax/sound/midi/ShortMessage.java
@@ -48,11 +48,6 @@ package javax.sound.midi;
public class ShortMessage extends MidiMessage
{
/**
- * Status byte for System Exclusive message.
- */
- public static final int SYSTEM_EXCLUSIVE = 0xF0;
-
- /**
* Status byte for Time Code message.
*/
public static final int MIDI_TIME_CODE = 0xF1;
@@ -170,7 +165,7 @@ public class ShortMessage extends MidiMessage
*
* @param data the message data
*/
- public ShortMessage(byte[] data)
+ protected ShortMessage(byte[] data)
{
super(data);
}
@@ -263,9 +258,6 @@ public class ShortMessage extends MidiMessage
case 0xF5: // FIXME: unofficial bus select. Not in spec??
return 1;
- case SYSTEM_EXCLUSIVE:
- return 0; // FIXME: is this correct?
-
case TUNE_REQUEST:
case END_OF_EXCLUSIVE:
case TIMING_CLOCK:
diff --git a/javax/sound/midi/SysexMessage.java b/javax/sound/midi/SysexMessage.java
index 7ab60f4b6..6471a3eb2 100644
--- a/javax/sound/midi/SysexMessage.java
+++ b/javax/sound/midi/SysexMessage.java
@@ -69,7 +69,7 @@ public class SysexMessage extends MidiMessage
* Create a SysexMessage object.
* @param data a complete system exclusive message
*/
- public SysexMessage(byte[] data)
+ protected SysexMessage(byte[] data)
{
super(data);
}
diff --git a/javax/sound/midi/Track.java b/javax/sound/midi/Track.java
index da7ef2ef3..d06c8cc1d 100644
--- a/javax/sound/midi/Track.java
+++ b/javax/sound/midi/Track.java
@@ -54,11 +54,16 @@ public class Track
/**
* The list of MidiEvents for this track.
*/
- protected Vector events;
+ Vector events;
// A HashSet to speed processing
private HashSet eventSet;
-
+
+ // This is only instantiable within this package.
+ Track()
+ {
+ }
+
/**
* Add a new event to this track. Specific events may only be added once.
* The event will be inserted into the appropriate spot in the event list
diff --git a/javax/sound/sampled/Control.java b/javax/sound/sampled/Control.java
index 810c2edd5..4759a3353 100644
--- a/javax/sound/sampled/Control.java
+++ b/javax/sound/sampled/Control.java
@@ -43,7 +43,7 @@ package javax.sound.sampled;
* for instance its volume.
* @since 1.3
*/
-public class Control
+public abstract class Control
{
/**
* This describes a single control.
@@ -75,7 +75,7 @@ public class Control
/**
* Return the name of this Type.
*/
- public String toString()
+ public final String toString()
{
return name;
}
diff --git a/javax/sound/sampled/LineEvent.java b/javax/sound/sampled/LineEvent.java
index db925935b..dd4a9ae9a 100644
--- a/javax/sound/sampled/LineEvent.java
+++ b/javax/sound/sampled/LineEvent.java
@@ -126,7 +126,7 @@ public class LineEvent extends EventObject
/**
* Return the frame position associated with this event.
*/
- public long getFramePosition()
+ public final long getFramePosition()
{
return framePosition;
}
@@ -134,7 +134,7 @@ public class LineEvent extends EventObject
/**
* Return the Line associated with this event.
*/
- public Line getLine()
+ public final Line getLine()
{
return line;
}
@@ -142,7 +142,7 @@ public class LineEvent extends EventObject
/**
* Return the Type associated with this event.
*/
- public Type getType()
+ public final Type getType()
{
return type;
}
diff --git a/javax/sound/sampled/Mixer.java b/javax/sound/sampled/Mixer.java
index b9afba3fe..ff657cfd1 100644
--- a/javax/sound/sampled/Mixer.java
+++ b/javax/sound/sampled/Mixer.java
@@ -62,7 +62,7 @@ public interface Mixer extends Line
* @param desc a descriptive string
* @param vers the mixer's version
*/
- public Info(String name, String vendor, String desc, String vers)
+ protected Info(String name, String vendor, String desc, String vers)
{
this.name = name;
this.description = desc;
@@ -83,7 +83,7 @@ public interface Mixer extends Line
/**
* Return the name of the mixer.
*/
- public String getName()
+ public final String getName()
{
return name;
}
@@ -91,7 +91,7 @@ public interface Mixer extends Line
/**
* Return the mixer's description.
*/
- public String getDescription()
+ public final String getDescription()
{
return description;
}
@@ -99,7 +99,7 @@ public interface Mixer extends Line
/**
* Return the mixer's vendor.
*/
- public String getVendor()
+ public final String getVendor()
{
return vendor;
}
@@ -107,12 +107,12 @@ public interface Mixer extends Line
/**
* Return the mixer's version.
*/
- public String getVersion()
+ public final String getVersion()
{
return version;
}
- public String toString()
+ public final String toString()
{
return ("name=" + name + "; description=" + description
+ "; vendor=" + vendor + "; version=" + version);
diff --git a/javax/sound/sampled/Port.java b/javax/sound/sampled/Port.java
index 7b3daafd3..fb39e6c07 100644
--- a/javax/sound/sampled/Port.java
+++ b/javax/sound/sampled/Port.java
@@ -127,7 +127,7 @@ public interface Port extends Line
return super.matches(other) && equals(other);
}
- public String toString()
+ public final String toString()
{
return super.toString() + "; name=" + name + "; isSource=" + isSource;
}
diff --git a/javax/sound/sampled/ReverbType.java b/javax/sound/sampled/ReverbType.java
index a08959377..c7cced8a7 100644
--- a/javax/sound/sampled/ReverbType.java
+++ b/javax/sound/sampled/ReverbType.java
@@ -84,7 +84,7 @@ public class ReverbType
/**
* Return the decay time.
*/
- public int getDecayTime()
+ public final int getDecayTime()
{
return decayTime;
}
@@ -92,7 +92,7 @@ public class ReverbType
/**
* Return the early reflection delay.
*/
- public int getEarlyReflectionDelay()
+ public final int getEarlyReflectionDelay()
{
return earlyReflectionDelay;
}
@@ -100,7 +100,7 @@ public class ReverbType
/**
* Return the early reflection intensity.
*/
- public float getEarlyReflectionIntensity()
+ public final float getEarlyReflectionIntensity()
{
return earlyReflectionIntensity;
}
@@ -108,7 +108,7 @@ public class ReverbType
/**
* Return the late reflection delay.
*/
- public int getLateReflectionDelay()
+ public final int getLateReflectionDelay()
{
return lateReflectionDelay;
}
@@ -116,7 +116,7 @@ public class ReverbType
/**
* Return the late reflection intensity.
*/
- public float getLateReflectionIntensity()
+ public final float getLateReflectionIntensity()
{
return lateReflectionIntensity;
}
@@ -133,7 +133,7 @@ public class ReverbType
/**
* Return a description of this ReverbType.
*/
- public String toString()
+ public final String toString()
{
return ("name=" + name + "; earlyReflectionDelay=" + earlyReflectionDelay
+ "; earlyReflectionIntensity=" + earlyReflectionIntensity