-
Notifications
You must be signed in to change notification settings - Fork 6k
Description
Hi,
I'm migrating my app from ExoPlayer r1.5.10 the the latest 2.X, and I'm excited to see that pitch-shifting and time-stretching has been incorporated to the library formally, and in the AudioTrack wrapper object, with logic to enable draining of current transformed data when changing playback parameters and such.
According to its author, Sonic however is mostly aimed at time-stretching and pitch-shifting of speech, and yields pretty poor quality for music. Because of this, it'd be great for the AudioTrack object to treat SonicAudioProcessor as an abstraction (some kind of TimeStretchingPitchShiftingAudioProcessor interface) that we could replace with our own implementations that use different algorithms.
For what I've seen, the only extra methods that AudioTrack is calling on the instance (apart from those from the AudioProcessor interface), are setPitch / setSpeed / getOutputByteCount / getInputByteCount, which would be pretty generic to any other implementation.
Would it make sense to provide this functionality? I could come up with an RB that lets users of the library to pass the specific time-stretching instance to use through the MediaCodecAudioRenderer constructor.
Thanks!
Bruno