From f4559f157d2010ce02afa001018ec9bec5229a55 Mon Sep 17 00:00:00 2001 From: xufuji456 <839789740@qq.com> Date: Sun, 18 Jul 2021 21:56:17 +0800 Subject: [PATCH] enable AudioTrack player --- .../java/com/frank/ffmpeg/activity/AudioHandleActivity.kt | 1 - app/src/main/res/layout/activity_audio_handle.xml | 2 +- app/src/main/res/values/strings.xml | 4 ++-- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/app/src/main/java/com/frank/ffmpeg/activity/AudioHandleActivity.kt b/app/src/main/java/com/frank/ffmpeg/activity/AudioHandleActivity.kt index 696aa0c..2c12966 100644 --- a/app/src/main/java/com/frank/ffmpeg/activity/AudioHandleActivity.kt +++ b/app/src/main/java/com/frank/ffmpeg/activity/AudioHandleActivity.kt @@ -198,7 +198,6 @@ class AudioHandleActivity : BaseActivity() { } R.id.btn_play_audio//use AudioTrack to play audio -> { -// Thread { AudioPlayer().play(srcFile) }.start() val audioIntent = Intent(this@AudioHandleActivity, AudioPlayActivity::class.java) audioIntent.data = Uri.parse(srcFile) startActivity(audioIntent) diff --git a/app/src/main/res/layout/activity_audio_handle.xml b/app/src/main/res/layout/activity_audio_handle.xml index a53bc48..b7837dd 100644 --- a/app/src/main/res/layout/activity_audio_handle.xml +++ b/app/src/main/res/layout/activity_audio_handle.xml @@ -45,7 +45,7 @@ android:layout_height="wrap_content" android:text="@string/audio_play" android:layout_marginTop="10dp" - android:visibility="gone"/> + android:visibility="visible"/>