Recording into ofSoundPlayer

Hi, I’m relatively new to the forum but hopefully someone out there can help with this problem:

I’ve been successfully reading audio input using ofSoundStream, but would like to store samples in ofSoundPlayer objects on a key press (for example), and then play them back. Is there a straightforward method for doing this? It seems like I will need a much larger buffer.

I haven’t really begun to write the code for this yet, but any input would be appreciated!