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 the dispose().

Author:
mzechner

Method Summary
 void dispose()
          Disposes the AudioRecorder
 void 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 to
offset - the offset into the array
numSamples - the number of samples to be read

dispose

void dispose()
Disposes the AudioRecorder

Specified by:
dispose in interface Disposable


Copyright © 2013. All Rights Reserved.