public class JavaSoundAudioPlayer extends Object implements AudioPlayer
Modifier and Type | Field and Description |
---|---|
protected AudioInputStream |
ais |
protected boolean |
isMpeg |
protected boolean |
isOgg |
protected boolean |
isWav |
Constructor and Description |
---|
JavaSoundAudioPlayer()
Creates a new instance of JavaSoundAudioPlayer
|
Modifier and Type | Method and Description |
---|---|
protected InputStream |
checkInputStream(InputStream is,
String name) |
void |
close() |
Clip |
getClip() |
void |
play() |
void |
realize(String fileName,
MediaBag mediaBag) |
boolean |
setDataSource(Object source) |
void |
stop() |
protected AudioInputStream ais
protected boolean isMpeg
protected boolean isOgg
protected boolean isWav
public JavaSoundAudioPlayer()
public boolean setDataSource(Object source) throws Exception
setDataSource
in interface AudioPlayer
Exception
public void realize(String fileName, MediaBag mediaBag) throws Exception
realize
in interface AudioPlayer
Exception
public void close()
close
in interface AudioPlayer
public void play()
play
in interface AudioPlayer
public void stop()
stop
in interface AudioPlayer
protected InputStream checkInputStream(InputStream is, String name) throws Exception
Exception
Copyright © 2004-15 Francesc Busquets (fbusquets@xtec.cat) & Departament d'Educació de la Generalitat de Catalunya (info@xtec.cat)
Licensed under the terms of the GNU General Public License.