From: Jos v.d.V. <jo...@us...> - 2006-12-06 19:21:10
|
Update of /cvsroot/win32forth/win32forth/apps/Player4 In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv25929 Modified Files: Catalog.f Commands.f Mediatree.f PLAYER4.F Pl_MciWindow.f Pl_Toolset.f Pl_Version.f PopupWindow.f mshell_r.f Log Message: Jos: Made the catalog ROM bootable and adapted the catalog for full-path Index: mshell_r.f =================================================================== RCS file: /cvsroot/win32forth/win32forth/apps/Player4/mshell_r.f,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** mshell_r.f 19 Jul 2006 15:25:26 -0000 1.4 --- mshell_r.f 6 Dec 2006 19:20:57 -0000 1.5 *************** *** 179,181 **** --- 179,190 ---- : build-ptrs ( #records -- ) 0 swap add-ptrs ; + : #RecordsInDatabase ( record-size m_hndl - #records ) >hfileLength @ swap / ; + + : CreateIndexFile ( counted$ #records - f ) + cells + over create-file-ptrs + swap open-file-ptrs + extend-file + ; + \s Index: Pl_Version.f =================================================================== RCS file: /cvsroot/win32forth/win32forth/apps/Player4/Pl_Version.f,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -d -r1.20 -r1.21 *** Pl_Version.f 19 Jul 2006 15:25:26 -0000 1.20 --- Pl_Version.f 6 Dec 2006 19:20:56 -0000 1.21 *************** *** 3,7 **** anew -Pl_Version.f ! 10127 value player_version# \ Version numbers: v.ww.rr --- 3,7 ---- anew -Pl_Version.f ! 10128 value player_version# \ Version numbers: v.ww.rr *************** *** 184,186 **** --- 184,218 ---- medialabel, relative filename and filesize are the same. + \ changes for Version 1.01.28 + Jos: December 6th, 2006. + Made the catalog of the player ROM bootable. + The idea is to burn a CD or DVD with a configured Player4 and some music. + As soon as that disk is put in the drive player4 will auto-start and + act according its configuration. It might even start playing and go + to the tray bar. + Steps to make a DVD: + Copy player4.exe and autorun.inf to a directory on your HD + Make a directory in it called files. + Copy the music into the directory files + Start Player4 + Choose in the menu Options for Setup a search path catalog + Select the music directory + Choose in the menu Catalog for Import directory tree... + Activate you favorite flags such as: Auto play the catalog at the start + Note: The sort flags can also be used. + Leave Player4 + + Burn the disk in such a way that the files: + + autorun.inf + catalog.dat + catalog.idx + PathMediaFiles.dat + Player4.exe + + are in the root together with the directory Files. + + When the autostart option is still on in your PC then it will start + player4 as soon as the disk is put in the drive. + Index: Catalog.f =================================================================== RCS file: /cvsroot/win32forth/win32forth/apps/Player4/Catalog.f,v retrieving revision 1.40 retrieving revision 1.41 diff -C2 -d -r1.40 -r1.41 *** Catalog.f 15 Oct 2006 16:08:43 -0000 1.40 --- Catalog.f 6 Dec 2006 19:20:56 -0000 1.41 *************** *** 455,458 **** --- 455,475 ---- : set-all-not-played ( - ) for-all-records record-not-played ; + : Mark#playingAsPlayed ( - ) + #playing -1 > + if #playing RecordDef true #playing RecordDef Played- c! + then + ; + + : SetRecordInCollectionToNotPlayed ( n - ) + n>record dup RecordDef Excluded- c@ not + if 0 swap RecordDef Played- c! + then + ; + + : SetCollectionToNotPlayed ( - ) + for-all-records SetRecordInCollectionToNotPlayed + Mark#playingAsPlayed RefreshCatalog + ; + : change-randomlevel ( level n - ) n>record over random swap RecordDef RandomLevel ! *************** *** 505,511 **** ; ! : random-shuffle ( - ) vadr-config MaximumRandomLevel @ for-all-records change-randomlevel drop ! sort_by_RandomLevel RefreshCatalog ; --- 522,531 ---- ; ! : shuffle-catalog ( - ) vadr-config MaximumRandomLevel @ for-all-records change-randomlevel drop ! ; ! ! : random-shuffle ( - ) ! shuffle-catalog sort_by_RandomLevel RefreshCatalog ; *************** *** 621,627 **** if r@ Incollection? else r@ Requested? not ! r@ RecordDef Played- c@ 0= and then then r> RecordDef Deleted- c@ 0= and if drop i leave --- 641,648 ---- if r@ Incollection? else r@ Requested? not ! then then + r@ RecordDef Played- c@ 0= and r> RecordDef Deleted- c@ 0= and if drop i leave *************** *** 745,749 **** : "search-records ( adr count - ) ! for-all-records search-record 2drop ; --- 766,770 ---- : "search-records ( adr count - ) ! for-all-records search-record 2drop Mark#playingAsPlayed ; Index: Mediatree.f =================================================================== RCS file: /cvsroot/win32forth/win32forth/apps/Player4/Mediatree.f,v retrieving revision 1.35 retrieving revision 1.36 diff -C2 -d -r1.35 -r1.36 *** Mediatree.f 19 Jul 2006 15:25:26 -0000 1.35 --- Mediatree.f 6 Dec 2006 19:20:56 -0000 1.36 *************** *** 121,125 **** z" Music" 2r@ 1 AddItemHierarical dup to hMusic z" Requests" 2r> 1 AddItemHierarical dup to hRequests ! dummy dup &PrevMusic ! dup &PrevMovie ! &PrevRequest ! dup &PrevMovie hArtist ! &PrevMovie hArtist ! (( z" First Artist" hPrev hMusic 1 AddItemHierarical to hArtist --- 121,125 ---- z" Music" 2r@ 1 AddItemHierarical dup to hMusic z" Requests" 2r> 1 AddItemHierarical dup to hRequests ! dummy dup &PrevMusic ! dup &PrevMovie ! dup to LastChar &PrevRequest ! dup &PrevMovie hArtist ! &PrevMovie hArtist ! (( z" First Artist" hPrev hMusic 1 AddItemHierarical to hArtist *************** *** 186,190 **** r@ n>record dup RecordDef Request- c@ if 1 +to #requests &PrevRequest ! else dup CountedFilename music? if &PrevMusic else &PrevMovie --- 186,190 ---- r@ n>record dup RecordDef Request- c@ if 1 +to #requests &PrevRequest ! else dup CountedFilename music? if &PrevMusic else &PrevMovie *************** *** 205,209 **** :M FillTreeView: ( -- ) - TVI_ROOT DeleteItem: self \ delete all items from the tree view 0 to #Excluded --- 205,208 ---- Index: Pl_Toolset.f =================================================================== RCS file: /cvsroot/win32forth/win32forth/apps/Player4/Pl_Toolset.f,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 Binary files /tmp/cvsNkDLNX and /tmp/cvsKQhCL2 differ Index: PLAYER4.F =================================================================== RCS file: /cvsroot/win32forth/win32forth/apps/Player4/PLAYER4.F,v retrieving revision 1.63 retrieving revision 1.64 diff -C2 -d -r1.63 -r1.64 *** PLAYER4.F 2 Dec 2006 10:17:30 -0000 1.63 --- PLAYER4.F 6 Dec 2006 19:20:56 -0000 1.64 *************** *** 94,97 **** --- 94,99 ---- needs CommandID.f + : SetVolLevel ( Volume - ) dup 1000 min 0 max vadr-config VolLevel ! SetVolume: Player4W ; + \ ----------------------------------------------------------------------------- \ Define the Main Window *************** *** 215,237 **** then check-config unmap-configuration ; ! :M On_Init: ( -- ) On_Init: super AccelTable EnableAccelerators \ init the accelerator table COLOR_BTNFACE 1+ GCL_HBRBACKGROUND hwnd Call SetClassLong drop ! InitFileNames check/resize-config-file catalog-exist? ! if map-config-file map-database vadr-config ExitFailed- c@ ! if MciDebug? if cr ." REBUILD " then ! generate-index-file build-free-list ! then ! true vadr-config ExitFailed- c! ! MciDebug? ! if database-mhndl #records-in-database . ." records, " ! ." freelist: " vadr-config #free-list @ . ! then ! else map-config-file then ! SortByFlags -1 to #playing GetHandle: Self SetParent: ControlCenter --- 217,256 ---- then check-config unmap-configuration ; ! string: StartupDir ! ! : ?SetPath ( flag - ) ! if Catalogpath count dup>r + r@ ascii \ -scan 1- r> swap - ! StartupDir count 1- pad place pad +place pad count Catalogpath place ! Catalogpath +null z" Player4.exe" zEXEC-CMD drop bye ! then ! ; ! ! :M On_Init: { RomBooted } ( -- ) On_Init: super AccelTable EnableAccelerators \ init the accelerator table COLOR_BTNFACE 1+ GCL_HBRBACKGROUND hwnd Call SetClassLong drop ! CURRENT-DIR$ count drop 3 StartupDir place ! RomBoot to RomBooted InitFileNames check/resize-config-file catalog-exist? ! if map-config-file RomBooted ?SetPath ! map-database vadr-config ExitFailed- c@ ! if MciDebug? ! if cr ." REBUILD " ! then ! generate-index-file build-free-list ! then ! true vadr-config ExitFailed- c! ! MciDebug? ! if database-mhndl #records-in-database . ." records, " ! ." freelist: " vadr-config #free-list @ . ! then ! vadr-config s_Random_popular- w@ ! if shuffle-catalog ! then ! SortByFlags ! else map-config-file then ! -1 to #playing GetHandle: Self SetParent: ControlCenter *************** *** 241,245 **** self Start: Player4W self Start: Splitter ! SeparatorX @ 0= if Startsize: self drop 2/ SeparatorX ! --- 260,264 ---- self Start: Player4W self Start: Splitter ! vadr-config VolLevel @ SetVolLevel SeparatorX @ 0= if Startsize: self drop 2/ SeparatorX ! *************** *** 270,273 **** --- 289,293 ---- :M WM_CLOSE ( h m w l -- res ) + GetVolume: Player4W vadr-config VolLevel ! AccelTable DisableAccelerators \ free the accelerator table Close: self *************** *** 316,320 **** : Stop ( -- ) ! Playing?: Player4W if AbortPlaying: Player4W then ; IDM_STOP SetCommand : Next ( -- ) --- 336,340 ---- : Stop ( -- ) ! Playing?: Player4W if -1 to #playing AbortPlaying: Player4W then ; IDM_STOP SetCommand : Next ( -- ) *************** *** 392,396 **** : ButtonIn? ( - ButtonIn ) IDJoystick GetJoystickInfo 2nip nip 0= ; : WaitTillDepressed ( - ) begin ButtonIn? until ; - : SetVolLevel ( Volume - ) dup 1000 min 0 max vadr-config VolLevel ! SetVolume: Player4W ; : DecreaseVolume ( - ) --- 412,415 ---- *************** *** 520,523 **** --- 539,543 ---- MENUITEM "&Export the catalog to Player.csv" csv-catalog ; MENUITEM "S&earch and make a collection..." SearchCatalog ; + MENUITEM "&Mark collection as not yet played" SetCollectionToNotPlayed ; MENUSEPARATOR :MENUITEM mEndless "Endless play" Endless ; Index: Pl_MciWindow.f =================================================================== RCS file: /cvsroot/win32forth/win32forth/apps/Player4/Pl_MciWindow.f,v retrieving revision 1.27 retrieving revision 1.28 diff -C2 -d -r1.27 -r1.28 *** Pl_MciWindow.f 19 Jul 2006 15:25:26 -0000 1.27 --- Pl_MciWindow.f 6 Dec 2006 19:20:56 -0000 1.28 *************** *** 159,163 **** :M PlayFile: ( addr len -- ) \ open and play a file Close: self - 2dup file-status nip 0= if \ don't try play RealPlayer files, sometimes MCI crashes on my system, when trying (dbu) --- 159,162 ---- *************** *** 165,168 **** --- 164,168 ---- if 2drop else Open: self 0 Play: self + vadr-config VolLevel @ SetVolume: Self \ Restore the volume to VolLevel then else 2drop *************** *** 223,227 **** : (PlayOneFile) ( addr len -- ) \ plays a file and waits until playing is finished PlayFile: self \ play this file - vadr-config VolLevel @ SetVolume: Self \ Restore the volume to VolLevel begin PLAYER \ call the main PLAYER Playing? 0= \ and wait until playing is finished --- 223,226 ---- *************** *** 276,279 **** --- 275,292 ---- \ Play files from catalog \ ----------------------------------------------------------------------------- + + :M PlayFileFromCatalog: ( adr n - ) + CatalogPath full-path + if turnkey? not + if 2dup type ." Not found in path" + then + then + 2dup file-status nip not + if (PlayOneFile) + else 2drop + then + + ;M + :M play-catalog-random: ( -- ) database-mhndl #records-in-database vadr-config #free-list @ - 0> *************** *** 289,295 **** RecordDef File_name r@ Cnt_File_name c@ 2dup type-cr r@ incr-#played r@ to #playing r> mark-played ! CatalogPath full-path not ! if (PlayOneFile) ! then then then --- 302,306 ---- RecordDef File_name r@ Cnt_File_name c@ 2dup type-cr r@ incr-#played r@ to #playing r> mark-played ! PlayFileFromCatalog: Self then then Index: PopupWindow.f =================================================================== RCS file: /cvsroot/win32forth/win32forth/apps/Player4/PopupWindow.f,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** PopupWindow.f 22 Jul 2006 17:02:40 -0000 1.10 --- PopupWindow.f 6 Dec 2006 19:20:56 -0000 1.11 *************** *** 5,8 **** --- 5,9 ---- \ ----------------------------------------------------------------------------- + : PlaySelectedFromTreeView ( -- ) last-selected-rec n>record dup to #playing dup>r *************** *** 11,22 **** r> mark-played turnkey? not ! if 2dup cr type-space ! then ! CatalogPath full-path not ! if PlayFile: Player4W ! else turnkey? not ! if type ." Not found in path" ! then ! then ; defer ClosePopupWindow ' noop is ClosePopupWindow --- 12,19 ---- r> mark-played turnkey? not ! if 2dup cr type-space ! then ! PlayFileFromCatalog: Player4W ! ; defer ClosePopupWindow ' noop is ClosePopupWindow Index: Commands.f =================================================================== RCS file: /cvsroot/win32forth/win32forth/apps/Player4/Commands.f,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** Commands.f 26 Aug 2006 15:25:31 -0000 1.7 --- Commands.f 6 Dec 2006 19:20:56 -0000 1.8 *************** *** 58,62 **** catalog-exist? if 0 to last-selected-rec player-base search-records ! SortByFlags then ; --- 58,62 ---- catalog-exist? if 0 to last-selected-rec player-base search-records ! SortByFlags RefreshCatalog then ; |