aboutsummaryrefslogtreecommitdiff
path: root/libjava/classpath/javax/sound
diff options
context:
space:
mode:
Diffstat (limited to 'libjava/classpath/javax/sound')
-rw-r--r--libjava/classpath/javax/sound/midi/ControllerEventListener.java4
-rw-r--r--libjava/classpath/javax/sound/midi/Instrument.java16
-rw-r--r--libjava/classpath/javax/sound/midi/InvalidMidiDataException.java6
-rw-r--r--libjava/classpath/javax/sound/midi/MetaEventListener.java4
-rw-r--r--libjava/classpath/javax/sound/midi/MetaMessage.java40
-rw-r--r--libjava/classpath/javax/sound/midi/MidiChannel.java100
-rw-r--r--libjava/classpath/javax/sound/midi/MidiDevice.java68
-rw-r--r--libjava/classpath/javax/sound/midi/MidiEvent.java18
-rw-r--r--libjava/classpath/javax/sound/midi/MidiFileFormat.java48
-rw-r--r--libjava/classpath/javax/sound/midi/MidiMessage.java34
-rw-r--r--libjava/classpath/javax/sound/midi/MidiSystem.java125
-rw-r--r--libjava/classpath/javax/sound/midi/MidiUnavailableException.java6
-rw-r--r--libjava/classpath/javax/sound/midi/Patch.java14
-rw-r--r--libjava/classpath/javax/sound/midi/Receiver.java6
-rw-r--r--libjava/classpath/javax/sound/midi/Sequence.java80
-rw-r--r--libjava/classpath/javax/sound/midi/Sequencer.java168
-rw-r--r--libjava/classpath/javax/sound/midi/ShortMessage.java144
-rw-r--r--libjava/classpath/javax/sound/midi/Soundbank.java30
-rw-r--r--libjava/classpath/javax/sound/midi/SoundbankResource.java24
-rw-r--r--libjava/classpath/javax/sound/midi/Synthesizer.java62
-rw-r--r--libjava/classpath/javax/sound/midi/SysexMessage.java27
-rw-r--r--libjava/classpath/javax/sound/midi/Track.java35
-rw-r--r--libjava/classpath/javax/sound/midi/Transmitter.java10
-rw-r--r--libjava/classpath/javax/sound/midi/VoiceStatus.java12
-rw-r--r--libjava/classpath/javax/sound/midi/spi/MidiDeviceProvider.java18
-rw-r--r--libjava/classpath/javax/sound/midi/spi/MidiFileReader.java28
-rw-r--r--libjava/classpath/javax/sound/midi/spi/MidiFileWriter.java28
-rw-r--r--libjava/classpath/javax/sound/midi/spi/SoundbankReader.java24
-rw-r--r--libjava/classpath/javax/sound/sampled/AudioFileFormat.java8
-rw-r--r--libjava/classpath/javax/sound/sampled/AudioFormat.java30
-rw-r--r--libjava/classpath/javax/sound/sampled/AudioInputStream.java60
-rw-r--r--libjava/classpath/javax/sound/sampled/AudioPermission.java2
-rw-r--r--libjava/classpath/javax/sound/sampled/AudioSystem.java44
-rw-r--r--libjava/classpath/javax/sound/sampled/BooleanControl.java4
-rw-r--r--libjava/classpath/javax/sound/sampled/Clip.java2
-rw-r--r--libjava/classpath/javax/sound/sampled/CompoundControl.java6
-rw-r--r--libjava/classpath/javax/sound/sampled/DataLine.java14
-rw-r--r--libjava/classpath/javax/sound/sampled/EnumControl.java8
-rw-r--r--libjava/classpath/javax/sound/sampled/FloatControl.java12
-rw-r--r--libjava/classpath/javax/sound/sampled/Line.java2
-rw-r--r--libjava/classpath/javax/sound/sampled/LineEvent.java8
-rw-r--r--libjava/classpath/javax/sound/sampled/LineUnavailableException.java2
-rw-r--r--libjava/classpath/javax/sound/sampled/Mixer.java6
-rw-r--r--libjava/classpath/javax/sound/sampled/Port.java18
-rw-r--r--libjava/classpath/javax/sound/sampled/ReverbType.java12
-rw-r--r--libjava/classpath/javax/sound/sampled/UnsupportedAudioFileException.java2
-rw-r--r--libjava/classpath/javax/sound/sampled/spi/AudioFileReader.java14
-rw-r--r--libjava/classpath/javax/sound/sampled/spi/AudioFileWriter.java6
-rw-r--r--libjava/classpath/javax/sound/sampled/spi/FormatConversionProvider.java24
49 files changed, 730 insertions, 733 deletions
diff --git a/libjava/classpath/javax/sound/midi/ControllerEventListener.java b/libjava/classpath/javax/sound/midi/ControllerEventListener.java
index eb075b3..8349de0 100644
--- a/libjava/classpath/javax/sound/midi/ControllerEventListener.java
+++ b/libjava/classpath/javax/sound/midi/ControllerEventListener.java
@@ -41,9 +41,9 @@ package javax.sound.midi;
import java.util.EventListener;
/**
- * The interface defines the methods to be implemented by classes wanting
+ * The interface defines the methods to be implemented by classes wanting
* to be notified on MIDI controller events from a Sequencer.
- *
+ *
* @author Anthony Green (green@redhat.com)
* @since 1.3
*
diff --git a/libjava/classpath/javax/sound/midi/Instrument.java b/libjava/classpath/javax/sound/midi/Instrument.java
index f2821db..a8626fa 100644
--- a/libjava/classpath/javax/sound/midi/Instrument.java
+++ b/libjava/classpath/javax/sound/midi/Instrument.java
@@ -40,7 +40,7 @@ package javax.sound.midi;
/**
* The abstract base class for all MIDI instruments.
- *
+ *
* @author Anthony Green (green@redhat.com)
* @since 1.3
*
@@ -49,29 +49,29 @@ public abstract class Instrument extends SoundbankResource
{
// The instrument patch.
private Patch patch;
-
+
/**
* Create a new Instrument.
- *
+ *
* @param soundbank the Soundbank containing the instrument.
* @param patch the patch for this instrument
* @param name the name of this instrument
* @param dataClass the class used to represent sample data for this instrument
*/
- protected Instrument(Soundbank soundbank, Patch patch,
+ protected Instrument(Soundbank soundbank, Patch patch,
String name, Class<?> dataClass)
{
super(soundbank, name, dataClass);
- this.patch = patch;
+ this.patch = patch;
}
-
+
/**
* Get the patch for this instrument.
- *
+ *
* @return the patch for this instrument
*/
public Patch getPatch()
{
return patch;
- }
+ }
}
diff --git a/libjava/classpath/javax/sound/midi/InvalidMidiDataException.java b/libjava/classpath/javax/sound/midi/InvalidMidiDataException.java
index 9f56900..6325b04 100644
--- a/libjava/classpath/javax/sound/midi/InvalidMidiDataException.java
+++ b/libjava/classpath/javax/sound/midi/InvalidMidiDataException.java
@@ -40,7 +40,7 @@ package javax.sound.midi;
/**
* This exception is thrown when we encounter bad MIDI data.
- *
+ *
* @author Anthony Green (green@redhat.com)
* @since 1.3
*
@@ -48,7 +48,7 @@ package javax.sound.midi;
public class InvalidMidiDataException extends Exception
{
private static final long serialVersionUID = 2780771756789932067L;
-
+
/**
* Create an InvalidMidiDataException object.
*/
@@ -59,7 +59,7 @@ public class InvalidMidiDataException extends Exception
/**
* Create an InvalidMidiDataException object.
- *
+ *
* @param s the exception message string
*/
public InvalidMidiDataException(String s)
diff --git a/libjava/classpath/javax/sound/midi/MetaEventListener.java b/libjava/classpath/javax/sound/midi/MetaEventListener.java
index dd7b8a2..28a7a9d 100644
--- a/libjava/classpath/javax/sound/midi/MetaEventListener.java
+++ b/libjava/classpath/javax/sound/midi/MetaEventListener.java
@@ -41,9 +41,9 @@ package javax.sound.midi;
import java.util.EventListener;
/**
- * The interface defines the methods to be implemented by classes wanting
+ * The interface defines the methods to be implemented by classes wanting
* to be notified on MIDI meta events from a Sequencer.
- *
+ *
* @author Anthony Green (green@redhat.com)
* @since 1.3
*
diff --git a/libjava/classpath/javax/sound/midi/MetaMessage.java b/libjava/classpath/javax/sound/midi/MetaMessage.java
index f7c4fb4..4d43975 100644
--- a/libjava/classpath/javax/sound/midi/MetaMessage.java
+++ b/libjava/classpath/javax/sound/midi/MetaMessage.java
@@ -40,7 +40,7 @@ package javax.sound.midi;
/**
* A system exclusive MIDI message.
- *
+ *
* @author Anthony Green (green@redhat.com)
* @since 1.3
*
@@ -51,15 +51,15 @@ public class MetaMessage extends MidiMessage
* The META status code. Only valid for MIDI files, not the wire protocol.
*/
public static final int META = 0xFF;
-
+
// The length of the variable length data length encoding.
private int lengthLength = 0;
-
+
/**
* Create a default valid meta message.
- *
+ *
* The official specs don't specify what message is to be
- * created. For now, we create a zero length meta message
+ * created. For now, we create a zero length meta message
* with a type code of 0.
*/
public MetaMessage()
@@ -71,7 +71,7 @@ public class MetaMessage extends MidiMessage
data[3] = (byte) 0; // Length
lengthLength = 1;
}
-
+
/**
* Create a MetaMessage object.
* @param data a complete system exclusive message
@@ -84,10 +84,10 @@ public class MetaMessage extends MidiMessage
while ((data[index++] & 0x80) > 0)
lengthLength++;
}
-
+
/**
* Set the meta message.
- *
+ *
* @param type the meta type byte (< 128)
* @param data the message data
* @param length the length of the message data
@@ -101,9 +101,9 @@ public class MetaMessage extends MidiMessage
+ Integer.toHexString(type)
+ " must be less than 128");
- // For a nice description of how variable length values are handled,
+ // For a nice description of how variable length values are handled,
// see http://www.borg.com/~jglatt/tech/midifile.htm
-
+
// First compute the length of the length value
lengthLength = 0;
int lengthValue = length;
@@ -111,13 +111,13 @@ public class MetaMessage extends MidiMessage
lengthValue = lengthValue >> 7;
lengthLength++;
} while (lengthValue > 0);
-
+
// Now allocate our data array
this.length = 2 + lengthLength + length;
this.data = new byte[this.length];
this.data[0] = (byte) META;
this.data[1] = (byte) type;
-
+
// Now compute the length representation
long buffer = length & 0x7F;
while ((length >>= 7) > 0)
@@ -125,7 +125,7 @@ public class MetaMessage extends MidiMessage
buffer <<= 8;
buffer |= ((length & 0x7F) | 0x80);
}
-
+
// Now store the variable length length value
int index = 2;
do
@@ -135,25 +135,25 @@ public class MetaMessage extends MidiMessage
break;
buffer >>= 8;
} while (true);
-
+
// Now copy the real data.
System.arraycopy(data, 0, this.data, index, length);
}
-
+
/**
* Get the meta message type.
- *
+ *
* @return the meta message type
*/
public int getType()
{
return data[1];
}
-
+
/**
* Get the data for this message, not including the status,
* type, or length information.
- *
+ *
* @return the message data, not including status, type or lenght info
*/
public byte[] getData()
@@ -163,7 +163,7 @@ public class MetaMessage extends MidiMessage
System.arraycopy(data, 2 + lengthLength, result, 0, dataLength);
return result;
}
-
+
/* Create a deep-copy clone of this object.
* @see java.lang.Object#clone()
*/
@@ -171,6 +171,6 @@ public class MetaMessage extends MidiMessage
{
byte message[] = new byte[length];
System.arraycopy(data, 0, message, 0, length);
- return new MetaMessage(message);
+ return new MetaMessage(message);
}
}
diff --git a/libjava/classpath/javax/sound/midi/MidiChannel.java b/libjava/classpath/javax/sound/midi/MidiChannel.java
index fe3b511..36da51d 100644
--- a/libjava/classpath/javax/sound/midi/MidiChannel.java
+++ b/libjava/classpath/javax/sound/midi/MidiChannel.java
@@ -40,22 +40,22 @@ package javax.sound.midi;
/**
* A MIDI channel.
- *
+ *
* @author Anthony Green (green@redhat.com)
* @since 1.3
*
*/
public interface MidiChannel
{
-
+
/**
* Start playing a note.
- *
+ *
* @param noteNumber the MIDI note number
* @param velocity the velocity at which the key was pressed
*/
public void noteOn(int noteNumber, int velocity);
-
+
/**
* Stop playing a note.
*
@@ -63,173 +63,173 @@ public interface MidiChannel
* @param velocity the volcity at which the ket was released
*/
public void noteOff(int noteNumber, int velocity);
-
+
/**
* Stop playing a note.
- *
+ *
* @param noteNumber the MIDI note number
*/
public void noteOff(int noteNumber);
-
+
/**
* Change in a key pressure for a note.
- *
+ *
* @param noteNumber the MIDI note number
* @param pressure the key pressure
*/
public void setPolyPressure(int noteNumber, int pressure);
-
+
/**
* Get the key pressure for a note.
- *
+ *
* @param noteNumber the MIDI note number
* @return the key pressure
*/
public int getPolyPressure(int noteNumber);
-
+
/**
* Set the key pressure for the channel.
- *
+ *
* @param pressure the key pressure
*/
public void setChannelPressure(int pressure);
-
+
/**
* Get the key pressure for the channel.
- *
+ *
* @return the key pressure
*/
public int getChannelPressure();
-
+
/**
* Set a change in a controller's value.
- *
+ *
* @param controller the MIDI controller number (0 to 127)
* @param value the new value (0 to 127)
*/
public void controlChange(int controller, int value);
-
+
/**
* Get a controller's value.
- *
+ *
* @param controller the MIDI controller number (0 to 127)
* @return the controller's value (0 to 127)
*/
public int getController(int controller);
-
+
/**
* Change the patch for this channel.
- *
+ *
* @param program the patch number to switch to (0 to 127)
*/
public void programChange(int program);
-
+
/**
* Change the bank and patch for this channel.
- *
+ *
* @param bank the bank to switch to (0 to 16383)
* @param program the patch to switch to (0 to 127)
*/
public void programChange(int bank, int program);
-
+
/**
* Get the current patch for this channel.
- *
+ *
* @return current patch (0 to 127)
*/
public int getProgram();
-
+
/**
* Change the pitch bend for this channel using a positive 14-bit value.
- *
+ *
* @param bend the new pitch bend value
*/
public void setPitchBend(int bend);
-
+
/**
* Get the pitch bend for this channel as a positive 14-bit value.
- *
+ *
* @return the current patch bend value
*/
public int getPitchBend();
-
+
/**
* Reset all MIDI controllers to their default values.
*/
public void resetAllControllers();
-
+
/**
* Stop playing all notes. Sound may not stop.
*/
public void allNotesOff();
-
+
/**
* Stop all sound.
*/
public void allSoundOff();
-
+
/**
* Set whether or not local controls are on or off. They are on by
* default.
- *
+ *
* @param on true to enable local controls, false to disable
* @return the new value
*/
public boolean localControl(boolean on);
-
+
/**
* Turns mono mode on or off.
- *
- * @param on true to enable mono mode, false to disable
+ *
+ * @param on true to enable mono mode, false to disable
*/
public void setMono(boolean on);
-
+
/**
* Get the current mono mode.
- *
+ *
* @return true if mono is enabled, false otherwise
*/
public boolean getMono();
-
+
/**
* Turns omni mode on or off.
- *
+ *
* @param on true to enable omni mode, false to disable
*/
public void setOmni(boolean on);
-
+
/**
* Get the current omni mode.
- *
+ *
* @return true if omni is enabled, false otherwise
*/
public boolean getOmni();
-
+
/**
* Turns mute mode on or off.
- *
+ *
* @param mute true to enable mute mode, false to disable
*/
public void setMute(boolean mute);
-
+
/**
* Get the current mute mode.
- *
+ *
* @return true if mute is enabled, false otherwise
*/
public boolean getMute();
-
+
/**
* Turns solo mode on or off. If any channels are soloed, then only those
* channels make sounds, otherwise all channels will make sound.
- *
+ *
* @param solo true to enable solo mode, false to disable
*/
public void setSolo(boolean solo);
-
+
/**
* Get the current solo mode.
- *
+ *
* @return true is solo is enabled, false otherwise.
*/
public boolean getSolo();
diff --git a/libjava/classpath/javax/sound/midi/MidiDevice.java b/libjava/classpath/javax/sound/midi/MidiDevice.java
index 387ccea..7a0ca7f 100644
--- a/libjava/classpath/javax/sound/midi/MidiDevice.java
+++ b/libjava/classpath/javax/sound/midi/MidiDevice.java
@@ -40,7 +40,7 @@ package javax.sound.midi;
/**
* Interface for all MIDI devices.
- *
+ *
* @author Anthony Green (green@redhat.com)
* @since 1.3
*
@@ -52,69 +52,69 @@ public interface MidiDevice
* @return the Info object describing this device
*/
public Info getDeviceInfo();
-
+
/**
* Open this MIDI device and allocate any system resource we need.
- *
+ *
* @throws MidiUnavailableException if we're not able to open for some reason
*/
public void open() throws MidiUnavailableException;
-
+
/**
* Close this MIDI device, and release any system resources we're using.
*/
public void close();
-
+
/**
* Returns true if this MIDI device is open and false otherwise.
- *
+ *
* @return true if this is open, false otherwise
*/
public boolean isOpen();
-
+
/**
* If this device supports time-stamps, then it will return the number
* of microseconds since this device has been open, and -1 otherwise.
- *
+ *
* @return -1 or the number of microseconds since this was opened
*/
public long getMicrosecondPosition();
-
+
/**
* The maximum number of MIDI IN connections we can get as Receivers,
* or -1 if there is no maximum.
- *
+ *
* @return -1 or the maximum number of Receivers we can get
*/
public int getMaxReceivers();
-
+
/**
* The maximum number of MIDI OUT connections we can get as Transmitters,
* or -1 if there is no maximum.
- *
+ *
* @return -1 or the maximum number of Transmitters we can get
*/
public int getMaxTransmitters();
-
+
/**
* Get a MIDI IN Receiver for this device.
- *
+ *
* @return a MIDI IN Receiver for this device
* @throws MidiUnavailableException if we can't get a Receiver
*/
public Receiver getReceiver() throws MidiUnavailableException;
-
+
/**
* Get a MIDI OUT Transmitter for this device.
- *
+ *
* @return a MIDI OUT Transmitter for this device
* @throws MidiUnavailableException if we can't get a Transmitter
*/
public Transmitter getTransmitter() throws MidiUnavailableException;
-
+
/**
* A MIDI device descriptor object.
- *
+ *
* @author green@redhat.com
*
*/
@@ -125,10 +125,10 @@ public interface MidiDevice
private String vendor;
private String description;
private String version;
-
+
/**
* Create an Info object for a MIDI device
- *
+ *
* @param name the device name
* @param vendor the vendor name
* @param description the device description
@@ -141,11 +141,11 @@ public interface MidiDevice
this.description = description;
this.version = version;
}
-
+
/**
* This equals method only returns true if this object
* is the same as obj.
- *
+ *
* @param obj the object we're comparing to
* @return true if this is the same object
* @see java.lang.Object#equals(java.lang.Object)
@@ -154,10 +154,10 @@ public interface MidiDevice
{
return super.equals(obj);
}
-
+
/**
* A hash code for this object.
- *
+ *
* @return the hash code for this object
* @see java.lang.Object#hashCode()
*/
@@ -165,50 +165,50 @@ public interface MidiDevice
{
return super.hashCode();
}
-
+
/**
* Get the device name.
- *
+ *
* @return the device name
*/
public final String getName()
{
return name;
}
-
+
/**
* Get the device vendor.
- *
+ *
* @return the device vendor
*/
public final String getVendor()
{
return vendor;
}
-
+
/**
* Get the device description
- *
+ *
* @return the device description
*/
public final String getDescription()
{
return description;
}
-
+
/**
* get the device version
- *
+ *
* @return the device version
*/
public final String getVersion()
{
return version;
}
-
+
/**
* Simple return the name of the device.
- *
+ *
* @return the device name
* @see java.lang.Object#toString()
*/
diff --git a/libjava/classpath/javax/sound/midi/MidiEvent.java b/libjava/classpath/javax/sound/midi/MidiEvent.java
index 3ca5c21..3b0072c 100644
--- a/libjava/classpath/javax/sound/midi/MidiEvent.java
+++ b/libjava/classpath/javax/sound/midi/MidiEvent.java
@@ -41,7 +41,7 @@ package javax.sound.midi;
/**
* A MIDI event is the combination of a MIDI message and a timestamp specified
* in MIDI ticks.
- *
+ *
* @author Anthony Green (green@redhat.com)
* @since 1.3
*
@@ -50,10 +50,10 @@ public class MidiEvent
{
private final MidiMessage message;
private long tick;
-
+
/**
* Create a MIDI event object from the given MIDI message and timestamp.
- *
+ *
* @param message the MidiMessage for this event
* @param tick the timestamp for this event
*/
@@ -62,30 +62,30 @@ public class MidiEvent
this.message = message;
this.tick = tick;
}
-
+
/**
* Get the MIDI message for this event.
- *
+ *
* @return the MidiMessage for this event
*/
public MidiMessage getMessage()
{
return message;
}
-
+
/**
* Set the timestemp for this event in MIDI ticks.
- *
+ *
* @param tick the timestamp
*/
public void setTick(long tick)
{
this.tick = tick;
}
-
+
/**
* Get the timestamp for this event in MIDI ticks.
- *
+ *
* @return the timestamp for this even in MIDI ticks
*/
public long getTick()
diff --git a/libjava/classpath/javax/sound/midi/MidiFileFormat.java b/libjava/classpath/javax/sound/midi/MidiFileFormat.java
index 79fa9fe..73744523d 100644
--- a/libjava/classpath/javax/sound/midi/MidiFileFormat.java
+++ b/libjava/classpath/javax/sound/midi/MidiFileFormat.java
@@ -40,7 +40,7 @@ package javax.sound.midi;
/**
* Describe a MIDI file, including specifics about its type, length and timing.
- *
+ *
* @author Anthony Green (green@redhat.com)
* @since 1.3
*
@@ -48,44 +48,44 @@ package javax.sound.midi;
public class MidiFileFormat
{
/**
- * The MIDI file type. This is either 0, 1 or 2.
- *
+ * The MIDI file type. This is either 0, 1 or 2.
+ *
* Type 0 files contain a single track and represents a single song
* performance.
* Type 1 may contain multiple tracks for a single song performance.
* Type 2 may contain multiple tracks, each representing a
* separate song performance.
- *
+ *
* See http://en.wikipedia.org/wiki/MIDI#MIDI_file_formats for more
* information.
*/
protected int type;
/**
- * The division type of the MIDI file.
+ * The division type of the MIDI file.
*/
protected float divisionType;
-
+
/**
* The timing resolution of the MIDI file.
*/
protected int resolution;
-
+
/**
- * The size of the MIDI file in bytes.
+ * The size of the MIDI file in bytes.
*/
protected int byteLength = UNKNOWN_LENGTH;
-
+
/**
- * The length of the MIDI file in microseconds.
+ * The length of the MIDI file in microseconds.
*/
protected long microsecondLength = UNKNOWN_LENGTH;
-
+
/**
* A special value indicating an unknown quantity.
*/
public static final int UNKNOWN_LENGTH = -1; // FIXME is this really -1?
-
+
/**
* Create a MidiFileFormat object from the given parameters.
*
@@ -95,8 +95,8 @@ public class MidiFileFormat
* @param bytes the MIDI file size in bytes
* @param microseconds the MIDI file length in microseconds
*/
- public MidiFileFormat(int type, float divisionType,
- int resolution, int bytes, long microseconds)
+ public MidiFileFormat(int type, float divisionType,
+ int resolution, int bytes, long microseconds)
{
this.type = type;
this.divisionType = divisionType;
@@ -104,41 +104,41 @@ public class MidiFileFormat
this.byteLength = bytes;
this.microsecondLength = microseconds;
}
-
+
/**
* Get the MIDI file type (0, 1, or 2).
- *
+ *
* @return the MIDI file type (0, 1, or 2)
*/
public int getType()
{
return type;
}
-
+
/**
* Get the file division type.
- *
+ *
* @return the file divison type
*/
public float getDivisionType()
{
- return divisionType;
+ return divisionType;
}
-
+
/**
* Get the file timing resolution. If the division type is PPQ, then this
* is value represents ticks per beat, otherwise it's ticks per frame (SMPTE).
- *
+ *
* @return the timing resolution in ticks per beat or ticks per frame
*/
public int getResolution()
{
return resolution;
}
-
+
/**
* Get the file length in bytes.
- *
+ *
* @return the file length in bytes or UNKNOWN_LENGTH
*/
public int getByteLength()
@@ -148,7 +148,7 @@ public class MidiFileFormat
/**
* Get the file length in microseconds.
- *
+ *
* @return the file length in microseconds or UNKNOWN_LENGTH
*/
public long getMicrosecondLength()
diff --git a/libjava/classpath/javax/sound/midi/MidiMessage.java b/libjava/classpath/javax/sound/midi/MidiMessage.java
index e265b5e..8066151 100644
--- a/libjava/classpath/javax/sound/midi/MidiMessage.java
+++ b/libjava/classpath/javax/sound/midi/MidiMessage.java
@@ -40,7 +40,7 @@ package javax.sound.midi;
/**
* The base class for all MIDI messages.
- *
+ *
* @author Anthony Green (green@redhat.com)
* @since 1.3
*
@@ -51,15 +51,15 @@ public abstract class MidiMessage implements Cloneable
* MIDI message data.
*/
protected byte data[];
-
+
/**
* The total length of the MIDI message.
*/
protected int length;
-
+
/**
* MidiMessage contructor.
- *
+ *
* @param data a valid MIDI message
*/
protected MidiMessage(byte[] data)
@@ -67,59 +67,59 @@ public abstract class MidiMessage implements Cloneable
this.data = data;
this.length = data.length;
}
-
+
/**
* Set the complete MIDI message.
- *
+ *
* @param data The complete MIDI message.
* @param length The length of the MIDI message.
* @throws InvalidMidiDataException Thrown when the MIDI message is invalid.
*/
- protected void setMessage(byte[] data, int length)
+ protected void setMessage(byte[] data, int length)
throws InvalidMidiDataException
{
this.data = new byte[length];
System.arraycopy(data, 0, this.data, 0, length);
this.length = length;
}
-
+
/**
* Get the MIDI message data.
- *
+ *
* @return an array containing the MIDI message data
*/
public byte[] getMessage()
{
byte copy[] = new byte[length];
System.arraycopy(data, 0, copy, 0, length);
- return copy;
+ return copy;
}
-
+
/**
* Get the status byte of the MIDI message (as an int)
- *
+ *
* @return the status byte of the MIDI message (as an int), or zero if the message length is zero.
*/
public int getStatus()
{
if (length > 0)
return (data[0] & 0xff);
- else
+ else
return 0;
}
-
+
/**
* Get the length of the MIDI message.
- *
+ *
* @return the length of the MIDI messsage
*/
public int getLength()
{
return length;
}
-
+
/* Create a clone of this object.
- *
+ *
* @see java.lang.Object#clone()
*/
public abstract Object clone();
diff --git a/libjava/classpath/javax/sound/midi/MidiSystem.java b/libjava/classpath/javax/sound/midi/MidiSystem.java
index 627dd95..b273b98 100644
--- a/libjava/classpath/javax/sound/midi/MidiSystem.java
+++ b/libjava/classpath/javax/sound/midi/MidiSystem.java
@@ -55,9 +55,9 @@ import javax.sound.midi.spi.MidiFileWriter;
import javax.sound.midi.spi.SoundbankReader;
/**
- * MidiSystem provides access to the computer system's MIDI resources,
+ * MidiSystem provides access to the computer system's MIDI resources,
* as well as utility routines for reading MIDI files and more.
- *
+ *
* @author Anthony Green (green@redhat.com)
* @since 1.3
*
@@ -71,15 +71,15 @@ public class MidiSystem
/**
* Get an array of all available MIDI devices.
- *
+ *
* @return a possibly empty array of all available MIDI devices
*/
public static MidiDevice.Info[] getMidiDeviceInfo()
{
- Iterator deviceProviders =
- ServiceFactory.lookupProviders(MidiDeviceProvider.class);
+ Iterator deviceProviders =
+ ServiceFactory.lookupProviders(MidiDeviceProvider.class);
List infoList = new ArrayList();
-
+
while (deviceProviders.hasNext())
{
MidiDeviceProvider provider = (MidiDeviceProvider) deviceProviders.next();
@@ -87,44 +87,44 @@ public class MidiSystem
for (int i = infos.length; i > 0; )
infoList.add(infos[--i]);
}
-
- return (MidiDevice.Info[])
- infoList.toArray(new MidiDevice.Info[infoList.size()]);
+
+ return (MidiDevice.Info[])
+ infoList.toArray(new MidiDevice.Info[infoList.size()]);
}
-
+
/**
* Get the specified MIDI device.
- *
+ *
* @param info a description of the device we're looking for
* @return the requested MIDI device
* @throws MidiUnavailableException if no MIDI devices are configured or found
* @throws IllegalArgumentException if the device described by info is not found
*/
- public static MidiDevice getMidiDevice(MidiDevice.Info info)
+ public static MidiDevice getMidiDevice(MidiDevice.Info info)
throws MidiUnavailableException
{
- Iterator deviceProviders =
- ServiceFactory.lookupProviders(MidiDeviceProvider.class);
-
+ Iterator deviceProviders =
+ ServiceFactory.lookupProviders(MidiDeviceProvider.class);
+
if (! deviceProviders.hasNext())
throw new MidiUnavailableException("No MIDI device providers available.");
-
+
do
{
- MidiDeviceProvider provider =
+ MidiDeviceProvider provider =
(MidiDeviceProvider) deviceProviders.next();
if (provider.isDeviceSupported(info))
return provider.getDevice(info);
} while (deviceProviders.hasNext());
-
- throw new IllegalArgumentException("MIDI device "
- + info + " not available.");
+
+ throw new IllegalArgumentException("MIDI device "
+ + info + " not available.");
}
-
+
/**
* Get the default Receiver instance. This just picks the first one
* it finds for now.
- *
+ *
* @return the default Receiver instance
* @throws MidiUnavailableException if no Receiver is found
*/
@@ -145,7 +145,7 @@ public class MidiSystem
/**
* Get the default Transmitter instance. This just picks the first one
* it finds for now.
- *
+ *
* @return the default Transmitter instance
* @throws MidiUnavailableException if no Transmitter is found
*/
@@ -166,7 +166,7 @@ public class MidiSystem
/**
* Get the default Synthesizer instance. This just picks the first one
* it finds for now.
- *
+ *
* @return the default Synthesizer instance
* @throws MidiUnavailableException if no Synthesizer is found
*/
@@ -183,11 +183,11 @@ public class MidiSystem
}
throw new MidiUnavailableException("No Synthesizer device available");
}
-
+
/**
* Get the default Sequencer instance. This just picks the first one
* it finds for now.
- *
+ *
* @return the default Sequencer instance
* @throws MidiUnavailableException if no Sequencer is found
*/
@@ -203,11 +203,11 @@ public class MidiSystem
return (Sequencer) device;
}
throw new MidiUnavailableException("No Sequencer device available");
- }
-
+ }
+
/**
* Read a Soundbank object from the given stream.
- *
+ *
* @param stream the stream from which to read the Soundbank
* @return the Soundbank object
* @throws InvalidMidiDataException if we were unable to read the soundbank
@@ -229,7 +229,7 @@ public class MidiSystem
/**
* Read a Soundbank object from the given url.
- *
+ *
* @param url the url from which to read the Soundbank
* @return the Soundbank object
* @throws InvalidMidiDataException if we were unable to read the soundbank
@@ -251,7 +251,7 @@ public class MidiSystem
/**
* Read a Soundbank object from the given file.
- *
+ *
* @param file the file from which to read the Soundbank
* @return the Soundbank object
* @throws InvalidMidiDataException if we were unable to read the soundbank
@@ -268,13 +268,13 @@ public class MidiSystem
if (sb != null)
return sb;
}
- throw new InvalidMidiDataException("Cannot read soundbank from file "
- + file);
- }
+ throw new InvalidMidiDataException("Cannot read soundbank from file "
+ + file);
+ }
/**
* Read a MidiFileFormat object from the given stream.
- *
+ *
* @param stream the stream from which to read the MidiFileFormat
* @return the MidiFileFormat object
* @throws InvalidMidiDataException if we were unable to read the MidiFileFormat
@@ -296,7 +296,7 @@ public class MidiSystem
/**
* Read a MidiFileFormat object from the given url.
- *
+ *
* @param url the url from which to read the MidiFileFormat
* @return the MidiFileFormat object
* @throws InvalidMidiDataException if we were unable to read the MidiFileFormat
@@ -318,7 +318,7 @@ public class MidiSystem
/**
* Read a MidiFileFormat object from the given file.
- *
+ *
* @param file the file from which to read the MidiFileFormat
* @return the MidiFileFormat object
* @throws InvalidMidiDataException if we were unable to read the MidiFileFormat
@@ -335,13 +335,13 @@ public class MidiSystem
if (sb != null)
return sb;
}
- throw new InvalidMidiDataException("Can't read MidiFileFormat from file "
+ throw new InvalidMidiDataException("Can't read MidiFileFormat from file "
+ file);
- }
-
+ }
+
/**
* Read a Sequence object from the given stream.
- *
+ *
* @param stream the stream from which to read the Sequence
* @return the Sequence object
* @throws InvalidMidiDataException if we were unable to read the Sequence
@@ -363,7 +363,7 @@ public class MidiSystem
/**
* Read a Sequence object from the given url.
- *
+ *
* @param url the url from which to read the Sequence
* @return the Sequence object
* @throws InvalidMidiDataException if we were unable to read the Sequence
@@ -385,7 +385,7 @@ public class MidiSystem
/**
* Read a Sequence object from the given file.
- *
+ *
* @param file the file from which to read the Sequence
* @return the Sequence object
* @throws InvalidMidiDataException if we were unable to read the Sequence
@@ -402,13 +402,13 @@ public class MidiSystem
if (sq != null)
return sq;
}
- throw new InvalidMidiDataException("Can't read Sequence from file "
+ throw new InvalidMidiDataException("Can't read Sequence from file "
+ file);
- }
-
+ }
+
/**
* Return an array of supported MIDI file types on this system.
- *
+ *
* @return the array of supported MIDI file types
*/
public static int[] getMidiFileTypes()
@@ -443,7 +443,7 @@ public class MidiSystem
/**
* Return true if the system supports writing files of type fileType.
- *
+ *
* @param fileType the MIDI file type we want to write
* @return true if we can write fileType files, false otherwise
*/
@@ -453,17 +453,17 @@ public class MidiSystem
while (writers.hasNext())
{
MidiFileWriter fw = (MidiFileWriter) writers.next();
-
+
if (fw.isFileTypeSupported(fileType))
return true;
}
return false;
}
-
+
/**
* Return an array of supported MIDI file types on this system
* for the given sequnce.
- *
+ *
* @param sequence the sequnce to write
* @return the array of supported MIDI file types
*/
@@ -496,11 +496,11 @@ public class MidiSystem
}
return result;
}
-
+
/**
* Return true if the system supports writing files of type fileType
* for the given sequence.
- *
+ *
* @param fileType the MIDI file type we want to write
* @param sequence the Sequence we want to write
* @return true if we can write fileType files for sequence, false otherwise
@@ -511,7 +511,7 @@ public class MidiSystem
while (writers.hasNext())
{
MidiFileWriter fw = (MidiFileWriter) writers.next();
-
+
if (fw.isFileTypeSupported(fileType, sequence))
return true;
}
@@ -520,7 +520,7 @@ public class MidiSystem
/**
* Write a sequence to an output stream using a specific MIDI file format.
- *
+ *
* @param in the sequence to write
* @param fileType the MIDI file format to use
* @param out the output stream to write to
@@ -535,17 +535,17 @@ public class MidiSystem
while (writers.hasNext())
{
MidiFileWriter fw = (MidiFileWriter) writers.next();
-
+
if (fw.isFileTypeSupported(fileType, in))
return fw.write(in, fileType, out);
}
- throw new IllegalArgumentException("File type "
- + fileType + " is not supported");
+ throw new IllegalArgumentException("File type "
+ + fileType + " is not supported");
}
/**
* Write a sequence to a file using a specific MIDI file format.
- *
+ *
* @param in the sequence to write
* @param fileType the MIDI file format to use
* @param out the file to write to
@@ -560,12 +560,11 @@ public class MidiSystem
while (writers.hasNext())
{
MidiFileWriter fw = (MidiFileWriter) writers.next();
-
+
if (fw.isFileTypeSupported(fileType, in))
return fw.write(in, fileType, out);
}
- throw new IllegalArgumentException("File type "
- + fileType + " is not supported");
+ throw new IllegalArgumentException("File type "
+ + fileType + " is not supported");
}
}
-
diff --git a/libjava/classpath/javax/sound/midi/MidiUnavailableException.java b/libjava/classpath/javax/sound/midi/MidiUnavailableException.java
index a992c16..5403e42 100644
--- a/libjava/classpath/javax/sound/midi/MidiUnavailableException.java
+++ b/libjava/classpath/javax/sound/midi/MidiUnavailableException.java
@@ -40,7 +40,7 @@ package javax.sound.midi;
/**
* This exception is thrown when MIDI resources are not available.
- *
+ *
* @author Anthony Green (green@redhat.com)
* @since 1.3
*
@@ -48,7 +48,7 @@ package javax.sound.midi;
public class MidiUnavailableException extends Exception
{
private static final long serialVersionUID = 6093809578628944323L;
-
+
/**
* Create a MidiUnavailableException.
*/
@@ -59,7 +59,7 @@ public class MidiUnavailableException extends Exception
/**
* Create an MidiUnavailableException object.
- *
+ *
* @param s the exception message string
*/
public MidiUnavailableException(String s)
diff --git a/libjava/classpath/javax/sound/midi/Patch.java b/libjava/classpath/javax/sound/midi/Patch.java
index eb9d8bc..75e347f 100644
--- a/libjava/classpath/javax/sound/midi/Patch.java
+++ b/libjava/classpath/javax/sound/midi/Patch.java
@@ -40,7 +40,7 @@ package javax.sound.midi;
/**
* A Patch describes where an Instrument is loaded on a Synthesizer.
- *
+ *
* @author Anthony Green (green@redhat.com)
* @since 1.3
*
@@ -50,11 +50,11 @@ public class Patch
// Private data describing the patch
private int bank = 0;
private int program = 0;
-
+
/**
* Create a Patch object, specifying the bank and program in which this Patch
* is located.
- *
+ *
* @param bank the bank in which this Patch is located
* @param program the program in which this Patch is located
*/
@@ -63,20 +63,20 @@ public class Patch
this.bank = bank;
this.program = program;
}
-
+
/**
* Get the bank in which this Patch is located.
- *
+ *
* @return the bank in which this Patch is located
*/
public int getBank()
{
return bank;
}
-
+
/**
* Get the program in which this Patch is located.
- *
+ *
* @return the program in which this Patch is located
*/
public int getProgram()
diff --git a/libjava/classpath/javax/sound/midi/Receiver.java b/libjava/classpath/javax/sound/midi/Receiver.java
index 0e70b28..bc660d0 100644
--- a/libjava/classpath/javax/sound/midi/Receiver.java
+++ b/libjava/classpath/javax/sound/midi/Receiver.java
@@ -41,7 +41,7 @@ package javax.sound.midi;
/**
* This interface describes the methods required by objects receiving MIDI
* messages.
- *
+ *
* @author Anthony Green (green@redhat.com)
* @since 1.3
*
@@ -51,14 +51,14 @@ public interface Receiver
/**
* Send a MIDI message and timestamp. Some receivers don't support
* timestamps, in which case timeStamp should be -1.
- *
+ *
* @param message the MIDI message to send
* @param timeStamp time timestamp for this message in microseconds (or -1)
* @throws IllegalStateException if the receiver is closed
*/
public void send(MidiMessage message, long timeStamp)
throws IllegalStateException;
-
+
/**
* Close this receiver, possibly freeing system resources.
*/
diff --git a/libjava/classpath/javax/sound/midi/Sequence.java b/libjava/classpath/javax/sound/midi/Sequence.java
index 2ea201c..833150a 100644
--- a/libjava/classpath/javax/sound/midi/Sequence.java
+++ b/libjava/classpath/javax/sound/midi/Sequence.java
@@ -42,9 +42,9 @@ import java.util.Iterator;
import java.util.Vector;
/**
- * Objects of this type represent sequences of MIDI messages that can be
+ * Objects of this type represent sequences of MIDI messages that can be
* played back by a Sequencer.
- *
+ *
* @author Anthony Green (green@redhat.com)
* @since 1.3
*
@@ -52,69 +52,69 @@ import java.util.Vector;
public class Sequence
{
/**
- * The timing division type for this sequence (PPQ or SMPTE*)
+ * The timing division type for this sequence (PPQ or SMPTE*)
*/
protected float divisionType;
-
+
/**
- * The timing resolution in ticks/beat or ticks/frame, depending on the
- * division type.
+ * The timing resolution in ticks/beat or ticks/frame, depending on the
+ * division type.
*/
protected int resolution;
-
+
/**
- * The MIDI tracks used by this sequence.
+ * The MIDI tracks used by this sequence.
*/
protected Vector<Track> tracks;
-
+
/**
* Tempo-based timing. Resolution is specified in ticks per beat.
*/
public static final float PPQ = 0.0f;
-
+
/**
* 24 frames/second timing. Resolution is specific in ticks per frame.
*/
public static final float SMPTE_24 = 24.0f;
-
+
/**
* 25 frames/second timing. Resolution is specific in ticks per frame.
*/
public static final float SMPTE_25 = 25.0f;
-
+
/**
* 30 frames/second timing. Resolution is specific in ticks per frame.
*/
public static final float SMPTE_30 = 30.0f;
-
+
/**
* 29.97 frames/second timing. Resolution is specific in ticks per frame.
*/
public static final float SMPTE_30DROP = 29.97f;
-
+
// Private helper class
private void init(float divisionType, int resolution, int numTracks)
throws InvalidMidiDataException
{
if (divisionType != PPQ
- && divisionType != SMPTE_24
+ && divisionType != SMPTE_24
&& divisionType != SMPTE_25
&& divisionType != SMPTE_30
&& divisionType != SMPTE_30DROP)
- throw new InvalidMidiDataException("Invalid division type ("
+ throw new InvalidMidiDataException("Invalid division type ("
+ divisionType + ")");
this.divisionType = divisionType;
this.resolution = resolution;
-
+
tracks = new Vector<Track>(numTracks);
while (numTracks > 0)
tracks.set(--numTracks, new Track());
}
-
+
/**
* Create a MIDI sequence object with no initial tracks.
- *
+ *
* @param divisionType the division type (must be one of PPQ or SMPTE_*)
* @param resolution the timing resolution
* @throws InvalidMidiDataException if the division type is invalid
@@ -127,7 +127,7 @@ public class Sequence
/**
* Create a MIDI seqence object.
- *
+ *
* @param divisionType the division type (must be one of PPQ or SMPTE_*)
* @param resolution the timing resolution
* @param numTracks the number of initial tracks
@@ -138,30 +138,30 @@ public class Sequence
{
init(divisionType, resolution, 0);
}
-
+
/**
* The division type of this sequence.
- *
+ *
* @return division type of this sequence
*/
public float getDivisionType()
{
return divisionType;
}
-
+
/**
* The timing resolution for this sequence, relative to the division type.
- *
+ *
* @return the timing resolution for this sequence
*/
public int getResolution()
{
return resolution;
}
-
+
/**
* Create a new empty MIDI track and add it to this sequence.
- *
+ *
* @return the newly create MIDI track
*/
public Track createTrack()
@@ -170,10 +170,10 @@ public class Sequence
tracks.add(track);
return track;
}
-
+
/**
* Remove the specified MIDI track from this sequence.
- *
+ *
* @param track the track to remove
* @return true if track was removed and false othewise
*/
@@ -181,33 +181,33 @@ public class Sequence
{
return tracks.remove(track);
}
-
+
/**
* Get an array of MIDI tracks used in this sequence.
- *
+ *
* @return a possibly empty array of tracks
*/
public Track[] getTracks()
{
return tracks.toArray(new Track[tracks.size()]);
}
-
+
/**
* The length of this sequence in microseconds.
- *
+ *
* @return the length of this sequence in microseconds
*/
public long getMicrosecondLength()
{
long tickLength = getTickLength();
-
+
if (divisionType == PPQ)
{
// FIXME
// How can this possible be computed? PPQ is pulses per quarter-note,
// which is dependent on the tempo of the Sequencer.
- throw new
- UnsupportedOperationException("Can't compute PPQ based lengths yet");
+ throw new
+ UnsupportedOperationException("Can't compute PPQ based lengths yet");
}
else
{
@@ -215,10 +215,10 @@ public class Sequence
return (long) ((tickLength * 1000000) / (divisionType * resolution));
}
}
-
+
/**
* The length of this sequence in MIDI ticks.
- *
+ *
* @return the length of this sequence in MIDI ticks
*/
public long getTickLength()
@@ -234,15 +234,15 @@ public class Sequence
}
return length;
}
-
+
/**
* Get an array of patches used in this sequence.
- *
+ *
* @return an array of patches used in this sequence
*/
public Patch[] getPatchList()
{
- // FIXE: not quite sure how to do this yet.
+ // FIXE: not quite sure how to do this yet.
throw new UnsupportedOperationException("Can't get patch list yet");
}
}
diff --git a/libjava/classpath/javax/sound/midi/Sequencer.java b/libjava/classpath/javax/sound/midi/Sequencer.java
index 24ee250..ca9cad7 100644
--- a/libjava/classpath/javax/sound/midi/Sequencer.java
+++ b/libjava/classpath/javax/sound/midi/Sequencer.java
@@ -45,7 +45,7 @@ import java.io.InputStream;
* A Sequencer object plays MIDI sequences described as Sequence objects.
* This class provides methods for loading and unloading sequences, as well
* as basic transport controls.
- *
+ *
* @author Anthony Green (green@redhat.com)
* @since 1.3
*
@@ -54,46 +54,46 @@ public interface Sequencer extends MidiDevice
{
/**
* Set the Sequence object for this sequencer.
- *
+ *
* @param seq the Sequence to process
* @throws InvalidMidiDataException if the sequence is invalid for any reason
*/
public void setSequence(Sequence seq) throws InvalidMidiDataException;
-
+
/**
* Set the sequence for this sequencer. istream reads on a valid MIDI file.
- *
+ *
* @param istream an input stream for a valid MIDI file
* @throws IOException if an I/O exception happens
* @throws InvalidMidiDataException if the MIDI file contains bad data
*/
- public void setSequence(InputStream istream)
+ public void setSequence(InputStream istream)
throws IOException, InvalidMidiDataException;
-
+
/**
* Get the current sequence object for this sequencer.
- *
+ *
* @return the current sequence object. May be null.
*/
public Sequence getSequence();
-
+
/**
* Start playback of the current sequence.
*/
public void start();
-
+
/**
* Stop playback of the current sequence.
*/
public void stop();
-
+
/**
* Returns true if the sequence is playing.
- *
+ *
* @return true if the sequence is playing and false otherwise
*/
public boolean isRunning();
-
+
/**
* Start playback and record of MIDI events.
* Any tracks enabled for recording will have their events replaced.
@@ -101,114 +101,114 @@ public interface Sequencer extends MidiDevice
* will be sent to the sequencer's transmitter.
*/
public void startRecording();
-
+
/**
* Stop recording, although continue playing.
*/
public void stopRecording();
-
+
/**
* Returns true if sequence is recording.
- *
+ *
* @return true if the sequence is recording and false otherwise
*/
public boolean isRecording();
-
+
/**
* Enable recording for a specific track using data from a specific channel.
- *
- * @param track the track to enable for recording
+ *
+ * @param track the track to enable for recording
* @param channel the channel from which to record
*/
public void recordEnable(Track track, int channel);
-
+
/**
* Disable recording for a specific track.
- *
+ *
* @param track the track to disable recording for
*/
public void recordDisable(Track track);
-
+
/**
* Get the current tempo in beats per minute.
- *
+ *
* @return the current tempo in beats per minute
*/
public float getTempoInBPM();
-
+
/**
* Sets the current tempo in beats per minute.
- *
+ *
* @param bpm the new tempo in bears per minutes
*/
public void setTempoInBPM(float bpm);
-
+
/**
* Get the current tempo in microseconds per quarter note.
- *
+ *
* @return the current tempo in microseconds per quarter note.
*/
public float getTempoInMPQ();
-
+
/**
* Sets the current tempo in microseconds per quarter note.
- *
+ *
* @param mpq the new tempo in microseconds per quarter note.
*/
public void setTempoInMPQ(float mpq);
-
+
/**
* Set a scaling factor for the playback tempo, which is 1.0 by default.
- *
+ *
* @param factor the new tempo scaling factor
*/
public void setTempoFactor(float factor);
-
+
/**
* Get the current scaling factor for the playback tempo.
- *
- * @return the current tempo scaling factor
+ *
+ * @return the current tempo scaling factor
*/
public float getTempoFactor();
-
+
/**
* Get the length of the current sequence in MIDI ticks.
- *
+ *
* @return the length of the current sequence in MIDI ticks
*/
public long getTickLength();
-
+
/**
* Get the current playback position of the sequencer in MIDI ticks.
- *
+ *
* @return the current playback position of the sequencer in MIDI ticks
*/
public long getTickPosition();
-
+
/**
* Set the current playback position of the sequencer in MIDI ticks.
- *
+ *
* @param tick the new playback position of the sequencer in MIDI ticks
*/
public void setTickPosition(long tick);
/**
* Get the length of the current sequence in microseconds.
- *
+ *
* @return the length of the current sequence in microseconds
*/
public long getMicrosecondLength();
-
+
/**
* Get the current playback position of the sequencer in microseconds.
- *
+ *
* @return the current playback position of the sequencer in microseconds
*/
public long getMicrosecondPosition();
-
+
/**
* Set the current playback position of the sequencer in microseconds.
- *
+ *
* @param microsecond the new playback position of the sequencer in microseconds
*/
public void setMicrosecondPosition(long microsecond);
@@ -217,125 +217,125 @@ public interface Sequencer extends MidiDevice
* Set the source of timing information. sync must be found in the array
* returned by getMasterSyncModes().
* FIXME: What happens if it isn't?
- *
+ *
* @param sync the new source of timing information
*/
public void setMasterSyncMode(SyncMode sync);
-
+
/**
* Get the source of timing information.
- *
+ *
* @return the current source of timing information
*/
public SyncMode getMasterSyncMode();
-
+
/**
* Get an array of timing sources supported by this sequencer.
- *
+ *
* @return an array of timing sources supported by this sequencer
*/
public SyncMode[] getMasterSyncModes();
-
+
/**
* Set the slave synchronization mode for this sequencer. sync must be
* found in the array returned by getSlaveSyncModes().
* FIXME: What happens if it isn't?
- *
+ *
* @param sync the new slave sync mode for this sequencer
*/
public void setSlaveSyncMode(SyncMode sync);
-
+
/**
* Get the current slave synchronization mode.
- *
+ *
* @return the current slave synchronization mode
*/
public SyncMode getSlaveSyncMode();
-
+
/**
* Get an array of slave sync modes supported by this sequencer.
- *
+ *
* @return an array of slave sync modes supported by this sequencer
*/
public SyncMode[] getSlaveSyncModes();
-
+
/**
* Sets the mute state for a specific track.
- *
+ *
* @param track the track to modify
* @param mute the new mute state
*/
public void setTrackMute(int track, boolean mute);
-
+
/**
* Get the mute state of a specific track.
- *
+ *
* @param track the track to query
* @return the mute state for track
*/
public boolean getTrackMute(int track);
-
+
/**
* Sets the solo state for a specific track.
- *
+ *
* @param track the track to modify
* @param solo the new solo state
*/
public void setTrackSolo(int track, boolean solo);
-
+
/**
* Get the solo state for a specific track.
- *
+ *
* @param track the track to query
* @return the solo state for track
*/
public boolean getTrackSolo(int track);
-
+
/**
* Add a meta event listening object to this sequencer. It will receive
* notification whenever the sequencer processes a meta event.
* A listener may fail to get added if this sequencer doesn't support
* meta events.
- *
+ *
* @param listener the listener to add
* @return true if listener was added, false othewise
*/
public boolean addMetaEventListener(MetaEventListener listener);
-
+
/**
* Remove a meta event listener from this sequencer.
- *
+ *
* @param listener the listener to remove
*/
public void removeMetaEventListener(MetaEventListener listener);
-
+
/**
- * Add a controller event listening object to this sequencer. It will
- * receive notification whenever the sequencer processes a controller
+ * Add a controller event listening object to this sequencer. It will
+ * receive notification whenever the sequencer processes a controller
* event for a specified controller number..
- *
+ *
* @param listener the listener to add
* @param controllers the conroller numbers to listen to
* @return the controller numbers being listened to
*/
- public int[] addControllerEventListener(ControllerEventListener listener,
+ public int[] addControllerEventListener(ControllerEventListener listener,
int controllers[]);
-
+
/**
* Remove a controller listener from this sequencer for the specified
* controller numbers.
- *
+ *
* @param listener the listener to remove
* @param controllers the controllers to unlisten
* @return the controller numbers being unlistened
*/
public int[] removeControllerEventListener(ControllerEventListener listener,
int controllers[]);
-
+
/**
* A SyncMode object represents the mechanism by which a MIDI sequencer
* synchronizes time with a master or slave device.
- *
+ *
* @author green@redhat.com
*
*/
@@ -345,18 +345,18 @@ public interface Sequencer extends MidiDevice
* A master sync mode indicating the use of an internal sequencer clock.
*/
public static final SyncMode INTERNAL_CLOCK = new SyncMode("Internal Clock");
-
+
/**
* A master or slave sync mode indicating the use of MIDI clock messages.
*/
public static final SyncMode MIDI_SYNC = new SyncMode("MIDI Sync");
-
+
/**
- * A master or slave sync mode indicating the use of MIDI Time Code
+ * A master or slave sync mode indicating the use of MIDI Time Code
* messages.
*/
public static final SyncMode MIDI_TIME_CODE = new SyncMode("MIDI Time Code");
-
+
/**
* A slave sync mode indicating that no timing info will be transmitted.
*/
@@ -364,7 +364,7 @@ public interface Sequencer extends MidiDevice
// The name
private String name;
-
+
/**
* Create a new SyncMode object
* @param name the SyncMode name
@@ -373,7 +373,7 @@ public interface Sequencer extends MidiDevice
{
this.name = name;
}
-
+
/**
* SyncMode objects are only equal when identical.
*/
@@ -381,7 +381,7 @@ public interface Sequencer extends MidiDevice
{
return super.equals(o);
}
-
+
/**
* SyncMode objects use the Object hashCode.
*/
@@ -389,7 +389,7 @@ public interface Sequencer extends MidiDevice
{
return super.hashCode();
}
-
+
/**
* Use the SyncMode name as the string representation.
* @see java.lang.Object#toString()
diff --git a/libjava/classpath/javax/sound/midi/ShortMessage.java b/libjava/classpath/javax/sound/midi/ShortMessage.java
index ef01d11..08b8737 100644
--- a/libjava/classpath/javax/sound/midi/ShortMessage.java
+++ b/libjava/classpath/javax/sound/midi/ShortMessage.java
@@ -40,7 +40,7 @@ package javax.sound.midi;
/**
* A short MIDI message that is no longer than 3 bytes long.
- *
+ *
* @author Anthony Green (green@redhat.com)
* @since 1.3
*
@@ -51,91 +51,91 @@ public class ShortMessage extends MidiMessage
* Status byte for Time Code message.
*/
public static final int MIDI_TIME_CODE = 0xF1;
-
+
/**
- * Status byte for Song Position Pointer message.
+ * Status byte for Song Position Pointer message.
*/
public static final int SONG_POSITION_POINTER = 0xF2;
-
+
/**
* Status byte for Song Select message.
*/
public static final int SONG_SELECT = 0xF3;
-
+
/**
- * Status byte for Tune Request message.
+ * Status byte for Tune Request message.
*/
public static final int TUNE_REQUEST = 0xF6;
-
+
/**
* Status byte for End Of Exclusive message.
*/
public static final int END_OF_EXCLUSIVE = 0xF7;
-
+
/**
- * Status byte for Timing Clock message.
+ * Status byte for Timing Clock message.
*/
public static final int TIMING_CLOCK = 0xF8;
-
+
/**
- * Status byte for Start message.
+ * Status byte for Start message.
*/
public static final int START = 0xFA;
-
+
/**
- * Status byte for Continue message.
+ * Status byte for Continue message.
*/
- public static final int CONTINUE = 0xFB;
-
+ public static final int CONTINUE = 0xFB;
+
/**
- * Status byte for Stop message.
+ * Status byte for Stop message.
*/
- public static final int STOP = 0xFC;
-
+ public static final int STOP = 0xFC;
+
/**
* Status byte for Active Sensing message.
*/
- public static final int ACTIVE_SENSING = 0xFE;
-
+ public static final int ACTIVE_SENSING = 0xFE;
+
/**
* Status byte for System Reset message.
*/
- public static final int SYSTEM_RESET = 0xFF;
-
+ public static final int SYSTEM_RESET = 0xFF;
+
/**
* Status nibble for Note Off message.
*/
- public static final int NOTE_OFF = 0x80;
-
+ public static final int NOTE_OFF = 0x80;
+
/**
* Status nibble for Note On message.
*/
- public static final int NOTE_ON = 0x90;
-
+ public static final int NOTE_ON = 0x90;
+
/**
* Status nibble for Poly Pressure message.
*/
- public static final int POLY_PRESSURE = 0xA0;
-
+ public static final int POLY_PRESSURE = 0xA0;
+
/**
* Status nibble for Control Change message.
*/
- public static final int CONTROL_CHANGE = 0xB0;
-
+ public static final int CONTROL_CHANGE = 0xB0;
+
/**
* Status nibble for Program Change message.
*/
- public static final int PROGRAM_CHANGE = 0xC0;
-
+ public static final int PROGRAM_CHANGE = 0xC0;
+
/**
* Statue nibble for Channel Pressure message.
*/
public static final int CHANNEL_PRESSURE = 0xD0;
-
+
/**
* Status nibble for Pitch Bend message.
*/
- public static final int PITCH_BEND = 0xE0;
+ public static final int PITCH_BEND = 0xE0;
// Create and initialize a default, arbitrary message.
private static byte[] defaultMessage;
@@ -144,25 +144,25 @@ public class ShortMessage extends MidiMessage
defaultMessage = new byte[1];
defaultMessage[0] = (byte) STOP;
}
-
+
/**
* Create a short MIDI message.
- *
+ *
* The spec requires that this represent a valid MIDI message, but doesn't
* specify what it should be. We've chosen the STOP message for our
* implementation.
*/
public ShortMessage()
{
- this(defaultMessage);
+ this(defaultMessage);
}
-
+
/**
* Create a short MIDI message.
- *
+ *
* The data argument should be a valid MIDI message. Unfortunately the spec
* does not allow us to throw an InvalidMidiDataException if data is invalid.
- *
+ *
* @param data the message data
*/
protected ShortMessage(byte[] data)
@@ -171,8 +171,8 @@ public class ShortMessage extends MidiMessage
}
/**
- * Set the MIDI message.
- *
+ * Set the MIDI message.
+ *
* @param status the status byte for this message
* @param data1 the first data byte for this message
* @param data2 the second data byte for this message
@@ -189,19 +189,19 @@ public class ShortMessage extends MidiMessage
if (length > 1)
{
if (data1 < 0 || data1 > 127)
- throw new InvalidMidiDataException("data1 (" + data1
+ throw new InvalidMidiDataException("data1 (" + data1
+ ") must be between 0 and 127.");
data[1] = (byte) data1;
if (length > 2)
{
if (data2 < 0 || data2 > 127)
- throw new InvalidMidiDataException("data2 (" + data2
+ throw new InvalidMidiDataException("data2 (" + data2
+ ") must be between 0 and 127.");
data[2] = (byte) data2;
}
}
}
-
+
public void setMessage(int command, int channel, int data1, int data2)
throws InvalidMidiDataException
{
@@ -209,10 +209,10 @@ public class ShortMessage extends MidiMessage
// It currently assumes command and channel are valid values.
setMessage(command + channel, data1, data2);
}
-
+
/**
* Set the MIDI message to one that requires no data bytes.
- *
+ *
* @param status the status byte for this message
* @throws InvalidMidiDataException if status is bad, or requires data
*/
@@ -227,10 +227,10 @@ public class ShortMessage extends MidiMessage
setMessage(status, 0, 0);
}
-
+
/**
* Return the number of data bytes needed for a given MIDI status byte.
- *
+ *
* @param status the status byte for a short MIDI message
* @return the number of data bytes needed for this status byte
* @throws InvalidMidiDataException if status is an invalid status byte
@@ -238,27 +238,27 @@ public class ShortMessage extends MidiMessage
protected final int getDataLength(int status) throws InvalidMidiDataException
{
int originalStatus = status;
-
+
if ((status & 0xF0) != 0xF0)
status &= 0xF0;
-
+
switch (status)
{
- case NOTE_OFF:
- case NOTE_ON:
- case POLY_PRESSURE:
- case CONTROL_CHANGE:
+ case NOTE_OFF:
+ case NOTE_ON:
+ case POLY_PRESSURE:
+ case CONTROL_CHANGE:
case PITCH_BEND:
case SONG_POSITION_POINTER:
return 2;
-
+
case PROGRAM_CHANGE:
case CHANNEL_PRESSURE:
case SONG_SELECT:
case 0xF5: // FIXME: unofficial bus select. Not in spec??
return 1;
-
- case TUNE_REQUEST:
+
+ case TUNE_REQUEST:
case END_OF_EXCLUSIVE:
case TIMING_CLOCK:
case START:
@@ -267,39 +267,39 @@ public class ShortMessage extends MidiMessage
case ACTIVE_SENSING:
case SYSTEM_RESET:
return 0;
-
+
default:
- throw new InvalidMidiDataException("Invalid status: 0x"
+ throw new InvalidMidiDataException("Invalid status: 0x"
+ Integer.toHexString(originalStatus));
}
}
-
+
/**
- * Get the channel information from this MIDI message, assuming it is a
+ * Get the channel information from this MIDI message, assuming it is a
* MIDI channel message.
- *
+ *
* @return the MIDI channel for this message
*/
public int getChannel()
{
return data[0] & 0x0F;
}
-
+
/**
* Get the command nibble from this MIDI message, assuming it is a MIDI
* channel message.
- *
+ *
* @return the MIDI command for this message
*/
public int getCommand()
{
return data[0] & 0xF0;
}
-
+
/**
- * Get the first data byte from this message, assuming it exists, and
+ * Get the first data byte from this message, assuming it exists, and
* zero otherwise.
- *
+ *
* @return the first data byte or zero if none exists.
*/
public int getData1()
@@ -309,11 +309,11 @@ public class ShortMessage extends MidiMessage
else
return 0;
}
-
+
/**
- * Get the second data byte from this message, assuming it exists, and
+ * Get the second data byte from this message, assuming it exists, and
* zero otherwise.
- *
+ *
* @return the second date byte or zero if none exists.
*/
public int getData2()
@@ -323,7 +323,7 @@ public class ShortMessage extends MidiMessage
else
return 0;
}
-
+
/* Create a deep-copy clone of this object.
* @see java.lang.Object#clone()
*/
diff --git a/libjava/classpath/javax/sound/midi/Soundbank.java b/libjava/classpath/javax/sound/midi/Soundbank.java
index 16d9d79..d959cf5 100644
--- a/libjava/classpath/javax/sound/midi/Soundbank.java
+++ b/libjava/classpath/javax/sound/midi/Soundbank.java
@@ -39,9 +39,9 @@ exception statement from your version. */
package javax.sound.midi;
/**
- * A Soundbank is a container for instruments which may be loaded into
+ * A Soundbank is a container for instruments which may be loaded into
* a Synthesizer.
- *
+ *
* @author Anthony Green (green@redhat.com)
* @since 1.3
*
@@ -50,50 +50,50 @@ public interface Soundbank
{
/**
* Get the sound bank name.
- *
+ *
* @return the sound bank name
*/
String getName();
-
+
/**
* Get the sound bank version.
- *
+ *
* @return the sound bank version
*/
String getVersion();
/**
* Get the sound bank vendor.
- *
+ *
* @return the sound bank vendor
*/
String getVendor();
-
-
+
+
/**
* Get the sound bank description.
- *
+ *
* @return the sound bank description
*/
String getDescription();
-
+
/**
* Get an array of non-Instrument resources in this sound bank.
- *
+ *
* @return an array of non-instrument resources in this sound bank
*/
SoundbankResource[] getResources();
-
+
/**
* Get an array of Instruments in this sound bank.
- *
+ *
* @return an array of instruments in this sound bank
*/
Instrument[] getInstruments();
-
+
/**
* Get the Instrument for the given Patch.
- *
+ *
* @param patch the Patch to search for
* @return the Instrument corresponding to patch
*/
diff --git a/libjava/classpath/javax/sound/midi/SoundbankResource.java b/libjava/classpath/javax/sound/midi/SoundbankResource.java
index 93f42e4..0b4675b 100644
--- a/libjava/classpath/javax/sound/midi/SoundbankResource.java
+++ b/libjava/classpath/javax/sound/midi/SoundbankResource.java
@@ -40,7 +40,7 @@ package javax.sound.midi;
/**
* SoundbankResource objects represent audio data stored in a sound bank.
- *
+ *
* @author Anthony Green (green@redhat.com)
* @since 1.3
*
@@ -50,54 +50,54 @@ public abstract class SoundbankResource
private final Soundbank soundbank;
private final String name;
private final Class dataClass;
-
+
/**
* Create a SoundbankResource object.
- *
+ *
* @param soundbank the soundbank object containing this resource
* @param name the name of the resource
* @param dataClass the class used to represent the audio data
*/
protected SoundbankResource(Soundbank soundbank, String name, Class<?> dataClass)
{
- this.soundbank = soundbank;
+ this.soundbank = soundbank;
this.name = name;
this.dataClass = dataClass;
}
-
+
/**
* Get the sound bank containing this resource.
- *
+ *
* @return the sound bank in which this resource resides
*/
public Soundbank getSoundbank()
{
return soundbank;
}
-
+
/**
* Get the name of this resource.
- *
+ *
* @return the name of this resource
*/
public String getName()
{
return name;
}
-
+
/**
* Get the class used to represent the audio data for this resource.
- *
+ *
* @return the class used to represent the audio data for this resource
*/
public Class<?> getDataClass()
{
return dataClass;
}
-
+
/**
* Get the audio data for this resource.
- *
+ *
* @return the audio data object for this resource
*/
public abstract Object getData();
diff --git a/libjava/classpath/javax/sound/midi/Synthesizer.java b/libjava/classpath/javax/sound/midi/Synthesizer.java
index 22e5e92..3a7ab3c 100644
--- a/libjava/classpath/javax/sound/midi/Synthesizer.java
+++ b/libjava/classpath/javax/sound/midi/Synthesizer.java
@@ -40,7 +40,7 @@ package javax.sound.midi;
/**
* Interface for MIDI audio synthesizer devices.
- *
+ *
* @author Anthony Green (green@redhat.com)
* @since 1.3
*
@@ -49,122 +49,122 @@ public interface Synthesizer extends MidiDevice
{
/**
* Get the maximum number of notes that the synth can play at once.
- *
+ *
* @return the maximum number of notes that the synth can play at once
*/
public int getMaxPolyphony();
-
+
/**
* The processing latency for this synth in microseconds.
- *
+ *
* @return the processing latency for this synth in microseconds
*/
public long getLatency();
-
+
/**
* Get the set of MIDI channels controlled by this synth.
- *
+ *
* @return an array of MIDI channels controlled by this synth
*/
public MidiChannel[] getChannels();
-
+
/**
* Get the current status for the voices produced by this synth.
- *
+ *
* @return an array of VoiceStatus objects, getMaxPolyphony() in length
*/
public VoiceStatus[] getVoiceStatus();
-
+
/**
* Returns true is this synth is capable of loading soundbank.
- *
+ *
* @param soundbank the Soundbank to examine
* @return true if soundbank can be loaded, false otherwise
*/
public boolean isSoundbankSupported(Soundbank soundbank);
-
+
/**
* Load an instrument into this synth. The instrument must be part of a
* supported soundbank.
- *
+ *
* @param instrument the Instrument to load
* @return true if the instrument was loaded and false otherwise
* @throws IllegalArgumentException if this synth doesn't support instrument
*/
public boolean loadInstrument(Instrument instrument);
-
+
/**
* Unload an instrument from this synth.
- *
+ *
* @param instrument the Instrument to unload
* @throws IllegalArgumentException if this synth doesn't support instrument
*/
public void unloadInstrument(Instrument instrument);
-
+
/**
* Move an intrument from one place to another. The instrument at the
* target location is unloaded.
- *
+ *
* @param from the instrument source
* @param to the instrument target
* @return if from was remapped
* @throws IllegalArgumentException
*/
public boolean remapInstrument(Instrument from, Instrument to);
-
+
/**
* Get the default Soundbank for this synth. Return null if there is no
* default.
- *
+ *
* @return the default Soundbank for this synth, possibly null.
*/
public Soundbank getDefaultSoundbank();
-
+
/**
* Get an array containing all instruments in this synthesizer.
- *
+ *
* @return an array containing all instruments in this synthesizer
*/
public Instrument[] getAvailableInstruments();
-
+
/**
* Get an array containing all instruments loaded in this synthesizer.
- *
+ *
* @return an array containing all instruments loaded in this synthesizer
*/
public Instrument[] getLoadedInstruments();
-
+
/**
* Load all soundbank instruments into this synthesizer.
- *
+ *
* @param soundbank the Soundbank from which to load instruments
* @return true if all instruments were loaded, false othewise
* @throws IllegalArgumentException if the soundbank isn't supported by this
*/
public boolean loadAllInstruments(Soundbank soundbank);
-
+
/**
* Unload all soundbank instruments from this synthesizer.
- *
+ *
* @param soundbank the Soundbank containing the instruments to unload
* @throws IllegalArgumentException if the soundbank isn't supported by this
*/
public void unloadAllInstruments(Soundbank soundbank);
-
+
/**
- * Load a subset of soundbank instruments into this synthesizer. The
+ * Load a subset of soundbank instruments into this synthesizer. The
* subset is defined by an array of Patch objects.
- *
+ *
* @param soundbank the Soundbank from which to load instruments
* @param patchList the array of patches identifying instruments to load
* @return true if instruments were loaded, false otherwise
* @throws IllegalArgumentException if the soundbank isn't supported by this
*/
public boolean loadInstruments(Soundbank soundbank, Patch[] patchList);
-
+
/**
* Unload a subset of soundbank instruments from this synthesizer.
- *
+ *
* @param soundbank the Soundbank containing the instruments to unload
* @param patchList the array of patches identifying instruments to unload
* @throws IllegalArgumentException if the soundbank isn't supported by this
diff --git a/libjava/classpath/javax/sound/midi/SysexMessage.java b/libjava/classpath/javax/sound/midi/SysexMessage.java
index 3744e2f..93e3b5d 100644
--- a/libjava/classpath/javax/sound/midi/SysexMessage.java
+++ b/libjava/classpath/javax/sound/midi/SysexMessage.java
@@ -40,7 +40,7 @@ package javax.sound.midi;
/**
* A system exclusive MIDI message.
- *
+ *
* @author Anthony Green (green@redhat.com)
* @since 1.3
*
@@ -48,14 +48,14 @@ package javax.sound.midi;
public class SysexMessage extends MidiMessage
{
public static final int SYSTEM_EXCLUSIVE = 0xF0;
-
+
public static final int SPECIAL_SYSTEM_EXCLUSIVE = 0xF7;
-
+
/**
* Create a default valid system exclusive message.
- *
+ *
* The official specs don't specify what message is to be
- * created. Our implementation creates an empty
+ * created. Our implementation creates an empty
* system exclusive message.
*/
public SysexMessage()
@@ -64,20 +64,20 @@ public class SysexMessage extends MidiMessage
data[0] = (byte) SYSTEM_EXCLUSIVE;
data[1] = (byte) ShortMessage.END_OF_EXCLUSIVE;
}
-
+
/**
* Create a SysexMessage object.
* @param data a complete system exclusive message
*/
protected SysexMessage(byte[] data)
{
- super(data);
+ super(data);
}
-
+
/**
* Set the sysex message. The first data byte (status) must be
* 0xF0 or 0xF7.
- *
+ *
* @param data the message data
* @param length the length of the message data
* @throws InvalidMidiDataException if the status byte is not 0xF0 or 0xF7
@@ -95,7 +95,7 @@ public class SysexMessage extends MidiMessage
/**
* Set the sysex message. status must be either 0xF0 or 0xF7.
- *
+ *
* @param status the sysex statys byte (0xF0 or 0xF7)
* @param data the message data
* @param length the length of the message data
@@ -114,7 +114,7 @@ public class SysexMessage extends MidiMessage
System.arraycopy(data, 0, this.data, 1, length);
this.length = length+1;
}
-
+
/**
* Get the data for this message, not including the status byte.
* @return the message data, not including the status byte
@@ -125,7 +125,7 @@ public class SysexMessage extends MidiMessage
System.arraycopy(data, 1, result, 0, length - 1);
return result;
}
-
+
/* Create a deep-copy clone of this object.
* @see java.lang.Object#clone()
*/
@@ -133,7 +133,6 @@ public class SysexMessage extends MidiMessage
{
byte message[] = new byte[length];
System.arraycopy(data, 0, message, 0, length);
- return new SysexMessage(message);
+ return new SysexMessage(message);
}
}
-
diff --git a/libjava/classpath/javax/sound/midi/Track.java b/libjava/classpath/javax/sound/midi/Track.java
index eed5d4c..550d2e1 100644
--- a/libjava/classpath/javax/sound/midi/Track.java
+++ b/libjava/classpath/javax/sound/midi/Track.java
@@ -42,9 +42,9 @@ import java.util.HashSet;
import java.util.Vector;
/**
- * A Track contains a list of timecoded MIDI events for processing
+ * A Track contains a list of timecoded MIDI events for processing
* by a Sequencer.
- *
+ *
* @author Anthony Green (green@redhat.com)
* @since 1.3
*
@@ -52,10 +52,10 @@ import java.util.Vector;
public class Track
{
/**
- * The list of MidiEvents for this track.
+ * The list of MidiEvents for this track.
*/
Vector events = new Vector();
-
+
// A HashSet to speed processing
private HashSet eventSet = new HashSet();
@@ -68,7 +68,7 @@ public class 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
* based on its timecode.
- *
+ *
* @param event the event to add
* @return true if the event was added, false otherwise
*/
@@ -78,7 +78,7 @@ public class Track
{
if (eventSet.contains(event))
return false;
-
+
eventSet.add(event);
long targetTick = event.getTick();
@@ -89,10 +89,10 @@ public class Track
return true;
}
}
-
+
/**
* Remove an event from this track.
- *
+ *
* @param event the event to remove
* @return true if the event was removed, false otherwise
*/
@@ -102,21 +102,21 @@ public class Track
{
if (! eventSet.remove(event))
return false;
-
+
int i = events.indexOf(event);
if (i >= 0)
{
events.remove(i);
return true;
}
-
+
throw new InternalError("event in set but not list");
}
}
-
+
/**
* Get an event idetified by its order index
- *
+ *
* @param index the location of the event to get
* @return the event at index
* @throws ArrayIndexOutOfBoundsException if index is out of bounds
@@ -131,16 +131,16 @@ public class Track
}
catch (IndexOutOfBoundsException e)
{
- throw (ArrayIndexOutOfBoundsException)
+ throw (ArrayIndexOutOfBoundsException)
new ArrayIndexOutOfBoundsException().initCause(e);
}
}
}
-
-
+
+
/**
* Get the number events in this track.
- *
+ *
* @return the number of events in this track
*/
public int size()
@@ -150,7 +150,7 @@ public class Track
/**
* Get the length of the track in MIDI ticks.
- *
+ *
* @return the length of the track in MIDI ticks
*/
public long ticks()
@@ -162,4 +162,3 @@ public class Track
}
}
}
-
diff --git a/libjava/classpath/javax/sound/midi/Transmitter.java b/libjava/classpath/javax/sound/midi/Transmitter.java
index d788725..ab81cc8 100644
--- a/libjava/classpath/javax/sound/midi/Transmitter.java
+++ b/libjava/classpath/javax/sound/midi/Transmitter.java
@@ -41,7 +41,7 @@ package javax.sound.midi;
/**
* This interface specifies the methods required by objects which send
* MIDI events to Receivers, including MIDI IN ports and Sequencers.
- *
+ *
* @author Anthony Green (green@redhat.com)
* @since 1.3
*
@@ -50,14 +50,14 @@ public interface Transmitter
{
/**
* Set the Receiver to which MIDI events will be sent.
- *
+ *
* @param receiver the Receiver to which MIDI events will be sent
*/
public void setReceiver(Receiver receiver);
-
+
/**
* Get the Receiver to which MIDI events will be sent (possibly null)
- *
+ *
* @return the Receiver to which MIDI events will be sent (possibly null)
*/
public Receiver getReceiver();
@@ -66,5 +66,5 @@ public interface Transmitter
* Close this Transmitter, possibly releasing system resources.
* FIXME: Does this mean the Receiver is closed? I think it must.
*/
- public void close();
+ public void close();
}
diff --git a/libjava/classpath/javax/sound/midi/VoiceStatus.java b/libjava/classpath/javax/sound/midi/VoiceStatus.java
index a6a9c3f..2ba0c9e 100644
--- a/libjava/classpath/javax/sound/midi/VoiceStatus.java
+++ b/libjava/classpath/javax/sound/midi/VoiceStatus.java
@@ -40,7 +40,7 @@ package javax.sound.midi;
/**
* Objects of this type define the status of a Synthesizer voice.
- *
+ *
* @author Anthony Green (green@redhat.com)
* @since 1.3
*
@@ -51,27 +51,27 @@ public class VoiceStatus
* True if this voice is processing a MIDI note.
*/
public boolean active = false;
-
+
/**
* The channel for this voice when active.
*/
public int channel = 0;
-
+
/**
* The bank of the voice when active.
*/
public int bank = 0;
-
+
/**
* The program for this voice when active.
*/
public int program = 0;
-
+
/**
* The note for this voice when active.
*/
public int note = 0;
-
+
/**
* The volume for this voice when active.
*/
diff --git a/libjava/classpath/javax/sound/midi/spi/MidiDeviceProvider.java b/libjava/classpath/javax/sound/midi/spi/MidiDeviceProvider.java
index 537edb2..7119ec4 100644
--- a/libjava/classpath/javax/sound/midi/spi/MidiDeviceProvider.java
+++ b/libjava/classpath/javax/sound/midi/spi/MidiDeviceProvider.java
@@ -42,7 +42,7 @@ import javax.sound.midi.*;
/**
* The abstract base class for all MidiDeviceProvider types.
- *
+ *
* @author Anthony Green (green@redhat.com)
* @since 1.3
*
@@ -51,36 +51,36 @@ public abstract class MidiDeviceProvider
{
/**
* Returns true if this provider supports a specific MIDI device.
- *
+ *
* @param info the MIDI device descriptor
* @return true if this provider supports info
*/
public boolean isDeviceSupported(MidiDevice.Info info)
{
MidiDevice.Info infos[] = getDeviceInfo();
-
+
int i = infos.length;
-
+
while (i > 0)
{
if (info.equals(infos[--i]))
return true;
}
-
+
return false;
}
-
+
/**
* Get the list descriptors for all MIDI devices supported by
* this provider.
- *
+ *
* @return an array of descriptors for all supported MIDI devices.
*/
public abstract MidiDevice.Info[] getDeviceInfo();
-
+
/**
* Get the MidiDevice for the MIDI device described by info
- *
+ *
* @param info the descriptor for the MIDI device we want
* @return the MidiDevice we're looking for
* @throws IllegalArgumentException is this provider doesn't support info
diff --git a/libjava/classpath/javax/sound/midi/spi/MidiFileReader.java b/libjava/classpath/javax/sound/midi/spi/MidiFileReader.java
index 4342ebf..d370a8a 100644
--- a/libjava/classpath/javax/sound/midi/spi/MidiFileReader.java
+++ b/libjava/classpath/javax/sound/midi/spi/MidiFileReader.java
@@ -50,7 +50,7 @@ import javax.sound.midi.Sequence;
/**
* The MidiFileReader abstract class defines the methods to be provided
* by a MIDI file reader.
- *
+ *
* @author Anthony Green (green@redhat.com)
* @since 1.3
*
@@ -59,7 +59,7 @@ public abstract class MidiFileReader
{
/**
* Read a MidiFileFormat from the given stream.
- *
+ *
* @param stream the stream from which to read the MIDI data
* @return the MidiFileFormat object
* @throws InvalidMidiDataException if the stream refers to invalid data
@@ -67,32 +67,32 @@ public abstract class MidiFileReader
*/
public abstract MidiFileFormat getMidiFileFormat(InputStream stream)
throws InvalidMidiDataException, IOException;
-
+
/**
* Read a MidiFileFormat from the given stream.
- *
+ *
* @param url the url from which to read the MIDI data
* @return the MidiFileFormat object
* @throws InvalidMidiDataException if the url refers to invalid data
* @throws IOException if an I/O exception occurs while reading
*/
public abstract MidiFileFormat getMidiFileFormat(URL url)
- throws InvalidMidiDataException, IOException;
+ throws InvalidMidiDataException, IOException;
/**
* Read a MidiFileFormat from the given stream.
- *
+ *
* @param file the file from which to read the MIDI data
* @return the MidiFileFormat object
* @throws InvalidMidiDataException if the file refers to invalid data
* @throws IOException if an I/O exception occurs while reading
*/
public abstract MidiFileFormat getMidiFileFormat(File file)
- throws InvalidMidiDataException, IOException;
-
+ throws InvalidMidiDataException, IOException;
+
/**
* Read a Sequence from the given stream.
- *
+ *
* @param stream the stream from which to read the MIDI data
* @return the Sequence object
* @throws InvalidMidiDataException if the stream refers to invalid data
@@ -100,26 +100,26 @@ public abstract class MidiFileReader
*/
public abstract Sequence getSequence(InputStream stream)
throws InvalidMidiDataException, IOException;
-
+
/**
* Read a Sequence from the given stream.
- *
+ *
* @param url the url from which to read the MIDI data
* @return the Sequence object
* @throws InvalidMidiDataException if the url refers to invalid data
* @throws IOException if an I/O exception occurs while reading
*/
public abstract Sequence getSequence(URL url)
- throws InvalidMidiDataException, IOException;
+ throws InvalidMidiDataException, IOException;
/**
* Read a Sequence from the given stream.
- *
+ *
* @param file the file from which to read the MIDI data
* @return the Sequence object
* @throws InvalidMidiDataException if the file refers to invalid data
* @throws IOException if an I/O exception occurs while reading
*/
public abstract Sequence getSequence(File file)
- throws InvalidMidiDataException, IOException;
+ throws InvalidMidiDataException, IOException;
}
diff --git a/libjava/classpath/javax/sound/midi/spi/MidiFileWriter.java b/libjava/classpath/javax/sound/midi/spi/MidiFileWriter.java
index e2a1f55..08aee36 100644
--- a/libjava/classpath/javax/sound/midi/spi/MidiFileWriter.java
+++ b/libjava/classpath/javax/sound/midi/spi/MidiFileWriter.java
@@ -45,20 +45,20 @@ import java.io.OutputStream;
import javax.sound.midi.Sequence;
/**
- * MidiFileWriter provides MIDI file writing services.
- *
- * There are three types of Standard MIDI File (SMF) formats,
+ * MidiFileWriter provides MIDI file writing services.
+ *
+ * There are three types of Standard MIDI File (SMF) formats,
* represented by integers 0, 1, and 2.
- *
+ *
* Type 0 files contain a single track and represents a single song
* performance.
* Type 1 may contain multiple tracks for a single song performance.
* Type 2 may contain multiple tracks, each representing a
* separate song performance.
- *
+ *
* See http://en.wikipedia.org/wiki/MIDI#MIDI_file_formats for more
* information.
- *
+ *
* @author Anthony Green (green@redhat.com)
* @since 1.3
*
@@ -67,23 +67,23 @@ public abstract class MidiFileWriter
{
/**
* Return the MIDI file types supported by this writer.
- *
+ *
* @return the MIDI file types, or an empty array
*/
public abstract int[] getMidiFileTypes();
-
+
/**
* Return the MIDI file types supported by this writer for the
* given sequence.
- *
+ *
* @param sequence the sequence we'd like to write
* @return the MIDI file types, or an empty array
*/
public abstract int[] getMidiFileTypes(Sequence sequence);
-
+
/**
* Returns true if this writer supports the given file type.
- *
+ *
* @param fileType the file type we're asking about
* @return true if this writer supports fileType, false otherwise
*/
@@ -101,7 +101,7 @@ public abstract class MidiFileWriter
/**
* Returns true if this writer supports the given file type for the
* given sequence.
- *
+ *
* @param fileType the file type we're asking about
* @param sequence the sequence we'd like to write
* @return true if this writer supports fileType, false otherwise
@@ -119,7 +119,7 @@ public abstract class MidiFileWriter
/**
* Write a sequence to a stream using the specified MIDI file type.
- *
+ *
* @param in the sequence to write
* @param fileType the MIDI file type to use
* @param out the output stream to write to
@@ -131,7 +131,7 @@ public abstract class MidiFileWriter
/**
* Write a sequence to a file using the specified MIDI file type.
- *
+ *
* @param in the sequence to write
* @param fileType the MIDI file type to use
* @param out the file to write to
diff --git a/libjava/classpath/javax/sound/midi/spi/SoundbankReader.java b/libjava/classpath/javax/sound/midi/spi/SoundbankReader.java
index dbf2bb0..948d54f 100644
--- a/libjava/classpath/javax/sound/midi/spi/SoundbankReader.java
+++ b/libjava/classpath/javax/sound/midi/spi/SoundbankReader.java
@@ -49,7 +49,7 @@ import javax.sound.midi.Soundbank;
/**
* The SoundbankReader abstract class defines the methods to be provided
* by a soundbank file reader.
- *
+ *
* @author Anthony Green (green@redhat.com)
* @since 1.3
*
@@ -58,37 +58,37 @@ public abstract class SoundbankReader
{
/**
* Get a Soundbank from the given URL.
- *
+ *
* @param url from which to read the Soundbank
- *
+ *
* @return the Soundbank object
- *
+ *
* @throws InvalidMidiDataException if the data provided by url cannot be recognized
* @throws IOException if the data provided by url cannot be read
*/
public abstract Soundbank getSoundbank(URL url)
throws InvalidMidiDataException, IOException;
-
+
/**
* Get a Soundbank from the given InputStream.
- *
+ *
* @param stream from which to read the Soundbank
- *
+ *
* @return the Soundbank object
- *
+ *
* @throws InvalidMidiDataException if the data provided by InputStream cannot be recognized
* @throws IOException if the data provided by InputStream cannot be read
*/
public abstract Soundbank getSoundbank(InputStream stream)
throws InvalidMidiDataException, IOException;
-
+
/**
* Get a Soundbank from the given File.
- *
+ *
* @param file from which to read the Soundbank
- *
+ *
* @return the Soundbank object
- *
+ *
* @throws InvalidMidiDataException if the data provided by File cannot be recognized
* @throws IOException if the data provided by File cannot be read
*/
diff --git a/libjava/classpath/javax/sound/sampled/AudioFileFormat.java b/libjava/classpath/javax/sound/sampled/AudioFileFormat.java
index 899258c..2eeb78c 100644
--- a/libjava/classpath/javax/sound/sampled/AudioFileFormat.java
+++ b/libjava/classpath/javax/sound/sampled/AudioFileFormat.java
@@ -143,7 +143,7 @@ public class AudioFileFormat
/**
* Create a new AudioFileFormat given the type, the format, the
- * frame length, and some properties. The new object will have an
+ * frame length, and some properties. The new object will have an
* unspecified byte length. A copy of the properties argument will
* be made, so changes to the map passed in will not affect the
* new AudioFileFormat.
@@ -153,7 +153,7 @@ public class AudioFileFormat
* @param properties the properties
*/
public AudioFileFormat(Type type, AudioFormat fmt, int frameLen,
- Map<String, Object> properties)
+ Map<String, Object> properties)
{
this.byteLength = AudioSystem.NOT_SPECIFIED;
this.format = fmt;
@@ -171,7 +171,7 @@ public class AudioFileFormat
* @param frameLen the frame length
*/
protected AudioFileFormat(Type type, int byteLen, AudioFormat fmt,
- int frameLen)
+ int frameLen)
{
this.byteLength = byteLen;
this.format = fmt;
@@ -237,6 +237,6 @@ public class AudioFileFormat
public String toString()
{
return ("byteLength=" + byteLength + "; format=" + format
- + "; type=" + type + "; frameLength=" + frameLength);
+ + "; type=" + type + "; frameLength=" + frameLength);
}
}
diff --git a/libjava/classpath/javax/sound/sampled/AudioFormat.java b/libjava/classpath/javax/sound/sampled/AudioFormat.java
index 1f31c99..b4fc601 100644
--- a/libjava/classpath/javax/sound/sampled/AudioFormat.java
+++ b/libjava/classpath/javax/sound/sampled/AudioFormat.java
@@ -140,7 +140,7 @@ public class AudioFormat
/**
* Create a new audio format, given various attributes of it.
* The properties map for this format will be empty.
- *
+ *
* @param encoding the encoding for this format
* @param sampleRate the sample rate
* @param sampleSizeInBits the sample size, in bits
@@ -150,8 +150,8 @@ public class AudioFormat
* @param bigEndian true if the data is stored big-endian
*/
public AudioFormat(Encoding encoding, float sampleRate, int sampleSizeInBits,
- int channels, int frameSize, float frameRate,
- boolean bigEndian)
+ int channels, int frameSize, float frameRate,
+ boolean bigEndian)
{
this.encoding = encoding;
this.sampleRate = sampleRate;
@@ -178,8 +178,8 @@ public class AudioFormat
* @param properties a map describing properties of this format
*/
public AudioFormat(Encoding encoding, float sampleRate, int sampleSizeInBits,
- int channels, int frameSize, float frameRate,
- boolean bigEndian, Map<String, Object> properties)
+ int channels, int frameSize, float frameRate,
+ boolean bigEndian, Map<String, Object> properties)
{
this.encoding = encoding;
this.sampleRate = sampleRate;
@@ -198,7 +198,7 @@ public class AudioFormat
* bits and the number of channels, unless one of those is
* AudioSystem#NOT_SPECIFIED. The frame rate will be the same as the sample
* rate, and the properties map will be empty.
- *
+ *
* @param sampleRate the sample rate
* @param sampleSizeInBits the sample size, in bits
* @param channels the number of channels
@@ -206,7 +206,7 @@ public class AudioFormat
* @param bigEndian true if the data is stored big-endian
*/
public AudioFormat(float sampleRate, int sampleSizeInBits,
- int channels, boolean signed, boolean bigEndian)
+ int channels, boolean signed, boolean bigEndian)
{
this.encoding = signed ? Encoding.PCM_SIGNED : Encoding.PCM_UNSIGNED;
this.sampleRate = sampleRate;
@@ -257,7 +257,7 @@ public class AudioFormat
/**
* Given a key, return a property associated with this format;
- * or null if this property is not set.
+ * or null if this property is not set.
* @param key the name of the property
* @return the value of the property, or null if the property is not set
*/
@@ -318,7 +318,7 @@ public class AudioFormat
}
/**
- * Return a read-only Map holding the properties associated with
+ * Return a read-only Map holding the properties associated with
* this format.
*/
public Map<String, Object> properties()
@@ -332,24 +332,24 @@ public class AudioFormat
public String toString()
{
CPStringBuilder result = new CPStringBuilder();
-
+
// usually at least encoding should be somewhat specified
result.append(encoding);
-
+
if (sampleRate != AudioSystem.NOT_SPECIFIED)
{
result.append(" ");
result.append(sampleRate);
result.append(" Hz");
}
-
+
if (sampleSizeInBits != AudioSystem.NOT_SPECIFIED)
{
result.append(" ");
result.append(sampleSizeInBits);
result.append(" bits");
}
-
+
if (channels != AudioSystem.NOT_SPECIFIED)
{
result.append(" ");
@@ -357,10 +357,10 @@ public class AudioFormat
result.append(" channel");
if (channels > 1) result.append("s");
}
-
+
if (sampleSizeInBits > 8)
result.append(bigEndian ? " big endian" : " little endian");
-
+
return result.toString();
}
}
diff --git a/libjava/classpath/javax/sound/sampled/AudioInputStream.java b/libjava/classpath/javax/sound/sampled/AudioInputStream.java
index 863578b..526e7e1 100644
--- a/libjava/classpath/javax/sound/sampled/AudioInputStream.java
+++ b/libjava/classpath/javax/sound/sampled/AudioInputStream.java
@@ -1,4 +1,4 @@
-/*
+/*
Copyright (C) 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -55,7 +55,7 @@ public class AudioInputStream extends InputStream
/** The length of the audio stream in frames. */
protected long frameLength;
- /** The current frame position, starting from frame zero. */
+ /** The current frame position, starting from frame zero. */
protected long framePos;
/** The size of a frame in bytes. */
@@ -92,7 +92,7 @@ public class AudioInputStream extends InputStream
public AudioInputStream(TargetDataLine line)
{
this(new TargetInputStream(line), line.getFormat(),
- AudioSystem.NOT_SPECIFIED);
+ AudioSystem.NOT_SPECIFIED);
}
/**
@@ -181,30 +181,30 @@ public class AudioInputStream extends InputStream
result = -1;
else
{
- int myFrameSize = (frameSize == AudioSystem.NOT_SPECIFIED
- ? 1 : frameSize);
- // Ensure length is a multiple of frame size.
- length -= length % myFrameSize;
-
- result = 0;
- while (result == 0 || result % myFrameSize != 0)
- {
- int val = input.read(buf, offset, length);
- if (val < 0)
- {
- // This is a weird situation as we might have read a
- // frame already. It isn't clear at all what to do if
- // we only found a partial frame. For now we just
- // return whatever we did find.
- if (result == 0)
- return -1;
- result -= result % myFrameSize;
- break;
- }
- result += val;
- }
- // assert result % myFrameSize == 0;
- framePos += result / myFrameSize;
+ int myFrameSize = (frameSize == AudioSystem.NOT_SPECIFIED
+ ? 1 : frameSize);
+ // Ensure length is a multiple of frame size.
+ length -= length % myFrameSize;
+
+ result = 0;
+ while (result == 0 || result % myFrameSize != 0)
+ {
+ int val = input.read(buf, offset, length);
+ if (val < 0)
+ {
+ // This is a weird situation as we might have read a
+ // frame already. It isn't clear at all what to do if
+ // we only found a partial frame. For now we just
+ // return whatever we did find.
+ if (result == 0)
+ return -1;
+ result -= result % myFrameSize;
+ break;
+ }
+ result += val;
+ }
+ // assert result % myFrameSize == 0;
+ framePos += result / myFrameSize;
}
return result;
}
@@ -212,7 +212,7 @@ public class AudioInputStream extends InputStream
public void reset() throws IOException
{
input.reset();
- framePos = markedFramePos;
+ framePos = markedFramePos;
}
public long skip(long n) throws IOException
@@ -243,10 +243,10 @@ public class AudioInputStream extends InputStream
public synchronized int read() throws IOException
{
if (buf == null)
- buf = new byte[1];
+ buf = new byte[1];
int count = read(buf, 0, 1);
if (count < 0)
- return -1;
+ return -1;
return buf[0];
}
diff --git a/libjava/classpath/javax/sound/sampled/AudioPermission.java b/libjava/classpath/javax/sound/sampled/AudioPermission.java
index 6698e35..a5325c9 100644
--- a/libjava/classpath/javax/sound/sampled/AudioPermission.java
+++ b/libjava/classpath/javax/sound/sampled/AudioPermission.java
@@ -1,4 +1,4 @@
-/*
+/*
Copyright (C) 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
diff --git a/libjava/classpath/javax/sound/sampled/AudioSystem.java b/libjava/classpath/javax/sound/sampled/AudioSystem.java
index e858f17..01133c9 100644
--- a/libjava/classpath/javax/sound/sampled/AudioSystem.java
+++ b/libjava/classpath/javax/sound/sampled/AudioSystem.java
@@ -57,7 +57,7 @@ import javax.sound.sampled.spi.MixerProvider;
* This clas is the primary interface to the audio system. It contains
* a number of static methods which can be used to access this package's
* functionality.
- *
+ *
* @since 1.3
*/
public class AudioSystem
@@ -77,7 +77,7 @@ public class AudioSystem
* Return the file format of a given File.
* @param f the file to check
* @return the format of the file
- * @throws UnsupportedAudioFileException if the file's format is not
+ * @throws UnsupportedAudioFileException if the file's format is not
* recognized
* @throws IOException if there is an I/O error reading the file
*/
@@ -104,7 +104,7 @@ public class AudioSystem
* Return the file format of a given input stream.
* @param is the input stream to check
* @return the format of the stream
- * @throws UnsupportedAudioFileException if the stream's format is not
+ * @throws UnsupportedAudioFileException if the stream's format is not
* recognized
* @throws IOException if there is an I/O error reading the stream
*/
@@ -131,7 +131,7 @@ public class AudioSystem
* Return the file format of a given URL.
* @param url the URL to check
* @return the format of the URL
- * @throws UnsupportedAudioFileException if the URL's format is not
+ * @throws UnsupportedAudioFileException if the URL's format is not
* recognized
* @throws IOException if there is an I/O error reading the URL
*/
@@ -197,14 +197,14 @@ public class AudioSystem
/**
* Given an audio input stream, this will try to create a new audio input
* stream whose encoding matches the given target encoding. If no provider
- * offers this conversion, an exception is thrown.
+ * offers this conversion, an exception is thrown.
* @param targ the target encoding
* @param ais the original audio stream
* @return a new audio stream
* @throws IllegalArgumentException if the conversion cannot be made
*/
public static AudioInputStream getAudioInputStream(AudioFormat.Encoding targ,
- AudioInputStream ais)
+ AudioInputStream ais)
{
Iterator i = ServiceFactory.lookupProviders(FormatConversionProvider.class);
while (i.hasNext())
@@ -220,14 +220,14 @@ public class AudioSystem
/**
* Given an audio input stream, this will try to create a new audio input
* stream whose format matches the given target format. If no provider
- * offers this conversion, an exception is thrown.
+ * offers this conversion, an exception is thrown.
* @param targ the target format
* @param ais the original audio stream
* @return a new audio stream
* @throws IllegalArgumentException if the conversion cannot be made
*/
public static AudioInputStream getAudioInputStream(AudioFormat targ,
- AudioInputStream ais)
+ AudioInputStream ais)
{
Iterator i = ServiceFactory.lookupProviders(FormatConversionProvider.class);
while (i.hasNext())
@@ -457,7 +457,7 @@ public class AudioSystem
* @since 1.5
*/
public static SourceDataLine getSourceDataLine(AudioFormat fmt,
- Mixer.Info mixer)
+ Mixer.Info mixer)
throws LineUnavailableException
{
DataLine.Info info = new DataLine.Info(SourceDataLine.class, fmt);
@@ -489,7 +489,7 @@ public class AudioSystem
/**
* Find and return a target data line matching the given audio format.
* @param fmt the format to match
- * @throws LineUnavailableException if no matching line was found
+ * @throws LineUnavailableException if no matching line was found
* @since 1.5
*/
public static TargetDataLine getTargetDataLine(AudioFormat fmt)
@@ -517,7 +517,7 @@ public class AudioSystem
* @since 1.5
*/
public static TargetDataLine getTargetDataLine(AudioFormat fmt,
- Mixer.Info mixer)
+ Mixer.Info mixer)
throws LineUnavailableException
{
DataLine.Info info = new DataLine.Info(TargetDataLine.class, fmt);
@@ -571,12 +571,12 @@ public class AudioSystem
/**
* Given a target encoding and a source audio format, return an array of all
- * matching audio formats to which data in this source format can be converted.
+ * matching audio formats to which data in this source format can be converted.
* @param encoding the target encoding
* @param sourceFmt the source format
*/
public static AudioFormat[] getTargetFormats(AudioFormat.Encoding encoding,
- AudioFormat sourceFmt)
+ AudioFormat sourceFmt)
{
HashSet<AudioFormat> result = new HashSet<AudioFormat>();
Iterator i = ServiceFactory.lookupProviders(FormatConversionProvider.class);
@@ -616,9 +616,9 @@ public class AudioSystem
* @param source the source format
*/
public static boolean isConversionSupported(AudioFormat.Encoding targ,
- AudioFormat source)
+ AudioFormat source)
{
- Iterator i
+ Iterator i
= ServiceFactory.lookupProviders(FormatConversionProvider.class);
while (i.hasNext())
{
@@ -636,9 +636,9 @@ public class AudioSystem
* @param source the source format
*/
public static boolean isConversionSupported(AudioFormat targ,
- AudioFormat source)
+ AudioFormat source)
{
- Iterator i
+ Iterator i
= ServiceFactory.lookupProviders(FormatConversionProvider.class);
while (i.hasNext())
{
@@ -672,20 +672,20 @@ public class AudioSystem
/**
* Return true if the given audio file format is supported for the
- * given audio input stream by one of the providers installed on the
+ * given audio input stream by one of the providers installed on the
* system.
* @param type the audio file format type
* @param ais the audio input stream
*/
public static boolean isFileTypeSupported(AudioFileFormat.Type type,
- AudioInputStream ais)
+ AudioInputStream ais)
{
return isFileTypeSupported(getAudioFileTypes(ais), type);
}
/**
* Return true if some provider on the system supplies a line
- * matching the argument.
+ * matching the argument.
* @param info the line to match
*/
public static boolean isLineSupported(Line.Info info)
@@ -711,7 +711,7 @@ public class AudioSystem
* @throws IllegalArgumentException if the file type is not supported
*/
public static int write(AudioInputStream ais, AudioFileFormat.Type type,
- File out)
+ File out)
throws IOException
{
Iterator i = ServiceFactory.lookupProviders(AudioFileWriter.class);
@@ -736,7 +736,7 @@ public class AudioSystem
* @throws IllegalArgumentException if the file type is not supported
*/
public static int write(AudioInputStream ais, AudioFileFormat.Type type,
- OutputStream os)
+ OutputStream os)
throws IOException
{
Iterator i = ServiceFactory.lookupProviders(AudioFileWriter.class);
diff --git a/libjava/classpath/javax/sound/sampled/BooleanControl.java b/libjava/classpath/javax/sound/sampled/BooleanControl.java
index 0a78e49..37e372e 100644
--- a/libjava/classpath/javax/sound/sampled/BooleanControl.java
+++ b/libjava/classpath/javax/sound/sampled/BooleanControl.java
@@ -1,4 +1,4 @@
-/*
+/*
Copyright (C) 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -99,7 +99,7 @@ public abstract class BooleanControl extends Control
* @param falseLabel the label for the false state
*/
protected BooleanControl(Type type, boolean init, String trueLabel,
- String falseLabel)
+ String falseLabel)
{
super(type);
this.value = init;
diff --git a/libjava/classpath/javax/sound/sampled/Clip.java b/libjava/classpath/javax/sound/sampled/Clip.java
index 1fa7694..28b4979 100644
--- a/libjava/classpath/javax/sound/sampled/Clip.java
+++ b/libjava/classpath/javax/sound/sampled/Clip.java
@@ -1,4 +1,4 @@
-/*
+/*
Copyright (C) 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
diff --git a/libjava/classpath/javax/sound/sampled/CompoundControl.java b/libjava/classpath/javax/sound/sampled/CompoundControl.java
index 556c805..2b8941c 100644
--- a/libjava/classpath/javax/sound/sampled/CompoundControl.java
+++ b/libjava/classpath/javax/sound/sampled/CompoundControl.java
@@ -95,9 +95,9 @@ public abstract class CompoundControl extends Control
result.append(": ");
for (int i = 0; i < memberControls.length; ++i)
{
- if (i > 0)
- result.append(", ");
- result.append(memberControls[i].toString());
+ if (i > 0)
+ result.append(", ");
+ result.append(memberControls[i].toString());
}
return result.toString();
}
diff --git a/libjava/classpath/javax/sound/sampled/DataLine.java b/libjava/classpath/javax/sound/sampled/DataLine.java
index 4482c98..5d88c6a 100644
--- a/libjava/classpath/javax/sound/sampled/DataLine.java
+++ b/libjava/classpath/javax/sound/sampled/DataLine.java
@@ -1,4 +1,4 @@
-/*
+/*
Copyright (C) 2005-2007 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -43,7 +43,7 @@ import gnu.java.lang.CPStringBuilder;
* The DataLine interface adds data-related functionality to the Line
* interface. For example, it adds methods to start and stop the data
* on the line.
- * @since 1.3
+ * @since 1.3
*/
public interface DataLine extends Line
{
@@ -158,7 +158,7 @@ public interface DataLine extends Line
if (minBufferSize < other.minBufferSize ||
maxBufferSize > other.maxBufferSize)
return false;
-
+
for (int i = 0; i < formats.length; ++i)
{
boolean ok = false;
@@ -173,7 +173,7 @@ public interface DataLine extends Line
if (! ok)
return false;
}
-
+
return true;
}
@@ -190,14 +190,14 @@ public interface DataLine extends Line
result.append(", ");
result.append(formats[i].toString());
}
-
+
result.append("]; minBufferSize: ");
result.append(minBufferSize);
result.append("; maxBufferSize: ");
result.append(maxBufferSize);
return result.toString();
}
-
+
} // end class: Info
/**
@@ -237,7 +237,7 @@ public interface DataLine extends Line
float getLevel();
/**
- * Return the current frame position.
+ * Return the current frame position.
* @since 1.5
*/
long getLongFramePosition();
diff --git a/libjava/classpath/javax/sound/sampled/EnumControl.java b/libjava/classpath/javax/sound/sampled/EnumControl.java
index 1ddc8a9..7a03242 100644
--- a/libjava/classpath/javax/sound/sampled/EnumControl.java
+++ b/libjava/classpath/javax/sound/sampled/EnumControl.java
@@ -1,4 +1,4 @@
-/*
+/*
Copyright (C) 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -40,7 +40,7 @@ package javax.sound.sampled;
/**
* An EnumControl is a Control which can take one of a specified set of
- * values.
+ * values.
* @since 1.3
*/
public abstract class EnumControl extends Control
@@ -110,8 +110,8 @@ public abstract class EnumControl extends Control
{
for (int i = 0; i < values.length; ++i)
{
- if (! values[i].equals(value))
- throw new IllegalArgumentException("value not supported");
+ if (! values[i].equals(value))
+ throw new IllegalArgumentException("value not supported");
}
this.value = value;
}
diff --git a/libjava/classpath/javax/sound/sampled/FloatControl.java b/libjava/classpath/javax/sound/sampled/FloatControl.java
index bbdb24b..6ae9178 100644
--- a/libjava/classpath/javax/sound/sampled/FloatControl.java
+++ b/libjava/classpath/javax/sound/sampled/FloatControl.java
@@ -97,7 +97,7 @@ public abstract class FloatControl extends Control
/**
* Create a new FloatControl given its type and various parameters.
* The minimum, maximum, and midpoint labels will all be the empty string.
- *
+ *
* @param type the type
* @param min the minimum valuee
* @param max the maximum value
@@ -107,7 +107,7 @@ public abstract class FloatControl extends Control
* @param units the description of the units
*/
protected FloatControl(Type type, float min, float max, float prec,
- int update, float init, String units)
+ int update, float init, String units)
{
super(type);
this.minimum = min;
@@ -123,7 +123,7 @@ public abstract class FloatControl extends Control
/**
* Create a new FloatControl given its type and various parameters.
- *
+ *
* @param type the type
* @param min the minimum valuee
* @param max the maximum value
@@ -136,8 +136,8 @@ public abstract class FloatControl extends Control
* @param maxLabel the label for the maximum value
*/
protected FloatControl(Type type, float min, float max, float prec,
- int update, float init, String units,
- String minLabel, String midLabel, String maxLabel)
+ int update, float init, String units,
+ String minLabel, String midLabel, String maxLabel)
{
super(type);
this.minimum = min;
@@ -242,7 +242,7 @@ public abstract class FloatControl extends Control
* over the given time interval, specified in microseconds.
* The default implementation does not do this, but instead
* simply sets the value to the final value immediately.
- *
+ *
* @param from the starting value
* @param to the final value
* @param ms the number of microseconds
diff --git a/libjava/classpath/javax/sound/sampled/Line.java b/libjava/classpath/javax/sound/sampled/Line.java
index 536752a..62d284b 100644
--- a/libjava/classpath/javax/sound/sampled/Line.java
+++ b/libjava/classpath/javax/sound/sampled/Line.java
@@ -94,7 +94,7 @@ public interface Line
* @param listener the listener to notify
*/
void addLineListener(LineListener listener);
-
+
/**
* Close this line.
*/
diff --git a/libjava/classpath/javax/sound/sampled/LineEvent.java b/libjava/classpath/javax/sound/sampled/LineEvent.java
index dd4a9ae..43a184c 100644
--- a/libjava/classpath/javax/sound/sampled/LineEvent.java
+++ b/libjava/classpath/javax/sound/sampled/LineEvent.java
@@ -1,4 +1,4 @@
-/*
+/*
Copyright (C) 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -153,15 +153,15 @@ public class LineEvent extends EventObject
public String toString()
{
return ("type=" + type + "; framePosition=" + framePosition
- + "line=" + line);
+ + "line=" + line);
}
-
+
private void readObject(ObjectInputStream ois)
throws IOException
{
throw new NotSerializableException("LineEvent is not serializable");
}
-
+
private void writeObject(ObjectOutputStream oos)
throws IOException
{
diff --git a/libjava/classpath/javax/sound/sampled/LineUnavailableException.java b/libjava/classpath/javax/sound/sampled/LineUnavailableException.java
index b203d7b..a4655ff 100644
--- a/libjava/classpath/javax/sound/sampled/LineUnavailableException.java
+++ b/libjava/classpath/javax/sound/sampled/LineUnavailableException.java
@@ -1,4 +1,4 @@
-/*
+/*
Copyright (C) 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
diff --git a/libjava/classpath/javax/sound/sampled/Mixer.java b/libjava/classpath/javax/sound/sampled/Mixer.java
index ff657cf..dd400f9 100644
--- a/libjava/classpath/javax/sound/sampled/Mixer.java
+++ b/libjava/classpath/javax/sound/sampled/Mixer.java
@@ -115,7 +115,7 @@ public interface Mixer extends Line
public final String toString()
{
return ("name=" + name + "; description=" + description
- + "; vendor=" + vendor + "; version=" + version);
+ + "; vendor=" + vendor + "; version=" + version);
}
}
@@ -148,7 +148,7 @@ public interface Mixer extends Line
/**
* Return an array of Info objects describing all the source lines
* available in this Mixer, which match the provided decsription.
- * @param info the description of the source lines to find
+ * @param info the description of the source lines to find
*/
Line.Info[] getSourceLineInfo(Line.Info info);
@@ -166,7 +166,7 @@ public interface Mixer extends Line
/**
* Return an array of Info objects describing all the target lines
* available in this Mixer, which match the provided decsription.
- * @param info the description of the target lines to find
+ * @param info the description of the target lines to find
*/
Line.Info[] getTargetLineInfo(Line.Info info);
diff --git a/libjava/classpath/javax/sound/sampled/Port.java b/libjava/classpath/javax/sound/sampled/Port.java
index fc0bf71..292e1f1 100644
--- a/libjava/classpath/javax/sound/sampled/Port.java
+++ b/libjava/classpath/javax/sound/sampled/Port.java
@@ -1,4 +1,4 @@
-/*
+/*
Copyright (C) 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -41,7 +41,7 @@ package javax.sound.sampled;
/**
* A Port is a Line which represents an audio device, for instance
* a microphone.
- *
+ *
* @since 1.3
*/
public interface Port extends Line
@@ -56,28 +56,28 @@ public interface Port extends Line
/** A CD player. */
public static final Info COMPACT_DISC = new Info(Port.class,
- "Compact Disc",
- true);
+ "Compact Disc",
+ true);
/** Headphones. */
public static final Info HEADPHONE = new Info(Port.class, "Headphone",
- false);
+ false);
/** Generic input line. */
public static final Info LINE_IN = new Info(Port.class, "Line in",
- true);
+ true);
/** Generic output line. */
public static final Info LINE_OUT = new Info(Port.class, "Line out",
- false);
+ false);
/** A microphone. */
public static final Info MICROPHONE = new Info(Port.class, "Microphone",
- true);
+ true);
/** A speaker. */
public static final Info SPEAKER = new Info(Port.class, "Speaker",
- false);
+ false);
private String name;
private boolean isSource;
diff --git a/libjava/classpath/javax/sound/sampled/ReverbType.java b/libjava/classpath/javax/sound/sampled/ReverbType.java
index c7cced8..79a4b49 100644
--- a/libjava/classpath/javax/sound/sampled/ReverbType.java
+++ b/libjava/classpath/javax/sound/sampled/ReverbType.java
@@ -1,4 +1,4 @@
-/* Reverb attributes
+/* Reverb attributes
Copyright (C) 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -61,7 +61,7 @@ public class ReverbType
* @param decay the decay time in microseconds
*/
protected ReverbType(String name, int earlyDelay, float earlyInten,
- int lateDelay, float lateInten, int decay)
+ int lateDelay, float lateInten, int decay)
{
this.name = name;
this.earlyReflectionDelay = earlyDelay;
@@ -136,9 +136,9 @@ public class ReverbType
public final String toString()
{
return ("name=" + name + "; earlyReflectionDelay=" + earlyReflectionDelay
- + "; earlyReflectionIntensity=" + earlyReflectionIntensity
- + "; lateReflectionDelay=" + lateReflectionDelay
- + "; lateReflectionIntensity=" + lateReflectionIntensity
- + "; decayTime=" + decayTime);
+ + "; earlyReflectionIntensity=" + earlyReflectionIntensity
+ + "; lateReflectionDelay=" + lateReflectionDelay
+ + "; lateReflectionIntensity=" + lateReflectionIntensity
+ + "; decayTime=" + decayTime);
}
}
diff --git a/libjava/classpath/javax/sound/sampled/UnsupportedAudioFileException.java b/libjava/classpath/javax/sound/sampled/UnsupportedAudioFileException.java
index bced9c1..1399b61 100644
--- a/libjava/classpath/javax/sound/sampled/UnsupportedAudioFileException.java
+++ b/libjava/classpath/javax/sound/sampled/UnsupportedAudioFileException.java
@@ -1,4 +1,4 @@
-/*
+/*
Copyright (C) 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
diff --git a/libjava/classpath/javax/sound/sampled/spi/AudioFileReader.java b/libjava/classpath/javax/sound/sampled/spi/AudioFileReader.java
index 6df4cc2..098190f 100644
--- a/libjava/classpath/javax/sound/sampled/spi/AudioFileReader.java
+++ b/libjava/classpath/javax/sound/sampled/spi/AudioFileReader.java
@@ -51,7 +51,7 @@ import javax.sound.sampled.UnsupportedAudioFileException;
* This abstract class defines the interface to audio file readers.
* A concrete provider subclass will implement the methods declared
* here. These methods can be used to determine the format of
- * files, and to retrieve an AudioInputStream for a file.
+ * files, and to retrieve an AudioInputStream for a file.
* @since 1.3
*/
public abstract class AudioFileReader
@@ -110,36 +110,36 @@ public abstract class AudioFileReader
/**
* Return an AudioInputStream for the given file. The file is assumed
- * to hold valid audio data.
+ * to hold valid audio data.
* @param file the file to read
* @return an AudioInputStream for the file
* @throws UnsupportedAudioFileException if the file's type is not
* recognized
- * @throws IOException if there is an error while reading the file
+ * @throws IOException if there is an error while reading the file
*/
public abstract AudioInputStream getAudioInputStream(File file)
throws UnsupportedAudioFileException, IOException;
/**
* Return an AudioInputStream wrapping the given input stream. The stream
- * is assumed to hold valid audio data.
+ * is assumed to hold valid audio data.
* @param is the input stream to wrap
* @return an AudioInputStream for the stream
* @throws UnsupportedAudioFileException if the stream's type is not
* recognized
- * @throws IOException if there is an error while reading the stream
+ * @throws IOException if there is an error while reading the stream
*/
public abstract AudioInputStream getAudioInputStream(InputStream is)
throws UnsupportedAudioFileException, IOException;
/**
* Return an AudioInputStream for the given URL. The URL is assumed
- * to hold valid audio data.
+ * to hold valid audio data.
* @param url the URL to read
* @return an AudioInputStream for the URL
* @throws UnsupportedAudioFileException if the URL's type is not
* recognized
- * @throws IOException if there is an error while reading the URL
+ * @throws IOException if there is an error while reading the URL
*/
public abstract AudioInputStream getAudioInputStream(URL url)
throws UnsupportedAudioFileException, IOException;
diff --git a/libjava/classpath/javax/sound/sampled/spi/AudioFileWriter.java b/libjava/classpath/javax/sound/sampled/spi/AudioFileWriter.java
index 955bb05..82f9b31 100644
--- a/libjava/classpath/javax/sound/sampled/spi/AudioFileWriter.java
+++ b/libjava/classpath/javax/sound/sampled/spi/AudioFileWriter.java
@@ -94,7 +94,7 @@ public abstract class AudioFileWriter
* @param ais the audio input stream to write
*/
public boolean isFileTypeSupported(AudioFileFormat.Type type,
- AudioInputStream ais)
+ AudioInputStream ais)
{
AudioFileFormat.Type[] types = getAudioFileTypes(ais);
for (int i = 0; i < types.length; ++i)
@@ -114,7 +114,7 @@ public abstract class AudioFileWriter
* @throws IOException if an I/O error occurs when writing
*/
public abstract int write(AudioInputStream ais, AudioFileFormat.Type type,
- File out)
+ File out)
throws IOException;
/**
@@ -126,6 +126,6 @@ public abstract class AudioFileWriter
* @throws IOException if an I/O error occurs when writing
*/
public abstract int write(AudioInputStream ais, AudioFileFormat.Type type,
- OutputStream os)
+ OutputStream os)
throws IOException;
}
diff --git a/libjava/classpath/javax/sound/sampled/spi/FormatConversionProvider.java b/libjava/classpath/javax/sound/sampled/spi/FormatConversionProvider.java
index e96cc04..b9d3e9d 100644
--- a/libjava/classpath/javax/sound/sampled/spi/FormatConversionProvider.java
+++ b/libjava/classpath/javax/sound/sampled/spi/FormatConversionProvider.java
@@ -42,7 +42,7 @@ import javax.sound.sampled.AudioFormat;
import javax.sound.sampled.AudioInputStream;
/**
- * A format conversion provider supplies methods for converting between
+ * A format conversion provider supplies methods for converting between
* different audio formats. This abstract class defines the interface
* to this functionality; concrete subclasses will implement the methods
* declared here.
@@ -67,7 +67,7 @@ public abstract class FormatConversionProvider
* @throws IllegalArgumentException if the conversion is not supported
*/
public abstract AudioInputStream getAudioInputStream(AudioFormat.Encoding encoding,
- AudioInputStream source);
+ AudioInputStream source);
/**
* Return an audio input stream given the desired target format and
@@ -79,7 +79,7 @@ public abstract class FormatConversionProvider
* @throws IllegalArgumentException if the conversion is not supported
*/
public abstract AudioInputStream getAudioInputStream(AudioFormat format,
- AudioInputStream source);
+ AudioInputStream source);
/**
* Return an array of all the source encodings supported by this conversion
@@ -109,7 +109,7 @@ public abstract class FormatConversionProvider
* @return an array of supported target formats
*/
public abstract AudioFormat[] getTargetFormats(AudioFormat.Encoding targ,
- AudioFormat src);
+ AudioFormat src);
/**
* Return true if this provider supports conversion from the given
@@ -119,13 +119,13 @@ public abstract class FormatConversionProvider
* @return true if the conversion is supported
*/
public boolean isConversionSupported(AudioFormat.Encoding targ,
- AudioFormat src)
+ AudioFormat src)
{
AudioFormat.Encoding[] encodings = getTargetEncodings(src);
for (int i = 0; i < encodings.length; ++i)
{
- if (targ.equals(encodings[i]))
- return true;
+ if (targ.equals(encodings[i]))
+ return true;
}
return false;
}
@@ -154,14 +154,14 @@ public abstract class FormatConversionProvider
AudioFormat.Encoding[] srcs = getSourceEncodings();
for (int i = 0; i < srcs.length; ++i)
{
- if (src.equals(srcs[i]))
- return true;
+ if (src.equals(srcs[i]))
+ return true;
}
return false;
}
/**
- * Return true if an encoding matching the argument is supported as a
+ * Return true if an encoding matching the argument is supported as a
* target encoding by this provider.
* @param targ the target encoding
* @return true if it is supported
@@ -171,8 +171,8 @@ public abstract class FormatConversionProvider
AudioFormat.Encoding[] encodings = getTargetEncodings();
for (int i = 0; i < encodings.length; ++i)
{
- if (targ.equals(encodings[i]))
- return true;
+ if (targ.equals(encodings[i]))
+ return true;
}
return false;
}