Is there's any way to save the modified audio to storage device using ExoPlayer

Viewed 55

After changing the speed and pitch of a local audio, I would like to save it into the storage device, I change the audio parameters using the code below :

  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);
    }

After some searchs I found TeeAudioProcessor and WavFileAudioBufferSink class can help me to achieve my needs, but I don't know how to use them, I can't find any simple code.

0 Answers
Related