diff options
author | Sven Gothel <[email protected]> | 2013-10-25 01:50:34 +0200 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2013-10-25 01:50:34 +0200 |
commit | 472dae2dd6bafcd1d867b090369c359417db0d8d (patch) | |
tree | 42ff815fba3bac9e5f7ef82d2d208e9851ce603c /src/jogl/classes/com/jogamp/audio | |
parent | 7b6fe9e4d26b4d3ff2a9ffac12523bcd29196db0 (diff) | |
parent | 445e6117edb0ce3545d01065a067fb7a751db030 (diff) |
Merge remote-tracking branch 'hharrison/master'
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 |