Slip streatch keeps the pitch constant while altering duration.
The easiest way to reproduce halfspeed/double speed playback is to record at half
/double the intended sample rate, then alter the header of the sample file to the intended sample rate.
In other words, if your intended sample rate is 48k and you want to reproduce a halfspeed effect, record at 96khz then use a wav editor (audacity for example) to change sample rate value the header in the wav file to 48khz. When you playback the modified file, it will have twice the duration and half the pitch of the original.
Going the other way needs an extra step. Assuming the intended rate is 48khz, recording at 24khz is a bad idea. In that case i would record at 48khz, the modify the rate in the header to 96khz. This modified file will playback at double the pitch and half the duration. The additional step is to downsample the modified file to 48khz to maintain the altered pitch and duration.
The key is modifying the wav file header sample rate directly. This changes the way the file contents are interpreted.