fix: 修复 Termux 声音功能

This commit is contained in:
pluv committed 2026-05-16 22:56:57 +08:00
1 parent 0889bfa1c3
commit d22966b34d
4 files changed
+38 -19

No files matched your search

+1 -3
View File
@@ -12,12 +12,10 @@ logger = get_logger(__name__)
# from .protocol import PlayFunctionProtocol
def play_by_path(path: pathlib.Path):
logger.debug("termux_audio.play_by_path: 开始播放 %s", path)
try:
os.system(f"play-audio {path}")
os.system(f"play-audio {path.resolve()}")
logger.debug("播放命令已执行: %s", path)
except Exception as e:
logger.error("播放失败: %s, 错误: %s", path, e)
raise