From 445e6117edb0ce3545d01065a067fb7a751db030 Mon Sep 17 00:00:00 2001 From: Harvey Harrison Date: Wed, 23 Oct 2013 00:33:24 -0700 Subject: jogl: add generics annotations to lists in the waveout code Signed-off-by: Harvey Harrison --- .../com/jogamp/audio/windows/waveout/Mixer.java | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'src/jogl/classes/com/jogamp/audio/windows') 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/**/ tracks = new ArrayList(); + private volatile ArrayList tracks = new ArrayList(); 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/**/ newTracks = (ArrayList) tracks.clone(); + ArrayList newTracks = new ArrayList(tracks); newTracks.add(track); tracks = newTracks; } synchronized void remove(Track track) { - ArrayList/**/ newTracks = (ArrayList) tracks.clone(); + ArrayList newTracks = new ArrayList(tracks); newTracks.remove(track); tracks = newTracks; } @@ -132,10 +132,10 @@ public class Mixer { @Override public void run() { while (!shutdown) { - List/**/ curTracks = tracks; + List curTracks = tracks; - for (Iterator iter = curTracks.iterator(); iter.hasNext(); ) { - Track track = (Track) iter.next(); + for (Iterator 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/**/ curTracks = tracks; + List curTracks = tracks; - for (Iterator iter = curTracks.iterator(); iter.hasNext(); ) { - Track track = (Track) iter.next(); + for (Iterator iter = curTracks.iterator(); iter.hasNext(); ) { + Track track = iter.next(); // Consider only playing tracks if (track.isPlaying()) { // First recompute its gain -- cgit v1.2.3