gpt4 book ai didi

android - Android:在另一个线程中调用AudioRecord onPeriodicNotification

转载 作者:行者123 更新时间:2023-12-03 00:49:45 24 4
gpt4 key购买 nike

所以,我正在使用ExtAudioRecorder:http://i-liger.com/sites/default/files/ExtAudioRecorder.java
我的问题是在UI线程上调用了onPeriodNotification。这将是什么优雅的解决方案。在每个onPeriodNotification调用中创建新线程似乎非常繁琐。我尝试在新的Thread()中初始化记录器,但仍在UI线程上进行了调用。

最佳答案

你不能但是您可以做的是在onPeriodNotification中将消息发布到第二个线程,然后返回。

关于android - Android:在另一个线程中调用AudioRecord onPeriodicNotification,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22706802/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com