[go: up one dir, main page]

CN1567241A - Recording method of continuous sound data - Google Patents

Recording method of continuous sound data Download PDF

Info

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
Application number
CN 03145903
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.)
Inventec Corp
Original Assignee
Inventec Corp
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 Inventec Corp filed Critical Inventec Corp
Priority to CN 03145903 priority Critical patent/CN1567241A/en
Publication of CN1567241A publication Critical patent/CN1567241A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Signal Processing For Digital Recording And Reproducing (AREA)

Abstract

The invention provides a recording method of continuous sound data, suitable for being carried on in the computer system with a multithread microprocessor, the invention uses the computer system to read the continuous sound data, and sample continuously, then record the data obtained by sampling in a buffer recording area in order; the invention provides more than one first auxiliary thread and one second auxiliary thread when the using space of the buffer recording area is insufficient, wherein the first auxiliary thread is used for processing the data in the buffer recording area, and the second auxiliary thread is used for recording the subsequent sampling data in another buffer recording area in sequence.

Description

连续声音资料的记录方法Recording method of continuous sound data

技术领域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 buffer recording area 10 It has at least one data field 100 and a status field 102, wherein the data field 100 is used to store the data after the computer system samples the continuous sound data, and the status field 102 is used to store the current usage status of the buffer recording area 10, if the usage status It is a processing state, which means that the sampled data in the buffer record area 10 is being processed by the computer system, and if the use state is a standby state, it means that the buffer record area 10 is storing the sampled data.

缓冲记录区域10的大小将直接影响收录的声音的连续性及时间延迟性。若缓冲记录区域10越大,可以记录的取样资料将越多且越完整,使收录的声音的连续性越好,不过由于计算机系统必须处理更多的取样资料,会造成收录的声音的时间延迟性更差;反之,若缓冲记录区域10越小,则收录的声音的时间延迟性越能获得改善,但其连续性则会变差。因此,以现有技术收录的声音并无法同时兼顾连续性及时间延迟性。The size of the buffer recording area 10 will directly affect the continuity and time delay of the recorded sound. If the buffer recording area 10 is larger, the sample data that can be recorded will be more and more complete, so that the continuity of the recorded sound is better, but because the computer system must process more sample data, the time delay of the recorded sound will be caused. Conversely, if the buffer recording area 10 is smaller, the time delay of the recorded sound can be improved, but its continuity will be worse. Therefore, the sound recorded with the prior art cannot take both continuity and time delay into account.

再者,现有技术的做法是当一缓冲记录区域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 buffer recording area 10 when the available space of a buffer recording area 10 is insufficient, and then release the buffer recording area The preparatory state of 10 is changed to a processing state, so that the subsequent sampling data is put into another buffer recording area 10, and then the state of this other buffer recording area is set as a preparatory state, and so on, until the sound Collection complete. It can be seen from the above that the computer system needs to perform quite a lot of cumbersome work, resulting in the inability to continuously record audio data, which is the main factor for the generally poor continuity of audio recordings using the prior art.

发明内容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 buffer recording area 10 is processed respectively, and the use of the response processing buffer recording area 10 Out of space event (event). Therefore, the present invention is suitable to be implemented in a computer system with a multi-threaded microprocessor, as shown in FIG. 2 , which is a computer system architecture diagram that can be used in the present invention. In FIG. 2 , the computer system at least includes an input/output device 20 , a memory 22 , a multi-thread microprocessor 24 and a storage device 26 . The computer system refers to an electronic device (not marked) for users to perform recording processing such as a personal desktop computer, a notebook personal computer, a digital voice recorder, a digital personal assistant or a mobile phone. In the following embodiments, the notebook personal The computer explains the recording method of the continuous audio data of the present invention. To simplify the drawings and descriptions, the system architecture here only shows system components related to the present invention, and other irrelevant system components are not shown in the drawings.

该输入/输出装置20主要用以接收来自外界的连续声音资料,例如集声器(麦克风),并且用以将该计算机系统收录的声音资料予以播放,例如扬声器(喇叭);而内存22可动态地分配有至少一缓冲记录区域220,缓冲记录区域220的逻辑结构可以参见图1,其主要是用以储存计算机系统对连续声音资料进行取样后的资料;多线程微处理器24用以检测该内存22的缓冲记录区域220内所储存的声音资料是否填满,其可以为一Intel系列的微处理芯片;其中,当该多线程微处理器24判断该内存22的缓冲记录区域220储存的声音资料即将填满时,则将该缓冲记录区域220内储存的声音资料储存在该储存装置26中,该储存装置26可以利用一磁盘装置来实现。The input/output device 20 is mainly used to receive continuous sound data from the outside, such as a sound collector (microphone), and to play the sound data recorded by the computer system, such as a loudspeaker (speaker); and the memory 22 can dynamically There is at least one buffer recording area 220 allocated, the logical structure of buffer recording area 220 can be referred to Fig. 1, and it is mainly used for storing the data after computer system samples continuous sound data; Multi-threaded microprocessor 24 is used for detecting this Whether the sound data stored in the buffer recording area 220 of the internal memory 22 is filled up, it can be an Intel series microprocessor chip; When the data is about to be full, the audio data stored in the buffer recording area 220 is stored in the storage device 26, and the storage device 26 can be realized by a disk device.

图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/output device 20 of the computer system as shown in Figure 2, and continuously sample the continuous sound data, the sampling frequency can be determined by the user, and then proceed to step 302 .

在该步骤302中,该计算机系统将取样所得的资料按顺序记录在内存22中的一缓冲记录区域220中,接着进至步骤303。In the step 302 , the computer system sequentially records the sampled data in a buffer recording area 220 in the memory 22 , and then proceeds to step 303 .

在该步骤303中,该计算机系统判断储存取样资料的缓冲记录区域220是否将由该取样资料填满,若是则进至步骤304;反之,则返回该步骤303。In the step 303 , the computer system judges whether the buffer recording area 220 storing the sampled data will be filled with the sampled data, and if so, proceeds to the step 304 ; otherwise, returns to the step 303 .

在该步骤304中,该计算机系统自该被取样资料填满的缓冲记录区域220取出所有的取样资料,并将该取出的取样资料储存在该储存装置26中,接着进至步骤305。In the step 304 , the computer system takes out all the sampled data from the buffer recording area 220 filled with the sampled data, and stores the taken out sampled data in the storage device 26 , and then proceeds to the step 305 .

在该步骤305中,该计算机系统清除该被取样资料填满的缓冲记录区域220内的内容,作为计算机系统下次接收取样资料时的储存之用,接着进至步骤306。In the step 305 , the computer system clears the contents of the buffer record area 220 filled with the sampled data for storage when the computer system receives the sampled data next time, and then proceeds to step 306 .

在该步骤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 internal memory 22, and sets it as a standby state, for the computer system to record the sampled data processed subsequently in the existing In the buffer recording area (222 or 224) that is set as the standby state, then return to the step 300, so that the computer system repeatedly stores the processing sample data until the continuous audio data recording is completed.

其中,图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 buffer recording area 220 filled with sampled data, and on the other hand processes the data from the internal memory 22. Another buffer recording area (222 or 224) is processed, whereby the sampling data processed by the computer device is continuously stored, wherein, the storage device 26 assists the processing of the computer system on data storage to resolve data It solves the problem of discontinuous storage and provides a storage technology for multi-threaded audio data.

综上所述,本发明可以大幅缩短对缓冲记录区域内的取样资料的处理时间,提高录音程序的执行效率;再者,处理状态中的缓冲记录区域可以及时被收回,使得连续地取样动作能够顺利进行,且间接使得所分配的缓冲记录区域的记忆空间可以减少,因而节省了系统资源。由于本发明是使用多线程技术,而且缓冲记录区域可以设置为具有较小的记忆空间,因此本发明具有较佳的时间延迟性,因此具有一定的优势,尤其适用于实时传输语音资料的场合中,例如:视频会议等,同时又能兼具有连续性的特点。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)

1, a kind of recording method of continuous audio document is characterized in that, is adapted at having in the computer system of a multithreaded microprocessor carrying out, and wherein this multithreaded microprocessor is in order to switch at least one thread and to carry out, and this method comprises at least:
(a) read this continuous audio document, and this continuous audio document is taken a sample continuously;
(b) data that sampling is obtained is recorded in a buffering posting field in order;
(c) when the usage space deficiency of this buffering posting field, carry out the following step:
(c1) provide at least one first worker thread, this first worker thread is in order to handle the data in this buffering posting field; And
(c2) provide one second worker thread, this second worker thread is in order to be recorded in another buffering posting field in order with sampling data subsequently.
2, the recording method of continuous audio document as claimed in claim 1 is characterized in that, this step (c1) and step (c2) can parallelly be carried out.
3, the recording method of continuous audio document as claimed in claim 1 or 2 is characterized in that, this recording method also comprises:
The state of the buffering posting field in the step (c1) is made as a treatment state; And
The state of another buffering posting field in the step (c2) is made as a readiness.
4, the recording method of continuous audio document as claimed in claim 1 or 2 is characterized in that, first worker thread in this step (c1) is in order to carry out the following step at least:
Read the data in this buffering posting field, this is read data storage in a storage device; And
Remove the data in this buffering posting field, use for the data storage of starting writing to make this buffer memory zone.
5, the recording method of continuous audio document as claimed in claim 1 or 2 is characterized in that, this continuous audio document is a simulated audio signal.
6, the recording method of continuous audio document as claimed in claim 4 is characterized in that, this storage device is a disk set.
CN 03145903 2003-07-10 2003-07-10 Recording method of continuous sound data Pending CN1567241A (en)

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)

* Cited by examiner, † Cited by third party
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

Cited By (1)

* Cited by examiner, † Cited by third party
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