Package fr.formiko.usuel.media.audio
Class AudioPlayer.AudioThread
java.lang.Object
java.lang.Thread
fr.formiko.usuel.media.audio.AudioPlayer.AudioThread
- All Implemented Interfaces:
Runnable
- Enclosing class:
- AudioPlayer
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Thread
Thread.State, Thread.UncaughtExceptionHandler -
Field Summary
FieldsFields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate voiddoSounds()open file & do sounds.private AudioFormatgetOutFormat(AudioFormat inFormat)get audio format.voidinterrupt game & don't launch next music.voidrun()private voidstream(AudioInputStream in, SourceDataLine line)do sounds by reading line by line.private voidMethods inherited from class java.lang.Thread
activeCount, checkAccess, clone, countStackFrames, currentThread, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, onSpinWait, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, suspend, toString, yield
-
Field Details
-
ap
-
normallyEnded
private boolean normallyEnded -
gainControl
-
-
Constructor Details
-
AudioThread
-
-
Method Details
-
run
public void run() -
doSounds
private void doSounds()open file & do sounds. -
updateVolume
private void updateVolume() -
getOutFormat
get audio format. -
stream
do sounds by reading line by line.- Throws:
IOException
-
interrupt
public void interrupt()interrupt game & don't launch next music.
-