|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object ch.aplu.util.SoundPlayer ch.aplu.util.SoundPlayerExt
public class SoundPlayerExt
Class for playing sound files using file streaming in a separate thread. Sound format supported: WAV (PCM_SIGNED), MP3 (Layer 1,2,3)
MP3 decoder from JavaLayer distributed by SourceForge.net.
The following jar files (or later versions) must reside in the classpath:
- jl1.0.1.jar
- mp3spi1.9.4.jar
- tritonius_share.jar
Download from www.javazoom.net or www.sourceforge.net.
Download of redistribution from www.aplu.ch/mp3support.
With thanks to the authors.
Constructor Summary | |
---|---|
SoundPlayerExt(javax.sound.sampled.AudioInputStream audioInputStream)
Same as SoundPlayerExt(audioIputStream, mixerIndex) using the default sound device. |
|
SoundPlayerExt(javax.sound.sampled.AudioInputStream audioInputStream,
int mixerIndex)
Construct a sound player attached to the given AudioInputStream using the given mixer index (sound device). |
|
SoundPlayerExt(byte[] ary,
javax.sound.sampled.AudioFormat audioFormat)
Same as SoundPlayerExt(ary, audioFormat, mixerIndex) using the default sound device. |
|
SoundPlayerExt(byte[] ary,
javax.sound.sampled.AudioFormat audioFormat,
int mixerIndex)
Construct a sound player with data from the given byte array using the given mixer index (sound device). |
|
SoundPlayerExt(java.io.ByteArrayOutputStream os,
javax.sound.sampled.AudioFormat audioFormat)
Same as SoundPlayerExt(os, audioFormat, mixerIndex) using the default sound device. |
|
SoundPlayerExt(java.io.ByteArrayOutputStream os,
javax.sound.sampled.AudioFormat audioFormat,
int mixerIndex)
Construct a sound player with data from the given ByteArrayOutputStream using the given mixer index (sound device). |
|
SoundPlayerExt(java.io.File audioFile)
Same as SoundPlayerEx(audioFile, mixerIndex) using the default sound device. |
|
SoundPlayerExt(java.io.File audioFile,
int nbMixer)
Construct a sound player attached to given File instance using the given mixer index (sound device). |
|
SoundPlayerExt(java.lang.Object resourceObj,
java.lang.String audioPathname)
Same as SoundPlayerExt(obj, audioPathname, mixerIndex) using the default sound device. |
|
SoundPlayerExt(java.lang.Object resourceObj,
java.lang.String audioPathname,
int mixerIndex)
Construct a sound player attached to given pathname from a JAR archive using the given mixer index (sound device). |
|
SoundPlayerExt(java.lang.String audioPathname)
Same as SoundPlayerEx(audioPathname, mixerIndex) using the default sound device. |
|
SoundPlayerExt(java.lang.String audioPathname,
int nbMixer)
Construct a sound player attached to given pathname (relative or fully qualified) using the given mixer index (sound device). |
|
SoundPlayerExt(java.net.URL url)
Same as SoundPlayerEx(url, mixerIndex) using the default sound device. |
|
SoundPlayerExt(java.net.URL url,
int nbMixer)
Construct a sound player attached to given URL using the given mixer index (sound device). |
Method Summary | |
---|---|
java.lang.String |
getMP3Info()
Return string with extended MP3 file information. |
Methods inherited from class ch.aplu.util.SoundPlayer |
---|
addSoundConverter, addSoundPlayerListener, advanceFrames, advanceTime, blockingPlay, delay, getAvailableMixers, getCurrentPos, getCurrentTime, getFormat, getFrameRate, getFrameSize, getMixerIndex, getMono, getStereo, getVolume, getWavInfo, getWavMono, getWavRaw, getWavStereo, isPlaying, mute, pause, play, playLoop, replay, rewindFrames, rewindTime, setVolume, stop, URLfromJAR |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SoundPlayerExt(java.lang.Object resourceObj, java.lang.String audioPathname, int mixerIndex)
public SoundPlayerExt(java.lang.Object resourceObj, java.lang.String audioPathname)
public SoundPlayerExt(java.net.URL url)
public SoundPlayerExt(javax.sound.sampled.AudioInputStream audioInputStream, int mixerIndex)
java.lang.RuntimeException
- if sound initialization failspublic SoundPlayerExt(javax.sound.sampled.AudioInputStream audioInputStream)
public SoundPlayerExt(java.io.ByteArrayOutputStream os, javax.sound.sampled.AudioFormat audioFormat, int mixerIndex)
java.lang.RuntimeException
- if sound initialization failspublic SoundPlayerExt(java.io.ByteArrayOutputStream os, javax.sound.sampled.AudioFormat audioFormat)
public SoundPlayerExt(byte[] ary, javax.sound.sampled.AudioFormat audioFormat, int mixerIndex)
java.lang.RuntimeException
- if sound initialization failspublic SoundPlayerExt(byte[] ary, javax.sound.sampled.AudioFormat audioFormat)
public SoundPlayerExt(java.net.URL url, int nbMixer)
java.lang.IllegalArgumentException
- if sound resource or sound system is unavailable.public SoundPlayerExt(java.io.File audioFile)
public SoundPlayerExt(java.io.File audioFile, int nbMixer)
java.lang.RuntimeException
- if sound initialization failspublic SoundPlayerExt(java.lang.String audioPathname)
public SoundPlayerExt(java.lang.String audioPathname, int nbMixer)
java.lang.RuntimeException
- if sound initialization failsMethod Detail |
---|
public java.lang.String getMP3Info()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |