public void setSpeed(float speed) {
PlaybackParameters param = new PlaybackParameters(speed, (float) getCurrentPitch());
player.setPlaybackParameters(param);
}
public void setPitch(float pitch) {
PlaybackParameters param = new PlaybackParameters((float) getCurrentTempo(), pitch);
player.setPlaybackParameters(param);
}
Now I'm trying to save the modified audio into the storage using your library, but I'm facing an issue the output tempo and pitch is completely different from the exoplayer
:
try {
AudioTool.getInstance(this)
.withAudio(copiedPath)
.changeAudioPitch(44100, pitch, tempo, null).saveCurrentTo(outputPath);
} catch (IOException e) {
e.printStackTrace();
}
The output playback audio becomes faster instead of slower, I will be very thankful if you help me out with this issue