can i increase or decrease the audio speed in expo audio
wodin
August 3, 2019, 9:34am
2
Yes.
See the audio-recording-example . If you run it you will see it allows you to record some audio and then play it back. There is a slider to adjust the rate of playback.
Here is the setRateAsync
call:
_onVolumeSliderValueChange = value => {
if (this.sound != null) {
this.sound.setVolumeAsync(value);
}
};
_trySetRate = async (rate, shouldCorrectPitch) => {
if (this.sound != null) {
try {
await this.sound.setRateAsync(rate, shouldCorrectPitch);
} catch (error) {
// Rate changing could not be performed, possibly because the client's Android API is too old.
}
}
};
_onRateSliderSlidingComplete = async value => {
this._trySetRate(value * RATE_SCALE, this.state.shouldCorrectPitch);
};
system
Closed
August 18, 2019, 9:34am
3
This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.