From e42d0a4126c11532ec20a4bb2168a938ef0443c5 Mon Sep 17 00:00:00 2001 From: Agnieszka C <85929121+Aga-C@users.noreply.github.com> Date: Mon, 26 Feb 2024 17:27:45 +0100 Subject: [PATCH 1/2] Changed default file type to MP3 (#35) --- .../org/fossify/voicerecorder/activities/SettingsActivity.kt | 4 ++-- .../main/kotlin/org/fossify/voicerecorder/helpers/Config.kt | 2 +- app/src/main/res/layout/activity_settings.xml | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/app/src/main/kotlin/org/fossify/voicerecorder/activities/SettingsActivity.kt b/app/src/main/kotlin/org/fossify/voicerecorder/activities/SettingsActivity.kt index bb36b322..bf8f1c83 100644 --- a/app/src/main/kotlin/org/fossify/voicerecorder/activities/SettingsActivity.kt +++ b/app/src/main/kotlin/org/fossify/voicerecorder/activities/SettingsActivity.kt @@ -147,8 +147,8 @@ class SettingsActivity : SimpleActivity() { binding.settingsExtension.text = config.getExtensionText() binding.settingsExtensionHolder.setOnClickListener { val items = arrayListOf( - RadioItem(EXTENSION_M4A, getString(R.string.m4a)), - RadioItem(EXTENSION_MP3, getString(R.string.mp3)) + RadioItem(EXTENSION_MP3, getString(R.string.mp3)), + RadioItem(EXTENSION_M4A, getString(R.string.m4a)) ) if (isQPlus()) { diff --git a/app/src/main/kotlin/org/fossify/voicerecorder/helpers/Config.kt b/app/src/main/kotlin/org/fossify/voicerecorder/helpers/Config.kt index 91aae783..46cf1bdd 100644 --- a/app/src/main/kotlin/org/fossify/voicerecorder/helpers/Config.kt +++ b/app/src/main/kotlin/org/fossify/voicerecorder/helpers/Config.kt @@ -20,7 +20,7 @@ class Config(context: Context) : BaseConfig(context) { set(saveRecordingsFolder) = prefs.edit().putString(SAVE_RECORDINGS, saveRecordingsFolder).apply() var extension: Int - get() = prefs.getInt(EXTENSION, EXTENSION_M4A) + get() = prefs.getInt(EXTENSION, EXTENSION_MP3) set(extension) = prefs.edit().putInt(EXTENSION, extension).apply() var audioSource: Int diff --git a/app/src/main/res/layout/activity_settings.xml b/app/src/main/res/layout/activity_settings.xml index ac6481c5..1ac6af13 100644 --- a/app/src/main/res/layout/activity_settings.xml +++ b/app/src/main/res/layout/activity_settings.xml @@ -220,7 +220,7 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_below="@+id/settings_extension_label" - tools:text="@string/m4a" /> + tools:text="@string/mp3" /> From 6fb1c7821ecefd1fe22789e291b7413ef85c98d5 Mon Sep 17 00:00:00 2001 From: Agnieszka C <85929121+Aga-C@users.noreply.github.com> Date: Tue, 27 Feb 2024 11:27:17 +0100 Subject: [PATCH 2/2] Changed default bitrate --- .../main/kotlin/org/fossify/voicerecorder/helpers/Constants.kt | 2 +- app/src/main/res/layout/activity_settings.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/main/kotlin/org/fossify/voicerecorder/helpers/Constants.kt b/app/src/main/kotlin/org/fossify/voicerecorder/helpers/Constants.kt index d4c07076..c7a3eba8 100644 --- a/app/src/main/kotlin/org/fossify/voicerecorder/helpers/Constants.kt +++ b/app/src/main/kotlin/org/fossify/voicerecorder/helpers/Constants.kt @@ -19,7 +19,7 @@ const val EXTENSION_MP3 = 1 const val EXTENSION_OGG = 2 val BITRATES = arrayListOf(32000, 64000, 96000, 128000, 160000, 192000, 256000, 320000) -const val DEFAULT_BITRATE = 128000 +const val DEFAULT_BITRATE = 192000 const val SAMPLE_RATE = 44100 const val RECORDING_RUNNING = 0 diff --git a/app/src/main/res/layout/activity_settings.xml b/app/src/main/res/layout/activity_settings.xml index 1ac6af13..e5738106 100644 --- a/app/src/main/res/layout/activity_settings.xml +++ b/app/src/main/res/layout/activity_settings.xml @@ -265,7 +265,7 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_below="@+id/settings_bitrate_label" - tools:text="128 kbps" /> + tools:text="192 kbps" />