aboutsummaryrefslogtreecommitdiffstats
path: root/src/jogl/classes/com/jogamp/audio/windows/waveout/Track.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/jogl/classes/com/jogamp/audio/windows/waveout/Track.java')
-rw-r--r--src/jogl/classes/com/jogamp/audio/windows/waveout/Track.java20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/jogl/classes/com/jogamp/audio/windows/waveout/Track.java b/src/jogl/classes/com/jogamp/audio/windows/waveout/Track.java
index 98a787478..5e55786ac 100644
--- a/src/jogl/classes/com/jogamp/audio/windows/waveout/Track.java
+++ b/src/jogl/classes/com/jogamp/audio/windows/waveout/Track.java
@@ -56,7 +56,7 @@ public class Track {
// If we're playing the file, this is its input stream
private InputStream input;
// Keep around the file name
- private File file;
+ private final File file;
// Whether we're playing this sound
private boolean playing;
// Whether we're looping this sound
@@ -64,7 +64,7 @@ public class Track {
// The position of this sound; defaults to being at the origin
private volatile Vec3f position = new Vec3f();
- Track(File file) throws IOException {
+ Track(final File file) throws IOException {
if (!file.getName().endsWith(".rawsound")) {
throw new IOException("Unsupported file format (currently supports only raw sounds)");
}
@@ -96,7 +96,7 @@ public class Track {
openInput();
// Fill it immediately
fill();
- } catch (IOException e) {
+ } catch (final IOException e) {
e.printStackTrace();
return;
}
@@ -109,7 +109,7 @@ public class Track {
return playing;
}
- public synchronized void setLooping(boolean looping) {
+ public synchronized void setLooping(final boolean looping) {
this.looping = looping;
}
@@ -117,7 +117,7 @@ public class Track {
return looping;
}
- public void setPosition(float x, float y, float z) {
+ public void setPosition(final float x, final float y, final float z) {
position = new Vec3f(x, y, z);
}
@@ -125,7 +125,7 @@ public class Track {
if (input == null) {
return;
}
- SoundBuffer curBuffer = fillingBuffer;
+ final SoundBuffer curBuffer = fillingBuffer;
if (!curBuffer.empty()) {
return;
}
@@ -152,7 +152,7 @@ public class Track {
private float leftGain;
private float rightGain;
- void setLeftGain(float leftGain) {
+ void setLeftGain(final float leftGain) {
this.leftGain = leftGain;
}
@@ -160,7 +160,7 @@ public class Track {
return leftGain;
}
- void setRightGain(float rightGain) {
+ void setRightGain(final float rightGain) {
this.rightGain = rightGain;
}
@@ -180,7 +180,7 @@ public class Track {
// This is called by the mixer and must be extremely fast
float nextSample() {
- float res = activeBuffer.getSample(samplePosition++);
+ final float res = activeBuffer.getSample(samplePosition++);
++samplesRead;
if (!hasNextSample()) {
swapBuffers();
@@ -193,7 +193,7 @@ public class Track {
}
synchronized void swapBuffers() {
- SoundBuffer tmp = activeBuffer;
+ final SoundBuffer tmp = activeBuffer;
activeBuffer = fillingBuffer;
fillingBuffer = tmp;
fillingBuffer.empty(true);