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.0-SNAPSHOT'
version = '1.4.1-SNAPSHOT'

// Create a Sonatype user token for these environment variables:
// export ORG_GRADLE_PROJECT_sonatypeUsername="<tokenUsername>"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,12 +66,14 @@ public static void initPreferences(Context context) {
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);
if (!prefs.contains(res.getString(R.string.pref_key_srate))) {
SharedPreferences.Editor editor = prefs.edit();
int srate = PdBase.suggestSampleRate();
editor.putString(res.getString(R.string.pref_key_srate), "" + ((srate > 0) ? srate : AudioParameters.suggestSampleRate()));

// init samplerate and audio device prefs to "Default":
editor.putString(res.getString(R.string.pref_key_srate), res.getStringArray(R.array.srate_values)[0]);
editor.putString(res.getString(R.string.pref_key_indevice), res.getStringArray(R.array.indevice_values)[0]);
editor.putString(res.getString(R.string.pref_key_outdevice), res.getStringArray(R.array.outdevice_values)[0]);

int nic = PdBase.suggestInputChannels();
editor.putString(res.getString(R.string.pref_key_inchannels), "" + ((nic > 0) ? nic : AudioParameters.suggestInputChannels()));
editor.putString(res.getString(R.string.pref_key_outdevice), res.getStringArray(R.array.outdevice_values)[0]);
int noc = PdBase.suggestOutputChannels();
editor.putString(res.getString(R.string.pref_key_outchannels), "" + ((noc > 0) ? noc : AudioParameters.suggestOutputChannels()));
editor.commit();
Expand Down
2 changes: 2 additions & 0 deletions PdCore/pd-core/src/main/res/values/audio.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string-array name="srate_labels">
<item>Default</item>
<item>8000Hz</item>
<item>11025Hz</item>
<item>16000Hz</item>
Expand All @@ -10,6 +11,7 @@
<item>48000Hz</item>
</string-array>
<string-array name="srate_values">
<item>-1</item>
<item>8000</item>
<item>11025</item>
<item>16000</item>
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.0-SNAPSHOT'
implementation 'io.github.libpd.android:pd-core:1.4.1-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.0-SNAPSHOT' // Must match version in PdCore/build.gradle
pdCoreVersion = '1.4.1-SNAPSHOT' // Must match version in PdCore/build.gradle
}