MP3 Audio Streaming through modifying some of slick's openal files

May rarly crash/not play on next music.
May have introduced other unknown bugs. 
This may be due to loading it async.
Also loading of ogg is not loaded async anymore as it seems it doesn't
work very well.
This commit is contained in:
fd
2015-02-08 23:48:55 -05:00
parent c87cc96c07
commit 6883e2ab44
7 changed files with 2111 additions and 14 deletions

View File

@@ -285,7 +285,7 @@ public class Game extends BasicGameState {
}
if (isLeadIn())
trackPosition = leadInTime * -1; // render approach circles during song lead-in
trackPosition = (leadInTime - Options.getMusicOffset()) * -1; // render approach circles during song lead-in
// countdown
if (osu.countdown > 0) { // TODO: implement half/double rate settings
@@ -376,7 +376,7 @@ public class Game extends BasicGameState {
if (isLeadIn()) { // stop updating during song lead-in
leadInTime -= delta;
if (!isLeadIn())
MusicController.playAt(0, false);
MusicController.resume();
return;
}
@@ -694,6 +694,10 @@ public class Game extends BasicGameState {
// reset game data
resetGameData();
//needs to play before we can set position
//so we can resume without lag later
MusicController.play();
MusicController.setPosition(0);
MusicController.pause();