|
jjdh API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectdh.javax.sound.SoundFacade
public class SoundFacade
Field Summary | |
---|---|
protected static AudioProxy |
dummyAudioProxy
|
protected Map<String,BufferStrategy> |
map
|
protected BufferStrategyChooser |
strategyChooser
|
protected ExecutorService |
threadPool
|
Constructor Summary | |
---|---|
SoundFacade()
Creates a new SoundFacade with can play maximal eight sounds simultaneously. |
|
SoundFacade(int maxSimultaneousSounds)
Creates a new SoundFacade with the specified maximum number of simultaneous playable sounds. |
Method Summary | |
---|---|
static AudioInputStream |
asAudioInputStream(InputStream is)
Create a audio stream from the given input stream. |
static SourceDataLine |
getLine(AudioFormat audioFormat)
Open a data line to play the given type of sampled audio. |
protected static int |
getMaxSimultaneousSounds(AudioFormat playbackFormat)
Gets the maximum number of simultaneous sounds with the specified AudioFormat that the default mixer can play. |
protected BufferStrategy |
getStrategy(String name)
Returrns the saved strategy for the given key ( null, if no mapping exists). |
AudioProxy |
play(InputStream is,
String name)
Will try to play the given input stream. |
protected StandardAudioProxy |
playAudioStream(AudioInputStream audioInputStream)
Plays audio from the given uncompressed audio input stream. |
protected AudioProxy |
playAudioStream(BufferStrategy factory)
Plays the audio from the given audio stream factory. |
AudioProxy |
playByName(String name)
Will try to play the sound with the given Name (works only if the sound was olready one time played). |
void |
shutdown()
Shutdown this SoundFacade. |
AudioProxy |
stream(InputStream is)
Will try to stream the given input stream as audio. |
String |
toString()
Returns s textual description of this SoundFacace. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected static final AudioProxy dummyAudioProxy
protected BufferStrategyChooser strategyChooser
protected Map<String,BufferStrategy> map
protected ExecutorService threadPool
Constructor Detail |
---|
public SoundFacade()
public SoundFacade(int maxSimultaneousSounds)
Method Detail |
---|
protected BufferStrategy getStrategy(String name)
public AudioProxy stream(InputStream is)
public AudioProxy playByName(String name)
public AudioProxy play(InputStream is, String name)
protected AudioProxy playAudioStream(BufferStrategy factory)
ExecutionException
InterruptedException
protected StandardAudioProxy playAudioStream(AudioInputStream audioInputStream)
public static AudioInputStream asAudioInputStream(InputStream is)
public static SourceDataLine getLine(AudioFormat audioFormat)
audioFormat
- protected static int getMaxSimultaneousSounds(AudioFormat playbackFormat)
public void shutdown()
public String toString()
toString
in class Object
|
jjdh API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |