Increase playback speed of sound file in java

前端 未结 2 1932
暖寄归人
暖寄归人 2020-12-17 04:18

I\'m looking for information on how I can increase the playback speed of a sound file using Java and it\'s sound API.

I\'m currently using a clip and an AudioInputSt

2条回答
  •  有刺的猬
    2020-12-17 04:31

    I do this by using linear interpolation. As you step through your samples by some increment, use the fractional distance to create a value to stream.

    For example if you land at 1.25 (between a sample with value 10 and sample of value 30), you would output a value of 15.

提交回复
热议问题