Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion PdCore/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ allprojects {
// These are specific to PdCore, but nexusPublishing needs them here:
// https://github.com/gradle-nexus/publish-plugin/issues/84
group = 'io.github.libpd.android'
version = '1.4.2-SNAPSHOT'
version = '1.4.3-SNAPSHOT'

// Create a Sonatype user token for these environment variables:
// export ORG_GRADLE_PROJECT_sonatypeUsername="<tokenUsername>"
Expand Down
11 changes: 11 additions & 0 deletions PdCore/pd-core/src/main/java/org/puredata/android/io/PdAudio.java
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ public class PdAudio {
private static int inputDeviceId = -1;
private static int outputDeviceId = -1;
private static int bufferSizeInFrames = -1;
private static boolean autoReopen = true;
private static final Handler handler = new Handler(Looper.getMainLooper());
private static final Runnable pollRunner = new Runnable() {
@Override
Expand Down Expand Up @@ -65,6 +66,7 @@ public synchronized static void initAudio(int sampleRate, int inChannels, int ou
options.put("inputDeviceId", String.valueOf(inputDeviceId));
options.put("outputDeviceId", String.valueOf(outputDeviceId));
options.put("bufferSizeInFrames", String.valueOf(bufferSizeInFrames));
options.put("autoReopen", String.valueOf(autoReopen ? 1 : 0));
if (PdBase.openAudio(inChannels, outChannels, sampleRate, options) != 0) {
throw new IOException("unable to open Pd audio: " + sampleRate + ", " + inChannels + ", " + outChannels);
}
Expand Down Expand Up @@ -106,6 +108,15 @@ public synchronized static void setBufferSizeInFrames(int frames) {
bufferSizeInFrames = frames;
}

/**
* Enable the audio wrapper to reopen the default device when the current device has been disconnected
*
* @param reopen enable auto-reopening (true by default)
*/
public synchronized static void setAutoReopen(boolean reopen) {
autoReopen = reopen;
}

/**
* Starts the audio components.
*
Expand Down
2 changes: 1 addition & 1 deletion PdCore/pd-core/src/main/jni/libpd
Submodule libpd updated 41 files
+1 −1 .github/workflows/builds.yaml
+5 −5 Android.mk
+15 −0 CHANGES.txt
+15 −13 CMakeLists.txt
+19 −18 Makefile
+6 −4 README.md
+7 −0 java/org/puredata/core/PdBase.java
+19 −2 jni/oboe/OboeEngine.cpp
+9 −0 jni/oboe/OboeEngine.h
+7 −7 jni/oboe/z_jni_oboe.cpp
+1 −15 libpd.podspec
+132 −130 libpd.xcodeproj/project.pbxproj
+1 −1 pure-data
+4 −5 python/setup.py
+1 −1 samples/c/pdtest/Makefile
+1 −2 samples/c/pdtest_double/Makefile
+1 −2 samples/c/pdtest_gui/Makefile
+1 −1 samples/c/pdtest_multi/Makefile
+1 −1 samples/c/pdtest_portaudio/Makefile
+1 −1 samples/c/pdtest_queued/Makefile
+1 −1 samples/c/pdtest_thread/Makefile
+1 −2 samples/cpp/pdtest/Makefile
+1 −2 samples/cpp/pdtest_freeverb/Makefile
+1 −2 samples/cpp/pdtest_jack/Makefile
+1 −2 samples/cpp/pdtest_multi/Makefile
+1 −2 samples/cpp/pdtest_rtaudio/Makefile
+45 −0 samples/emscripten/README.md
+8 −0 samples/emscripten/gemtest/.gitignore
+22 −0 samples/emscripten/gemtest/Makefile
+76 −0 samples/emscripten/gemtest/gemtest.c
+21 −0 samples/emscripten/gemtest/glx.c
+48 −0 samples/emscripten/gemtest/test.pd
+4 −0 samples/emscripten/pdtest/.gitignore
+12 −0 samples/emscripten/pdtest/Makefile
+67 −0 samples/emscripten/pdtest/index.html
+76 −0 samples/emscripten/pdtest/pdtest.c
+17 −0 samples/emscripten/pdtest/test.pd
+4 −0 samples/emscripten/pdtest_gui/.gitignore
+12 −0 samples/emscripten/pdtest_gui/Makefile
+93 −0 samples/emscripten/pdtest_gui/pdtest_gui.c
+27 −0 samples/emscripten/pdtest_gui/test.pd
2 changes: 1 addition & 1 deletion PdTest/src/org/puredata/android/test/PdTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ public boolean onOptionsItemSelected(MenuItem item) {
if (item.getItemId() == R.id.about_item) {
AlertDialog.Builder ad = new AlertDialog.Builder(this);
ad.setTitle(R.string.about_title);
ad.setMessage(R.string.about_msg);
ad.setMessage(getString(R.string.about_msg) + "\n\nPure Data version is " + PdBase.versionString());
ad.setNeutralButton(android.R.string.ok, null);
ad.setCancelable(true);
ad.show();
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ allprojects {

```gradle
dependencies {
implementation 'io.github.libpd.android:pd-core:1.4.2-SNAPSHOT'
implementation 'io.github.libpd.android:pd-core:1.4.3-SNAPSHOT'
}
```

Expand Down
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,5 @@ ext {
compileSdk = 34
androidxLegacySupportVersion = '1.0.0'
ndkVersion = libs.versions.ndk.get()
pdCoreVersion = '1.4.2-SNAPSHOT' // Must match version in PdCore/build.gradle
pdCoreVersion = '1.4.3-SNAPSHOT' // Must match version in PdCore/build.gradle
}
Loading