修复在startpush()前调用stopPlayAudio()函数会多新建一个渲染通道的问题.

This commit is contained in:
jingtonghuai
2025-07-25 17:41:07 +08:00
parent 6f027448ab
commit 9643c55c73
5 changed files with 8 additions and 5 deletions

View File

@@ -8,8 +8,8 @@ android {
defaultConfig {
minSdk 24
versionCode 9
versionName '4.0.2'
versionCode 10
versionName '4.0.3'
externalNativeBuild {
cmake {

View File

@@ -315,6 +315,9 @@ public class RenderThread extends Thread {
}
private void handleStartPushAudio(){
if (mCurrentBnfSession > 0){
scrfdncnn.finsession(mCurrentBnfSession);
}
mCurrentBnfSession = scrfdncnn.newsession();
if (audioPlayer != null && isRendering){
audioPlayer.pushStart();
@@ -340,7 +343,6 @@ public class RenderThread extends Thread {
private void handleStopPlayAudio(){
if (scrfdncnn != null && isRendering){
scrfdncnn.finsession(mCurrentBnfSession);
mCurrentBnfSession = scrfdncnn.newsession();
if (audioPlayer != null){
audioPlayer.stop();
}

View File

@@ -11,8 +11,8 @@ android {
applicationId "ai.guiji.duix.test"
minSdk 24
targetSdk 34
versionCode 2
versionName "3.0.2"
versionCode 3
versionName "3.0.3"
}
signingConfigs {

View File

@@ -21,6 +21,7 @@ class MainActivity : BaseActivity() {
private var mLastProgress = 0
val models = arrayListOf(
"https://github.com/duixcom/Duix-Mobile/releases/download/v1.0.0/bendi3_20240518.zip",
"https://github.com/duixcom/Duix-Mobile/releases/download/v1.0.0/airuike_20240409.zip",
"https://github.com/duixcom/Duix-Mobile/releases/download/v1.0.0/675429759852613_7f8d9388a4213080b1820b83dd057cfb_optim_m80.zip",
"https://github.com/duixcom/Duix-Mobile/releases/download/v1.0.0/674402003804229_f6e86fb375c4f1f1b82b24f7ee4e7cb4_optim_m80.zip",