Skip to content

Commit c4c3daf

Browse files
committed
Version 2.6.0
- New AutomaticVocalPitchCorrection class implements the auto-tune effect. Adjustable scale (which notes are valid), range (wide/bass/tenor/alto/soprano), speed and middle frequency. Can be used from subtle vocal pitch correction to the strong popular auto-tune sound. - "Offline mode" for AdvancedAudioPlayer. Set internalBufferSizeSeconds to 0 in the constructor to enable "offline mode", where the player can not be used for real-time playback, but can process audio in an iteration. - Android minimum version was increased to API Level 24 (Android 7, 2016). - Updated example projects to the recent versions of Android Studio, Xcode and Visual Studio.
1 parent 0bbd8a4 commit c4c3daf

File tree

136 files changed

+207
-292
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

136 files changed

+207
-292
lines changed

Examples_Android/SuperpoweredCrossExample/app/build.gradle

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@ apply plugin: 'com.android.application'
33
def superpowered_sdk_path = new File(projectDir, '../../../Superpowered')
44

55
android { // main settings for your application
6-
compileSdkVersion = 31
6+
compileSdkVersion = 33
77

88
defaultConfig {
99
applicationId "com.superpowered.crossexample"
10-
minSdkVersion 22
11-
targetSdkVersion 31
10+
minSdkVersion 24
11+
targetSdkVersion 33
1212
versionCode 1
1313
versionName "1.0"
1414

@@ -18,7 +18,7 @@ android { // main settings for your application
1818

1919
externalNativeBuild {
2020
cmake {
21-
arguments '-DANDROID_PLATFORM=android-22', '-DANDROID_TOOLCHAIN=clang', '-DANDROID_ARM_NEON=TRUE', '-DANDROID_STL=c++_static', "-DPATH_TO_SUPERPOWERED:STRING=${superpowered_sdk_path}"
21+
arguments '-DANDROID_PLATFORM=android-24', '-DANDROID_TOOLCHAIN=clang', '-DANDROID_ARM_NEON=TRUE', '-DANDROID_STL=c++_static', "-DPATH_TO_SUPERPOWERED:STRING=${superpowered_sdk_path}"
2222
cFlags '-O3', '-fsigned-char' // full optimization, char data type is signed
2323
cppFlags '-fsigned-char', "-I${superpowered_sdk_path}"
2424
}
@@ -31,10 +31,10 @@ android { // main settings for your application
3131
}
3232
}
3333

34-
ndkPath "/Volumes/iMect/android/ndk/23.1.7779620/android-ndk-r23b"
34+
ndkPath "/Volumes/iMect/android/ndk/25.1.8937393"
3535
}
3636

3737
dependencies {
3838
implementation fileTree(dir: 'libs', include: ['*.jar'])
39-
implementation 'androidx.appcompat:appcompat:1.4.1'
39+
implementation 'androidx.appcompat:appcompat:1.5.0'
4040
}

Examples_Android/SuperpoweredCrossExample/app/src/main/cpp/CrossExample.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -209,29 +209,29 @@ Java_com_superpowered_crossexample_MainActivity_CrossExample(
209209
// onPlayPause - Toggle playback state of player.
210210
extern "C" JNIEXPORT void
211211
Java_com_superpowered_crossexample_MainActivity_onPlayPause(JNIEnv * __unused env, jobject __unused obj, jboolean play) {
212-
example->onPlayPause(play);
212+
if (example) example->onPlayPause(play);
213213
}
214214

215215
// onCrossfader - Handle crossfader events.
216216
extern "C" JNIEXPORT void
217217
Java_com_superpowered_crossexample_MainActivity_onCrossfader(JNIEnv * __unused env, jobject __unused obj, jint value) {
218-
example->onCrossfader(value);
218+
if (example) example->onCrossfader(value);
219219
}
220220

221221
// onFxSelect - Handle FX selection.
222222
extern "C" JNIEXPORT void
223223
Java_com_superpowered_crossexample_MainActivity_onFxSelect(JNIEnv * __unused env, jobject __unused obj, jint value) {
224-
example->onFxSelect(value);
224+
if (example) example->onFxSelect(value);
225225
}
226226

227227
// onFxOff - Turn of all effects.
228228
extern "C" JNIEXPORT void
229229
Java_com_superpowered_crossexample_MainActivity_onFxOff(JNIEnv * __unused env, jobject __unused obj) {
230-
example->onFxOff();
230+
if (example) example->onFxOff();
231231
}
232232

233233
// onFxValue - Adjust FX value.
234234
extern "C" JNIEXPORT void
235235
Java_com_superpowered_crossexample_MainActivity_onFxValue(JNIEnv * __unused env, jobject __unused obj, jint value) {
236-
example->onFxValue(value);
236+
if (example) example->onFxValue(value);
237237
}

Examples_Android/SuperpoweredCrossExample/app/src/main/java/com/superpowered/crossexample/MainActivity.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ public void CrossExample_PlayPause(View button) {
144144
}
145145

146146
@Override
147-
public boolean onCreateOptionsMenu(Menu menu) {
147+
public boolean onCreateOptionsMenu(@NonNull Menu menu) {
148148
// Inflate the menu; this adds items to the action bar if it is present.
149149
getMenuInflater().inflate(R.menu.menu_main, menu);
150150
return true;

Examples_Android/SuperpoweredCrossExample/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ buildscript {
88
google()
99
}
1010
dependencies {
11-
classpath 'com.android.tools.build:gradle:7.1.1'
11+
classpath 'com.android.tools.build:gradle:7.2.2'
1212
}
1313
}
1414

Examples_Android/SuperpoweredCrossExample/gradle/wrapper/gradle-wrapper.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
33
distributionPath=wrapper/dists
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists
6-
distributionUrl=https\://services.gradle.org/distributions/gradle-7.2-bin.zip
6+
distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.3-bin.zip

Examples_Android/SuperpoweredEffect/app/build.gradle

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@ apply plugin: 'com.android.application'
33
def superpowered_sdk_path = new File(projectDir, '../../../Superpowered')
44

55
android { // main settings for your application
6-
compileSdkVersion = 31
6+
compileSdkVersion = 33
77

88
defaultConfig {
99
applicationId "com.superpowered.effect"
10-
minSdkVersion 22
11-
targetSdkVersion 31
10+
minSdkVersion 24
11+
targetSdkVersion 33
1212
versionCode 1
1313
versionName "1.0"
1414

@@ -18,7 +18,7 @@ android { // main settings for your application
1818

1919
externalNativeBuild {
2020
cmake {
21-
arguments '-DANDROID_PLATFORM=android-22', '-DANDROID_TOOLCHAIN=clang', '-DANDROID_ARM_NEON=TRUE', '-DANDROID_STL=c++_static', "-DPATH_TO_SUPERPOWERED:STRING=${superpowered_sdk_path}"
21+
arguments '-DANDROID_PLATFORM=android-24', '-DANDROID_TOOLCHAIN=clang', '-DANDROID_ARM_NEON=TRUE', '-DANDROID_STL=c++_static', "-DPATH_TO_SUPERPOWERED:STRING=${superpowered_sdk_path}"
2222
cFlags '-O3', '-fsigned-char' // full optimization, char data type is signed
2323
cppFlags '-fsigned-char', "-I${superpowered_sdk_path}"
2424
}
@@ -31,11 +31,11 @@ android { // main settings for your application
3131
}
3232
}
3333

34-
ndkPath "/Volumes/iMect/android/ndk/23.1.7779620/android-ndk-r23b"
34+
ndkPath "/Volumes/iMect/android/ndk/25.1.8937393"
3535
}
3636

3737
dependencies {
3838
implementation fileTree(dir: 'libs', include: ['*.jar'])
39-
implementation 'androidx.appcompat:appcompat:1.4.1'
40-
implementation 'androidx.constraintlayout:constraintlayout:2.1.3'
39+
implementation 'androidx.appcompat:appcompat:1.5.0'
40+
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
4141
}

Examples_Android/SuperpoweredEffect/app/src/main/java/com/superpowered/effect/MainActivity.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ protected void onCreate(Bundle savedInstanceState) {
4141

4242
@Override
4343
public void onRequestPermissionsResult(int requestCode, @NonNull String[] permissions, @NonNull int[] grantResults) {
44+
super.onRequestPermissionsResult(requestCode, permissions, grantResults);
4445
// Called when the user answers to the permission dialogs.
4546
if ((requestCode != 0) || (grantResults.length < 1) || (grantResults.length != permissions.length)) return;
4647
boolean hasAllPermissions = true;

Examples_Android/SuperpoweredEffect/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ buildscript {
77
jcenter()
88
}
99
dependencies {
10-
classpath 'com.android.tools.build:gradle:7.1.1'
10+
classpath 'com.android.tools.build:gradle:7.2.2'
1111

1212

1313
// NOTE: Do not place your application dependencies here; they belong

Examples_Android/SuperpoweredEffect/gradle/wrapper/gradle-wrapper.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
33
distributionPath=wrapper/dists
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists
6-
distributionUrl=https\://services.gradle.org/distributions/gradle-7.2-bin.zip
6+
distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.3-bin.zip

Examples_Android/SuperpoweredFrequencyDomain/app/build.gradle

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@ apply plugin: 'com.android.application'
33
def superpowered_sdk_path = new File(projectDir, '../../../Superpowered')
44

55
android { // main settings for your application
6-
compileSdkVersion = 31
6+
compileSdkVersion = 33
77

88
defaultConfig {
99
applicationId "com.superpowered.frequencydomain"
10-
minSdkVersion 22
11-
targetSdkVersion 31
10+
minSdkVersion 24
11+
targetSdkVersion 33
1212
versionCode 1
1313
versionName "1.0"
1414

@@ -18,7 +18,7 @@ android { // main settings for your application
1818

1919
externalNativeBuild {
2020
cmake {
21-
arguments '-DANDROID_PLATFORM=android-22', '-DANDROID_TOOLCHAIN=clang', '-DANDROID_ARM_NEON=TRUE', '-DANDROID_STL=c++_static', "-DPATH_TO_SUPERPOWERED:STRING=${superpowered_sdk_path}"
21+
arguments '-DANDROID_PLATFORM=android-24', '-DANDROID_TOOLCHAIN=clang', '-DANDROID_ARM_NEON=TRUE', '-DANDROID_STL=c++_static', "-DPATH_TO_SUPERPOWERED:STRING=${superpowered_sdk_path}"
2222
cFlags '-O3', '-fsigned-char' // full optimization, char data type is signed
2323
cppFlags '-fsigned-char', "-I${superpowered_sdk_path}"
2424
}
@@ -31,10 +31,10 @@ android { // main settings for your application
3131
}
3232
}
3333

34-
ndkPath "/Volumes/iMect/android/ndk/23.1.7779620/android-ndk-r23b"
34+
ndkPath "/Volumes/iMect/android/ndk/25.1.8937393"
3535
}
3636

3737
dependencies {
3838
implementation fileTree(dir: 'libs', include: ['*.jar'])
39-
implementation 'androidx.appcompat:appcompat:1.4.1'
39+
implementation 'androidx.appcompat:appcompat:1.5.0'
4040
}

Examples_Android/SuperpoweredFrequencyDomain/app/src/main/java/com/superpowered/frequencydomain/MainActivity.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ private void initialize() {
7070
}
7171

7272
@Override
73-
public boolean onCreateOptionsMenu(Menu menu) {
73+
public boolean onCreateOptionsMenu(@NonNull Menu menu) {
7474
// Inflate the menu; this adds items to the action bar if it is present.
7575
getMenuInflater().inflate(R.menu.menu_main, menu);
7676
return true;

Examples_Android/SuperpoweredFrequencyDomain/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ buildscript {
88
google()
99
}
1010
dependencies {
11-
classpath 'com.android.tools.build:gradle:7.1.1'
11+
classpath 'com.android.tools.build:gradle:7.2.2'
1212
}
1313
}
1414

Examples_Android/SuperpoweredFrequencyDomain/gradle/wrapper/gradle-wrapper.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
33
distributionPath=wrapper/dists
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists
6-
distributionUrl=https\://services.gradle.org/distributions/gradle-7.2-bin.zip
6+
distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.3-bin.zip

Examples_Android/SuperpoweredPlayer/app/build.gradle

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@ apply plugin: 'com.android.application'
33
def superpowered_sdk_path = new File(projectDir, '../../../Superpowered')
44

55
android { // main settings for your application
6-
compileSdkVersion = 31
6+
compileSdkVersion = 33
77

88
defaultConfig {
99
applicationId "com.superpowered.playerexample"
10-
minSdkVersion 22
11-
targetSdkVersion 31
10+
minSdkVersion 24
11+
targetSdkVersion 33
1212
versionCode 1
1313
versionName "1.0"
1414

@@ -18,7 +18,7 @@ android { // main settings for your application
1818

1919
externalNativeBuild {
2020
cmake {
21-
arguments '-DANDROID_PLATFORM=android-22', '-DANDROID_TOOLCHAIN=clang', '-DANDROID_ARM_NEON=TRUE', '-DANDROID_STL=c++_static', "-DPATH_TO_SUPERPOWERED:STRING=${superpowered_sdk_path}"
21+
arguments '-DANDROID_PLATFORM=android-24', '-DANDROID_TOOLCHAIN=clang', '-DANDROID_ARM_NEON=TRUE', '-DANDROID_STL=c++_static', "-DPATH_TO_SUPERPOWERED:STRING=${superpowered_sdk_path}"
2222
cFlags '-O3', '-fsigned-char' // full optimization, char data type is signed
2323
cppFlags '-fsigned-char', "-I${superpowered_sdk_path}"
2424
}
@@ -31,11 +31,11 @@ android { // main settings for your application
3131
}
3232
}
3333

34-
ndkPath "/Volumes/iMect/android/ndk/23.1.7779620/android-ndk-r23b"
34+
ndkPath "/Volumes/iMect/android/ndk/25.1.8937393"
3535
}
3636

3737
dependencies {
3838
implementation fileTree(include: ['*.jar'], dir: 'libs')
39-
implementation 'androidx.appcompat:appcompat:1.4.1'
40-
implementation 'androidx.constraintlayout:constraintlayout:2.1.3'
39+
implementation 'androidx.appcompat:appcompat:1.5.0'
40+
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
4141
}

Examples_Android/SuperpoweredPlayer/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ buildscript {
77
jcenter()
88
}
99
dependencies {
10-
classpath 'com.android.tools.build:gradle:7.1.1'
10+
classpath 'com.android.tools.build:gradle:7.2.2'
1111

1212

1313
// NOTE: Do not place your application dependencies here; they belong

Examples_Android/SuperpoweredPlayer/gradle/wrapper/gradle-wrapper.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
33
distributionPath=wrapper/dists
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists
6-
distributionUrl=https\://services.gradle.org/distributions/gradle-7.2-bin.zip
6+
distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.3-bin.zip

Examples_Android/SuperpoweredRecorder/app/build.gradle

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@ apply plugin: 'com.android.application'
33
def superpowered_sdk_path = new File(projectDir, '../../../Superpowered')
44

55
android { // main settings for your application
6-
compileSdkVersion = 31
6+
compileSdkVersion = 33
77

88
defaultConfig {
99
applicationId "com.superpowered.recorder"
10-
minSdkVersion 22
11-
targetSdkVersion 31
10+
minSdkVersion 24
11+
targetSdkVersion 33
1212
versionCode 1
1313
versionName "1.0"
1414

@@ -18,7 +18,7 @@ android { // main settings for your application
1818

1919
externalNativeBuild {
2020
cmake {
21-
arguments '-DANDROID_PLATFORM=android-22', '-DANDROID_TOOLCHAIN=clang', '-DANDROID_ARM_NEON=TRUE', '-DANDROID_STL=c++_static', "-DPATH_TO_SUPERPOWERED:STRING=${superpowered_sdk_path}"
21+
arguments '-DANDROID_PLATFORM=android-24', '-DANDROID_TOOLCHAIN=clang', '-DANDROID_ARM_NEON=TRUE', '-DANDROID_STL=c++_static', "-DPATH_TO_SUPERPOWERED:STRING=${superpowered_sdk_path}"
2222
cFlags '-O3', '-fsigned-char' // full optimization, char data type is signed
2323
cppFlags '-fsigned-char', "-I${superpowered_sdk_path}"
2424
}
@@ -36,6 +36,6 @@ android { // main settings for your application
3636

3737
dependencies {
3838
implementation fileTree(dir: 'libs', include: ['*.jar'])
39-
implementation 'androidx.appcompat:appcompat:1.4.1'
40-
implementation 'androidx.constraintlayout:constraintlayout:2.1.3'
39+
implementation 'androidx.appcompat:appcompat:1.5.0'
40+
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
4141
}

Examples_Android/SuperpoweredRecorder/app/src/main/cpp/RecorderExample.cpp

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,6 @@ static bool audioProcessing (
1717
int numberOfFrames, // number of frames to process
1818
int __unused samplerate // current sample rate in Hz
1919
) {
20-
{
21-
static int test = 0;
22-
test += numberOfFrames;
23-
if (test >= 48000) {
24-
test = 0;
25-
__android_log_print(ANDROID_LOG_VERBOSE, "Superpowered", "record");
26-
}
27-
}
2820
float floatBuffer[numberOfFrames * 2];
2921
Superpowered::ShortIntToFloat(audio, floatBuffer, (unsigned int)numberOfFrames);
3022
recorder->recordInterleaved(floatBuffer, (unsigned int)numberOfFrames);

Examples_Android/SuperpoweredRecorder/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ buildscript {
77
jcenter()
88
}
99
dependencies {
10-
classpath 'com.android.tools.build:gradle:7.1.1'
10+
classpath 'com.android.tools.build:gradle:7.2.2'
1111

1212

1313
// NOTE: Do not place your application dependencies here; they belong

Examples_Android/SuperpoweredRecorder/gradle/wrapper/gradle-wrapper.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
33
distributionPath=wrapper/dists
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists
6-
distributionUrl=https\://services.gradle.org/distributions/gradle-7.2-bin.zip
6+
distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.3-bin.zip

Examples_Android/SuperpoweredUSBExample/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ buildscript {
66
google()
77
}
88
dependencies {
9-
classpath 'com.android.tools.build:gradle:7.1.1'
9+
classpath 'com.android.tools.build:gradle:7.2.2'
1010
}
1111
}
1212

Examples_Android/SuperpoweredUSBExample/complexusb/build.gradle

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@ apply plugin: 'com.android.application'
33
def superpowered_sdk_path = new File(projectDir, '../../../Superpowered')
44

55
android { // main settings for your application
6-
compileSdkVersion = 31
6+
compileSdkVersion = 33
77

88
defaultConfig {
99
applicationId "com.superpowered.complexusb"
10-
minSdkVersion 22 //more than 96.5% of all active Android devices
11-
targetSdkVersion 31
10+
minSdkVersion 24
11+
targetSdkVersion 33
1212
versionCode 1
1313
versionName "1.0"
1414

@@ -18,7 +18,7 @@ android { // main settings for your application
1818

1919
externalNativeBuild {
2020
cmake {
21-
arguments '-DANDROID_PLATFORM=android-22', '-DANDROID_TOOLCHAIN=clang', '-DANDROID_ARM_NEON=TRUE', '-DANDROID_STL=c++_static', "-DPATH_TO_SUPERPOWERED:STRING=${superpowered_sdk_path}"
21+
arguments '-DANDROID_PLATFORM=android-24', '-DANDROID_TOOLCHAIN=clang', '-DANDROID_ARM_NEON=TRUE', '-DANDROID_STL=c++_static', "-DPATH_TO_SUPERPOWERED:STRING=${superpowered_sdk_path}"
2222
cFlags '-O3', '-fsigned-char' // full optimization, char data type is signed
2323
cppFlags '-fsigned-char', "-I${superpowered_sdk_path}"
2424
}
@@ -31,10 +31,10 @@ android { // main settings for your application
3131
}
3232
}
3333

34-
ndkPath "/Volumes/iMect/android/ndk/23.1.7779620/android-ndk-r23b"
34+
ndkPath "/Volumes/iMect/android/ndk/25.1.8937393"
3535
}
3636

3737
dependencies {
3838
implementation fileTree(dir: 'libs', include: ['*.jar'])
39-
implementation 'androidx.appcompat:appcompat:1.4.1'
39+
implementation 'androidx.appcompat:appcompat:1.5.0'
4040
}

0 commit comments

Comments
 (0)