Last active
March 23, 2017 13:07
-
-
Save sigmadeltasoftware/c31cb5e484c8f912ada879c887d485ee to your computer and use it in GitHub Desktop.
Android Low-Latency Audio Post-Processing with Superpowered - SuperpoweredRenderer constructor
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SuperpoweredRenderer::SuperpoweredRenderer(unsigned int samplerate, unsigned int buffersize, const char *path, int fileLength) { | |
/* | |
* According to the SuperpoweredAdvancedAudioPlayer::process method, the size of our buffer should be: numberOfSamples * 8 + 64 bytes big | |
*/ | |
stereoBuffer = (float *)memalign(16, (buffersize * 8) + 64); | |
audioPlayer = new SuperpoweredAdvancedAudioPlayer(&audioPlayer , playerEventCallbackA, samplerate, 0); | |
audioPlayer->open(path, 0, fileLength); | |
audioSystem = new SuperpoweredAndroidAudioIO(samplerate, buffersize, false, true, audioProcessing, this, -1, SL_ANDROID_STREAM_MEDIA, 0); | |
vibrato.initialize(44100); | |
vibrato.setDepth(0.0f); | |
vibrato.setFrequency(0); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
superpoweredSDK/Low-Latency-Android-iOS-Linux-Windows-tvOS-macOS-Interactive-Audio-Platform#264