• Welcome to Theos PowerBasic Museum 2017.

News:

Attachments are only available to registered users.
Please register using your full, real name.

Main Menu

BassBox

Started by Patrice Terrier, October 08, 2007, 10:57:44 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Patrice Terrier

Starting from now: october 25, 2007

I will always attached the latest patch version, with publication's date, to the first post of this thread, as well as in the new message.

Then it would be easier for you to detect that you are using the latest patch or not.

...
Patrice Terrier
GDImage (advanced graphic addon)
http://www.zapsolution.com

Patrice Terrier

In this patch, I have greatly improved audio detection!

Now files like these:
c:\windows\winsxs\x86_microsoft-windows-mmsys_31bf3856ad364e35_6.0.6000.16386_none_5c390844e2400bf9\dts.wav
c:\windows\winsxs\x86_microsoft-windows-mmsys_31bf3856ad364e35_6.0.6000.16386_none_5c390844e2400bf9\ac3.wav
that would cause havoc, even in Windows Media Player are properly detected and handled by BassBox.

I have also removed from the hidden list any audio files that would be stored in "recycle.bin".

This version should not GPF anymore on bad audio files  ::)

...
Patrice Terrier
GDImage (advanced graphic addon)
http://www.zapsolution.com

Patrice Terrier

#77
BassBox has a new feature!

Try this:




Patrice Terrier
GDImage (advanced graphic addon)
http://www.zapsolution.com

Kent Sarikaya

That is a really sweet addition Patrice!!

Patrice Terrier

Kent,

Glad you like it ;)

Indeed the new "Background\" folder allows you to store jpg files, that you can use to customize the BassBox background while in standard mode (of course they are ignored in Blur and Crystal VISTA mode).

The hidden background list is updated there:


'// Fill the bakground listbox
'// Warning: Currently only JPG files!
SUB DetectBackground()
    LOCAL hList, WashFind, hFind, BackgroundCount, nSelected AS LONG
    LOCAL fd AS WIN32_FIND_DATA
    LOCAL zTmp AS ASCIIZ * %MAX_PATH
    LOCAL zBackground AS ASCIIZ * %MAX_PATH
    LOCAL sBackgroundPath AS STRING
    LOCAL nActiveBackgroundSize AS QUAD
    LOCAL nItemSize AS QUAD

'   // Size of the current active background image
    nActiveBackgroundSize = zsFileSize((SK_CENTERFORM()))

    sBackgroundPath = zsExePath() + "Background\"

    hList = zGetMainItem(%ID_Background)
    CALL ListDeleteAll(hList)

    WashFind = FindFirstFile((sBackgroundPath + "*.*"), fd)
    hFind = WashFind
    DO WHILE hFind > 0
       IF ASC(fd.cFileName) <> 46 THEN
          IF INSTR(CHR$(0,1,32,33,128), CHR$(fd.dwFileAttributes)) THEN
             zTmp = sBackgroundPath + fd.cFileName: CALL CharLower(zTmp)
             IF INSTR(".jpg.", RIGHT$(zTmp, 4) + ".") THEN
                nItemSize = MAK(QUAD, fd.nFileSizeLow, fd.nFileSizeHigh)
                IF ListAdd(hList, zTmp) > -1 THEN
                   INCR BackgroundCount
'                  // If same size, then we assume it is our current background...
                   IF nItemSize = nActiveBackgroundSize THEN zBackground = zTmp
                END IF
             END IF
          END IF
       END IF
       hFind = FindNextFile(WashFind, fd)
    LOOP
    CALL FindClose(WashFind)

    nSelected = ListFindString(hList, zBackground)
    CALL ListSelectPlus(hList, nSelected)

    IF BackgroundCount < 2 THEN
       CALL ShowWindow(zGetMainItem(%ID_BTN_BACKL), %SW_HIDE)
       CALL ShowWindow(zGetMainItem(%ID_BTN_BACKR), %SW_HIDE)
    END IF

END SUB


And to perform the copy of the selected background I have added a couple of new API to zSkin.inc:


FUNCTION zsFileOperation(BYVAL hDlg AS LONG, zSrce AS ASCIIZ, zTarget AS ASCIIZ, zTitle AS ASCIIZ, BYVAL FlagDialog AS LONG, BYVAL wFunc AS LONG) AS LONG
    LOCAL ErrCode AS LONG
    DIM Sh AS SHFILEOPSTRUCT
    IF zsExist(zSrce) THEN
       Sh.hWnd = hDlg&
       Sh.wFunc = wFunc
       Sh.pFrom = VARPTR(zSrce)
       Sh.pTo = VARPTR(zTarget)
       Sh.fFlags = %FOF_SILENT OR %FOF_NOCONFIRMATION OR %FOF_NOCONFIRMMKDIR
       IF FlagDialog THEN
          Sh.lpszProgressTitle = VARPTR(zTitle)
          Sh.fFlags = %FOF_NOCONFIRMATION OR %FOF_NOCONFIRMMKDIR OR %FOF_SIMPLEPROGRESS
       END IF
       ErrCode = SHFileOperation(Sh)
    ELSE
       ErrCode = 2 ' The system cannot find the file specified
    END IF
    FUNCTION = ErrCode
END FUNCTION

FUNCTION zsFileCopy(BYVAL hDlg AS LONG, zSrce AS ASCIIZ, zTarget AS ASCIIZ, zTitle AS ASCIIZ, BYVAL FlagDialog AS LONG) AS LONG
    FUNCTION = zsFileOperation (hDlg, zSrce, zTarget, zTitle, FlagDialog, %FO_COPY)
END FUNCTION

FUNCTION zsFileMove(BYVAL hDlg AS LONG, zSrce AS ASCIIZ, zTarget AS ASCIIZ, zTitle AS ASCIIZ, BYVAL FlagDialog AS LONG) AS LONG
    FUNCTION = zsFileOperation (hDlg, zSrce, zTarget, zTitle, FlagDialog, %FO_MOVE)
END FUNCTION

Patrice Terrier
GDImage (advanced graphic addon)
http://www.zapsolution.com

Petr Schreiber

Thanks Patrice,

really nice addition !


Petr
AMD Sempron 3400+ | 1GB RAM @ 533MHz | GeForce 6200 / GeForce 9500GT | 32bit Windows XP SP3

psch.thinbasic.com

Patrice Terrier

#81
Now you can drag a complete folder directly onto the BassBox desktop icon if any :




...
Patrice Terrier
GDImage (advanced graphic addon)
http://www.zapsolution.com

Charles Pegge

Thanks Patrice, I love trying out different backgrounds, I think it will be a very popular feature. but one thing to watch out for with the new icon ability: dropping music folders and files onto the BassBox icon, when BassBox is not running, results in a GPF.

Patrice Terrier

#83
Quotedropping music folders and files onto the BassBox icon, when BassBox is not running, results in a GPF.

Well I am unable to reproduce it myself (on VISTA).

When I drag a folder while BassBox is not running, then it starts it, before playing.

Anybody else has the same problem than Charles?
Patrice Terrier
GDImage (advanced graphic addon)
http://www.zapsolution.com

Patrice Terrier

#84
Charles

You must be aware that the command line size is limited, this means if you have slected several files instead of using just the folder name, then the overall length of the joined file names could very fast exceed the size of the command line.
And this depending on the Windows version could (perhaps) cause the gpf.

On my computer in such a case when command$ is overflooded, then it is just ignored and it comes empty...


You may find this link instructive about command line size limitation:
http://blogs.msdn.com/oldnewthing/archive/2003/12/10/56028.aspx
Patrice Terrier
GDImage (advanced graphic addon)
http://www.zapsolution.com

Charles Pegge


I am using XP on an HP Pavillion Desktop, Patrice. I ran a few more tests after a reboot, with BassBox.mp3 and bluecube.ogg. The ogg file did not cause a gpf but only the visual part of BassBox was working. There were no controls or sound and it set my wave audio volume to zero. (at system level) .

Patrice Terrier

Charles

In the short link property, did you select "start in" ---> the same folder holding BassBox and the various Bass.dll ?

Anyway I shall test it tomorrow on my XP computer, to see what is different than on VISTA.

I hate these differences between OS of the same provider ;)
Patrice Terrier
GDImage (advanced graphic addon)
http://www.zapsolution.com

Charles Pegge

Very interesting! I created a shortcut to BassBox, moved it to the desktop then dragged music files onto the shortcut. It works perfectly!

Kent Sarikaya

Being able to drag to a shortcut and get that kind of functionality is really cool stuff. First class abilities Patrice!!

Patrice Terrier

I did check on XP and I have been able to reproduce the GPF.

It occures in TAGS_Read (inside GetTag).
I shall check the TAGS_Read declaration for the BassTags.dll, something must be wrong there.


-- Kent,
Yes I think, that being able to drag a whole folder on a short cut, is a nice feature addition.
Patrice Terrier
GDImage (advanced graphic addon)
http://www.zapsolution.com