如何在xamarin android中添加mediarecorder的暂停和恢复功能? [英] How to add pause and resume functionality with mediarecorder in xamarin android?

查看:221
本文介绍了如何在xamarin android中添加mediarecorder的暂停和恢复功能?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

I am using MediaRecorder to record audio in Xamarin Android. I want to add Pause and Resume functionality to this. MediaRecorder does not have built in methods to Pause and Resume the recording. How can I accomplish this? Do I need to store separate audio files when Paused and merge them in a single audio file? If yes, then how can I implement that in Xamarin Android?

Thanks in advance.





< b>我尝试了什么:



我试图同时使用AudioRecord类(低级API)和MediaRecorder类(高级API)。他们都没有内置的方法来暂停和恢复录音。



What I have tried:

I have tried to use both AudioRecord class (Low level API) and MediaRecorder class (High level API). None of them has built-in methods to Pause and Resume the recording.

推荐答案

在api 24它确实 MediaRecorder | Android开发者 [ ^ ]不确定这是否有帮助....



您必须停止并启动并合并文件,这里是针对android的实现GitHub - lassana / continuous-audiorecorder:在Android SDK中实现缺少的功能:暂停录音机。 [ ^ ]



我是抱歉,由于我没有经验,我不能具体说Xamarin。



/ Darren
At api 24 it does MediaRecorder | Android Developers[^] not sure if that helps....

You would have to stop and start and merge the files, here is an implementation of just that for android GitHub - lassana/continuous-audiorecorder: Implementation of the missing feature in Android SDK: audio recorder with a pause.[^]

I'm sorry I can't be specific with Xamarin as I have no experience.

/Darren


这篇关于如何在xamarin android中添加mediarecorder的暂停和恢复功能?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆