2014-08-28 88 views

回答

1

在這裏Changing Pitch and Frequency of Recorded Audio

mAudioManager = (AudioManager) context.getSystemService(Context.AUDIO_SERVICE); 
mSoundPool = new SoundPool(size, AudioManager.STREAM_MUSIC, 0); 
mSoundPoolMap = new HashMap<Integer, Integer>(); 
mSoundPoolMap.put(index, mSoundPool.load(context, R.raw.sound, 1)); 


mSoundPool.play(id, streamVolume, streamVolume, 1, loop, 1f); 

答案頻率爲1F的一部分。如果您將其更改爲介於.5f和2.0f之間的值,這會減慢或加快樣本的速度,從而改變音高。

來自: Changing Pitch and Frequency of Recorded Audio