Specialized SoundRecorder which stores the captured audio data into a sound buffer.
if (SoundBufferRecorder.isAvailable()) { // Record some audio data auto recorder = SoundBufferRecorder(); recorder.start(); ... recorder.stop(); // Get the buffer containing the captured audio data auto buffer = recorder.getBuffer(); // Save it to a file (for example...) buffer.saveToFile("my_record.ogg"); }
$(SOUNDRECORDER_LINK)
$(U SoundBufferRecorder) allows to access a recorded sound through a $(SOUNDBUFFER_LINK), so that it can be played, saved to a file, etc.
It has the same simple interface as its base class (start(), stop()) and adds a function to retrieve the recorded sound buffer (getBuffer()).
As usual, don't forget to call the isAvailable() function before using this class (see $(SOUNDRECORDER_LINK) for more details about this).