Merge pull request #190 from Aga-C/change-ogg-naming
Added Opus to ogg name on the UI (#189)
This commit is contained in:
commit
9deea1c306
4 changed files with 11 additions and 2 deletions
|
@ -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…
Reference in a new issue