Package com.badlogic.gdx.audio
Interface AudioRecorder
-
- All Superinterfaces:
Disposable
public interface AudioRecorder extends Disposable
An AudioRecorder allows to record input from an audio device. It has a sampling rate and is either stereo or mono. Samples are returned in signed 16-bit PCM format. Stereo samples are interleaved in the order left channel, right channel. The AudioRecorder has to be disposed if no longer needed via thedispose()
.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
dispose()
Disposes the AudioRecordervoid
read(short[] samples, int offset, int numSamples)
Reads in numSamples samples into the array samples starting at offset.
-
-
-
Method Detail
-
read
void read(short[] samples, int offset, int numSamples)
Reads in numSamples samples into the array samples starting at offset. If the recorder is in stereo you have to multiply numSamples by 2.- Parameters:
samples
- the array to write the samples tooffset
- the offset into the arraynumSamples
- the number of samples to be read
-
dispose
void dispose()
Disposes the AudioRecorder- Specified by:
dispose
in interfaceDisposable
-
-