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, stopfinalizepublic SoundBufferRecorder()
@Deprecated protected long nativeCreate()
SFMLNativeObjectnativeCreate in class SoundRecorder@Deprecated protected void nativeSetExPtr()
SFMLNativeObjectnativeSetExPtr in class SoundRecorder@Deprecated protected void nativeDelete()
SFMLNativeObjectnativeDelete in class SoundRecorderpublic ConstSoundBuffer getBuffer()
SoundRecorder.start(int) and SoundRecorder.stop() methods.protected final boolean onStart()
SoundRecorderonStart in class SoundRecordertrue to start recording after this method is done, false to cancel.protected final boolean onProcessSamples(short[] samples)
SoundRecorderonProcessSamples in class SoundRecordersamples - 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()
SoundRecorderonStop in class SoundRecorder