CN101515274A - Method for reading and playing mobile phone audio-frequency data - Google Patents

Method for reading and playing mobile phone audio-frequency data Download PDF

Info

Publication number
CN101515274A
CN101515274A CNA2008102076673A CN200810207667A CN101515274A CN 101515274 A CN101515274 A CN 101515274A CN A2008102076673 A CNA2008102076673 A CN A2008102076673A CN 200810207667 A CN200810207667 A CN 200810207667A CN 101515274 A CN101515274 A CN 101515274A
Authority
CN
China
Prior art keywords
reading
file
audio
path
playing
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CNA2008102076673A
Other languages
Chinese (zh)
Inventor
王峥
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shanghai Wingtech Electronic Technology Co Ltd
Original Assignee
Shanghai Wingtech Electronic Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shanghai Wingtech Electronic Technology Co Ltd filed Critical Shanghai Wingtech Electronic Technology Co Ltd
Priority to CNA2008102076673A priority Critical patent/CN101515274A/en
Publication of CN101515274A publication Critical patent/CN101515274A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Mobile Radio Communication Systems (AREA)
  • Telephonic Communication Services (AREA)

Abstract

The invention relates to a method for reading and playing mobile phone audio-frequency data. The method comprises: calling a path message of a needed audio-frequency file through a virtual file system, analyzing the path content, loading the needed audio frequency into a memory if necessary, directly accessing and reading the audio-frequency file stored on the memory, and carrying out the functions, such as playing, stopping, FF, REW and the like. The audio-frequency file can be played as the common audio-frequency files, and the needed audio frequency does not need to be taken as a temporary file to be written into the file system so as to save the external storage device space, reduce the times of reading external storage devices, provide a uniform audio-frequency file interface for the file system and improve the efficiency of the whole mobile phone system.

Description

A kind of method for reading and playing mobile phone audio-frequency data
Technical field
The present invention relates to a kind of method for reading and playing mobile phone audio-frequency data.
Background technology
In The present computer technology, the tissue of data is generally realized by file system.In regular handset equipment, audio decoder need visit various voice datas by the system call of file system usually, thereby reaches the function of voice playing.But, under many circumstances, we need use audio decoder to play-over internal memory or be built in data in the External memory equipment, then can only by or the specific address of data conduct interviews, and can't unify visit by the system call of file system.At present, how will leave the audio data file on the External memory equipment in, combine and associate with file system as internal memory, External memory equipment, do not have extraordinary method at present, common disposal route is that these voice datas that leave in the External memory equipment are write in the temporary file of file system, reaches the purpose of broadcast then by the system call of this temporary file being carried out some file system.Need the application of playing audio-fequency data for mobile phone, such way efficient is low in the extreme, and is subjected to the restriction of file system remaining space size.
Summary of the invention
The present invention makes that above problem is solved by the following technical programs.
Method of the present invention is physics voice data and a special file path are associated, be associated in the path therewith by traditional file system, when needs visit physics voice data, only need by this special file system path, open and read corresponding file, can play as common audio file, thereby convenient greatly the use improved the efficient of whole cell phone system.
Describe technical scheme of the present invention below in detail.
A kind of method for reading and playing mobile phone audio-frequency data comprises following steps:
Step 1, processor is set up Virtual File System according to the file path of voice data;
Step 2, processor are called the path of respective audio file according to customer requirements by Virtual File System;
Step 3, the processor resolution path, loads required audio file and goes into internal memory not at internal memory as the audio content memory location, reads respective audio file and broadcast in internal memory.
File path in the described step 1 in the Virtual File System is a binary data.
File path in the described step 1 in the Virtual File System is the path of a ucs2 coding.
File path in the described step 1 in the Virtual File System comprises following content: routing head sign, dish separator, voice data address, voice data length and voice data suffix name.
Described voice data address accounts for two character lengths.
Described voice data length accounts for two character lengths.
The length of described voice data suffix name is decided according to the length of suffix name.
The content that the path parses in the described step 3 leaves in the special-purpose region of memory,
After audio file called end, this reserved area was released.
In special-purpose region of memory, also deposit file current accessed length.
Said method also be included in the voice playing process suspend, advance, rewind down or stop.
By above technical scheme, can realize calling the routing information of required audio file by Virtual File System, and carry out the resolution path content, required audio frequency is loaded into internal memory, and then directly the audio file that is stored on the internal memory is read in visit, play, stop, F.F., functions such as rewind down, can play as common audio file, need not required audio frequency is write in the file system as temporary file, saved the External memory equipment space, reduce the number of times that reads External memory equipment, and, improve the efficient of whole cell phone system for file system provides unified audio file interface.
Description of drawings
The invention will be further elaborated below in conjunction with the drawings and specific embodiments.
Fig. 1 is a process flow diagram of playing the internal memory voice data.
Fig. 2 is the Organization Chart of mobile phone file system.
Fig. 3 is that the internal memory voice data is mapped to Virtual File System path data format chart afterwards.
Embodiment
As shown in Figure 1, audio decoder is decoded to it by the system call of file system and is play.For the specific implementation process of file system, generally can drive and carry out the read-write of file by traditional FLASH.The present invention has then adopted the internal memory voice data has been mapped in the virtual file system, and audio decoder is finished visit to internal storage data by this virtual file system just.As shown in Figure 1, the inventive method specifically may further comprise the steps:
Step 1, processor is set up Virtual File System according to the file path of voice data.Voice data is mapped to a special file path.This path is somewhat different with the ordinary file path, and in the ordinary file path, what generally deposit is some significant catalogue and filenames.And the path among the present invention then mainly is some special binary data.
Step 2, processor are called the path of respective audio file according to customer requirements by Virtual File System.
Step 3, the processor resolution path, by shown in content, in internal memory, read the respective audio file and play.The Virtual File System of present embodiment provides the file system that is associated with topmost paper system system call interfaces, comprises fopen, fclose, fread, fseek or the like.Because voice playing belongs to read-only application, therefore do not provide the write operation of file system.Embodiment is as follows:
(1) fopen operation is imported the special file system path that mapping is good in the step 1 into as parameter, to resolving in this path, parse the high 16 and low 16 of former voice data address from specific data bit, thereby restores the address of original audio data.From specific data bit, parse length high 16 and low 16 of former voice data, thereby restore the length of original audio data.These data that parse are kept in the interim internal memory.
(2) fread operates, and obtains the start address and the side-play amount of original audio data, and the address of duplicating designated length is in the internal memory of appointment.
(3) fseek operation, the side-play amount of change file access.
(4) fclse operation discharges interim internal memory
During the mobile phone play audio file,, can finish and the same effect of real file broadcast by above four operations.In the inventive method implementation procedure, compare the method that existing visit is stored in the temporary file of External memory equipment, this method only needs directly visit to get final product by the data that parsing special file system path is loaded in the internal memory, reduced the access times to physical storage device, speed is faster, efficient is higher.
Fig. 2 has shown the structure of mobile phone file system.In the present invention, the FLASH module is as a driving of file system, and it is a readable memory module of writing.Virtual File System drives as another of file system, and it is readable and can not write, because it only provides relevant data to decode to audio decoder and play, therefore writes without any meaning.
Fig. 3 has shown that the present invention is mapped to internal storage data a kind of concrete enforcement form in the special file path of Virtual File System.The path that the special file system comprises comprises following content:
(1) routing head sign is corresponding to the drive in the ordinary file system path.Be generally a special English character, as character X, to distinguish common file drive.
(2) drive decollator: and common file system path is consistent.
(3) the path decollator and common file system path be consistent.
(4) the voice data address is high 16.The address space of considering present mobile phone is essentially 32, so the data address described in the present invention also is 32.
(5) low 16 of the voice data address.
(6) high 16 bit data of voice data length.
(7) ground 16 bit data of voice data length.
(8) the suffix name of voice data and ordinary file system path are consistent.This suffix name is generally used for the compression type of audio decoder storehouse identification voice data.
Only being preferable enforcement example of the present invention in sum, is not to be used for limiting practical range of the present invention.Be that every equivalence of doing according to the content of the present patent application claim changes and modification, all should reduce within the technology category of the present invention.

Claims (10)

1. method for reading and playing mobile phone audio-frequency data is characterized in that comprising following steps:
Step 1, processor is set up Virtual File System according to the file path of voice data;
Step 2, processor are called the path of respective audio file according to customer requirements by Virtual File System;
Step 3, the processor resolution path, loads required audio file and goes into internal memory not at internal memory as the audio content memory location, reads respective audio file and broadcast in internal memory.
2. method for reading and playing according to claim 1 is characterized in that: the file path in the step 1 in the Virtual File System is a binary data.
3. method for reading and playing according to claim 1 is characterized in that: the file path in the step 1 in the Virtual File System is the path of a ucs2 coding.
4. method for reading and playing according to claim 1 is characterized in that: the file path in the step 1 in the Virtual File System comprises following content: routing head sign, dish separator, voice data address, voice data length and voice data suffix name.
5. method for reading and playing according to claim 4 is characterized in that: the voice data address accounts for two character lengths.
6. method for reading and playing according to claim 4 is characterized in that: voice data length accounts for two character lengths.
7. method for reading and playing according to claim 4 is characterized in that: the length of voice data suffix name is decided according to the length of suffix name.
8. method for reading and playing according to claim 4 is characterized in that: the content that the path parses in the step 3 leaves in the special-purpose region of memory, and after audio file called end, this reserved area was released.
9. method for reading and playing according to claim 8 is characterized in that: also deposit file current accessed length in special-purpose region of memory.
10. according to claim 1 or 9 described method for reading and playing, it is characterized in that further comprising the steps of: in the voice playing process, suspend, advance, rewind down or stop.
CNA2008102076673A 2008-12-24 2008-12-24 Method for reading and playing mobile phone audio-frequency data Pending CN101515274A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CNA2008102076673A CN101515274A (en) 2008-12-24 2008-12-24 Method for reading and playing mobile phone audio-frequency data

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CNA2008102076673A CN101515274A (en) 2008-12-24 2008-12-24 Method for reading and playing mobile phone audio-frequency data

Publications (1)

Publication Number Publication Date
CN101515274A true CN101515274A (en) 2009-08-26

Family

ID=41039731

Family Applications (1)

Application Number Title Priority Date Filing Date
CNA2008102076673A Pending CN101515274A (en) 2008-12-24 2008-12-24 Method for reading and playing mobile phone audio-frequency data

Country Status (1)

Country Link
CN (1) CN101515274A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102664026A (en) * 2010-12-16 2012-09-12 哈曼国际工业有限公司 Handlebar audio controls
CN103124309A (en) * 2011-11-21 2013-05-29 希姆通信息技术(上海)有限公司 Method and terminal for read-write control of mobile phone files
CN103312810A (en) * 2013-06-21 2013-09-18 上海辰锐信息科技公司 Remote virtual file system

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102664026A (en) * 2010-12-16 2012-09-12 哈曼国际工业有限公司 Handlebar audio controls
CN102664026B (en) * 2010-12-16 2016-07-06 哈曼国际工业有限公司 Handlebar audio frequency control
CN103124309A (en) * 2011-11-21 2013-05-29 希姆通信息技术(上海)有限公司 Method and terminal for read-write control of mobile phone files
CN103124309B (en) * 2011-11-21 2014-09-17 希姆通信息技术(上海)有限公司 Method and terminal for read-write control of mobile phone files
CN103312810A (en) * 2013-06-21 2013-09-18 上海辰锐信息科技公司 Remote virtual file system
CN103312810B (en) * 2013-06-21 2017-01-25 上海辰锐信息科技公司 Remote virtual file system

Similar Documents

Publication Publication Date Title
CN102012831B (en) Over-the-air technology (OTA) upgrading method based on Linux platform
CN100511154C (en) Audio driver sound management method
CN101282375A (en) Method and mobile terminal for mapping multimedia documents based on call record
CN102782665A (en) Combining user content with supplemental content at a data storage device
CN101916290B (en) Managing method of internal memory database and device
WO2009107393A1 (en) Access device, information recording device, controller, and information recording system
CN102223410A (en) Searching method of intelligent information terminal and terminal
CN113419670A (en) Data writing processing method and device and electronic equipment
CN1929427A (en) Mobile terminal, electronic-book reading device, updating system and reading method
CN103078810A (en) Efficient rich media showing system and method
CN100507873C (en) FLASH document management method and system in FLASH memory
KR20070063132A (en) Apparatus and method for manage a bad block
CN101515274A (en) Method for reading and playing mobile phone audio-frequency data
CN112181275A (en) Data processor and data processing method
CN102902687A (en) Accessing method and device of resource file
CN108647278B (en) File management method and system
CN101187936B (en) A log data storage method and device
CN101908021A (en) Flash memory erasing-writing method and flash memory
CN100440383C (en) External storing performance testing method and apparatus
CN101986302B (en) Media file association method and device
CN116795803A (en) File data storage method, device, equipment and storage medium
CN101206660A (en) File organization method
CN102054005A (en) Method and device for loading file
CN103024219A (en) IAD (Integrated Access Device) and voice processing method and system based on same
CN101345945A (en) Short message storage method and apparatus

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C02 Deemed withdrawal of patent application after publication (patent law 2001)
WD01 Invention patent application deemed withdrawn after publication

Open date: 20090826