Hi !
This is an extremely small SID player using the LittleSID2.0 Winamp plugin. Thanks to GPI for the information about WinAmp plugins.
Get the winamp.pbi from here: http://www.schliess.com/stuff/winamp.pbi
Get the player+DLL+some of the best SID songs from here:http://www.schliess.com/stuff/wolfgangs_sid_pack.zip
MFG
:)WolfgangS
new:stupid spelling error removed :*(
This is the sourcecode:
Code: Select all
IncludeFile "winamp.pbi"
hWindow=OpenWindow(0,100,100,250,190,#PB_Window_SystemMenu,"FemtoPlayer - Do not distribute")
If init_winamp("in_littlesid.dll","out_ds.dll",hWindow)=0
winamp_setvolume(255)
;winamp_setpan(0) ;?
If CreateGadgetList(WindowID())
ButtonGadget(10,10,10,50,25,"outconfig")
ButtonGadget(11,10,40,50,25,"outabout")
ButtonGadget(12,10,70,50,25,"inconfig")
ButtonGadget(13,10,100,50,25,"inabout")
ButtonGadget(14,10,130,50,25,"STOP")
TextGadget(21,65,167,130,12,"[url]http://WWW.PUREBASIC.COM[/url]")
ListViewGadget(30, 70, 10, 170, 150)
EndIf
If ExamineDirectory(50, "", "*.sid")
While NextDirectoryEntry()=1
AddGadgetItem(30,-1,DirectoryEntryName())
Wend
EndIf
EndIf
Repeat
event=WaitWindowEvent()
Delay(1)
If event=#PB_Event_Gadget
ID=EventGadgetID()
Select ID
Case 10
winamp_outconfig(WindowID())
Case 11
winamp_outabout(WindowID())
Case 12
winamp_inconfig(WindowID())
Case 13
winamp_inabout(WindowID())
Case 14
winamp_stop()
Case 30
If EventType()=#PB_EventType_LeftDoubleClick
a.s=GetGadgetItemText(30,GetGadgetState(30),0): If a.s"":hPlay=winamp_play(a.s):EndIf
EndIf
EndSelect
EndIf
Until event=#PB_Event_CloseWindow
winamp_stop()
quit_winamp()