Skip to content

Commit

Permalink
Update sonivox sources
Browse files Browse the repository at this point in the history
  • Loading branch information
billthefarmer committed Nov 7, 2022
1 parent 16c126c commit 86d59c9
Show file tree
Hide file tree
Showing 8 changed files with 21 additions and 8 deletions.
1 change: 1 addition & 0 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ apply plugin: 'com.android.application'

android {
compileSdkVersion 28
namespace "org.billthefarmer.miditest"

defaultConfig {
applicationId "org.billthefarmer.miditest"
Expand Down
3 changes: 1 addition & 2 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest
xmlns:android="http://schemas.android.com/apk/res/android"
package="org.billthefarmer.miditest">
xmlns:android="http://schemas.android.com/apk/res/android">

<application
android:allowBackup="true"
Expand Down
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ buildscript {
}

dependencies {
classpath 'com.android.tools.build:gradle:7.2.1'
classpath 'com.android.tools.build:gradle:7.3.1'

// NOTE: Do not place your application dependencies here; they
// belong in the individual module build.gradle files
Expand Down
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.3-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
3 changes: 1 addition & 2 deletions library/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ plugins {

android {
compileSdkVersion 28
namespace "org.billthefarmer.mididriver"

externalNativeBuild {
ndkBuild {
Expand Down Expand Up @@ -37,8 +38,6 @@ android {
lintOptions {
disable 'OldTargetApi', 'ExpiredTargetSdkVersion'
}

namespace = 'org.billthefarmer.mididriver'
}

afterEvaluate {
Expand Down
2 changes: 1 addition & 1 deletion library/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest package="org.billthefarmer.mididriver" />
<manifest />
15 changes: 14 additions & 1 deletion library/src/main/jni/lib_src/eas_dlssynth.c
Original file line number Diff line number Diff line change
Expand Up @@ -348,11 +348,24 @@ EAS_RESULT DLS_StartVoice (S_VOICE_MGR *pVoiceMgr, S_SYNTH *pSynth, S_SYNTH_VOIC
pWTVoice->phaseAccum = (EAS_U32) pSynth->pDLS->pDLSSamples + pSynth->pDLS->pDLSSampleOffsets[pDLSRegion->wtRegion.waveIndex];
if (pDLSRegion->wtRegion.region.keyGroupAndFlags & REGION_FLAG_IS_LOOPED)
{
#if defined (_8_BIT_SAMPLES)
pWTVoice->loopStart = pWTVoice->phaseAccum + pDLSRegion->wtRegion.loopStart;
pWTVoice->loopEnd = pWTVoice->phaseAccum + pDLSRegion->wtRegion.loopEnd - 1;
#else //_16_BIT_SAMPLES
pWTVoice->loopStart = pWTVoice->phaseAccum + (pDLSRegion->wtRegion.loopStart<<1);
pWTVoice->loopEnd = pWTVoice->phaseAccum + (pDLSRegion->wtRegion.loopEnd<<1) - 2;
#endif
}
else
pWTVoice->loopStart = pWTVoice->loopEnd = pWTVoice->phaseAccum + pSynth->pDLS->pDLSSampleLen[pDLSRegion->wtRegion.waveIndex] - 1;
{
#if defined (_8_BIT_SAMPLES)
pWTVoice->loopStart = pWTVoice->loopEnd = pWTVoice->phaseAccum
+ pSynth->pDLS->pDLSSampleLen[pDLSRegion->wtRegion.waveIndex] - 1;
#else //_16_BIT_SAMPLES
pWTVoice->loopStart = pWTVoice->loopEnd = pWTVoice->phaseAccum
+ pSynth->pDLS->pDLSSampleLen[pDLSRegion->wtRegion.waveIndex] - 2;
#endif
}

return EAS_SUCCESS;
}
Expand Down
1 change: 1 addition & 0 deletions library/src/main/jni/midi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
///////////////////////////////////////////////////////////////////////////////

#include <jni.h>
#include <assert.h>
#include <pthread.h>

#include <android/log.h>
Expand Down

0 comments on commit 86d59c9

Please sign in to comment.