public class SoundBufferRecorder extends SoundRecorder
SoundRecorder
which stores captured audio data into a SoundBuffer
.Constructor and Description |
---|
SoundBufferRecorder()
Constructs a sound buffer recorder.
|
Modifier and Type | Method and Description |
---|---|
ConstSoundBuffer |
getBuffer()
Gets the sound buffer containing the captured audio data.
|
protected long |
nativeCreate()
Deprecated.
|
protected void |
nativeDelete()
Deprecated.
|
protected void |
nativeSetExPtr()
Deprecated.
|
protected boolean |
onProcessSamples(short[] samples)
Called when a new batch of audio samples comes in.
|
protected boolean |
onStart()
Called when the sound recorder starts recording.
|
protected void |
onStop()
Called when the audio capture has stopped.
|
getSampleRate, isAvailable, start, start, stop
finalize
public SoundBufferRecorder()
@Deprecated protected long nativeCreate()
SFMLNativeObject
nativeCreate
in class SoundRecorder
@Deprecated protected void nativeSetExPtr()
SFMLNativeObject
nativeSetExPtr
in class SoundRecorder
@Deprecated protected void nativeDelete()
SFMLNativeObject
nativeDelete
in class SoundRecorder
public ConstSoundBuffer getBuffer()
SoundRecorder.start(int)
and SoundRecorder.stop()
methods.protected final boolean onStart()
SoundRecorder
onStart
in class SoundRecorder
true
to start recording after this method is done, false
to cancel.protected final boolean onProcessSamples(short[] samples)
SoundRecorder
onProcessSamples
in class SoundRecorder
samples
- the 16-bit mono samples that were captured.true
to continue recording after this method is done, false
to stop recording.protected final void onStop()
SoundRecorder
onStop
in class SoundRecorder