CN1567241A - Recording method of continuous sound data - Google Patents
Recording method of continuous sound data Download PDFInfo
- Publication number
- CN1567241A CN1567241A CN 03145903 CN03145903A CN1567241A CN 1567241 A CN1567241 A CN 1567241A CN 03145903 CN03145903 CN 03145903 CN 03145903 A CN03145903 A CN 03145903A CN 1567241 A CN1567241 A CN 1567241A
- Authority
- CN
- China
- Prior art keywords
- data
- recording method
- buffering
- continuous audio
- recording area
- 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
Links
- 238000000034 method Methods 0.000 title claims abstract description 23
- 238000005070 sampling Methods 0.000 claims abstract description 11
- 238000013500 data storage Methods 0.000 claims description 3
- 230000005236 sound signal Effects 0.000 claims description 3
- 230000003139 buffering effect Effects 0.000 claims 8
- 230000007812 deficiency Effects 0.000 claims 1
- 238000010586 diagram Methods 0.000 description 3
- 230000005540 biological transmission Effects 0.000 description 1
- 239000000463 material Substances 0.000 description 1
- 230000004044 response Effects 0.000 description 1
- 230000026676 system process Effects 0.000 description 1
Images
Landscapes
- Signal Processing For Digital Recording And Reproducing (AREA)
Abstract
Description
技术领域technical field
本发明是关于一种录音技术,特别是关于一种连续声音资料的记录方法。The invention relates to a recording technology, in particular to a method for recording continuous sound materials.
背景技术Background technique
现有的录音技术,是使用一计算机系统对连续声音资料(如:模拟音频信号)进行记录,计算机系统中需分配若干的内存作为缓冲记录区域10(如图1所示),缓冲记录区域10至少具有一数据字段100及一状态字段102,其中数据字段100用以储存计算机系统对连续声音资料进行取样后的资料,而状态字段102用以储存缓冲记录区域10目前的使用状态,若使用状态是一处理状态,代表缓冲记录区域10内的取样资料正被计算机系统处理中,若使用状态是一预备状态,则代表缓冲记录区域10正对取样的资料进行储存。Existing recording technology is to use a computer system to record continuous sound data (such as: analog audio signal), and in the computer system, some internal memory needs to be allocated as the buffer recording area 10 (as shown in Figure 1), and the
缓冲记录区域10的大小将直接影响收录的声音的连续性及时间延迟性。若缓冲记录区域10越大,可以记录的取样资料将越多且越完整,使收录的声音的连续性越好,不过由于计算机系统必须处理更多的取样资料,会造成收录的声音的时间延迟性更差;反之,若缓冲记录区域10越小,则收录的声音的时间延迟性越能获得改善,但其连续性则会变差。因此,以现有技术收录的声音并无法同时兼顾连续性及时间延迟性。The size of the
再者,现有技术的做法是当一缓冲记录区域10的使用空间不足时,即令计算机系统开始对缓冲记录区域10内的取样资料进行处理(包括:压缩、储存等),然后解除缓冲记录区域10的预备状态,改设为一处理状态,使得随后的取样资料被放入另一个缓冲记录区域10中,再将该另一个缓冲记录区域的状态设为一预备状态,如此不断进行,直到声音收录完成。由上可知,计算机系统所需执行的工作相当多且繁琐,导致无法连续地记录声音资料,这正是使用现有技术收录的声音普遍具有连续性不佳的主要因素。Furthermore, the way in the prior art is to make the computer system start to process (compress, store, etc.) the sampling data in the
发明内容Contents of the invention
为克服上述现有技术的缺点,本发明的主要目的在于提供一种连续声音资料的记录方法,解决现有技术中收录声音连续性不佳的问题,并进而使收录的声音能够同时兼顾连续性及时间延迟性。In order to overcome the shortcomings of the above-mentioned prior art, the main purpose of the present invention is to provide a recording method for continuous sound data, which solves the problem of poor continuity of the recorded sound in the prior art, and then enables the recorded sound to take into account the continuity at the same time. and time delay.
为达到上述目的,本发明的连续声音资料的记录方法,适合在具有一多线程微处理器的计算机系统中进行,其中该多线程微处理器用以在一个以上的线程中切换并执行,该方法至少包括:读取该连续声音资料,并对该连续声音资料进行连续地取样;将取样得到的资料按顺序记录在一缓冲记录区域;在该缓冲记录区域的使用空间不足时,提供一个以上的第一辅助线程,该第一辅助线程用以处理该缓冲记录区域内的资料;以及,提供一第二辅助线程,该第二辅助线程用以将随后的取样资料按顺序记录在另一缓冲记录区域。In order to achieve the above-mentioned purpose, the method for recording continuous audio data of the present invention is suitable for carrying out in a computer system with a multi-threaded microprocessor, wherein the multi-threaded microprocessor is used to switch and execute in more than one thread, the method At least including: reading the continuous audio data, and continuously sampling the continuous audio data; recording the sampled data in a buffer recording area in sequence; when the buffer recording area has insufficient space, providing more than one A first auxiliary thread, the first auxiliary thread is used to process the data in the buffer record area; and, a second auxiliary thread is provided, and the second auxiliary thread is used to sequentially record subsequent sampled data in another buffer record area.
如上所述的连续声音资料的记录方法,其中该提供一个以上的第一辅助线程及提供一第二辅助线程的步骤可平行进行;该第一辅助线程处理的该缓冲记录区域的状态设为一处理状态;以及该第二辅助线程处理的另一缓冲记录区域的状态设为一预备状态;该第一辅助线程用以执行至少下列步骤:读取该缓冲记录区域内的资料,将该读取资料储存在一储存装置中;以及清除该缓冲记录区域内的资料,以令该缓冲记忆区域供下笔资料储存使用;以及,该连续声音资料是一模拟音频信号;该储存装置是一磁盘装置。The method for recording continuous audio data as described above, wherein the steps of providing more than one first auxiliary thread and providing a second auxiliary thread can be performed in parallel; the state of the buffer recording area processed by the first auxiliary thread is set to one processing state; and the state of another buffer record area processed by the second auxiliary thread is set to a ready state; the first auxiliary thread is used to perform at least the following steps: read the data in the buffer record area, and the read The data is stored in a storage device; and the data in the buffer recording area is cleared so that the buffer memory area is used for storing the next data; and the continuous sound data is an analog audio signal; the storage device is a disk device.
综上所述,本发明解决了现有技术中收录声音连续性不佳的问题,利用本发明,可使收录的声音能够同时兼顾连续性及时间延迟性。To sum up, the present invention solves the problem of poor continuity of the recorded sound in the prior art. By using the present invention, the recorded sound can be both continuous and time-delayed.
附图说明Description of drawings
图1是本发明使用的缓冲记录区域的逻辑示意图。FIG. 1 is a logical schematic diagram of a buffer recording area used in the present invention.
图2是一可供本发明使用的计算机系统架构图Fig. 2 is a computer system architecture diagram that can be used by the present invention
图3是本发明方法的流程图。Figure 3 is a flow chart of the method of the present invention.
具体实施方式Detailed ways
实施例Example
本发明的目的,在于使用多线程(thread)技术进行连续声音资料的记录,也就是通过创建多个辅助线程,分别对缓冲记录区域10内的资料进行处理,以及响应处理缓冲记录区域10的使用空间不足的事件(event)。因此,本发明适合在具有一多线程微处理器的计算机系统中进行,如图2所示,其即为一可供本发明使用的计算机系统架构图。在图2中,该计算机系统至少包括一输入/输出装置20、一内存22、一多线程微处理器24以及一储存装置26。该计算机系统是指个人桌上型计算机、笔记本型个人计算机、数字录音笔、数字个人助理或移动电话等供使用者进行录音处理的电子装置(图未标),以下实施例,以笔记本型个人计算机说明本发明的连续声音资料的记录方法。为简化附图及说明,此处的系统架构仅显示与本发明有关的系统构件,其它无关的系统构件,并未显示在附图中。The purpose of the present invention is to use multithreading (thread) technology to carry out the recording of continuous sound data, namely by creating a plurality of auxiliary threads, the data in the
该输入/输出装置20主要用以接收来自外界的连续声音资料,例如集声器(麦克风),并且用以将该计算机系统收录的声音资料予以播放,例如扬声器(喇叭);而内存22可动态地分配有至少一缓冲记录区域220,缓冲记录区域220的逻辑结构可以参见图1,其主要是用以储存计算机系统对连续声音资料进行取样后的资料;多线程微处理器24用以检测该内存22的缓冲记录区域220内所储存的声音资料是否填满,其可以为一Intel系列的微处理芯片;其中,当该多线程微处理器24判断该内存22的缓冲记录区域220储存的声音资料即将填满时,则将该缓冲记录区域220内储存的声音资料储存在该储存装置26中,该储存装置26可以利用一磁盘装置来实现。The input/
图3是本发明方法的流程图。首先,步骤300是通过如图2所示的计算机系统的输入/输出装置20接收一连续声音资料,并对该连续声音资料进行连续地取样,取样的频率可由使用者决定,接着进至步骤302。Figure 3 is a flow chart of the method of the present invention. First, step 300 is to receive a continuous sound data through the input/
在该步骤302中,该计算机系统将取样所得的资料按顺序记录在内存22中的一缓冲记录区域220中,接着进至步骤303。In the step 302 , the computer system sequentially records the sampled data in a
在该步骤303中,该计算机系统判断储存取样资料的缓冲记录区域220是否将由该取样资料填满,若是则进至步骤304;反之,则返回该步骤303。In the step 303 , the computer system judges whether the
在该步骤304中,该计算机系统自该被取样资料填满的缓冲记录区域220取出所有的取样资料,并将该取出的取样资料储存在该储存装置26中,接着进至步骤305。In the step 304 , the computer system takes out all the sampled data from the
在该步骤305中,该计算机系统清除该被取样资料填满的缓冲记录区域220内的内容,作为计算机系统下次接收取样资料时的储存之用,接着进至步骤306。In the step 305 , the computer system clears the contents of the
在该步骤306中,该计算机系统自该内存22中找寻下一个缓冲记录区域(222或224),并且将其设为预备状态,供该计算机系统将随后处理的取样资料,按顺序记录在已经被设为预备状态的缓冲记录区域(222或224)之中,接着则返回该步骤300,令该计算机系统重复地将处理中的取样资料进行储存,直到将连续声音资料记录完成。In the step 306, the computer system searches for the next buffer recording area (222 or 224) from the
其中,图3所示的步骤304至步骤305可与步骤306并行处理,也就是,计算机系统一方面对该被取样资料填满的缓冲记录区域220进行处理,另一方面则自内存22中对另一个缓冲记录区域(222或224)进行处理,借此令该计算机装置处理的取样资料连续地进行储存,其中,借由该储存装置26辅助该计算机系统在资料储存上的处理,以解决资料储存不连续的问题,并且提供一种多线程声音资料的储存技术。Wherein, steps 304 to 305 shown in FIG. 3 can be processed in parallel with step 306, that is, on the one hand, the computer system processes the
综上所述,本发明可以大幅缩短对缓冲记录区域内的取样资料的处理时间,提高录音程序的执行效率;再者,处理状态中的缓冲记录区域可以及时被收回,使得连续地取样动作能够顺利进行,且间接使得所分配的缓冲记录区域的记忆空间可以减少,因而节省了系统资源。由于本发明是使用多线程技术,而且缓冲记录区域可以设置为具有较小的记忆空间,因此本发明具有较佳的时间延迟性,因此具有一定的优势,尤其适用于实时传输语音资料的场合中,例如:视频会议等,同时又能兼具有连续性的特点。In summary, the present invention can greatly shorten the processing time of the sampling data in the buffer recording area, and improve the execution efficiency of the recording program; moreover, the buffer recording area in the processing state can be recovered in time, so that the continuous sampling action can be It goes smoothly, and indirectly reduces the memory space of the allocated buffer record area, thus saving system resources. Since the present invention uses multi-threading technology, and the buffer recording area can be set to have a smaller memory space, the present invention has better time delay, so it has certain advantages, and is especially suitable for the occasion of real-time transmission of voice data , such as: video conferencing, etc., and at the same time have the characteristics of continuity.
Claims (6)
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN 03145903 CN1567241A (en) | 2003-07-10 | 2003-07-10 | Recording method of continuous sound data |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN 03145903 CN1567241A (en) | 2003-07-10 | 2003-07-10 | Recording method of continuous sound data |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| CN1567241A true CN1567241A (en) | 2005-01-19 |
Family
ID=34471543
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN 03145903 Pending CN1567241A (en) | 2003-07-10 | 2003-07-10 | Recording method of continuous sound data |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN1567241A (en) |
Cited By (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN101482831B (en) * | 2008-01-08 | 2013-05-15 | 国际商业机器公司 | Method and equipment for concomitant scheduling of working thread and worker thread |
-
2003
- 2003-07-10 CN CN 03145903 patent/CN1567241A/en active Pending
Cited By (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN101482831B (en) * | 2008-01-08 | 2013-05-15 | 国际商业机器公司 | Method and equipment for concomitant scheduling of working thread and worker thread |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN101110247B (en) | Playing method for audio files and device thereof | |
| US20060221788A1 (en) | Efficient techniques for modifying audio playback rates | |
| JP2009502050A (en) | GPU timeline with rendered queue | |
| CN101048775A (en) | Synchronization of multiple media types between host and media device | |
| WO2017096882A1 (en) | Video playing method and device | |
| CN111930975A (en) | Ship navigation data playback and analysis system and method | |
| CN112988916A (en) | Full and incremental synchronization method, device and storage medium for Clickhouse | |
| CN1902935A (en) | Apparatus and method for searching for a video clip | |
| US8526777B2 (en) | Moving image recording method and information processing device | |
| CN1567241A (en) | Recording method of continuous sound data | |
| TWI223231B (en) | Digital audio with parameters for real-time time scaling | |
| CN1630344A (en) | Control method of digital camera | |
| EP1501073A1 (en) | Information playback apparatus, information playback method, and computer readable medium therefor | |
| TWI231913B (en) | Recording method of continuous audio data | |
| CN114253477A (en) | Ultrahigh concurrent image data writing method and device and readable storage medium | |
| CN1194539C (en) | Data Rate Converter | |
| CN1063571C (en) | Recording method and apparatus of audio signal suing integrated circuit memory card | |
| CN1595397A (en) | Automatic making and playing method of audible text | |
| CN113986849B (en) | Music caching method, device, electronic device and storage medium | |
| US8443015B2 (en) | Apparatus and method for providing content and content analysis results | |
| JPH08249343A (en) | Audio information acquisition device and audio information acquisition method | |
| CN100588237C (en) | Digital signal conversion system and method | |
| US20090327344A1 (en) | Media foundation source reader | |
| Hazel et al. | Transcription linking software: integrating the ephemeral and the fixed in interaction research | |
| CN113434711B (en) | Multimedia data display method, storage medium and device |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| C06 | Publication | ||
| PB01 | Publication | ||
| C10 | Entry into substantive examination | ||
| SE01 | Entry into force of request for substantive examination | ||
| C12 | Rejection of a patent application after its publication | ||
| RJ01 | Rejection of invention patent application after publication |