The naive approach is to play it using a different sampling rate as compared to the sampling rate used to record the file. For example, if the file was recorded with Fs=44100Hz, then playing it with Fs=22050Hz, will give you half the original pitch.
Of course this naive approach involves changing the duration of the file, and other sound-related artifacts. If you need something less naive, you will have to implement a pitch-shifting algorithm yourself, and that's a huge topic --- I suggest you start by searching pitch shift
in google.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…