I want to implement a BPM matching Crossfade feature using Exoplayer. Basically I have a concept how it should work, but I'm not sure which Exoplayer classes to modify to achieve my goals.
Let me please first write how I want to do this so you can understand the case.
As you probably know BPM Crossfade let to seamlessly switch from one song to another. Additionally it adjusts second song tempo to first song tempo during the crossfade.
So the plan is as follows:
Load song A and B so they both starts to buffer.
Decoded samples of song A and B are stored in buffers BF1 and BF2.
There is a class called MUX which is a main buffer and contains both songs buffers BF1 and BF2. MUX provides audio samples to the Player. Samples provided to the Player are BF1 samples or mixed samples from BF1 and BF2 if there is a crossfade.
If buffer reach the crossfade point then samples are send to Analyser class so it can analyse samples from both buffers and modify them for crossfade. Analyser sends modified samples to MUX which updated it's main buffer.
When crossfade is finished load next song from playlist
So basically which class to extend to create class like MUX? Should it be some custom MediaSource? How can I access BF1 and BF2?
I've also read somewhere that you don't anymore buffer songs that are not active. How can I overcome this as I want to manage second song buffer.
I hope you can guide me a little bit. I decided to ask question here and not on StackOverflow as you have much deeper knowledge of ExoPlayer structure.
This is quite far outside the scope of this issue tracker. We're unable to offer advice on this kind of large customization effort; we simply don't have enough time. Sorry.
Hello,
I want to implement a BPM matching Crossfade feature using Exoplayer. Basically I have a concept how it should work, but I'm not sure which Exoplayer classes to modify to achieve my goals.
Let me please first write how I want to do this so you can understand the case. As you probably know BPM Crossfade let to seamlessly switch from one song to another. Additionally it adjusts second song tempo to first song tempo during the crossfade. So the plan is as follows:
So basically which class to extend to create class like MUX? Should it be some custom MediaSource? How can I access BF1 and BF2?
I've also read somewhere that you don't anymore buffer songs that are not active. How can I overcome this as I want to manage second song buffer.
I hope you can guide me a little bit. I decided to ask question here and not on StackOverflow as you have much deeper knowledge of ExoPlayer structure.
Thanks in advance for any help!