began work on making mp3spi work with libgdx
This commit is contained in:
parent
68422f0453
commit
2821db605e
@ -79,14 +79,15 @@ project(":core") {
|
|||||||
|
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
|
compile group: 'com.googlecode.soundlibs', name: 'jlayer', version: '1.0.1.4'
|
||||||
|
|
||||||
|
compile group: 'com.googlecode.soundlibs', name: 'mp3spi', version: '1.9.5.4'
|
||||||
|
|
||||||
compile "com.badlogicgames.gdx:gdx:$gdxVersion"
|
compile "com.badlogicgames.gdx:gdx:$gdxVersion"
|
||||||
compile "com.badlogicgames.gdx:gdx-freetype:$gdxVersion"
|
compile "com.badlogicgames.gdx:gdx-freetype:$gdxVersion"
|
||||||
compile "com.badlogicgames.gdx:gdx-box2d:$gdxVersion"
|
compile "com.badlogicgames.gdx:gdx-box2d:$gdxVersion"
|
||||||
compile "com.badlogicgames.box2dlights:box2dlights:$box2DLightsVersion"
|
compile "com.badlogicgames.box2dlights:box2dlights:$box2DLightsVersion"
|
||||||
|
|
||||||
compile group: 'com.googlecode.soundlibs', name: 'mp3spi', version: '1.9.5-1'
|
|
||||||
compile group: 'com.googlecode.soundlibs', name: 'jlayer', version: '1.0.1-1'
|
|
||||||
|
|
||||||
compile "org.apache.commons:commons-math3:3.2"
|
compile "org.apache.commons:commons-math3:3.2"
|
||||||
|
|
||||||
compile "com.github.rwl:jtransforms:2.4.0"
|
compile "com.github.rwl:jtransforms:2.4.0"
|
||||||
|
@ -74,18 +74,6 @@ public class Mp3AudioData implements AudioData {
|
|||||||
public void reset() {
|
public void reset() {
|
||||||
if (playbackMusic != null) {
|
if (playbackMusic != null) {
|
||||||
playbackMusic.stop();
|
playbackMusic.stop();
|
||||||
playbackMusic.dispose();
|
|
||||||
playbackMusic = null;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (din != null) {
|
|
||||||
try {
|
|
||||||
din.close();
|
|
||||||
in.close();
|
|
||||||
} catch (IOException e) {
|
|
||||||
// TODO Auto-generated catch block
|
|
||||||
e.printStackTrace();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -148,13 +136,17 @@ public class Mp3AudioData implements AudioData {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void dispose() {
|
public void dispose() {
|
||||||
|
reset();
|
||||||
playbackMusic.dispose();
|
playbackMusic.dispose();
|
||||||
|
if (din != null) {
|
||||||
try {
|
try {
|
||||||
|
din.close();
|
||||||
in.close();
|
in.close();
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
// TODO Auto-generated catch block
|
// TODO Auto-generated catch block
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -76,6 +76,7 @@ public class WavAudioData implements AudioData {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void dispose() {
|
public void dispose() {
|
||||||
|
reset();
|
||||||
playbackMusic.dispose();
|
playbackMusic.dispose();
|
||||||
decoder.cleanAndClose();
|
decoder.cleanAndClose();
|
||||||
}
|
}
|
||||||
|
@ -203,6 +203,9 @@ public class CreativeStage extends Stage implements MiniListener {
|
|||||||
beatViewer.setMusic(null, null);
|
beatViewer.setMusic(null, null);
|
||||||
volumeWindow.setMusic(null);
|
volumeWindow.setMusic(null);
|
||||||
graphViewer.setData(null, null, null);
|
graphViewer.setData(null, null, null);
|
||||||
|
if (musicPlayBackControls.getAudiofile() != null) {
|
||||||
|
musicPlayBackControls.getAudiofile().dispose();
|
||||||
|
}
|
||||||
musicPlayBackControls.setAudiofile(null);
|
musicPlayBackControls.setAudiofile(null);
|
||||||
analyzer = new AudioAnalyzer();
|
analyzer = new AudioAnalyzer();
|
||||||
analyzer.sender.addListener(this);
|
analyzer.sender.addListener(this);
|
||||||
|
Loading…
Reference in New Issue
Block a user