public interface AudioManager
| Modifier and Type | Interface and Description |
|---|---|
static class |
AudioManager.OutputBehavior
The possible behaviors of a output, if there is currently another output
|
| Modifier and Type | Method and Description |
|---|---|
List<UUID> |
getAllRegisteredAudioEnvironments() |
AudioFormat |
getDefaultInputAudioFormat() |
AudioFormat |
getDefaultOutputAudioFormat() |
AudioInputStream |
getInputStreamOfAudioEnvironment(UUID identifier)
Get's a AudioInputStream with the audio input from the audio environment described by the given identifier.
|
boolean |
isAudioEnvironmentCurrentlyOutputting(UUID identifier)
Checks whether the audio environment described by the given identifier is currently outputting any audio.
|
void |
playAudio(UUID identifier,
AudioInputStream audioToPlay,
AudioManager.OutputBehavior behavior)
Queues the playback of the given audio input stream on the audio environment specified by the given identifier
|
void |
stopAudioOutput(UUID identifier)
Stops all audio output on the audio environment specified by the given identifier.
|
void playAudio(UUID identifier, AudioInputStream audioToPlay, AudioManager.OutputBehavior behavior)
identifier - The identifier of the audio environment to play this audio on.audioToPlay - The audio to play.behavior - How to behave if there is some output already.void stopAudioOutput(UUID identifier)
identifier - The identifier of the audio environment to interrupt.List<UUID> getAllRegisteredAudioEnvironments()
UUIDs, each being the identifier of a registered audio environmentboolean isAudioEnvironmentCurrentlyOutputting(UUID identifier)
identifier - The identifier of the audio environment to checkAudioInputStream getInputStreamOfAudioEnvironment(UUID identifier)
For example the microphone input.
This stream should be read from with appropriate speed, because every other thread that has a InputStream from the same environment will need to wait otherwise.
If the stream is no longer needed, it must be closed.
identifier - The identifier of the audio environment to get the input Stream from.AudioFormat getDefaultOutputAudioFormat()
AudioFormat getDefaultInputAudioFormat()
Copyright © 2018. All rights reserved.