close mp3 file handles.
This commit is contained in:
@@ -199,4 +199,13 @@ public class Mp3InputStream extends InputStream implements AudioInputStream {
|
|||||||
|
|
||||||
return skipped;
|
return skipped;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void close() throws IOException {
|
||||||
|
try {
|
||||||
|
bitstream.close();
|
||||||
|
} catch (BitstreamException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -392,5 +392,16 @@ public class OpenALStreamPlayer {
|
|||||||
public void resuming() {
|
public void resuming() {
|
||||||
lastUpdateTime = System.currentTimeMillis() - offsetTime;
|
lastUpdateTime = System.currentTimeMillis() - offsetTime;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void close() {
|
||||||
|
if(audio != null){
|
||||||
|
try {
|
||||||
|
audio.close();
|
||||||
|
} catch (IOException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -916,6 +916,9 @@ public class SoundStore {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(this.stream != null){
|
||||||
|
this.stream.close();
|
||||||
|
}
|
||||||
currentMusic = sources.get(0);
|
currentMusic = sources.get(0);
|
||||||
this.stream = stream;
|
this.stream = stream;
|
||||||
if (stream != null) {
|
if (stream != null) {
|
||||||
|
|||||||
Reference in New Issue
Block a user