📄 linear.c
字号:
#else
W99AV_ReadInfo(W99AV_INFO_AUDIO_REMAIN, &__dwTemp);
#endif
// wyc.172-CDDA, remove follow code to save time for playing CDDA medley title.
#ifndef SUPPORT_PLAY_MEDLEYCDDA
if (__dwTemp <= 0x30)
#else
if (__dwTemp <= 10000)
#endif //
break;
}
UTL_OutputShowTime();
}
//CHIPS_OpenAudio (FALSE);
// wyc.172-CDDA, if play CDDA medley title we not mute the audio when across tracks.
//LJY1.21, LJY1.11, let VCD can play till track end.
#ifdef SUPPORT_ANTISHOCK
else
{
//LJY1.23, LJY1.11b, clear skipping threshold to let it can perform FAST cross track because RISC will keep Vrem around the skipping threshold for FAST cmd..
W99AV_WriteDRAMData(W99AV_DRAM_FAST_VIDEO_THRESHOLD, 0);
W99AV_WriteDM(W99AV_DM_AUDIO_SKIP_THRESHOLD_REFERENCED, 0x200);
//LJY1.11d, ~0.5sec tolerance for track change.
//LJY1.24a, using UTL_EstimateBufferTime() for code refinement.
__dwTemp = UTL_EstimateBufferTime();
#if 0 //LJY1.24a, remove it, using UTL_EstimateBufferTime() for code refinement.
W99AV_ReadInfo ( W99AV_INFO_VIDEO_REMAIN , &__dwTemp );
W99AV_ReadInfo (W99AV_INFO_AUDIO_REMAIN, &_dwMONITORTemp) ;
__dwTemp += _dwMONITORTemp;
__dwTemp /= SECTOR_588;
#endif
if((__dwTimeNow - __dwTemp) < (__dwTimeEnd- __wTemp))
return ERR_ERROR;
}
#endif
#ifdef SUPPORT_PLAY_MEDLEYCDDA
if (!(__wDiscType & BOOK_CDDA))
#endif //
CHIPS_OpenAudio (FALSE);
__dwTimeNow= __dwTimeBegin;
__btPlaying= FALSE;
__btPlayEnd= TRUE;
// PlayEnd, must check repeat AB
//#if 1 to disable REPEATAB cross track
}
else if (__btIntroMode)
{
if ( __dwTimeNow > (__dwTimeBegin + __dwIntroPlayTime) )
{
__dwTimeNow= __dwTimeBegin;
__btPlaying= FALSE;
__btPlayEnd= TRUE;
CHIPS_OpenAudio (FALSE);
}
}
if ( ! __btPlayEnd )
return ERR_ERROR;
// STEP mode can't allow from the start of playing track
if ( (__bModeCmd == KEY_STEP) || (__bModeCmd==KEY_FREEZE) )
{
__bModeCmd=KEY_PLAY;
//__btVideoFreeze=FALSE;
}
__dwIER= 0; // suppose not need IRQ
// f/w 0.45
// modify for use by LINEAR_ChangeTrack call
// wyc.172-CDDA, we add a parameter for CDDA playing, when 1 to represent playing across
// tracks automatically. 0 means press keys to across tracks.
LINEAR_ChangeTrack(KEY_NEXT, 1);
return ERR_NOERR;
}
// *********************************************************************
// Function : LINEAR_PlayItem
// Description : Will get the range of __wPlayItem, and start play
// Arguments : None
//
// Return : None
// Change : __wPlayItem
// Side Effect :
// *********************************************************************
void LINEAR_PlayItem()
{
// Pause->Playing
// do not re-initial the play range
// just resume from the current time(__dwTimeNow)
if ( __btPause )
{
UTL_PlayItem (__wPlayItem, __dwTimeNow );
}
else // Stop->Playing
{
// Micky1.07-2, DVD only need the action that UTL_PlayItem.
// DVD PGM->play->next(auto or user key)-> will call LINEAR_ChangeTrack-> NV_TitlePlay
// CC_KeyCommand->Get_PlayRange-> LINEAR_PlayItem-> only need do reset+command.
if (__wDiscType & BOOK_DVD)
{
// Micky1.10, fix stop->program-> play, always play TT/CC 1/1.
// For DVD, RESUME-> PLAY, use common path
// For VCD, RESUME-> KEY_GOTOTIME_PLAY
// PGM + RESUME, RESUME should be high priority
if ( __bModeCELLTimeSearch != CELL_TIME_BEGIN )
{
UTL_PlayItem (__wPlayItem, 0 );
return;
}
}
// 1. for PROGRAM mode,
// first must get Program entry, and mapping to __wPlayItem
#ifdef PROGRAM1
// Must send program index for next track
if ( __btPlayingProgram )
#else
if ( __btProgram )
#endif
{
// wyc.pro __wProgramData[0] -> __bProgramMaxEntry
if ( __bProgramMaxEntry ) // Program has entries
{
// wyc.pro to let DVD can run program playing from stop mode
if (__wDiscType & BOOK_DVD)
{
__bTemp = _LinearEntryOperation(LINEAR_FIND_ENTRY,1);
if (__bTemp == 1)
{
//Kevin0.86, __bTitle/__wChapter for font mode / GDI mode program UI
#ifndef CT908_UI
__wTemp= __wProgramData[__bProgramPlayingIndex];
__bTitle = HIBYTE(__wTemp);
__wChapter = (WORD)LOBYTE(__wTemp);
#else
__bTitle = __ProgIdxList[__bProgramPlayingIndex].bMainIndex;
__wChapter = __ProgIdxList[__bProgramPlayingIndex].wSubIndex;
#endif
NV_TitlePlay(__bTitle,__wChapter);
}
else
{
// LLY2.37p, assign KEY_STOP from F/W
// To avoid IR and F/W key conflict issue
//__bISRKey = KEY_STOP;
__bFWKey = KEY_STOP;
}
}
else
{
//Kevin0.86, __wPlayItem for font mode / GDI mode program UI
#ifndef CT908_UI
__wPlayItem= __wProgramData[ __bProgramPlayingIndex];
#else
__bFMPlayingDir = __ProgIdxList[__bProgramPlayingIndex].bMainIndex; //for FM use only
__wPlayItem= __ProgIdxList[__bProgramPlayingIndex].wSubIndex;
#endif
// for VCD, the __wPlayItem=TrackNO+1;
if ( __wDiscType & BOOK_VCD )
__wPlayItem++;
}
}
//DEBUG // must debug, will come here???
else // Program has no entry
{
// DVD_100aMicky, clear __btProgram first
// as panel will reference it from panel 2.00
/*__btProgram= FALSE; // no recording program-data
__btPlayingProgram = FALSE;
__bFMMenuID = FM_MENU_NORMAL;*/
// wyc1.10-3, clear all program variables to avoid sometimes the UI in program mode but __btProgram is FALSE.
LINEAR_Program(LINEAR_PROGRAM_CLEAR,NULL);
OSD_OUTPUT_MACRO(MSG_CLEARPROGRAM, FALSE, 0); //CoCo.101
}
}
// 2. for Random mode
// must random give a __wPlayItem
if ( __btRandom )
{
#ifndef NO_MP3
if (__wDiscType & CDROM_M1)
{
// wyc1.07, because old method only search 100 times to try to find playable files dir, and __dwCountSystem will be similar
// when searching this 100 times. So it is possible of finding no playable dir in this searching and __bFMPlayingDir will be assign
// a unknown value. So add protection to make sure we can get a playable dir index after this loop.
__bFMPlayingDir = (BYTE)(__dwCountSystem % __bFMTotalDirs);
while (__pwFMFilesOfDir[__bFMPlayingDir] == 0)
{
// wyc1.21, the old method to compute directory / files have bugs and will cause Picture CD go wrong
// dir / file in random mode. Modify to fix it.
__bFMPlayingDir++;
if ( __bFMPlayingDir >= __bFMTotalDirs)
__bFMPlayingDir = 0;
}
__wPlayItem = (WORD)(__dwCountSystem % __pwFMFilesOfDir[__bFMPlayingDir]);
__wPlayItem+= __wTrackBegin;
}
else
#endif
{
__wPlayItem= (WORD)(__dwCountSystem % (__wTrackEnd- __wTrackBegin+ 1));
__wPlayItem+= __wTrackBegin;
}
}
//DVD_047
// for DVD, don't call this, as it will clear current time as 0
// cause KEY_NEXT/PREV will show time 0 then chapter time
if ( !(__wDiscType & BOOK_DVD) )
UTL_ShowTrack ( MSG_TRACK, __wPlayItem, 3 );
// play the __wPlayItem from the beginning
// wyc0.91, move function FM_ProcessHighLight in front of UTL_PlayItem to avoid FM_ProcessHighLight spending too much time in
// draw bitmap to make audio overflow problem in MP3.
#ifndef NO_MP3
if (__wDiscType & CDROM_M1)
{
FM_ProcessHighLight(__wPlayItem);
}
#endif // #ifndef NO_MP3
UTL_PlayItem (__wPlayItem, 0);
}
}
// *********************************************************************
// Function : LINEAR_Number
// Description :
// Arguments : bNumber : The
// Return : TRUE, number is valid, and perform action
// : FALSE, number is invalid or out of range
// Change :
// Side Effect :
// *********************************************************************
BIT LINEAR_Number( WORD wNumber )
{
// in Input GoToTime mode
//alex1.23,20040218 combine gototime , search,bookmark, Remove __btGotoTime , use __bSearhMode in Linear_Number function
//if (__btGoToTime)
if(__bSearchMode==SEARCH_MODE_TIME)
{
// do not allow the value larger
if ( wNumber>=10 )
{
// OSD_Output(MSG_INVALID, OSD_ERR_KEY, 1 );
return FALSE;
}
else // process this input
{
BYTE bTemp;
// *** MULTI_DISC; Count the I/P NO. of Time
__bGoToTimeNO++;
//DVD_046-1
// don;t support goto time number rounding
#ifdef GOTOTIME_NUMBER_NOROUND
if(__bGoToTimeNO>5) return FALSE ; // pxu 2000/09/05 for input number should not more than 5
#endif
#ifdef GOTOTIME_LEFTTORIGHT
// LLY.037, support H:MM:SS format input mode
// and there is no limit for input digit
if(__bGoToTimeNO == 1)
__bTimeHour=(BYTE)wNumber;
else if(__bGoToTimeNO == 2)
__bTimeMin=(BYTE)wNumber*10;
else if(__bGoToTimeNO == 3)
__bTimeMin+=(BYTE)wNumber;
else if(__bGoToTimeNO == 4)
__bTimeSec=(BYTE)wNumber*10;
else
__bTimeSec+=(BYTE)wNumber;
#else // #ifdef GOTOTIME_LEFTTORIGHT
__bTimeHour = __bTimeMin/10; // LLY.0371, calculate hour part
bTemp= __bTimeMin% 10;
__bTimeMin= bTemp* 10+ __bTimeSec/ 10;
bTemp= __bTimeSec% 10;
__bTimeSec= bTemp* 10+ (BYTE)wNumber;
#endif // #ifdef GOTOTIME_LEFTTORIGHT
// Notice: MSG_GOTOTIME will reference __bTimeHour, __bTimeMin, __bTimeSec directly
OSD_OUTPUT_MACRO ( MSG_GOTOTIME, __bGoToTimeNO, 0xff );
#ifdef GOTOTIME_LEFTTORIGHT
if ( __bGoToTimeNO == 5 )
{
// DVD_277Micky,Fix DVD(GOTOTIME_LEFTTORIGHT) input 5 number-> always show invalid
// update cc/linear/input.h
// move the codes to KEY_GOTOTIME_VALUE
// calculate __dwGoToTIme at one place.
// Notice: can't call _CC_GoTimeAction(GOTIME_CALCULATE) & _CC_GoTimeAction(GOTIME_EXECUTE)
// to replace simulate re-sending key for recursive issue !!
// LINEAR_Number() --> _CC_GoTimeAction() --> LINEAR_Action() --> LINEAR_Number()
// LLY2.37p, assign KEY_GOTOTIME_VALUE from F/W
// To avoid IR and F/W key conflict issue
//__bISRKey=KEY_GOTOTIME_VALUE;
__bFWKey=KEY_GOTOTIME_VALUE;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -