writeSamples(float[], int, int) and
writeSamples(short[], int, int) methods to write float or 16-bit signed short PCM data directly to the audio device.
Stereo samples are interleaved in the order left channel sample, right channel sample. The dispose() method must be
called when this AudioDevice is no longer needed.
| Modifier and Type | Method and Description |
|---|---|
| public void | dispose()
Redeclares com. Frees all resources associated with this AudioDevice. |
| public int | |
| public boolean | |
| public void | |
| public void | |
| public void | |
| public void | writeSamples(short[]
The samples. samples, int The offset into the samples array offset, int the number of samples to write to the device numSamples)Writes the array of 16-bit signed PCM samples to the audio device and blocks until they have been processed. |
| public void | writeSamples(float[]
The samples. samples, int The offset into the samples array offset, int the number of samples to write to the device numSamples)Writes the array of float PCM samples to the audio device and blocks until they have been processed. |
| dispose | back to summary |
|---|---|
| public void dispose() Redeclares com. Frees all resources associated with this AudioDevice. Needs to be called when the device is no longer needed. | |
| getLatency | back to summary |
|---|---|
public int getLatency()
| |
| isMono | back to summary |
|---|---|
public boolean isMono()
| |
| pause | back to summary |
|---|---|
| public void pause() Pauses the audio device if supported | |
| resume | back to summary |
|---|---|
| public void resume() Unpauses the audio device if supported | |
| setVolume | back to summary |
|---|---|
| public void setVolume(float volume) Sets the volume in the range [0,1]. | |
| writeSamples | back to summary |
|---|---|
| public void writeSamples(short[] samples, int offset, int numSamples) Writes the array of 16-bit signed PCM samples to the audio device and blocks until they have been processed.
| |
| writeSamples | back to summary |
|---|---|
| public void writeSamples(float[] samples, int offset, int numSamples) Writes the array of float PCM samples to the audio device and blocks until they have been processed.
| |