/[classpath]/classpath/javax/sound/midi/Sequence.java
ViewVC logotype

Diff of /classpath/javax/sound/midi/Sequence.java

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

revision 1.2.2.1 by gnu_andrew, Wed Nov 2 00:43:41 2005 UTC revision 1.2.2.2 by tromey, Wed Nov 2 18:35:11 2005 UTC
# Line 65  public class Sequence Line 65  public class Sequence
65    /**    /**
66     * The MIDI tracks used by this sequence.     * The MIDI tracks used by this sequence.
67     */     */
68    protected Vector tracks;    protected Vector<Track> tracks;
69        
70    /**    /**
71     * Tempo-based timing.  Resolution is specified in ticks per beat.     * Tempo-based timing.  Resolution is specified in ticks per beat.
# Line 107  public class Sequence Line 107  public class Sequence
107      this.divisionType = divisionType;      this.divisionType = divisionType;
108      this.resolution = resolution;      this.resolution = resolution;
109            
110      tracks = new Vector(numTracks);      tracks = new Vector<Track>(numTracks);
111      while (numTracks > 0)      while (numTracks > 0)
112        tracks.set(--numTracks, new Track());        tracks.set(--numTracks, new Track());
113    }    }
# Line 189  public class Sequence Line 189  public class Sequence
189     */     */
190    public Track[] getTracks()    public Track[] getTracks()
191    {    {
192      return (Track[]) tracks.toArray(new Track[tracks.size()]);      return tracks.toArray(new Track[tracks.size()]);
193    }    }
194        
195    /**    /**
# Line 224  public class Sequence Line 224  public class Sequence
224    public long getTickLength()    public long getTickLength()
225    {    {
226      long length = 0;      long length = 0;
227      Iterator itr = tracks.iterator();      Iterator<Track> itr = tracks.iterator();
228      while (itr.hasNext())      while (itr.hasNext())
229      {      {
230        Track track = (Track) itr.next();        Track track = itr.next();
231        long trackTicks = track.ticks();        long trackTicks = track.ticks();
232        if (trackTicks > length)        if (trackTicks > length)
233          length = trackTicks;          length = trackTicks;

Legend:
Removed from v.1.2.2.1  
changed lines
  Added in v.1.2.2.2

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26