Android系统中的录音数据快速存储方法技术方案

技术编号:6075150 阅读:1011 留言:0更新日期:2012-04-11 18:40
一种Android系统中的录音数据快速存储方法,其特征在于,在录音系统内部建立用于录音数据即时传输的数据管道,在数据管道基础上建立管道数据流方式,启动录音时将同时启动录音线程和录音存储线程,录音线程中的录音数据作为管道数据输入流,通过数据输入管道保存在系统的循环缓冲区里,循环缓冲区里的录音数据作为管道数据输出流,通过数据输出管道传递给录音存储线程,由录音存储线程将录音数据即时保存在手机的存储器中,如果存储器空间已满或出现掉电,则结束录音。本发明专利技术通过管道数据流方式即时传输录音数据到存储器,能够避免因掉电或存储空间已满而导致的录音数据丢失;两个线程之间数据能够安全、及时和有效的传输。

Fast recording method for recording data in Android system

Fast store recording data in a Android system method, which is characterized in that the data pipeline is established for recording data real-time transmission in the recording system, the establishment of pipeline data flow in the data pipeline on the basis of start recording will also start recording sound recording and storage thread thread thread as the recording data of recording data pipeline the input stream, through the data stored in the buffer input pipeline circulation system, circulation recording data buffer as pipeline data transferred to the output stream, recording storage threads through the data output pipeline, by recording the recording data stored in the thread of the mobile phone instant memory, if the memory space is full or power down, the end recording. The present invention through the pipeline data flow real-time transmission recording data to memory, can avoid recording data due to a power failure or the storage space is full of the loss; data between the two threads can safely and timely and effective transmission.

【技术实现步骤摘要】

本专利技术涉及数据处理领域,尤其是一种用于在安装了 Android系统的移动终端 上,用于录音数据即时自动保存的录音数据快速存储方法。
技术介绍
随着现代生活节奏的不断加快和人们生活水平的不断提高,手机的使用在人们日 常生活中已越来越普及,手机录音已经成为手机不可或缺的一个重要功能。手机录音功能 在录音数据存储机制上存在着一些问题,比如当正使用手机进行录音时,遇到手机存储空 间不足或者电池电量不足导致手机关机,已经录制的录音文件得不到保存,导正整个录音 文件丢失得不到保存,导致整个录音失败。遇到这种情况会给用户带来很大的麻烦。这是 因为以前的录音文件存储时是通过申请空间,创建文件,把数据暂放在缓存里,之后才去 读文件,然后通过文件名保存文件,这种保存方式若遇到手机掉电、手机存储空间已满等问 题则会造成录音数据无法存储,从而造成数据丢失。目前最流行的安装了 android系统的 智能手机,其上安装的录音系统也没有能解决此问题。
技术实现思路
本专利技术所要解决的技术问题是,针对现有手机录音数据不能即时保存,容易丢失 的问题,而提供一种即时存储录音数据的一种Android系统中录音数据快速本文档来自技高网...

【技术保护点】
1.一种Android系统中的录音数据快速存储方法,其特征在于,在录音系统内部建立用于录音数据即时传输的数据管道,数据管道包括数据输入管道和数据输出管道,在数据管道基础上建立管道数据流方式,管道数据流包括管道数据输入流和管道数据输出流,录音线程中的录音数据作为管道数据输入流,通过数据输入管道保存在系统的循环缓冲区里,循环缓冲区里的录音数据作为管道数据输出流,通过数据输出管道传递给录音存储线程,由录音存储线程将录音数据即时保存在手机的存储器中;启动录音时同时启动录音线程和录音存储线程。

【技术特征摘要】

【专利技术属性】
技术研发人员:李雨欣何从华
申请(专利权)人:重庆国虹科技发展有限公司
类型:发明
国别省市:85

网友询问留言 已有0条评论
  • 还没有人留言评论。发表了对其他浏览者有用的留言会获得科技券。

1