KR20120017679A - Random playing method of media device using car - Google Patents
Random playing method of media device using car Download PDFInfo
- Publication number
- KR20120017679A KR20120017679A KR1020100080423A KR20100080423A KR20120017679A KR 20120017679 A KR20120017679 A KR 20120017679A KR 1020100080423 A KR1020100080423 A KR 1020100080423A KR 20100080423 A KR20100080423 A KR 20100080423A KR 20120017679 A KR20120017679 A KR 20120017679A
- Authority
- KR
- South Korea
- Prior art keywords
- value
- uitemptrknum
- random
- random number
- media device
- Prior art date
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F7/00—Methods or arrangements for processing data by operating upon the order or content of the data handled
- G06F7/58—Random or pseudo-random number generators
- G06F7/588—Random number generators, i.e. based on natural stochastic processes
-
- G—PHYSICS
- G11—INFORMATION STORAGE
- G11B—INFORMATION STORAGE BASED ON RELATIVE MOVEMENT BETWEEN RECORD CARRIER AND TRANSDUCER
- G11B20/00—Signal processing not specific to the method of recording or reproducing; Circuits therefor
- G11B20/10—Digital recording or reproducing
-
- G—PHYSICS
- G11—INFORMATION STORAGE
- G11B—INFORMATION STORAGE BASED ON RELATIVE MOVEMENT BETWEEN RECORD CARRIER AND TRANSDUCER
- G11B2220/00—Record carriers by type
- G11B2220/20—Disc-shaped record carriers
Landscapes
- Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- Signal Processing (AREA)
- Computational Mathematics (AREA)
- Mathematical Analysis (AREA)
- Mathematical Optimization (AREA)
- Pure & Applied Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- Signal Processing For Digital Recording And Reproducing (AREA)
- Management Or Editing Of Information On Record Carriers (AREA)
Abstract
Description
The present invention relates to a random playback method of a vehicle media device, and more particularly to a random playback method of USB, DISC implemented in the vehicle media device itself.
The random play function supported in the in-vehicle media device is generally implemented by using a component having the function.
Therefore, when a problem occurs in the random play function of a vehicle media device, for example, when all songs contained in the media are not randomly played and only a specific song is played many times, the problem may be caused by a component having a random play function. There is no way to improve.
In addition, when a component that does not have a built-in random play function is used in order to reduce the unit cost of the vehicle media device, the vehicle media device cannot substantially support the random play function.
The present invention has been made in view of the above problems, and an object thereof is to provide a random playback method implemented in software in a media device for a vehicle, instead of using a component having a random playback function.
In order to achieve the above object, in a vehicle media device according to an aspect of the present invention, a method for randomly playing a file recorded on media includes: allocating bits corresponding to the number of the file by the total number of files recorded on the media; Generating a random number corresponding to the number of the file; And if the value of the bit corresponding to the random number that is generated is not a specific value, reproducing a file of a number corresponding to the generated random number.
According to the present invention, it is possible to reduce the component dependence by implementing the random play function, so that there is an effect that it can respond quickly when a problem occurs.
It is relatively simpler to implement and easier to verify than the algorithm embedded in the component.
In particular, there is an advantage that can reduce a lot of time required to verify the performance of the part.
1 is a flowchart illustrating a random playback method of a vehicle media device according to an embodiment of the present invention.
Advantages and features of the present invention and methods for achieving them will be apparent with reference to the embodiments described below in detail with the accompanying drawings. The present invention may, however, be embodied in many different forms and should not be construed as being limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the invention to those skilled in the art. And is intended to enable a person skilled in the art to readily understand the scope of the invention, and the invention is defined by the claims. It is to be understood that the terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention. In the present specification, the singular form includes plural forms unless otherwise specified in the specification. It is noted that " comprises, " or "comprising," as used herein, means the presence or absence of one or more other components, steps, operations, and / Do not exclude the addition.
Hereinafter, a random reproduction method of a vehicle media device according to an embodiment of the present invention will be described with reference to FIG. 1. 1 is a flowchart illustrating a random playback method of a vehicle media device according to an embodiment of the present invention.
As shown in FIG. 1, bits are allocated as many as the total number of files contained in the media (S100). For example, when a media (USB, disk, etc.) is inserted into a vehicle media device, information including the total number of files contained in the media is received and bits are allocated by the total number of files. It is checked whether the total assigned bit value is a specific value (for example, 1) (S110), and if the specific value is a specific value, the entire bit is initialized (for example, set to 0) (S150).
If not a specific value, a random number corresponding to the file number is generated (S120).
Hereinafter, in order to describe the random number generation in more detail, step S120 is described in terms of a module, and thus, the step S120 is referred to as a random number generation module for easy description.
The random number generation in the random number generation module uses the timer's time count value.
Specifying the random number generation range when reading the timer's time count value is the most important in the random number generation module implementation. From the first, the random number generation module is implemented with the maximum (maximum) number of songs recorded on the media (USB, DISC, etc.).
The source of the random number generation module may be implemented as follows.
unsigned int rand (unsigned int uiLimitValue) {
volatile int uiTempRand = 0;
volatile int uiTempCnt = 0;
volatile int uiTempBin = 2;
volatile unsigned int uiTempData = 0;
volatile static unsigned char uiRandShf = 0;
uiTempRand = (unsigned int) BinCvte ((signed int) uiLimitValue);
uiTempData = uiTempRand;
for (uiTempCnt = 0; uiTempCnt <(uiTempRand-1); uiTempCnt ++) {
uiTempBin * = 2;
}
uiTempBin = uiTempBin | (uiTempBin-1);
uiTempBin >> = uiRandShf;
uiTempRand = TCNT &(uiTempBin-1);
if (uiTempRand> uiLimitValue) uiTempRand >> = 1;
uiRandShf ++;
if (uiTempData <uiRandShf) uiRandShf = 0;
return uiTempRand;
}
int BinCvte (int uiDec) {
volatile int uiTempCnt = 0;
if (uiDec <0) return 0;
do {
uiDec / = 2;
uiTempCnt ++;
} while (uiDec> 0);
return uiTempCnt-1;
}
As described above, a random number generating function, for example, "unsigned int rand (unsigned int uiLimitValue)" in the source of the random number generating module receives the maximum number of songs recorded from the media as a factor. The random number generation function calculates the maximum number of bits corresponding to the maximum number of songs delivered. Here, the maximum number of bits may be implemented as implemented in the "int BinCvte (int uiDec)" function.
In more detail, the source of the random number generation module is given by passing the value of the transfer argument uiDec and dividing the value of uiDec by 2 until the quotient becomes 0. In this case, the total number of divisions is the minimum number of bits for representing uiDec.
The reason for obtaining the minimum number of bits that can represent the maximum number is to avoid missing a number of values including a desired range until the count register overflows as the time count value is counted up. For example, if the time count value is a 16-bit count, a number from 0 to 65535 occurs. At this time, the number of end positions 5 is 5, 15, 25, 35, ..., 65535, and so on. At this time, if the MASK is set to the minimum number of bits representing 5, only 5 to 0 can be selected, so that 5 of all numbers can be obtained.
Obtain the minimum number of bits that can represent the maximum number in the random number generation module, and use this to mask the value of the time count. If the value is greater than the maximum number, and if it is large, divide by 2 to make it smaller than the maximum number.
On the other hand, it is checked whether the value of the bit is a specific value (S130). If the value of the bit is a specific value, the file of the number corresponding to the random number is played (S140). However, if the value of the bit is not a specific value, the position moves (S160).
Hereinafter, in order to describe the random reproduction in more detail, steps S130, S140, and S160 will be described in terms of modules, and descriptions of steps S130, S140, and S160 will be given. This is referred to as a song selection module for ease.
The source (program code) of the song selection module for selection is as follows.
void CddaRandom (void) {
volatile unsigned int uiTempTrkNum = 0;
volatile unsigned int uiTempTrkTtNum = 0;
volatile unsigned int uiTempCnt = 0;
volatile unsigned int uiTempCnt2 = 0;
volatile unsigned int uiTempCnt3 = 1;
volatile unsigned int uiTempCnt4 = 0;
volatile static unsigned char ucErrCnt = 0;
if (DvdFlg.mem.ucRandChkTime <150) return;
if (DVD_PLAYER_STATUS.MEMBER.RAND == 1) {/ * handle random function * /
if (oDVD_PLAYER_STATUS.MEMBER.RAND == 0) {
uiTempTrkTtNum =
BCDtoHEX ((((unsigned int) DISC_STATUS2.MEMBER.TOTAL_CHAPTER_NO_H << 8) & 0xFF00)
| ((unsigned int) DISC_STATUS2.MEMBER.TOTAL_CHAPTER_NO_L &0x00FF));
uiTempTrkNum =
BCDtoHEX ((((unsigned int) DVD_PLAYER_STATUS.MEMBER.CHAPTER_NO_H << 8) & 0xFF00)
| ((unsigned int) DVD_PLAYER_STATUS.MEMBER.CHAPTER_NO_L &0x00FF));
if (uiTempTrkNum == 1) {
uiTempCnt = 0;
uiTempCnt2 = 0;
}
else {
uiTempCnt = (uiTempTrkNum-1) / 16;
uiTempCnt2 = (uiTempTrkNum-1)% 16;
}
uiTempCnt3 << = (unsigned char) uiTempCnt2;
uiRandomChkBit [uiTempCnt] | = uiTempCnt3;
uiTempCnt3 = 1;
do {
uiTempTrkNum = Rand (uiTempTrkTtNum);
} while (uiTempTrkNum == 0);
if (uiTempTrkNum == 1) {
uiTempCnt = 0;
uiTempCnt2 = 0;
}
else {
uiTempCnt = (uiTempTrkNum-1) / 16;
uiTempCnt2 = (uiTempTrkNum-1)% 16;
}
if ((uiRandomChkBit [uiTempCnt] & uiTempCnt3) == RESET) {
TrkDirSearch (
2,
0,
One,
(unsigned char) (HEXtoBCD (uiTempTrkNum) >> 8),
(unsigned char) HEXtoBCD (uiTempTrkNum)
);
uiTempCnt3 << = (unsigned char) uiTempCnt2;
uiRandomChkBit [uiTempCnt] | = uiTempCnt3;
DvdFlg.mem.ucRandChkTime = 0;
}
else {
do {
do {
uiTempTrkNum = Rand (uiTempTrkTtNum);
} while (uiTempTrkNum == 0);
} while (uiTempTrkNum == BCDtoHEX ((((unsigned int) DVD_PLAYER_STATUS.MEMBER.CHAPTER_NO_H << 8) & 0xFF00)
| ((unsigned int) DVD_PLAYER_STATUS.MEMBER.CHAPTER_NO_L &0x00FF)));
uiTempCnt3 = 1;
if (uiTempTrkNum == 1) {
uiTempCnt = 0;
uiTempCnt2 = 0;
}
else {
uiTempCnt = (uiTempTrkNum-1) / 16;
uiTempCnt2 = (uiTempTrkNum-1)% 16;
}
uiTempCnt3 << = (unsigned char) uiTempCnt2;
if ((uiRandomChkBit [uiTempCnt] & uiTempCnt3) == RESET) {
TrkDirSearch (
2,
0,
One,
(unsigned char) (HEXtoBCD (uiTempTrkNum) >> 8),
(unsigned char) HEXtoBCD (uiTempTrkNum)
);
uiRandomChkBit [uiTempCnt] | = uiTempCnt3;
DvdFlg.mem.ucRandChkTime = 0;
}
}
}
else if ((GetTotalPlayInfoSts.bit.PlayMode == 0x1C) || (GetTotalPlayInfoSts.bit.PlayMode == 0x12)) {
uiTempTrkTtNum =
BCDtoHEX ((((unsigned int) DISC_STATUS2.MEMBER.TOTAL_CHAPTER_NO_H << 8) & 0xFF00)
| ((unsigned int) DISC_STATUS2.MEMBER.TOTAL_CHAPTER_NO_L &0x00FF));
do {
uiTempTrkNum = Rand (uiTempTrkTtNum);
} while (uiTempTrkNum == 0);
if (uiTempTrkNum == 1) {
uiTempCnt = 0;
uiTempCnt2 = 0;
}
else {
uiTempCnt = (uiTempTrkNum-1) / 16;
uiTempCnt2 = (uiTempTrkNum-1)% 16;
}
uiTempCnt3 << = (unsigned char) uiTempCnt2;
if ((uiRandomChkBit [uiTempCnt] & uiTempCnt3) == RESET) {
TrkDirSearch (
2,
0,
One,
(unsigned char) (HEXtoBCD (uiTempTrkNum) >> 8),
(unsigned char) HEXtoBCD (uiTempTrkNum)
);
uiRandomChkBit [uiTempCnt] | = uiTempCnt3;
DvdFlg.mem.ucRandChkTime = 0;
ucErrCnt = 0;
uiTempTrkNum = uiTempTrkTtNum;
for (; uiTempTrkNum> 0; uiTempTrkNum-) {
uiTempCnt3 = 1;
if (uiTempTrkNum == 1) {
uiTempCnt = 0;
uiTempCnt2 = 0;
}
else {
uiTempCnt = (uiTempTrkNum-1) / 16;
uiTempCnt2 = (uiTempTrkNum-1)% 16;
}
uiTempCnt3 << = (unsigned char) uiTempCnt2;
if ((uiRandomChkBit [uiTempCnt] & uiTempCnt3) == RESET) {
break;
}
}
if (uiTempTrkNum == 0) {
(void) memset (uiRandomChkBit, 0x00, 35);
DvdFlg.mem.ucTrsInterTime = 150;
}
}
else {
ucErrCnt ++;
if (ucErrCnt> 5) {
ucErrCnt = 0;
for (; uiTempTrkNum> 0; uiTempTrkNum-) {
uiTempCnt3 = 1;
if (uiTempTrkNum == 1) {
uiTempCnt = 0;
uiTempCnt2 = 0;
}
else {
uiTempCnt = (uiTempTrkNum-1) / 16;
uiTempCnt2 = (uiTempTrkNum-1)% 16;
}
uiTempCnt3 << = (unsigned char) uiTempCnt2;
if ((uiRandomChkBit [uiTempCnt] & uiTempCnt3) == RESET) {
TrkDirSearch (
2,
0,
One,
(unsigned char) (HEXtoBCD (uiTempTrkNum) >> 8),
(unsigned char) HEXtoBCD (uiTempTrkNum)
);
uiRandomChkBit [uiTempCnt] | = uiTempCnt3;
DvdFlg.mem.ucRandChkTime = 0;
uiTempTrkNum = uiTempTrkTtNum;
for (; uiTempTrkNum> 0; uiTempTrkNum-) {
uiTempCnt3 = 1;
if (uiTempTrkNum == 1) {
uiTempCnt = 0;
uiTempCnt2 = 0;
}
else {
uiTempCnt = (uiTempTrkNum-1) / 16;
uiTempCnt2 = (uiTempTrkNum-1)% 16;
}
uiTempCnt3 << = (unsigned char) uiTempCnt2;
if ((uiRandomChkBit [uiTempCnt] & uiTempCnt3) == RESET) {
break;
}
}
if (uiTempTrkNum == 0) {
(void) memset (uiRandomChkBit, 0x00, 35);
break;
}
else {
return;
}
}
if (uiTempTrkNum == 1) {
uiTempCnt4 = uiTempTrkNum;
uiTempTrkNum = uiTempTrkTtNum;
for (; uiTempTrkNum> 0; uiTempTrkNum-) {
uiTempCnt3 = 1;
if (uiTempTrkNum == 1) {
uiTempCnt = 0;
uiTempCnt2 = 0;
}
else {
uiTempCnt = (uiTempTrkNum-1) / 16;
uiTempCnt2 = (uiTempTrkNum-1)% 16;
}
uiTempCnt3 << = (unsigned char) uiTempCnt2;
if ((uiRandomChkBit [uiTempCnt] & uiTempCnt3) == RESET) {
break;
}
}
if (uiTempTrkNum == 0) {
(void) memset (uiRandomChkBit, 0x00, 35);
break;
}
else {
uiTempTrkNum = uiTempTrkTtNum;
}
}
}
(void) memset (uiRandomChkBit, 0x00, 35);
}
}
}
}
else {
(void) memset (uiRandomChkBit, 0x00, 35);
}
}
The song selection module for selecting songs is implemented such that when a random number is generated, the vehicle media device may select and play a song having a number corresponding to the random number among the songs recorded on the disc.
The program code will be described in detail. The random number generated by the random number generating module corresponds to the number (index) of the song stored in the disc DISC.
Secure the storage space so that the vehicle media device can leave a history (log) of the songs played. For example, when a vehicle media device plays a song (specific song) having a number corresponding to a random number generated, a space for storing the reproduced song number is not stored until a specific song is played again until all other songs on the disc are played once. To secure. This can be achieved by allocating the buffer with the total number of songs on the disk. That is, the total number of songs stored in the disk is allocated to the buffer for storing the reproduced song, and each bit allocated to the butter is initialized to zero.
When the first random number is generated, the number of the song corresponding to the random number is selected and reproduced, and the bit corresponding to the number of the reproduced song is set to one. By reproducing the song in this manner and setting the corresponding bit to 1, it is easy to check whether the song is reproduced by checking the bit value.
If a maximum of 560 songs can be stored on a disc, a minimum of 70 bytes can be secured in the buffer so that a history of all the songs on the disc can be recorded.
After that, when a random number is generated in the random number generation module, it is checked whether the bit value corresponding to the number is 1 before playing the song of the number corresponding to the generated random number. If the beat value is 1, the song has already been played, so it moves right or left from the current position (at the beat position corresponding to the song number in the buffer) and searches for the unplayed song (the beat value at the moved position). To find the song to play). If the bit value is 0, since the song is not a reproduced song, a song of a number corresponding to the generated random number is reproduced.
If you have played all songs once, that is, if the value of all the bits reserved in the buffer is set to 1 for the number of songs on the media, the buffer is emptied (initialized for all allocated bits) and started again from the beginning and the disc is continuously Select a song to randomly play the songs contained in.
As described above, the self-implementation of the random play function can reduce the component dependency, so that it can respond quickly when a problem occurs, and the implementation is relatively simpler and easier to verify than the algorithm embedded in the component. In particular, there is an advantage that can reduce a lot of time required to verify the performance of the part.
Although the configuration of the present invention has been described in detail with reference to the preferred embodiments and the accompanying drawings, this is only an example, and various modifications are possible within the scope without departing from the spirit of the present invention. Therefore, the scope of the present invention should not be limited by the illustrated embodiments, but should be determined by the scope of the appended claims and equivalents thereof.
Claims (5)
Allocating bits corresponding to the number of the file by the total number of files contained in the media;
Generating a random number corresponding to the number of the file; And
If the value of the bit corresponding to the random number is not a specific value, reproducing the file of the number corresponding to the random number that occurred.
Random playback method of a vehicle media device comprising a.
Setting a value of a bit corresponding to the number of a reproduced file to said specific value;
Random playback method of the in-vehicle media device.
If the value of the bit corresponding to the generated random number is a specific value, moving the position to the right or left by a specific bit based on the position of the bit corresponding to the random number; And
Checking whether the value of the bit at the moved position is a specific value and performing one of the reproducing step and the moving step according to the checking result
Random playback method of a vehicle media device further comprising.
And if the value of all of the allocated bits is the specific value, initializing the value of all of the allocated bits.
Generating the random number is generating a random number using a time count value of a timer.
Random playback method of an in-vehicle media device.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
KR1020100080423A KR20120017679A (en) | 2010-08-19 | 2010-08-19 | Random playing method of media device using car |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
KR1020100080423A KR20120017679A (en) | 2010-08-19 | 2010-08-19 | Random playing method of media device using car |
Publications (1)
Publication Number | Publication Date |
---|---|
KR20120017679A true KR20120017679A (en) | 2012-02-29 |
Family
ID=45839540
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
KR1020100080423A KR20120017679A (en) | 2010-08-19 | 2010-08-19 | Random playing method of media device using car |
Country Status (1)
Country | Link |
---|---|
KR (1) | KR20120017679A (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104021805A (en) * | 2014-06-06 | 2014-09-03 | 杨红岩 | Implementation method and device of language listening training |
KR20160008321A (en) | 2014-07-14 | 2016-01-22 | 현대모비스 주식회사 | Apparatus and Method for playing media data randomly in feedback type in a vehicle |
-
2010
- 2010-08-19 KR KR1020100080423A patent/KR20120017679A/en not_active Application Discontinuation
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104021805A (en) * | 2014-06-06 | 2014-09-03 | 杨红岩 | Implementation method and device of language listening training |
KR20160008321A (en) | 2014-07-14 | 2016-01-22 | 현대모비스 주식회사 | Apparatus and Method for playing media data randomly in feedback type in a vehicle |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US6707768B2 (en) | Randomized playback of tracks in a multimedia player | |
US8806212B2 (en) | Method and apparatus for generating and verifying electronic signature of software data, and computer readable recording medium thereof | |
US20060288845A1 (en) | Preference-weighted semi-random media play | |
JP2008532118A5 (en) | ||
CN109862424B (en) | Video playing method and device and electronic equipment | |
JP2007502041A (en) | Playing encrypted content using region keys | |
KR20120017679A (en) | Random playing method of media device using car | |
US20120027380A1 (en) | Automatically bookmarking digital content | |
CA2294027C (en) | Method and apparatus for audibly indicating when a predetermined location has been encountered in stored data | |
KR20110081827A (en) | Storage device and method for dynamic content tracing | |
EP4365758A1 (en) | Contextualized content identification | |
WO2005076275A1 (en) | Control device, control method, recording device, and recording method | |
JP6865259B2 (en) | Interactive music request method, device, terminal, storage medium and program | |
US7933670B2 (en) | Maintaining music playback | |
US20060215522A1 (en) | Disc identification system | |
KR100955725B1 (en) | Method and System for Preventing Memory Hacking | |
US8374064B2 (en) | Method and devices for copy protection, copy protected record carrier | |
KR100602781B1 (en) | Apparatus and method for random replaying an audio file in an audio file replay system | |
CN117194333B (en) | File hiding method, system, equipment and medium based on NTFS (non-Uniform resource locator) file system | |
KR100713970B1 (en) | Audio random play method | |
US8441898B2 (en) | Method and devices for copy protection, copy protected record carrier | |
RU2012135285A (en) | ACCELERATOR FOR DESIGN AND MODELING RECORDING CHANNEL CHANNEL | |
TW200830323A (en) | Methods, system and mediums for use in protecting content | |
JP2008523531A (en) | Method and apparatus for extending interactivity to multiple storage media | |
JP2019128959A5 (en) |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
WITN | Withdrawal due to no request for examination |