Sample and Hold and rate reducer, aka bit crusher, effect for the Teensy Audio library http://www.pjrc.com/teensy/td_libs_Audio.html
You can implemnt it in two ways.
As shown in "bit_crush_example":
Add effect_sh.cpp and effect_sh.h to the audio library directory and add the line
#include "effect_sh.h"
to audio.h
As shown in "sample_and_hold_example":
No chance to the audio library folder is necessary, all necessary files are in the ino folder.
More info in the examples