This is easy:
1. Load your wave file into a buffer.
2. Take the first sample, multiply a pre-defined gain (0.2 or something less than 1), then add it to the sample at +1second (or how ever long you want your echo to be)
3. Take the second sample, multiply the pre-defined gain, then add it to the sample at +1 second.
Continue to the end of the file.