I'm building an Android digital piano with Superpowered SDK.
I use a SuperpoweredAdvancedAudioPlayer instance for every tone (e.g. c tone, d tone, e tone...).
To avoid memory, I would like to reuse audio samples (mp3 files) across SuperpoweredAdvancedAudioPlayer instances and - if necessary - pitch them down/up by a halftone (100 cent). e.g. The "E tone" uses the mp3 sample for the "D tone" and is just pitched up by 100 cent.
How can I make it happen, that the SuperpoweredAdvancedAudioPlayer instance for the e tone uses the same audio object as the d tone? (I want that the d-tone.mp3 file is only once allocated in memory)
Thanks!
Current instantiation:
player1 = new SuperpoweredAdvancedAudioPlayer(&player1 , playerEventCallback1, samplerate, 0);
player1->open(path, fileAoffset, fileAlength);