APIdia Launch Partner
Top Fields Constructors Methods
com.badlogic.gdx.backends.lwjgl3.audio

public Class JavaSoundAudioRecorder

extends Object
implements AudioRecorder
Class Inheritance
All Implemented Interfaces
com.badlogic.gdx.audio.AudioRecorder, com.badlogic.gdx.utils.Disposable
Imports
javax.sound.sampled.AudioFormat, .AudioFormat.Encoding, .AudioSystem, .TargetDataLine, com.badlogic.gdx.audio.AudioRecorder, com.badlogic.gdx.utils.GdxRuntimeException

Author
mzechner

Field Summary

Modifier and TypeField and Description
private byte[]
private TargetDataLine

Constructor Summary

AccessConstructor and Description
public
JavaSoundAudioRecorder(int samplingRate, boolean isMono)

Method Summary

Modifier and TypeMethod and Description
public void
dispose()

Implements com.badlogic.gdx.audio.AudioRecorder.dispose.

Disposes the AudioRecorder

public void
read(short[] samples, int offset, int numSamples)

Implements com.badlogic.gdx.audio.AudioRecorder.read.

Reads in numSamples samples into the array samples starting at offset.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

bufferback to summary
private byte[] buffer
lineback to summary
private TargetDataLine line

Constructor Detail

JavaSoundAudioRecorderback to summary
public JavaSoundAudioRecorder(int samplingRate, boolean isMono)

Method Detail

disposeback to summary
public void dispose()

Implements com.badlogic.gdx.audio.AudioRecorder.dispose.

Doc from com.badlogic.gdx.audio.AudioRecorder.dispose.

Disposes the AudioRecorder

readback to summary
public void read(short[] samples, int offset, int numSamples)

Implements com.badlogic.gdx.audio.AudioRecorder.read.

Doc from com.badlogic.gdx.audio.AudioRecorder.read.

Reads in numSamples samples into the array samples starting at offset. If the recorder is in stereo you have to multiply numSamples by 2.