From ae5011de7b3dd2e6bd05ea6b13b3ef9bdd37f71c Mon Sep 17 00:00:00 2001 From: gedoor Date: Sun, 7 Jun 2020 17:32:22 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E4=BC=98=E5=8C=96=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/io/legado/app/service/HttpReadAloudService.kt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/io/legado/app/service/HttpReadAloudService.kt b/app/src/main/java/io/legado/app/service/HttpReadAloudService.kt index de9807e84..4c29f84ae 100644 --- a/app/src/main/java/io/legado/app/service/HttpReadAloudService.kt +++ b/app/src/main/java/io/legado/app/service/HttpReadAloudService.kt @@ -76,7 +76,9 @@ class HttpReadAloudService : BaseReadAloudService(), val file = getSpeakFile(index) file.writeBytes(bytes) if (index == nowSpeak) { - playAudio(FileInputStream(file).fd) + @Suppress("BlockingMethodInNonBlockingContext") + val fis = FileInputStream(file) + playAudio(fis.fd) } } } else {