Added better logging and browser support.

We still need to work on the Linux browser a bit.
This commit is contained in:
Markil3
2021-07-25 14:07:07 -07:00
parent 6a95966f9e
commit 77c0b4fa67
517 changed files with 286 additions and 495 deletions

View File

@@ -4,6 +4,8 @@
package edu.regis.universeplayer.localPlayer;
import com.intervigil.wave.WaveReader;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.io.File;
import java.io.FileNotFoundException;
@@ -20,6 +22,8 @@ import java.util.LinkedList;
*/
public class Player
{
private static final Logger logger = LoggerFactory.getLogger(Player.class);
static
{
System.loadLibrary("player");
@@ -81,7 +85,7 @@ public class Player
}
catch (IOException e)
{
e.printStackTrace();
logger.error("Could not save WAVE file", e);
}
}
@@ -166,7 +170,7 @@ public class Player
}
catch (IOException e)
{
e.printStackTrace();
logger.error("Could not save audio file " + file, e);
}
// Compare JNI vs Java
try (AudioFile stream = getAudioStream(new File(args[0])))
@@ -177,7 +181,7 @@ public class Player
}
catch (IOException e)
{
e.printStackTrace();
logger.error("Could not save audio file " + file, e);
}
}
}