diff options
author | Harvey Harrison <[email protected]> | 2013-10-23 00:33:24 -0700 |
---|---|---|
committer | Harvey Harrison <[email protected]> | 2013-10-23 22:38:47 -0700 |
commit | 445e6117edb0ce3545d01065a067fb7a751db030 (patch) | |
tree | bef31601ed7fbc373626780c0cbc9fb9a7957332 /src/jogl/classes/com/jogamp/audio | |
parent | ee9d26c28589a25329ebd26ee6f714db0eedd092 (diff) |
jogl: add generics annotations to lists in the waveout code
Signed-off-by: Harvey Harrison <[email protected]>
Diffstat (limited to 'src/jogl/classes/com/jogamp/audio')
-rw-r--r-- | src/jogl/classes/com/jogamp/audio/windows/waveout/Mixer.java | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/jogl/classes/com/jogamp/audio/windows/waveout/Mixer.java b/src/jogl/classes/com/jogamp/audio/windows/waveout/Mixer.java index 3b76d2ebf..b36fd2637 100644 --- a/src/jogl/classes/com/jogamp/audio/windows/waveout/Mixer.java +++ b/src/jogl/classes/com/jogamp/audio/windows/waveout/Mixer.java @@ -50,7 +50,7 @@ public class Mixer { // Windows Event object private long event; - private volatile ArrayList/*<Track>*/ tracks = new ArrayList(); + private volatile ArrayList<Track> tracks = new ArrayList<Track>(); private Vec3f leftSpeakerPosition = new Vec3f(-1, 0, 0); private Vec3f rightSpeakerPosition = new Vec3f( 1, 0, 0); @@ -74,13 +74,13 @@ public class Mixer { } synchronized void add(Track track) { - ArrayList/*<Track>*/ newTracks = (ArrayList) tracks.clone(); + ArrayList<Track> newTracks = new ArrayList<Track>(tracks); newTracks.add(track); tracks = newTracks; } synchronized void remove(Track track) { - ArrayList/*<Track>*/ newTracks = (ArrayList) tracks.clone(); + ArrayList<Track> newTracks = new ArrayList<Track>(tracks); newTracks.remove(track); tracks = newTracks; } @@ -132,10 +132,10 @@ public class Mixer { @Override public void run() { while (!shutdown) { - List/*<Track>*/ curTracks = tracks; + List<Track> curTracks = tracks; - for (Iterator iter = curTracks.iterator(); iter.hasNext(); ) { - Track track = (Track) iter.next(); + for (Iterator<Track> iter = curTracks.iterator(); iter.hasNext(); ) { + Track track = iter.next(); try { track.fill(); } catch (IOException e) { @@ -209,10 +209,10 @@ public class Mixer { } // Run down all of the registered tracks mixing them in - List/*<Track>*/ curTracks = tracks; + List<Track> curTracks = tracks; - for (Iterator iter = curTracks.iterator(); iter.hasNext(); ) { - Track track = (Track) iter.next(); + for (Iterator<Track> iter = curTracks.iterator(); iter.hasNext(); ) { + Track track = iter.next(); // Consider only playing tracks if (track.isPlaying()) { // First recompute its gain |