/[svn]/jlscp/trunk/src/org/linuxsampler/lscp/MidiInputDevice.java
ViewVC logotype

Diff of /jlscp/trunk/src/org/linuxsampler/lscp/MidiInputDevice.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 783 by iliev, Wed Jun 1 07:11:31 2005 UTC revision 784 by iliev, Mon Oct 10 14:55:44 2005 UTC
# Line 22  Line 22 
22    
23  package org.linuxsampler.lscp;  package org.linuxsampler.lscp;
24    
25    
26  /**  /**
27   * Provides information about the current settings of a specific MIDI input device.   * Provides information about the current settings of a specific MIDI input device.
28   * @author  Grigor Iliev   * @author  Grigor Iliev
29   */   */
30  public class MidiInputDevice extends AbstractDevice {  public class MidiInputDevice extends AbstractDevice {
31            private MidiPort[] midiPorts = new MidiPort[0];
32            
33          /** Creates a new instance of MidiInputDevice */          /** Creates a new instance of MidiInputDevice */
34          public          public
35          MidiInputDevice() { }          MidiInputDevice() { }
36            
37            /**
38             * Gets the current non-<code>null</code> list of MIDI ports this device offers.
39             * @return A <code>MidiPort</code> array providing all MIDI ports this device offers.
40             */
41            public MidiPort[]
42            getMidiPorts() { return midiPorts; }
43            
44            /**
45             * Sets the current list of MIDI ports.
46             * @param ports The new list of MIDI ports.
47             * @throws IllegalArgumentException If <code>ports</code> is <code>null</code>.
48             */
49            public void
50            setMidiPorts(MidiPort[] ports) {
51                    if(ports == null) throw new IllegalArgumentException("ports must be non null");
52                    midiPorts = ports;
53            }
54            
55            /**
56             * Gets the MIDI port at the specified index.
57             * @param index The index of the MIDI port to be retrieved.
58             */
59            public MidiPort
60            getMidiPort(int index) { return midiPorts[index]; }
61            
62            /**
63             * Gets the current number of MIDI ports this device offers.
64             * @return The current number of MIDI ports this device offers.
65             */
66            public int
67            getMidiPortCount() { return midiPorts.length; }
68  }  }

Legend:
Removed from v.783  
changed lines
  Added in v.784

  ViewVC Help
Powered by ViewVC