Audio modules need to be placed in config file before tmp and application modules.
This commit is contained in:
@@ -33,6 +33,7 @@ class AudioActivity : AppCompatActivity() {
|
|||||||
setContentView(R.layout.activity_audio)
|
setContentView(R.layout.activity_audio)
|
||||||
|
|
||||||
supportActionBar?.setDisplayHomeAsUpEnabled(true)
|
supportActionBar?.setDisplayHomeAsUpEnabled(true)
|
||||||
|
Utils.addActivity("audio")
|
||||||
|
|
||||||
val audioModulesList = findViewById(R.id.AudioModulesList) as LinearLayout
|
val audioModulesList = findViewById(R.id.AudioModulesList) as LinearLayout
|
||||||
var id = 1000
|
var id = 1000
|
||||||
@@ -87,8 +88,6 @@ class AudioActivity : AppCompatActivity() {
|
|||||||
oldExtendedFilter = Config.variable("webrtc_aec_extended_filter")[0] == "yes"
|
oldExtendedFilter = Config.variable("webrtc_aec_extended_filter")[0] == "yes"
|
||||||
extentedFilter.isChecked = oldExtendedFilter
|
extentedFilter.isChecked = oldExtendedFilter
|
||||||
|
|
||||||
Utils.addActivity("audio")
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun onCreateOptionsMenu(menu: Menu): Boolean {
|
override fun onCreateOptionsMenu(menu: Menu): Boolean {
|
||||||
@@ -118,7 +117,7 @@ class AudioActivity : AppCompatActivity() {
|
|||||||
"${getString(R.string.failed_to_load_module)}: $module.so")
|
"${getString(R.string.failed_to_load_module)}: $module.so")
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
Config.addLine("module $module.so")
|
Config.addModuleLine("module $module.so")
|
||||||
save = true
|
save = true
|
||||||
}
|
}
|
||||||
if (!box.isChecked && oldAudioModules[module]!!) {
|
if (!box.isChecked && oldAudioModules[module]!!) {
|
||||||
@@ -164,7 +163,7 @@ class AudioActivity : AppCompatActivity() {
|
|||||||
if (aec.isChecked != oldAec) {
|
if (aec.isChecked != oldAec) {
|
||||||
Config.removeLine("module webrtc_aec.so")
|
Config.removeLine("module webrtc_aec.so")
|
||||||
if (aec.isChecked) {
|
if (aec.isChecked) {
|
||||||
Config.addLine("module webrtc_aec.so")
|
Config.addModuleLine("module webrtc_aec.so")
|
||||||
if (Api.module_load("webrtc_aec.so") != 0) {
|
if (Api.module_load("webrtc_aec.so") != 0) {
|
||||||
Utils.alertView(this, getString(R.string.error),
|
Utils.alertView(this, getString(R.string.error),
|
||||||
getString(R.string.failed_to_load_module))
|
getString(R.string.failed_to_load_module))
|
||||||
|
|||||||
@@ -109,6 +109,11 @@ object Config {
|
|||||||
config = Utils.removeLinesStartingWithString(config, line)
|
config = Utils.removeLinesStartingWithString(config, line)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fun addModuleLine(line: String) {
|
||||||
|
// Make sure it goes before first 'module_tmp'
|
||||||
|
config = config.replace("module opensles.so", "$line\nmodule opensles.so")
|
||||||
|
}
|
||||||
|
|
||||||
fun removeVariable(variable: String) {
|
fun removeVariable(variable: String) {
|
||||||
config = Utils.removeLinesStartingWithString(config, "$variable ")
|
config = Utils.removeLinesStartingWithString(config, "$variable ")
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user