mirror of
https://github.com/SimpleMobileTools/Simple-Voice-Recorder.git
synced 2025-02-13 10:10:42 +01:00
Added Opus to ogg name on the UI (#189)
This commit is contained in:
parent
3ed7e88132
commit
414e491661
@ -146,7 +146,7 @@ class SettingsActivity : SimpleActivity() {
|
|||||||
)
|
)
|
||||||
|
|
||||||
if (isQPlus()) {
|
if (isQPlus()) {
|
||||||
items.add(RadioItem(EXTENSION_OGG, getString(R.string.ogg)))
|
items.add(RadioItem(EXTENSION_OGG, getString(R.string.ogg_opus)))
|
||||||
}
|
}
|
||||||
|
|
||||||
RadioGroupDialog(this@SettingsActivity, items, config.extension) {
|
RadioGroupDialog(this@SettingsActivity, items, config.extension) {
|
||||||
|
@ -48,6 +48,14 @@ class Config(context: Context) : BaseConfig(context) {
|
|||||||
set(recordAfterLaunch) = prefs.edit().putBoolean(RECORD_AFTER_LAUNCH, recordAfterLaunch).apply()
|
set(recordAfterLaunch) = prefs.edit().putBoolean(RECORD_AFTER_LAUNCH, recordAfterLaunch).apply()
|
||||||
|
|
||||||
fun getExtensionText() = context.getString(
|
fun getExtensionText() = context.getString(
|
||||||
|
when (extension) {
|
||||||
|
EXTENSION_M4A -> R.string.m4a
|
||||||
|
EXTENSION_OGG -> R.string.ogg_opus
|
||||||
|
else -> R.string.mp3
|
||||||
|
}
|
||||||
|
)
|
||||||
|
|
||||||
|
fun getExtension() = context.getString(
|
||||||
when (extension) {
|
when (extension) {
|
||||||
EXTENSION_M4A -> R.string.m4a
|
EXTENSION_M4A -> R.string.m4a
|
||||||
EXTENSION_OGG -> R.string.ogg
|
EXTENSION_OGG -> R.string.ogg
|
||||||
|
@ -86,7 +86,7 @@ class RecorderService : Service() {
|
|||||||
defaultFolder.absolutePath
|
defaultFolder.absolutePath
|
||||||
}
|
}
|
||||||
|
|
||||||
currFilePath = "$baseFolder/${getCurrentFormattedDateTime()}.${config.getExtensionText()}"
|
currFilePath = "$baseFolder/${getCurrentFormattedDateTime()}.${config.getExtension()}"
|
||||||
|
|
||||||
try {
|
try {
|
||||||
recorder = if (recordMp3()) {
|
recorder = if (recordMp3()) {
|
||||||
|
@ -4,6 +4,7 @@
|
|||||||
<string name="m4a">m4a</string>
|
<string name="m4a">m4a</string>
|
||||||
<string name="mp3">mp3</string>
|
<string name="mp3">mp3</string>
|
||||||
<string name="ogg">ogg</string>
|
<string name="ogg">ogg</string>
|
||||||
|
<string name="ogg_opus">ogg (Opus)</string>
|
||||||
<string name="bitrate_value">%d kbps</string>
|
<string name="bitrate_value">%d kbps</string>
|
||||||
|
|
||||||
</resources>
|
</resources>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user