
public class AudioFrame extends Object
MediaAudioConverter.
Caller must call dispose() when done to drain the line and
release resources.
This class has no Humble dependencies per-see, but does playback audio that comes out of a converter.
| Modifier and Type | Method and Description |
|---|---|
void |
dispose()
Drain the line and then close it.
|
AudioFormat |
getFormat()
Get the audio format being used.
|
static AudioFrame |
make()
Create an audio frame with the default assumed format.
|
static AudioFrame |
make(AudioFormat audioFormat)
Get a connection to the speaker, if available.
|
void |
play(ByteBuffer rawAudio)
Play the given bytes (in
getFormat() format on the device. |
public static AudioFrame make()
public static AudioFrame make(AudioFormat audioFormat)
audioFormat - The java audio format that we will use.public AudioFormat getFormat()
public void play(ByteBuffer rawAudio)
getFormat() format on the device.rawAudio - a byte buffer where the data from Buffer.position()
to Buffer.limit() will be written.public void dispose()
Copyright © 2018 Humble Software. All rights reserved.