Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ;*******************************************************************************************
- ;* in_PureAmp.dll v1.03 (x86) - by Peace^TST - build: 30.08.2017 12:11
- ;* -----------------------------------------------------------------------------------------
- ;* https://testaware.wordpress.com/
- ;*******************************************************************************************
- ;EnableExplicit
- #IN_VER = $100
- ; ImageDecoder (0=off, 1=on)
- #IsIFF = 1 ; Use IFF
- #IsGDI = 1 ; Use GDI+
- #IsIDX = 1 ; Use Registered
- #IsDDS = 1 ; Use DDS
- #IsXUP = 1 ; Use Uncompress (PP20;XPKF;FIMP...)
- #PA_Raster = 8
- #PA_DefaultLength = -1 ;300000
- #PA_WinW = 130
- #PA_WinH = 10
- #PA_WinMaxW = 1024
- #PA_WinMaxH = 768
- Enumeration 1 ; Format-IDentifer
- #ID_AUD
- #ID_HTM
- #ID_MCI
- #ID_MOD
- #ID_MOV
- #ID_PIC
- #ID_SND
- #ID_TXT
- EndEnumeration
- Enumeration ; Window
- #W_Main
- EndEnumeration
- Enumeration ; Gadgets
- #G_Area
- #G_Canvas
- #G_Editor
- EndEnumeration
- ;* IN_WinAmp
- Structure IN_WinAmp Align #PB_Structure_AlignC
- version.i ;* module type (IN_VER)
- *description ;* description of module, with version string
- *hMainWindow ;* winamp's main window (filled in by winamp)
- *hDllInstance ;* DLL instance handle (Also filled in by winamp)
- *FileExtensions ;* "mp3\0Layer 3 MPEG\0mp2\0Layer 2 MPEG\0mpg\0Layer 1 MPEG\0"
- is_seekable.i ;* is this stream seekable?
- UsesOutputPlug.i ;* does this plug-in use the output plug-ins?
- *Config ;* void (*Config)(HWND hwndParent); // configuration dialog
- *About ;* void (*About)(HWND hwndParent); // about dialog
- *Init ;* void (*Init)(); // called at program init
- *Quit ;* void (*Quit)(); // called at program quit
- *GetFileInfo ;* void (*GetFileInfo)(char *file, char *title, int *length_in_ms); // If file == NULL, current playing is used
- *InfoBox ;* Int (*InfoBox)(char *file, HWND hwndParent);
- *IsOurFile ;* Int (*IsOurFile)(char *fn); // called before extension checks, to allow detection of mms://, etc
- *Play ;* Int (*Play)(char *fn); // return zero on success, -1 on file-not-found, some other value on other (stopping winamp) error
- *Pause ;* void (*Pause)(); // pause stream
- *UnPause ;* void (*UnPause)(); // unpause stream
- *IsPaused ;* Int (*IsPaused)(); // ispaused? return 1 if paused, 0 if not
- *Stop ;* void (*Stop)(); // stop (unload) stream
- *GetLength ;* Int (*GetLength)(); // get length in ms
- *GetOutputTime ;* Int (*GetOutputTime)(); // returns current output time in ms. (usually returns outMod->GetOutputTime()
- *SetOutputTime ;* void (*SetOutputTime)(int time_in_ms); // seeks to point in stream (in ms). Usually you signal your thread to seek, which seeks and calls outMod->Flush()..
- *SetVolume ;* void (*SetVolume)(int volume); // from 0 to 255.. usually just call outMod->SetVolume
- *SetPan ;* void (*SetPan)(int pan); // from -127 to 127.. usually just call outMod->SetPan
- *SAVSAInit ;* void (*SAVSAInit)(int maxlatency_in_ms, int srate);
- *SAVSADeInit ;* void (*SAVSADeInit)(); // call in Stop()
- *SAAddPCMData ;* void (*SAAddPCMData)(void *PCMData, int nch, int bps, int timestamp);
- *SAGetMode ;* Int (*SAGetMode)(); // gets csa (the current type (4=ws,2=osc,1=spec))
- *SAAdd ;* void (*SAAdd)(void *data, int timestamp, int csa);
- *VSAAddPCMData ;* void (*VSAAddPCMData)(void *PCMData, int nch, int bps, int timestamp)
- *VSAGetMode ;* Int (*VSAGetMode)(int *specNch, int *waveNch)
- *VSAAdd ;* void (*VSAAdd)(void *data, int timestamp)
- *VSASetInfo ;* void (*VSASetInfo)(int nch, int srate)
- *dsp_isactive ;* Int (*dsp_isactive)();
- *dsp_dosamples ;* Int (*dsp_dosamples)(short int *samples, int numsamples, int bps, int nch, int srate);
- *EQSet ;* void (*EQSet)(int on, char data[10], int preamp); // 0-64 each, 31 is +0, 0 is +12, 63 is -12. Do nothing to ignore.
- *SetInfo ;* void (*SetInfo)(int bitrate, int srate, int stereo, int synched); // if -1, changes ignored?
- *outMod ;* winamp_out_module *outMod; // filled in by winamp, optionally used
- EndStructure
- Structure PureAmp
- IsPause.i
- IsPlay.i
- IsMCI.i
- IsGIF.i
- Length.q
- Pan.i
- Position.q
- Volume.i
- Buffer.s{#MAX_PATH}
- EndStructure
- Structure PureInfo
- Decoder.s
- Encoder.s ; IFF,GDI+...
- Width.i
- Height.i
- Depth.i
- Length.q
- Speed.i
- Frames.i
- Fps.i
- Herz.i
- Colors.i
- NoInfo.s
- EndStructure
- Macro MA_MsgBox(WIN, TXT, TIT)
- MessageBox_(WIN, TXT, TIT, #MB_OK)
- EndMacro
- ProcedureDLL AttachProcess(Instance)
- Global PA.PureAmp
- Global PI.PureInfo ; PureAmp_InfoBox
- Global *In_Module.IN_WinAmp
- EndProcedure
- ProcedureDLL DetachProcess(Instance)
- With PA
- If \IsPlay
- If \IsMCI : mciSendString_("CLOSE " + Str(#ID_MCI), 0, 0, 0)
- ElseIf IsMovie(#ID_AUD) : FreeMovie(#ID_AUD)
- ElseIf IsMovie(#ID_MOV) : FreeMovie(#ID_MOV)
- ElseIf IsSound(#ID_SND) : FreeSound(#ID_SND)
- ElseIf IsMusic(#ID_MOD) : FreeMusic(#ID_MOD)
- ElseIf IsImage(#ID_PIC) : FreeImage(#ID_PIC)
- EndIf
- If IsWindow(#W_Main) : CloseWindow(#W_Main) : EndIf
- EndIf
- EndWith
- EndProcedure
- CompilerIf #IsXUP ; Uncompress file
- XIncludeFile "Include\i_XUP.pbi"
- CompilerEndIf
- XIncludeFile "Include\i_IMG.pbi" ; Picture
- XIncludeFile "Include\i_MUS.pbi" ; Modules
- XIncludeFile "Include\i_TXT.pbi" ; Text
- XIncludeFile "Include\i_HTM.pbi" ; HTML
- ProcedureC PureAmp_Config(hwndParent)
- MA_MsgBox(hwndParent, "No configuration.", "Configuration")
- EndProcedure
- ProcedureC PureAmp_About(hwndParent)
- Protected t$ = PeekS(*In_Module\description) + #LF$ + #LF$ +
- FormatDate("Coded by Peace^TST, build: %yyyy.%mm.%dd %hh:%ii:%ss", #PB_Compiler_Date) + #LF$ +
- "https://testaware.wordpress.com/" + #LF$ + #LF$ +
- "Using PureBasic " + StrF(#PB_Compiler_Version*0.01, 2) + " (x86)" + #LF$ +
- "http://www.purebasic.com/" + #LF$ + #LF$ +
- "This plugin is not tested in real Winamp," + #LF$ +
- "created only for the AmpMaster Library!"
- MA_MsgBox(hwndParent, t$, "About")
- EndProcedure
- ProcedureC PureAmp_Init()
- UseOGGSoundDecoder() ; 153Kb
- UseFLACSoundDecoder() ; 37Kb
- UsePNGImageDecoder() ; 126Kb
- ;UseJPEGImageDecoder() ; 111Kb
- UseJPEG2000ImageDecoder() ; 86Kb
- UseTGAImageDecoder() ; 1Kb
- InitSound()
- InitMovie()
- ;ClearStructure(@PA, PureAmp)
- EndProcedure
- ProcedureC PureAmp_Quit()
- ; Bug in StopMusic/Sound() and Free?
- With PA
- *In_Module\is_seekable = #True ; *** Default: seekable
- If \IsPlay
- If \IsMCI : mciSendString_("CLOSE " + Str(#ID_MCI), 0, 0, 0)
- ElseIf IsMovie(#ID_AUD) : FreeMovie(#ID_AUD)
- ElseIf IsMovie(#ID_MOV) : FreeMovie(#ID_MOV)
- ElseIf IsSound(#ID_SND) : FreeSound(#ID_SND)
- ElseIf IsMusic(#ID_MOD) : FreeMusic(#ID_MOD)
- ElseIf IsImage(#ID_PIC) : FreeImage(#ID_PIC)
- EndIf
- EndIf
- If IsWindow(#W_Main) : CloseWindow(#W_Main) : EndIf
- ;ClearStructure(@PA, PureAmp)
- ;ClearStructure(@PI, PureInfo)
- EndWith
- EndProcedure
- ProcedureC PureAmp_GetFileInfo(*file, *title.Integer, *length_in_ms.Integer)
- If *title : *title\i = #Null : EndIf ; No title or @GetFilePart(PeekS(*File))
- If *length_in_ms : *length_in_ms\i = #PA_DefaultLength : EndIf ; Default = -1/300000ms
- EndProcedure
- ProcedureC PureAmp_InfoBox(*file, hwndParent)
- ; https://msdn.microsoft.com/en-us/library/vs/alm/dd798683(v=vs.85).aspx
- With PI
- Protected t$, i
- If PA\IsMCI
- \Decoder = "MCI_SENDSTRING"
- \Width = WindowWidth(#W_Main, #PB_Window_InnerCoordinate) : If \Width <= #PA_WinW : \Width = #Null : EndIf
- \Height = WindowHeight(#W_Main,#PB_Window_InnerCoordinate) : If \Height <= #PA_WinH : \Height = #Null : EndIf
- mciSendString_("STATUS " + Str(#ID_MCI) + " SPEED", @PA\Buffer, #MAX_PATH, 0) : \Speed = StrToInt_(PA\Buffer)
- mciSendString_("STATUS " + Str(#ID_MCI) + " LENGTH",@PA\Buffer, #MAX_PATH, 0) : StrToInt64Ex_(PA\Buffer, #Null, @\Length)
- ElseIf IsMovie(#ID_AUD)
- \Decoder = "PB_AUDIO/MOVIE"
- ElseIf IsMovie(#ID_MOV)
- \Decoder = "PB_MOVIE"
- \Frames = MovieLength(#ID_MOV)
- \Fps = MovieInfo(#ID_MOV, 0)
- \Width = MovieWidth(#ID_MOV)
- \Height = MovieHeight(#ID_MOV)
- \Length = PA\Length
- ElseIf IsSound(#ID_SND)
- \Decoder = "PB_SOUND"
- \Frames = SoundLength(#ID_SND, #PB_Sound_Frame)
- \Herz = GetSoundFrequency(#ID_SND)
- \Length = PA\Length
- ElseIf IsImage(#ID_PIC)
- \Decoder = "PB_IMAGE"
- Select IMAGE_ENCODE
- Case #IMAGE_ENCODE_DDS : \Encoder = "DDS"
- Case #IMAGE_ENCODE_GDI : \Encoder = "GDI+"
- Case #IMAGE_ENCODE_GDP : \Encoder = "GDIplus"
- Case #IMAGE_ENCODE_IDX : \Encoder = "IDX"
- Case #IMAGE_ENCODE_IFF : \Encoder = "IFF"
- Case #IMAGE_ENCODE_PBI : \Encoder = "PB"
- EndSelect
- \Width = ImageWidth(#ID_PIC)
- \Height = ImageHeight(#ID_PIC)
- \Colors = IMG_CountColors(#ID_PIC)
- If \Colors
- For i = 1 To 32
- If \Colors <= (1<<i)
- \Depth = i : Break
- EndIf
- Next
- Else
- \Depth = ImageDepth(#ID_PIC, #PB_Image_OriginalDepth)
- EndIf
- ElseIf IsMusic(#ID_MOD)
- \Decoder = "PB_MUSIC"
- EndIf
- t$ = PeekS(*file) + #LF$ + #LF$
- If Len(\Decoder)
- t$ + "Decoder:" + #TAB$ + \Decoder + #LF$
- t$ + "Seekable:" + #TAB$
- If *In_Module\is_seekable
- t$ + "Yes"
- Else
- t$ + "No"
- EndIf
- t$ + #LF$ + #LF$
- If \Encoder : t$ + "Decoded:" + #TAB$ + \Encoder + #LF$ : EndIf
- If \Width : t$ + "Width:" + #TAB$ + Str(\Width) + #LF$ : EndIf
- If \Height : t$ + "Height:" + #TAB$ + Str(\Height) + #LF$ : EndIf
- If \Depth : t$ + "Depth:" + #TAB$ + Str(\Depth) + #LF$ : EndIf
- If \Colors : t$ + "Colors:" + #TAB$ + Str(\Colors) + #LF$ : EndIf
- If \Frames : t$ + "Frames:" + #TAB$ + Str(\Frames) + #LF$ : EndIf
- If \Fps : t$ + "Fps:" + #TAB$ + Str(\Fps) + #LF$ : EndIf
- If \Herz : t$ + "Herz:" + #TAB$ + Str(\Herz) + #LF$ : EndIf
- If \Speed : t$ + "Speed:" + #TAB$ + Str(\Speed) + #LF$ : EndIf
- If \Length : t$ + "Length:" + #TAB$ + Str(\Length) + "ms" : EndIf
- Else
- t$ + "No info available."
- EndIf
- Trim(t$, #LF$) ;StrTrim_(t$, #LF$)
- MA_MsgBox(hwndParent, t$, "Fileinfo")
- EndWith
- ProcedureReturn #Null
- EndProcedure
- ProcedureC PureAmp_IsOurFile(*fn)
- ProcedureReturn #Null
- EndProcedure
- ProcedureC PureAmp_Play(*fn)
- ; return zero on success, -1 on file-not-found, some other value on other (stopping winamp) error
- PureAmp_Quit()
- If *fn <= #Null : ProcedureReturn #True : EndIf
- Protected File$ = PeekS(*fn)
- Protected ID$ = ";"+GetExtensionPart(File$)+";"
- Protected x, y, i
- With PA
- OpenWindow(#W_Main, 16, 16, #PA_WinW, #PA_WinH, GetFilePart(File$), #PB_Window_Invisible|#PB_Window_NoActivate|#PB_Window_NoGadgets|#PB_Window_TitleBar|#PB_Window_SystemMenu)
- \IsPlay = #True ; *** Default: Play
- If StrStrI_(?l_MCI, ID$) And mciSendString_("OPEN " + #DQUOTE$ + File$ + #DQUOTE$ + " TYPE MPEGVIDEO ALIAS " + Str(#ID_MCI), 0, 0, 0) = #S_OK
- ; *** PureMCI
- \IsMCI = #True
- If StrStrI_(@ID$, "GIF")
- \IsGIF = #True ; use default-time (remark for real gif-playtime)
- *In_Module\is_seekable = #False ; *** GIF is Not seekable
- mciSendString_("PLAY " + Str(#ID_MCI) + " REPEAT", 0, 0, 0)
- Else
- mciSendString_("PLAY " + Str(#ID_MCI), 0, 0, 0)
- EndIf
- ElseIf StrStrI_(?l_SND, ID$) And LoadSound(#ID_SND, File$)
- ; *** PureSound
- PlaySound(#ID_SND)
- ElseIf StrStrI_(?l_AUD, ID$) And LoadMovie(#ID_AUD, File$) And PlayMovie(#ID_AUD, GetForegroundWindow_());WindowID(#W_Main))
- ; *** PureAudio (Movie)
- ElseIf StrStrI_(?l_MOV, ID$) And LoadMovie(#ID_MOV, File$) And PlayMovie(#ID_MOV, WindowID(#W_Main))
- ; *** PureMovie
- ResizeWindow(#W_Main,#PB_Ignore, #PB_Ignore, MovieWidth(#ID_MOV), MovieHeight(#ID_MOV))
- ShowWindow_(WindowID(#W_Main), #SW_SHOWNORMAL)
- UpdateWindow_(WindowID(#W_Main))
- Sleep_(300)
- ElseIf StrStrI_(?l_PIC, ID$) And IMG_LoadImage(File$) > #Null
- ; *** PurePicture
- ElseIf StrStrI_(?l_TXT, ID$) And TXT_LoadText(File$) > #Null
- ; *** PureText
- ElseIf StrStrI_(?l_HTM, ID$) And HTM_LoadHTML(File$) > #Null
- ; *** PureHTML
- ElseIf MUS_LoadMusic(File$)
- ; *** PureModule
- *In_Module\is_seekable = #False ; *** Not seekable
- ElseIf mciSendString_("OPEN " + #DQUOTE$ + File$ + #DQUOTE$ + " ALIAS " + Str(#ID_MCI), 0, 0, 0) = #S_OK
- ; *** PureMCI at least try again (unknown extension)
- \IsMCI = #True
- mciSendString_("PLAY " + Str(#ID_MCI), 0, 0, 0)
- Else
- \IsPlay = #False ; *** Error!
- EndIf
- ; *******************************
- ; Is file is playing or quit
- ; *******************************
- If \IsPlay
- ProcedureReturn #Null ; *** All OK!
- Else
- PureAmp_Quit() ; *** Error!
- EndIf
- EndWith
- ProcedureReturn #True
- EndProcedure
- ProcedureC PureAmp_Pause()
- ; pause stream
- With PA
- If \IsPlay And \IsPause = #False
- If \IsMCI : mciSendString_("PAUSE " + Str(#ID_MCI), 0, 0, 0)
- ElseIf IsMovie(#ID_AUD) : PauseMovie(#ID_AUD)
- ElseIf IsMovie(#ID_MOV) : PauseMovie(#ID_MOV)
- ElseIf IsSound(#ID_SND) : PauseSound(#ID_SND)
- ElseIf IsMusic(#ID_MOD) : StopMusic(#ID_MOD) ; why not PauseMusic()?
- EndIf
- EndIf
- \IsPause = #True
- EndWith
- EndProcedure
- ProcedureC PureAmp_UnPause()
- ; unpause stream
- With PA
- If \IsPlay And \IsPause
- If \IsMCI : mciSendString_("RESUME " + Str(#ID_MCI), 0, 0, 0)
- ElseIf IsMovie(#ID_AUD) : ResumeMovie(#ID_AUD)
- ElseIf IsMovie(#ID_MOV) : ResumeMovie(#ID_MOV)
- ElseIf IsSound(#ID_SND) : ResumeSound(#ID_SND)
- ElseIf IsMusic(#ID_MOD) : PlayMusic(#ID_MOD) ; why not ResumeMusic()?
- EndIf
- EndIf
- \IsPause = #False
- EndWith
- EndProcedure
- ProcedureC PureAmp_IsPaused()
- ; ispaused? return 1 if paused, 0 if not
- ProcedureReturn PA\IsPause
- EndProcedure
- ProcedureC PureAmp_Stop()
- ; stop (unload) stream
- PureAmp_Quit()
- EndProcedure
- ProcedureC PureAmp_GetLength()
- ; get length in ms
- With PA
- If \IsPlay
- \Length = #PA_DefaultLength
- If \IsMCI
- If \IsGIF = #False ; GIF? -> set default length (-1)
- mciSendString_("STATUS " + Str(#ID_MCI) + " LENGTH", @\Buffer, #MAX_PATH, 0)
- StrToInt64Ex_(\Buffer, #Null, @\Length)
- EndIf
- ElseIf IsMovie(#ID_MOV) : \Length = (MovieLength(#ID_MOV) / MovieInfo(#ID_MOV, 0)) * 1000
- ElseIf IsSound(#ID_SND) : \Length = SoundLength(#ID_SND, #PB_Sound_Millisecond)
- EndIf
- EndIf
- ProcedureReturn \Length
- EndWith
- EndProcedure
- ProcedureC PureAmp_GetOutputTime()
- ; get position in ms
- With PA
- If \IsPlay
- If \IsMCI
- mciSendString_("STATUS " + Str(#ID_MCI) + " POSITION", @\Buffer, #MAX_PATH, 0)
- StrToInt64Ex_(\Buffer, #Null, @\Position)
- ElseIf IsMovie(#ID_MOV) : \Position = (MovieStatus(#ID_MOV) * 1000) / MovieInfo(#ID_MOV, 0)
- ElseIf IsSound(#ID_SND) : \Position = GetSoundPosition(#ID_SND, #PB_Sound_Millisecond)
- EndIf
- EndIf
- ProcedureReturn \Position
- EndWith
- EndProcedure
- ProcedureC PureAmp_SetOutputTime(time_in_ms)
- ; set position in ms
- With PA
- If \IsPlay
- If \IsMCI
- mciSendString_("SEEK " + Str(#ID_MCI) + " TO " + Str(time_in_ms), 0, 0, 0)
- mciSendString_("PLAY " + Str(#ID_MCI), 0, 0, 0)
- ElseIf IsMovie(#ID_MOV) : MovieSeek(#ID_MOV, (time_in_ms * 0.001) * MovieInfo(#ID_MOV, 0))
- ElseIf IsSound(#ID_SND) : SetSoundPosition(#ID_SND, time_in_ms, #PB_Sound_Millisecond)
- EndIf
- EndIf
- EndWith
- EndProcedure
- ProcedureC PureAmp_SetVolume(volume)
- ; volume 0-255 -> 0-100%
- With PA
- Protected pan
- volume = (100.0 / 255.0) * volume
- If \IsPlay And \Volume <> volume
- \Volume = volume
- If \IsMCI
- pan = Abs(\Volume * 0.1 * \Pan)
- If \Pan < #Null ; left
- mciSendString_("SETAUDIO " + Str(#ID_MCI) + " RIGHT VOLUME TO "+ Str(\Volume * 10 - pan), 0, 0, 0)
- mciSendString_("SETAUDIO " + Str(#ID_MCI) + " LEFT VOLUME TO " + Str(\Volume * 10), 0, 0, 0)
- ElseIf \Pan > #Null ; right
- mciSendString_("SETAUDIO " + Str(#ID_MCI) + " RIGHT VOLUME TO "+ Str(\Volume * 10), 0, 0, 0)
- mciSendString_("SETAUDIO " + Str(#ID_MCI) + " LEFT VOLUME TO " + Str(\Volume * 10 - pan), 0, 0, 0)
- Else
- mciSendString_("SETAUDIO " + Str(#ID_MCI) + " VOLUME TO " + Str(\Volume * 10), 0, 0, 0)
- EndIf
- ElseIf IsMovie(#ID_AUD) : MovieAudio(#ID_AUD, \Volume, \Pan)
- ElseIf IsMovie(#ID_MOV) : MovieAudio(#ID_MOV, \Volume, \Pan)
- ElseIf IsMusic(#ID_MOD) : MusicVolume(#ID_MOD, \Volume)
- ElseIf IsSound(#ID_SND) : SoundVolume(#ID_SND, \Volume)
- EndIf
- EndIf
- EndWith
- EndProcedure
- ProcedureC PureAmp_SetPan(pan)
- ; set pan ± 127 -> ± 100%
- With PA
- pan = (100.0 / 127.0) * pan
- If \IsPlay And \Pan <> pan
- \Pan = pan
- If \IsMCI
- pan = Abs(\Volume * 0.1 * \Pan)
- If \Pan < #Null ; left
- mciSendString_("SETAUDIO " + Str(#ID_MCI) + " RIGHT VOLUME TO "+ Str(\Volume * 10 - pan), 0, 0, 0)
- mciSendString_("SETAUDIO " + Str(#ID_MCI) + " LEFT VOLUME TO " + Str(\Volume * 10), 0, 0, 0)
- ElseIf \Pan > #Null ; right
- mciSendString_("SETAUDIO " + Str(#ID_MCI) + " RIGHT VOLUME TO "+ Str(\Volume * 10), 0, 0, 0)
- mciSendString_("SETAUDIO " + Str(#ID_MCI) + " LEFT VOLUME TO " + Str(\Volume * 10 - pan), 0, 0, 0)
- Else
- mciSendString_("SETAUDIO " + Str(#ID_MCI) + " VOLUME TO " + Str(\Volume * 10), 0, 0, 0)
- EndIf
- ElseIf IsMovie(#ID_AUD) : MovieAudio(#ID_AUD, \Volume, \Pan)
- ElseIf IsMovie(#ID_MOV) : MovieAudio(#ID_MOV, \Volume, \Pan)
- ElseIf IsSound(#ID_SND) : SoundPan(#ID_SND, \Pan)
- EndIf
- EndIf
- EndWith
- EndProcedure
- ProcedureCDLL winampGetInModule2()
- *In_Module = ?In_PureAmp ; globalize
- ProcedureReturn *In_Module
- EndProcedure
- DataSection
- In_PureAmp:
- Data.i #IN_VER
- Data.i ?l_Description
- Data.i #Null ; winamp's main window (filled in by winamp)
- Data.i #Null ; DLL instance handle (also filled in by winamp)
- Data.i ?l_FileExtensions
- Data.i #True ; is this stream seekable? (#ID_SND)
- Data.i #Null ; does this plug-in use the output plug-ins?
- Data.i @PureAmp_Config()
- Data.i @PureAmp_About()
- Data.i @PureAmp_Init()
- Data.i @PureAmp_Quit()
- Data.i @PureAmp_GetFileInfo()
- Data.i @PureAmp_InfoBox()
- Data.i @PureAmp_IsOurFile()
- Data.i @PureAmp_Play()
- Data.i @PureAmp_Pause()
- Data.i @PureAmp_UnPause()
- Data.i @PureAmp_IsPaused()
- Data.i @PureAmp_Stop()
- Data.i @PureAmp_GetLength()
- Data.i @PureAmp_GetOutputTime()
- Data.i @PureAmp_SetOutputTime()
- Data.i @PureAmp_SetVolume()
- Data.i @PureAmp_SetPan()
- Data.i #Null,#Null,#Null,#Null,#Null,#Null,#Null,#Null,#Null,#Null,#Null,#Null,#Null,#Null
- l_Description:
- Data.s "PureAmp Media Input Plugin v1.03 (x86)"
- Data.i #Null
- l_FileExtensions:
- ; #ID_MOD
- Data.s "669", "669 Composer/Unis669 (*.669)",
- "ABC", "ABC Sample Module (*.abc)",
- "AMF", "Asylum Music Format (*.amf)",
- "AMS", "Extreme Tracker/Velvet Studio (*.ams)",
- "DBM", "DigiBooster Pro (*.dbm)",
- "DMF", "Delusion Digital Music Format (*.dmf)",
- "DSK", "DSIK Internal Format (*.dsk)",
- "FAR", "Farandole Composer (*.far)",
- "FT", "Fast Tracker 8CHN (*.ft)",
- "IT", "Impulse Tracker (*.it)",
- "J2B", "J2B Module (*.j2b)",
- "MDL", "DigiTrakker 1.0-3.0 (*.mdl)",
- "MED", "OctaMed Module (*.med)",
- "MOD", "Sound/Noise/ProTracker variants (*.mod)",
- "MT2", "MadTracker 2.0 (*.mt2)",
- "NST", "NoiseTracker Module (*.nst)",
- "PAT", "PAT Sample Module (*.pat)",
- "PSM", "Epic MegaGames MASI (*.psm)",
- "PTM", "PolyTracker (*ptm)",
- "S3M", "ScreamTracker 3.0 (*.s3m)",
- "STM", "ScreamTracker 2.0 (*.stm)",
- "ULT", "UltraTracker (*.ult)",
- "UMX", "Epic Games Unreal Format (*.umx)",
- "XM", "FastTracker II (*.xm)",
- "PP", "Amiga PowerPacker Format (*.pp)",
- "XPK", "Amiga eXtended PacKer Format (*.xpk)",
- "IM", "Amiga FileImploder Format (*.im)",
- "NPK", "NoisePlug Packed Format (*.npk)"
- ; #ID_AUD
- Data.s "MP3", "MPEG Layer-1/2/3 Audio File (*.mp3)",
- "WMA", "Windows Media Audio (*.wma)"
- ; #ID_SND
- Data.s "FLAC", "Free Lossless Audio Codec (*.flac)",
- "OGG", "Ogg Audio File (*.ogg)",
- "WAV", "Windows Waveform (*.wav)"
- ; #ID_MOV
- Data.s "ASF", "Advanced Systems Format (*.asf)",
- "AVI", "Audio Video Interleave (*.avi)",
- "MP4", "MPEG Layer-4 Video File (*.mp4)",
- "WMV", "Windows Media Video (*.wmv)"
- ; #ID_MCI
- Data.s "3GP", "3 Generation Personal Digital Assistant (*.3gp)",
- "AC3", "Audio Codec 3 (*.ac3)",
- "ADPCM", "Adaptive Differential Pulse Code Modulation (*.adpcm)",
- "GIF", "Graphics Interchange Format (*.gif)",
- "MID", "Musical Instrument Digital Interface (*.mid)",
- "MKV", "Matroska Video Container (*.mkv)"
- ; #ID_PIC
- Data.s "BMP", "Windows Bitmap (*.bmp)",
- "CUR", "Windows Cursor (*.cur)",
- "ICO", "Windows Icon (*.ico)",
- "IFF", "Interchange File Format (*.iff)",
- "DDS", "Direct Draw Surface (*.dds)",
- "EMF", "Windows Enhanced Metafile (*.emf)",
- "JP2", "JPEG2000 Format (*.jp2)",
- "JPG", "Joint Photographic Experts Group (*.jpg)",
- "PNG", "Portable Network Graphics (*.png)",
- "TGA", "Truevision Targa (*.tga)",
- "TIF", "Tagged Image File (*.tif)",
- "WMF", "Windows Meta File (*.wmf)"
- ; #ID_TXT
- Data.s "RTF", "Rich Text Format (*.rtf)",
- "TXT", "Text File (*.txt)"
- ; #ID_HTM
- Data.s "HTML", "Hypertext Markup Language (*.html)"
- Data.i #Null, #Null
- ; Compare extensions
- l_MCI: : Data.s ";3GP;3G2;AC3;ADPCM;GIF;M2A;M4A;MID;MIDI;MKA;MKV;MP1;MP2;MP2A;MP3;MP3A;MP4;MP4A;MPA;MPA1;MPA2;MPA3;MPA4;MPG;MPEG;MPEGA;OGG;OGA;WAV;WAVE;WMA;WMV;" ;TGA;PNG;JPG;
- l_AUD: : Data.s ";MP1;MP2;MP3;MPA;WAV;WAVE;WMA;"
- l_MOV: : Data.s ";ASF;AVI;DIVX;MP4;MPEG;MPG;WMV;XVID;"
- l_PIC: : Data.s ";ANBR;ANIM;ANM;APNG;BMP;BRUSH;CUR;DDS;DIB;EMF;EMZ;GIF;HAM;HAM8;ICO;IFF;ILBM;IM;J2K;JFIF;JNG;JP2;JPE;JPEG;JPF;JPG;JPG2;JPM;JPX;LACE;LBM;LORES;MNG;PBM;PIC;PNG;PP;RLE;TGA;TIF;TIFF;WMF;WMZ;XPK;"
- l_SND: : Data.s ";FLA;FLAC;OGA;OGG;WAV;WAVE;"
- l_TXT: : Data.s ";ASC;ASM;ASP;ASS;BAS;BAT;C;CFG;CPP;CSS;DIZ;DOC;DOK;GUIDE;H;HVS;I;INC;INI;MD;NFO;PB;PBI;PHP;PREF;PREFS;README;RTF;S;SRT;SSA;TEXI;TXT;XML;"
- l_HTM: : Data.s ";HTM;HTML;"
- EndDataSection
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement