CN102237113B - Method for caching CD (Compact Disc) data during reversely playing CD signals and player - Google Patents

Method for caching CD (Compact Disc) data during reversely playing CD signals and player Download PDF

Info

Publication number
CN102237113B
CN102237113B CN201010161592.7A CN201010161592A CN102237113B CN 102237113 B CN102237113 B CN 102237113B CN 201010161592 A CN201010161592 A CN 201010161592A CN 102237113 B CN102237113 B CN 102237113B
Authority
CN
China
Prior art keywords
sub
buffer area
data
laser disc
sector
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.)
Active
Application number
CN201010161592.7A
Other languages
Chinese (zh)
Other versions
CN102237113A (en
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.)
Zebondtechnology Co Ltd Fuoshan
Original Assignee
Zebondtechnology Co Ltd Fuoshan
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 Zebondtechnology Co Ltd Fuoshan filed Critical Zebondtechnology Co Ltd Fuoshan
Priority to CN201010161592.7A priority Critical patent/CN102237113B/en
Publication of CN102237113A publication Critical patent/CN102237113A/en
Application granted granted Critical
Publication of CN102237113B publication Critical patent/CN102237113B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Signal Processing For Digital Recording And Reproducing (AREA)

Abstract

The invention relates to the field of audio play, and discloses a method for caching CD (Compact Disc) data during reversely playing CD signals and a player. The method comprises the following steps of: S1, when an ith sub cache area is reversely played, determining an Xth sector of a first sector address stored in the ith sub cache area, and determining a Yth sector of a first sector address stored in an (i-1)th sub cache area; S2, if (X-Y)=W, returning to S1, otherwise, executing S3; S3, positioning tracking of an optical head to an (X-W)th sector of an optical disk; S4, writing the read data into the (i-1)th sub cache area till the optical head reads an (X-a)th sector of the optical disk, executing S5, otherwise, returning S4; S5, comparing the data read by the optical head with the data of front n bytes in the ith sub cache area one by one, executing S6 if the data are different, otherwise, returning to S1; and S6, writing the read data into the (i-1)th sub cache area, and returning to S5. When the technology is applied to reverse play, accurate connection of the reversely played audio can be ensured.

Description

Method and the player of buffer memory CD laser disc data during reverse-play CD laser disc signal
Technical field
The present invention relates to field of audio play, while relating in particular to a kind of forward play CD laser disc signal, read method and the CD optical disc player of buffer memory when the method for buffer memory CD laser disc data, forward play CD laser disc signal.
Background technology
CD laser disc music is because the music effect of its high-quality is extensively subject to audiophile's welcome.The mode of play CD laser disc laser disc mainly contains at present: adopt the mode of CD laser disc-ROM broadcasting of desktop computer, and two kinds of modes playing by special CD optical disc player.
Usually at desktop computer, and in larger CD optical disc player, due to desktop computer, and the internal memory of larger CD optical disc player itself all can have up to a hundred million, therefore in desktop computer during play CD laser disc CD laser disc, as long as first make shaven head read continuously the signal on CD laser disc CD laser disc, reading, be to adopt direct memory (Direct Memory Access, abbreviation DMA) mode is cached to the data of whole first song in internal memory continuously, then from internal memory, order reads the voice data in internal memory, export the data that read to sound card and can realize audio frequency broadcasting.
Yet along with the development of technology, portable music player is more and more welcomed by the people owing to holding portative advantage, becomes music player of new generation.
Fig. 1 is the electric composition connection diagram of portable player of the prior art.Shown in Figure 1, existing portable player is mainly comprised of shaven head 101, servo ic 102, Master control chip 103, buffer memory 104, sound card 105.
Shaven head 101 reads the data of CD laser disc under the control of servo ic 102, data are passed to system control chip by the digital audio channel between servo ic 102 and system control chip, system control chip carries out information interaction by control channel and servo ic 102, control servo ic 102, system control chip is connected with buffer memory 104, controls the write and read of buffer memory 104.
Yet in music wherein,, because its storer is all smaller, generally all only have several megabyte, and the CD laser disc song of a few minutes all can there be tens megabyte conventionally.Therefore cannot adopt directly whole song is read and writes internal memory in portable music player, then read the mode that song in internal memory realizes playback of songs.Such as: during forward play, according to the order forward of first in first out, read the data in buffer memory, output reading out data audio plays; When reverse-play, according to the data in order reverse read buffer memory first-in last-out, output data realize reverse-play.
In addition, because portable music player generally provides broadcasting speed adjustable function, user can be by the broadcasting speed that regulates audio frequency to play, the general scope of adjusting is normal playback speed 1% to 4 times.Because broadcasting speed is subject to user, control, the speed that therefore reads the voice data in buffer memory 104 can be different from the speed of the shaven head 101 voice data buffer memorys 104 that read being entered to internal memory.Therefore, in the prior art, portable music player buffer memory 104 voice datas generally adopt intermittent mode to carry out: write that data are entered buffer memory 104 until buffer memory 104 is write when full soon suspends and write buffer memory 104, by the time the played part of the data of buffer memory 104, after fast being played, then then being write the position of buffer memory 104 last time and is continued voice data to write buffer memory 104 in buffer memory 104.
And in existing portable music player in order to make the control of responding system in time of CD laser disc CD laser disc, CD laser disc CD laser disc in the process of portable music player work always in rotation status, now the signal on shaven head 101 is always in variable condition, and the CD laser disc servo ic 102 causing thus digital audio-frequency data is out changing always.
And by bit clock, bit data, three signals of channel clock, with DMA, mode and broadcasting control system, exchange digital audio-frequency data owing to taking chip.And that Play System is controlled servo ic 102 action that tracks is main as follows: obtained the positional information of current track from servocontrol passage by master control system, the target location that need to arrive with us compares, shaven head 101 is jumped forward or backward, progressively approach target location, by the control channel of servo ic 102, use sector autonomous tracing in intelligent vehicle to realize.Owing to there is no locating information in digital audio-frequency data, so dividing with sector autonomous tracing in intelligent vehicle, systems control division is difficult to digital audio-frequency data accurately to locate.
Therefore based on above reason, after writing buffering time-out, need to continue then when buffer memory 104 relayings are continued into buffer memory 104, the sector technology that tracks of application prior art, reading is continued in the position that is difficult to make bare headed 101CD laser disc CD laser disc accurately get back to last reading, the buffer memory 104 that buffer memory that existence continues to write 104 is finally write when suspending can not be accurately continuous problem: after writing buffering and suspending, the position on CD laser disc can not be accurately continuous with the position of time-out eve on CD laser disc when continuing to read CD laser disc data for shaven head 101, cause the voice data that writes buffer memory 104 not conform to the real data on CD laser disc at tie point place, cause playback of songs to occur sound saltus step, tie point lags behind, playing process occurs that sound repeats, or the problem put upside down of left and right passage, have a strong impact on user's use impression.
In addition, for thering is the player of rubbing dish function with the hands, when Play System frequently carries out the operation of forward play and reverse-play, forward and the frequent degree of oppositely writing buffer memory 104 also strengthen, it is many that the tie point of data becomes, the chance that appearance jumping sound and repetition or left and right passage are put upside down is also more, and above-mentioned data connecting portion accurately problem will be more outstanding to the destruction of music.
Needing reverse-play (such as rewind down or the situation of oppositely rubbing dish with the hands) especially, owing to needing the method for anti-reverse read (high address is read toward low address) to read the data in buffer memory when playing, therefore need the more data of buffer memory, make that cache size of the prior art is limited, the contradiction of the accurate continuous wave output of data is more obvious.
Summary of the invention
When the present invention's the first object is to provide a kind of reverse-play, CD laser disc data are write caching method, apply this technology when reverse-play, can guarantee the accurate connection of the audio frequency of reverse-play, are conducive to guarantee to play tonequality.
During a kind of reverse-play that the embodiment of the present invention provides, CD laser disc data are write caching method, comprising:
Step S1: when reverse-play is during to the sub-buffer area of i, determine the first sevtor address of storage in the sub-buffer area of described i, be designated as X sector, determine the first sevtor address of storing in (i-1) sub-buffer area, be designated as Y sector, wherein said first sevtor address is the voice data correspondence of current storage in described each the sub-buffer area sector reference position on described CD laser disc;
Step S2: if (X-Y)=W returns to step S1, otherwise execution step S3, wherein, the amount of audio data of storing in described (i-1) sub-buffer area is the amount of audio data of W sector on described CD laser disc;
Step S3: shaven head is tracked and navigates to (X-W) sector of described CD laser disc,
Step S4: according to the reading order of described shaven head, the data that read are write to described (i-1) sub-buffer area, until described shaven head is read (X-a) sector of described CD laser disc, execution step S5, otherwise return to this step, wherein a is the predetermined natural number that is less than described W;
Step S5: the data that described shaven head is read one by one with the sub-buffer area of described i in the data comparison of front n byte, if different, execution step S6; Otherwise return to step S1;
Step S6: according to the reading order of described shaven head, the data that read are write to described (i-1) sub-buffer area, return to step S5.
A kind of CD optical disc player that the embodiment of the present invention provides, comprising:
Shaven head, for reading the data of CD laser disc CD laser disc;
Servo ic, for control described shaven head under the control of processing module, comprises that just bare headed tracking navigates to (X-W) sector of described CD laser disc, and receives the data that described shaven head reads from described CD laser disc CD laser disc;
Rub dish detection module with the hands, be connected with described processor, for detection of oppositely rubbing dish signal with the hands, described testing result is inputted to described processor;
Described processor comprises oppositely writes buffer memory determination module, control module, comparison module,
Oppositely write buffer memory determination module, for when reverse-play is during to the sub-buffer area of i, determine the first sevtor address of storage in the sub-buffer area of described i, be designated as X sector, determine the first sevtor address of storing in (i-1) sub-buffer area, be designated as Y sector, wherein said first sevtor address is the voice data correspondence of current storage in described each the sub-buffer area sector reference position on described CD laser disc, as long as (X-Y) be not equal to described W, judge and currently need to rewrite buffer memory at described (i-1) sub-buffer memory, the amount of audio data of storing in described (i-1) sub-buffer area is the amount of audio data of W sector on described CD laser disc,
Described control module with describedly oppositely write buffer memory determination module, rub dish detection module with the hands, servo ic, buffer memory writing module, buffer memory be connected respectively,
Described control module is used for: when the described buffer memory determination module of oppositely writing, judges and need to when described (i-1) sub-buffer memory rewrites buffer memory, control described servo ic, described shaven head is tracked navigate to (X-W) sector of described CD laser disc,
When described comparison module judges that the data of the current data that read of described shaven head and front n byte in the sub-buffer area of described i are not identical, control described buffer memory writing module according to the reading order of described shaven head, continuation writes described (i-1) sub-buffer area by the data that read, until that described comparison module is judged the current data that read of described shaven head is identical with the data of front n byte in the sub-buffer area of described i;
Described comparison module, be connected with described buffer memory writing module, control module, for reading behind (X-a) sector of described CD laser disc at described shaven head, the data that described shaven head is read one by one with the sub-buffer area of described i in the data comparison of front n byte, described comparative result is passed to described control module;
Buffer memory writing module, be connected with described control module, under the control of described control module, after described shaven head tracks and navigates to (X-W) sector of described CD laser disc, according to the reading order of described shaven head, the data that read are write to described (i-1) sub-buffer area;
Buffer memory, is comprised of at least two sub-buffer areas, the voice data that each sub-buffer area writes for memory buffers writing module;
Cache read module, for reading the data in described buffer memory;
Sound card, is connected with described cache read module, for the data-switching that described cache read module is read, becomes sound signal, exports described sound signal.
Therefore, apply technology of the present invention, due in reverse-play process, whether the data of sub-buffer area that all judge current broadcasting while being played to every sub-buffer area are continuous on CD laser disc with the data that a upper sub-buffer area is deposited, as long as discontinuous, the fragment position (a front W sector) all shaven head being tracked again before the first sector of the sub-buffer area that navigates to current broadcasting, on this, a sub-buffer area writes voice data again, and after again writing to a certain extent, several leading bit data contrast in the sub-buffer area at the data that shaven head is read and broadcasting place, only having comparative result is that data are when identical, think that current thinking read tie point, stop writing caching.Guarantee the accurate continuity of the data in buffer memory, avoided reverse-play to jump the situation of sound, be conducive to improve tonequality, improved user's use impression.
Accompanying drawing explanation
Accompanying drawing described herein is used to provide a further understanding of the present invention, forms the application's a part, does not form inappropriate limitation of the present invention, in the accompanying drawings:
Fig. 1 is the schematic diagram of the structural system block diagram of a kind of CD laser disc Play System of the prior art;
Fig. 2 in the embodiment of the present invention 1, provide a kind of reverse-play time CD laser disc data write caching method schematic flow sheet;
Fig. 3 in the embodiment of the present invention 2, provide a kind of reverse-play time CD laser disc data write caching method schematic flow sheet;
The structural representation that Fig. 4 is a kind of CD optical disc player of providing in the embodiment of the present invention 3.
Embodiment
Below in conjunction with accompanying drawing and specific embodiment, describe the present invention in detail, in this illustrative examples of the present invention and explanation, be used for explaining the present invention, but not as a limitation of the invention.
Embodiment 1:
When Play System receives reverse-play instruction, determine the duration of reverse-play, Play System reads the data in buffer memory by anti-reverse order in buffer memory, until reverse-play reaches the playing duration of agreement, finish reverse-play, return to the playing flow of forward play.
The inventor finds in carrying out research of the present invention, for the ease of the management of buffer memory, whole large buffer memory can be resolved into a plurality of sub-buffer areas, when carrying out data storage, each sub-buffer area is carried out to cache management as writing buffer unit.Be such as but not limited to as follows:
Usually, CD laser disc CD laser disc normal speed can read 75 sectors lower p.s., and the transfer rate of data is (75 X2352 sector/second byte/sector)=176400 byte per seconds.
Suppose our system total in save as 8 megabyte, because system program part need to take partial memory, we only the reserved buffer memory that can deposit the CD laser disc audio frequency size about 30 seconds to DAB, as buffer memory, use.
In the present embodiment, we can be, but not limited to the buffer memory of 30 seconds capacity, resolve into 30 sub-buffer areas and manage.The size of setting every sub-buffer area is: the individual byte of 16+ ((75+2) X2352).
For every sub-buffer area, be defined as following structure:
[1: the first address pointer P1 of member, points to next buffer area first address of this buffer memory;
2: the second address pointer P2 of member, point to the upper buffer area first address of this buffer memory;
Member 3: valid data size, for identifying effective voice data size of current storage in current sub-buffer area;
Member 4: first sevtor address, and for recording the digital audio-frequency data stored in the book buffer area first sevtor address on CD laser disc dish.
Member 5: voice data storage area, for depositing voice data, such as can be, but not limited to that in the present embodiment the size of this voice data memory block is set as to (75+2) X2352 byte].
Starting Play System, before using, first do following initialization: the member 3 of 30 buffer memorys (current cache valid data size) clear 0; The member 4 of 30 buffer memorys (the first sevtor address information of current cache) clear 0; Meanwhile, member 1 (point to next sub-buffer area first address) by queue mode assignment:
The first address of (next sub-buffer area first address) member=buffer memory 1 of buffer memory 0;
The first address of (next sub-buffer area first address) member=buffer memory 2 of buffer memory 1;
…………
The first address of (next sub-buffer area first address) member=buffer memory 0 of buffer memory 29.
In addition, member 2 (pointing to a upper sub-buffer area first address) also by queue mode assignment:
The first address of (a upper sub-buffer area first address) member=buffer memory 29 of buffer memory 0;
The first address of (a upper sub-buffer area first address) member=buffer memory 0 of buffer memory 1;
…………
The first address of (a upper sub-buffer area first address) member=buffer memory 28 of buffer memory 29.
In addition, cache read pointer and buffer memory write pointer are all pointed to buffer memory 0.
Through above, process, 30 sub-buffer areas will form a large buffer memory of circle, and they join end to end by address pointer.
While writing each sub-buffer area in forward play process, be set in the data of the individual sector of W (being decided to be in the present embodiment 75) writing in each sub-buffer area.
Because storage in each sub-buffer area is with respect to the first address information of a upper sub-buffer area of book buffer area, therefore when reverse-play, cache read pointer can be soon after the voice data of current sub-buffer area finishes, cache read pointer jumps to the data in upper this sub-buffer area of sub-buffer area reverse-play according to the information of the member 2 in book buffer area, makes this reverse-play more convenient.
In each sub-buffer area, storage is with respect to the first address information of the next son buffer area of book buffer area, therefore when forward play, pointer can be soon after the voice data of current sub-buffer area finishes, cache read pointer jumps to the data in this sub-buffer area of next son buffer area forward play according to the information of the member 1 in book buffer area, makes this forward and reverse broadcasting more convenient.
In each sub-buffer area, store the first sevtor address (member 4) of data on CD laser disc, therefore when reverse-play need to be write buffer memory, according to the first sevtor address information in the sub-buffer area in front and back two, accurately continuously whether the voice data in the sub-buffer area in simple definite current front and back two exactly.
In each sub-buffer area, store effective voice data size information of relative book buffer area, when forward play or reverse-play, cache read pointer can be determined the current voice data whether reading in complete book buffer area according to this effective voice data size information, after reading, determine at a upper sub-buffer area (reverse-play) or next son buffer area (forward play) and continue to read voice data, audio plays.
During a kind of reverse-play that Fig. 2 provides for the present embodiment, CD laser disc data are write caching method schematic flow sheet.Shown in Figure 2, in the process of reverse-play, according to following flow process, write buffer memory:
Step 201: reverse-play during to the sub-buffer area of i, is determined the first sevtor address of storage in the sub-buffer area of i, is designated as X sector, determines the first sevtor address of storing in (i-1) sub-buffer area, is designated as Y sector.
If the current sub-buffer area of i of reading of current cache read pointer, reads the data output audio of the sub-buffer area of i, now, determine a first sevtor address for storage in the sub-buffer area of this i, be designated as X sector.And the first sevtor address in a upper sub-buffer area ((i-1) sub-buffer area) of definite current sub-buffer area of i.
Wherein this head sevtor address is the voice data correspondence of current storage in described each the sub-buffer area sector reference position on described CD laser disc, such as:
In the sub-buffer area of i, effective voice data of establishing storage is that on CD laser disc, X sector is to the voice data of X1 sector, and the first sevtor address of storing in the sub-buffer area of this i is X sevtor address.
In (i-1) sub-buffer area, effective voice data of establishing storage is that on CD laser disc, Y sector is to the voice data of Y1 sector, and the first sevtor address of storing in this (i-1) sub-buffer area is Y sevtor address.
Step 202: if (X-Y)=W returns to step 201, otherwise execution step 203.
The amount of audio data of storing in the sub-buffer area of W (i-1) accounts for the number of sectors of CD laser disc, such as can be defined in forward play and write buffer memory time, writes the data of 75 sectors of CD laser disc at every sub-buffer area.
If the difference of the first sevtor address of the sub-buffer area storage of the sub-buffer area of i and (i-1) is not equal to W (W is), can judge voice data that this (i-1) sub-buffer area stores on CD laser disc with the sub-buffer area of current i in voice data actual and discontinuous, therefore execution step 203, writes voice data again at (i-1) sub-buffer area; Otherwise, judge voice data that this (i-1) sub-buffer area stores on CD laser disc with the sub-buffer area of current i in voice data continuously actual, and return to step 201, when reverse-play is to another sub-buffer memory by the time, continue to start the continuity of voice data to judge from step 201.
Step 203: shaven head is tracked and navigates to (X-W) sector of CD laser disc.
When judge voice data that this (i-1) sub-buffer area is stored on CD laser disc with the sub-buffer area of current i in voice data when actual discontinuous, carry out this step.
Shaven head is tracked and navigates to (X-W) sector of CD laser disc, wherein W is the number of sectors that the amount of audio data of storing in (i-1) sub-buffer area accounts for CD laser disc, such as can be defined in forward play and write buffer memory time, at every sub-buffer area, write the data of 75 sectors of CD laser disc.
When W=75, shaven head is tracked and navigates to (X-75) sector of CD laser disc.
Step 204: according to bare headed reading order, store current first sector auxiliary information at (i-1) sub-buffer area.
In step 203, again track behind location, will write buffer pointers and move to (i-1) sub-buffer area, in this sub-buffer area, write first sector auxiliary information, store the sevtor address of data on CD laser disc: (X-75) sector.
Can in the member 4 in this (i-1) sub-buffer area, write first sevtor address information in the present embodiment.
Step 205: the data that shaven head is read write (i-1) sub-buffer area.
The order reading according to shaven head, the data that read at shaven head write the member 5----deposit data district in buffer memory according to dma mode, execution step 206.
Step 206: when shaven head is read (X-a) sector of CD laser disc, execution step 207; Otherwise return to step 205.
Wherein, a is the predetermined natural number that is less than W, and the inventor finds that in carrying out research process of the present invention the error of the location that tracks of shaven head is about left and right, 1 sector, therefore in the present embodiment, can be, but not limited to a to be set as 1,2.
If X=275, (X-W)=200, a=1, after shaven head is reorientated, read 74 sectors, while arriving the 274th sector, execution step 207, otherwise return to step 205: in current (i-1) sub-buffer area, continue to write with dma mode the voice data that shaven head reads.
Step 207: the data that shaven head is read one by one with the sub-buffer area of i in the data comparison of front n byte, if identical, return to step 201; Otherwise execution step 208.
When shaven head is read (X-a) sector of CD laser disc, carry out this step: shaven head reads the data on CD laser disc CD laser disc, and after reading, one by one by the data comparison of a predetermined byte (being such as but not limited to 4 bytes) of finally writing in the data that read and buffer memory.
Once comparative result is: the data that shaven head reads are identical with the data that finally write the predetermined byte in buffer memory, be judged to be current shaven head and read tie point (on CD laser disc, data and the data in the sub-buffer area of i of the position at shaven head place are continuous), stop at the caching of writing of book buffer area, return to step 201, with when being played to another sub-buffer area, whether from step 201, start to carry out data connection judges accurately, the illustrated flow process of the present embodiment is carried out in circulation, until reverse-play finishes; Otherwise, execution step 208.
Step 208: according to bare headed reading order, the data that read are continued to write (i-1) sub-buffer area, return to step 207.
When the data that read when shaven head are not identical with the data that finally write the predetermined byte in buffer memory, to the data that read be continued to write (i-1) sub-buffer area according to bare headed reading order, then return to step 207, the data that continuation is read shaven head compare, until the data that shaven head reads are identical with the data that finally write the predetermined byte in buffer memory.
In the present embodiment, can be, but not limited to the size of every sub-buffer area to be set as storing the data volume of 77 sectors on CD laser disc, and when being defined in forward play and writing buffer memory (routine is write buffer memory), at every sub-buffer area, write the data of 75 sectors on CD laser disc, like this, when reverse-play is write buffer memory, data comparison carry out step 207 after having read approximately 72,73 or 74 sectors described in, until be judged to be comparative result, be: " data are identical;; time, just think and read tie point, stop writing caching.So both can guarantee that the data of storing in adjacent two sub-buffer areas in buffer memory were accurately continuous, and can not waste again the storage useful space in each sub-buffer area, be conducive to making full use of of efficient resource.
Therefore, apply technology of the present invention, due in reverse-play process, whether the data of sub-buffer area that all judge current broadcasting while being played to every sub-buffer area are continuous on CD laser disc with the data that a upper sub-buffer area is deposited, as long as discontinuous, the son that navigates to current broadcasting of all shaven head being tracked again changes the fragment position (a front W sector) before the first sector of access, on this, a sub-buffer area writes voice data again, and after again writing to a certain extent, several leading bit data contrast in the sub-buffer area at the data that shaven head is read and broadcasting place, only having comparative result is that data are when identical, think that current thinking read tie point, stop writing caching.Guarantee the accurate continuity of the data in buffer memory, avoided reverse-play to jump the situation of sound, be conducive to improve tonequality, improved user's use impression.
Embodiment 2:
During a kind of reverse-play that Fig. 3 provides for the present embodiment, CD laser disc data are write caching method process flow diagram, and referring to diagram, 1 difference of this method flow process and embodiment is following:
After step 207, if the data that read of shaven head are identical with the data of front n byte in the sub-buffer area of i, and before returning to step 201, also carry out following steps:
Step 301: lastest imformation in (i-1) sub-buffer area: the size of effective voice data of the current actual storage of book buffer area, after execution step 301, return to step 201.
Specifically can at this (i-1) sub-buffer area, upgrade member 3 information, make this information record the current effective voice data size that is stored in this (i-1) sub-buffer area.
After upgrading the current effective voice data size that is stored in this (i-1) sub-buffer area, return to step 201 with when being played to another sub-buffer area, whether from step 201, start to carry out data connection judges accurately, the illustrated flow process of the present embodiment is carried out in circulation, until reverse-play finishes.
Therefore, increase step 301, can further make information in each sub-buffer area more fully accurately, be further conducive to cache read pointer according to the accurate and effective rate of this information carry out reading of voice data, with output audio.
Embodiment 3:
A kind of CD optical disc player structural representation that Fig. 4 provides for the present embodiment, referring to diagram, it mainly comprises: shaven head 401, servo ic 402, stranding dish detection module 403, processor 404, buffer memory writing module 405, buffer memory 406, cache read module 407, sound card 408.Wherein the annexation of each several part and principle of work are mainly as follows:
Shaven head 401, be connected with servo ic 402, read the voice data of CD laser disc CD laser disc under the control of servo ic 402, servo ic 402 is connected with processor 404, be subject to processing the control of device 404, such as making shaven head 401 location that again track under the control at processor 404.
Rubbing dish detection module 403 with the hands is connected with processor 404, rub dish detection module 403 with the hands for detection of oppositely rubbing dish signal (user can operate by the button on player or other stranding disc device) with the hands, and by testing result input processor 404, for processor 404, according to testing result, control the operation of player, when receiving reverse stranding dish signal, processor 404 is controlled player and is carried out reverse-play.
Processor 404 comprises oppositely writes buffer memory determination module 4041, control module 4042, comparison module 4043.
Wherein, oppositely writing buffer memory determination module 4041 is connected with control module 4042, when player reverse-play is during to the sub-buffer area 4061 of i, determine the first sevtor address of the sub-buffer area 4061 interior storages of i, be designated as X sector, and the first sevtor address of determining storage in (i-1) sub-buffer area 4061, is designated as Y sector.Wherein this head sevtor address is voice data correspondence in each the sub-buffer area 4061 interior current storages sector reference position on CD laser disc, as long as (X-Y) be not equal to W (such as can be, but not limited to be set as 75 sectors on CD laser disc), judge currently need to rewrite buffer memorys 406 at (i-1) sub-buffer memory 406.
Control module 4042 with oppositely write buffer memory determination module 4041, rub dish detection module 403 with the hands, servo ic 402, buffer memory writing module 405, buffer memory 406 be connected respectively, control module 4042 for: when oppositely write buffer memory determination module 4041 judge current need to be when (i-1) sub-buffer memory 406 rewrites buffer memory 406, control servo ic 402 and shaven head 401 is tracked navigate to (X-W) sector of CD laser disc, so that shaven head 401 again tracks and determines bit position and read the data CD laser disc from this.
Comparison module 4043, be connected with buffer memory writing module 405, control module 4042, comparison module 4043 for (X-a) sector of reading CD laser disc at shaven head 401 (numerical optimization of a but be not limited to be set to 1,2 or 3 or other be less than the numerical value of W) after, by shaven head 401 data that read one by one with the sub-buffer area 4061 of i in the data comparison of the individual byte of front n (can be, but not limited to is 4), comparative result is passed to control module 4042:
When control module 4042 judges that at comparison module 4043 data of the shaven head 401 current data that read and front n byte in the sub-buffer area 4061 of described i are not identical, control buffer memory writing module 405, make buffer memory writing module 405 according to the reading order of shaven head 401, continuation writes (i-1) sub-buffer area 4061 by the data that read, until that comparison module 4043 is judged the shaven head 401 current data that read is identical with the data of front n byte in the sub-buffer area 4061 of i.
Buffer memory writing module 405, be connected with the control module 4042 in processor 404, for under the control of control module 4042, after shaven head 401 tracks and navigates to (X-W) sector of described CD laser disc, reading order according to shaven head 401, writes (i-1) sub-buffer area 4061 by the data that read.
Buffer memory 406, is comprised of at least two sub-buffer areas 4061, the voice data that each sub-buffer area 4061 writes for memory buffers writing module 405.
Cache read module 407, for reading the data in buffer memory 406, voice data is inputted to sound card 408, sound card 408 data-switching become sound signal, externally output audio.
In this CD optical disc player, the detailed operation principle of each several part can be, but not limited to referring to the description in embodiment 1,2.
The setting of each sub-buffer area 4061 can be, but not limited to as follows:
Usually, CD laser disc CD laser disc normal speed can read 75 sectors lower p.s., and the transfer rate of data is (75 X2352 sector/second byte/sector)=176400 byte per seconds.
Suppose our system total in save as 8 megabyte, because system program part need to take partial memory, we only the reserved buffer memory 406 that can deposit the CD laser disc audio frequency size about 30 seconds to DAB as buffer memory 406 use.
In the present embodiment, we can be, but not limited to the buffer memory 406 30 seconds capacity, resolve into 30 sub-buffer areas 4061 and manage.The size of setting every sub-buffer area 4061 is: the individual byte of 16+ ((75+2) X2352).
For every sub-buffer area 4061, be defined as following structure:
[1: the first address pointer P1 of member, points to next buffer area first address of this buffer memory 406;
2: the second address pointer P2 of member, point to the upper buffer area first address of this buffer memory 406;
Member 3: valid data size, for identifying effective voice data size of current sub-buffer area 4061 interior current storages;
Member 4: first sevtor address, the first sevtor address for the digital audio-frequency data of recording the 4061 interior storages of book buffer area on CD laser disc dish.
Member 5: voice data storage area, for depositing voice data, such as can be, but not limited to that in the present embodiment the size of this voice data memory block is set as to (75+2) X2352 byte].
Starting Play System, before using, first do following initialization: the member 3 of 30 buffer memorys 406 (current cache 406 valid data sizes) clear 0; The member 4 of 30 buffer memorys 406 (the first sevtor address information of current cache 406) clear 0; Meanwhile, member 1 (point to next sub-buffer area 4061 first addresss) by queue mode assignment:
The first address of (next sub-buffer area 4061 first address) member=buffer memory 4061 of buffer memory 4060;
The first address of (next sub-buffer area 4061 first address) member=buffer memory 4062 of buffer memory 4061;
…………
The first address of (next sub-buffer area 4061 first address) member=buffer memory 4060 of buffer memory 40629.
In addition, member 2 (pointing to upper sub-buffer area 4061 first addresss) also by queue mode assignment:
The first address of (upper sub-buffer area 4061 first addresss) member=buffer memory 40629 of buffer memory 4060;
The first address of (upper sub-buffer area 4061 first addresss) member=buffer memory 4060 of buffer memory 4061;
…………
The first address of (upper sub-buffer area 4061 first addresss) member=buffer memory 40628 of buffer memory 40629.
In addition, cache read pointer and buffer memory write pointer are all pointed to buffer memory 4060.
Through above, process, 30 sub-buffer areas 4061 will form a large buffer memory 406 of circle, and they join end to end by address pointer.
While writing each sub-buffer area 4061 in forward play process, be set in the data of the individual sector of W (being decided to be in the present embodiment 75) writing in each sub-buffer area 4061.
Because storage in each sub-buffer area 4061 is with respect to the first address information of a upper sub-buffer area 4061 of book buffer area 4061, therefore when reverse-play, cache read pointer can be soon after the voice data of current sub-buffer area 4061 finishes, cache read pointer jumps to the data in upper this sub-buffer area 4061 of sub-buffer area 4061 reverse-play according to the information of the member 2 in book buffer area 4061, makes this reverse-play more convenient.
In each sub-buffer area 4061 storage with respect to next of book buffer area 4061 in the first address information of buffer area 4061, therefore when forward play, pointer can be soon after the voice data of current sub-buffer area 4061 finishes, cache read pointer jumps to the data in this sub-buffer area 4061 of next son buffer area 4061 forward play according to the information of the member 1 in book buffer area 4061, makes this forward and reverse broadcasting more convenient.
In each sub-buffer area 4061, store the first sevtor address (member 4) of data on CD laser disc, therefore when reverse-play need to be write buffer memory 406, according to the first sevtor address information in the sub-buffer area 4061 in front and back two, accurately continuously whether the voice data in the sub-buffer area 4061 in simple definite current front and back two exactly.
In each sub-buffer area 4061, store effective voice data size information of relative book buffer area 4061, when forward play or reverse-play, cache read pointer can be determined the current voice data whether reading in complete book buffer area 4061 according to this effective voice data size information, after reading, determine at a upper sub-buffer area 4061 (reverse-play) or next son buffer area 4061 (forward play) and continue to read voice data, audio plays.
The technical scheme above embodiment of the present invention being provided is described in detail, applied specific case herein the principle of the embodiment of the present invention and embodiment are set forth, the explanation of above embodiment is only applicable to help to understand the principle of the embodiment of the present invention; , for one of ordinary skill in the art, according to the embodiment of the present invention, in embodiment and range of application, all will change, in sum, this description should not be construed as limitation of the present invention meanwhile.

Claims (6)

1. CD laser disc data are write caching method during a reverse-play, it is characterized in that, comprise: step S1: when reverse-play is during to the sub-buffer area of i, determine the first sevtor address of storage in the sub-buffer area of described i, be designated as X sector, determine the first sevtor address of storing in (i-1) sub-buffer area, be designated as Y sector, wherein said first sevtor address is the voice data correspondence of current storage in described each the sub-buffer area sector reference position on described CD laser disc; Step S2: if (X-Y)=W returns to step S1, otherwise execution step S3, wherein, the amount of audio data of storing in described (i-1) sub-buffer area is the amount of audio data of W sector on described CD laser disc; Step S3: shaven head is tracked and navigates to (X-W) sector of described CD laser disc, step S4: according to the reading order of described shaven head, the data that read are write to described (i-1) sub-buffer area, until described shaven head is read (X-a) sector of described CD laser disc, execution step S5, otherwise return to this step, wherein a is the predetermined natural number that is less than described W; Step S5: the data that described shaven head is read one by one with the sub-buffer area of described i in the data comparison of front n byte, if different, execution step S6; Otherwise return to step S1; Step S6: according to the reading order of described shaven head, the data that read are write to described (i-1) sub-buffer area, return to step S5.
2. CD laser disc data are write caching method during a kind of reverse-play according to claim 1, it is characterized in that, in described each sub-buffer area, store respectively the first address with respect to a upper sub-buffer area of book buffer area, in described each sub-buffer area, store respectively described first sevtor address; In step S1, determine the first sevtor address of storing in (i-1) sub-buffer area, specifically: the first address that reads described (i-1) sub-buffer area in the sub-buffer area of described i, determine the first sevtor address of storing in (i-1) sub-buffer area, in described (i-1) sub-buffer area, read described first sevtor address; In step S4, the data that read are write to described (i-1) sub-buffer area, specifically: buffer memory write pointer is moved to the first address of described (i-1) sub-buffer area, at described (i-1) sub-buffer area, the data that read are write to described (i-1) sub-buffer area.
3. CD laser disc data are write caching method during a kind of reverse-play according to claim 1 and 2, it is characterized in that, described each sub-buffer area is set to the data that can store 75 sectors on described CD laser disc, step S2, specifically: if (X-Y)=75, return to step S1, otherwise execution step S3; Step S3, specifically: shaven head is tracked and navigates to (X-75) sector of described CD laser disc.
4. a CD optical disc player, is characterized in that, comprising: shaven head, for reading the data of CD laser disc, servo ic, for control described shaven head under the control of processor, comprises shaven head is tracked and navigates to (X-W) sector of described CD laser disc, and receives the data that described shaven head reads from described CD laser disc, rub dish detection module with the hands, be connected with described processor, for detection of oppositely rubbing dish signal with the hands, described testing result is inputted to described processor, described processor comprises oppositely writes buffer memory determination module, control module, comparison module, oppositely write buffer memory determination module, for when reverse-play is during to the sub-buffer area of i, determine the first sevtor address of storage in the sub-buffer area of described i, be designated as X sector, determine the first sevtor address of storing in (i-1) sub-buffer area, be designated as Y sector, wherein said first sevtor address is the voice data correspondence of current storage in described each the sub-buffer area sector reference position on described CD laser disc, as long as (X-Y) be not equal to described W, judge and currently need to rewrite buffer memory at described (i-1) sub-buffer memory, the amount of audio data of storing in described (i-1) sub-buffer area is the amount of audio data of W sector on described CD laser disc, described control module and the described buffer memory determination module of oppositely writing, rub dish detection module with the hands, servo ic, buffer memory writing module, buffer memory connects respectively, described control module is used for: when described oppositely write that buffer memory determination module judges need to be when described (i-1) sub-buffer memory rewrites buffer memory, control described servo ic, described shaven head is tracked and navigate to (X-W) sector of described CD laser disc, when described comparison module judges that the data of the current data that read of described shaven head and front n byte in the sub-buffer area of described i are not identical, control described buffer memory writing module according to the reading order of described shaven head, continuation writes described (i-1) sub-buffer area by the data that read, until that described comparison module is judged the current data that read of described shaven head is identical with the data of front n byte in the sub-buffer area of described i, described comparison module, be connected with described buffer memory writing module, control module, for reading behind (X-a) sector of described CD laser disc at described shaven head, the data that described shaven head is read one by one with the sub-buffer area of described i in the data comparison of front n byte, described comparative result is passed to described control module, buffer memory writing module, be connected with described control module, under the control of described control module, after described shaven head tracks and navigates to (X-W) sector of described CD laser disc, according to the reading order of described shaven head, the data that read are write to described (i-1) sub-buffer area, buffer memory, is comprised of at least two sub-buffer areas, the voice data that each sub-buffer area writes for memory buffers writing module, cache read module, for reading the data in described buffer memory, sound card, is connected with described cache read module, for the data-switching that described cache read module is read, becomes sound signal, exports described sound signal.
5. a kind of CD optical disc player according to claim 4, it is characterized in that, comprise: in described each sub-buffer area, store respectively the first address with respect to a upper sub-buffer area of book buffer area, in described each sub-buffer area, store respectively described first sevtor address.
6. a kind of CD optical disc player according to claim 4, is characterized in that, comprising: the storage space in described each sub-buffer area is set as: for storing the data of 77 sectors of described CD laser disc.
CN201010161592.7A 2010-04-26 2010-04-26 Method for caching CD (Compact Disc) data during reversely playing CD signals and player Active CN102237113B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201010161592.7A CN102237113B (en) 2010-04-26 2010-04-26 Method for caching CD (Compact Disc) data during reversely playing CD signals and player

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201010161592.7A CN102237113B (en) 2010-04-26 2010-04-26 Method for caching CD (Compact Disc) data during reversely playing CD signals and player

Publications (2)

Publication Number Publication Date
CN102237113A CN102237113A (en) 2011-11-09
CN102237113B true CN102237113B (en) 2014-12-10

Family

ID=44887689

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201010161592.7A Active CN102237113B (en) 2010-04-26 2010-04-26 Method for caching CD (Compact Disc) data during reversely playing CD signals and player

Country Status (1)

Country Link
CN (1) CN102237113B (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1295278A (en) * 1999-10-21 2001-05-16 三星电子株式会社 One-chip data processing unit with nonvolatile memory and operation method thereof
US7512764B2 (en) * 2001-08-24 2009-03-31 Tian Holdings, Llc Method for allocating a memory of a de-interleaving unit
US7620792B2 (en) * 2006-08-21 2009-11-17 Sigmatel, Inc. Processing system, memory and methods for use therewith

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1295278A (en) * 1999-10-21 2001-05-16 三星电子株式会社 One-chip data processing unit with nonvolatile memory and operation method thereof
US7512764B2 (en) * 2001-08-24 2009-03-31 Tian Holdings, Llc Method for allocating a memory of a de-interleaving unit
US7620792B2 (en) * 2006-08-21 2009-11-17 Sigmatel, Inc. Processing system, memory and methods for use therewith

Also Published As

Publication number Publication date
CN102237113A (en) 2011-11-09

Similar Documents

Publication Publication Date Title
KR101854200B1 (en) Method for writing data on storage medium and storage apparatus applying the same
US8607007B2 (en) Selection of data storage medium based on write characteristic
US7555483B2 (en) File management method and information processing device
US7325112B2 (en) High-speed snapshot method
US7590799B2 (en) OSD deterministic object fragmentation optimization in a disc drive
US9053019B2 (en) Non-volatile memory device, a data processing device using the same, and a swapping method used by the data processing and non-volatile memory devices
CN101727395A (en) Flash memory device and management system and method thereof
RU2319227C2 (en) Recording method with double logging and data carrier for use with the method
CN101118477A (en) Process for enhancing magnetic disc data accessing efficiency
WO2012025492A1 (en) Reordering access to reduce total seek time on tape media
JP2001165671A (en) Navigation system
CN101403975A (en) Method and apparatus for reproducing media contents using non-volatile storage medium
CN101441596A (en) Method for improving flash memory medium read-write speed
CN102237113B (en) Method for caching CD (Compact Disc) data during reversely playing CD signals and player
CN117413247A (en) Data processing method, device and system
CN202084295U (en) Cd player
CN202102712U (en) CD player
CN101290621B (en) Safe digital card memory search method
CN113220639B (en) File storage system control device for space application
CN102208202A (en) Method for caching compact disc (CD) data during forward playing of compact disc (CD) signals and player
CN1312570C (en) Method and relative device for hardware array data migration
US9171574B1 (en) Shingled band with a cache track
Gim et al. Dig: Rapid characterization of modern hard disk drive and its performance implication
CN100405330C (en) Method and device for getting residual space for FAT file system
CN103489465A (en) Method for automatically recording random events of locating blue-ray player

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant