diff --git a/tools/vio2sf/OUTPUT/dist.bat b/tools/vio2sf/OUTPUT/dist.bat
deleted file mode 100644
index dfccbc39a..000000000
--- a/tools/vio2sf/OUTPUT/dist.bat
+++ /dev/null
@@ -1,7 +0,0 @@
-copy /y winamp2\plugins\vio2sf.bin ~dist
-copy /y winamp2\plugins\in_vio2sf.dll ~dist
-copy /y winamp5\plugins\in_vio2sfu.dll ~dist
-copy /y fb8\foo_8_vio2sf.dll ~dist
-copy /y fb9\components\foo_input_vio2sf.dll ~dist
-copy /y kbmed\plugins\vio2sf.kpi ~dist
-upx -9 ~dist/*
\ No newline at end of file
diff --git a/tools/vio2sf/OUTPUT/readme.txt b/tools/vio2sf/OUTPUT/readme.txt
deleted file mode 100644
index 1ff983962..000000000
--- a/tools/vio2sf/OUTPUT/readme.txt
+++ /dev/null
@@ -1,9 +0,0 @@
-drop directories in here for testing: (projects are configured to put plugins in here)
-winamp2
-winamp5
-kbmed
-fb8
-fb9
-
-tips:
-run winamp /NEW myfile.mini2sf to test builds
\ No newline at end of file
diff --git a/tools/vio2sf/OUTPUT/upx.exe b/tools/vio2sf/OUTPUT/upx.exe
deleted file mode 100644
index 2afa5610e..000000000
Binary files a/tools/vio2sf/OUTPUT/upx.exe and /dev/null differ
diff --git a/tools/vio2sf/OUTPUT/~dist/vio2sf.txt b/tools/vio2sf/OUTPUT/~dist/vio2sf.txt
deleted file mode 100644
index 529f52f3a..000000000
--- a/tools/vio2sf/OUTPUT/~dist/vio2sf.txt
+++ /dev/null
@@ -1,130 +0,0 @@
-2SF plugins / DeSmuMe
-This build is from the DeSmuMe SVN repository
-
-foo_8_vio2sf.dll + vio2sf.bin(put into same directory)
- foobar2000 v0.8.x plugin
-
-foo_input_vio2sf.dll + vio2sf.bin(put into same directory)
- foobar2000 v0.9.x plugin
-
-in_vio2sf.dll + vio2sf.bin(put into same directory)
- Winamp 2.x plugin
- Missing feature:reading-from-archive unicode-filename(by-spec)
-
-in_vio2sfu.dll + vio2sf.bin(put into same directory)
- Winamp 5.x unicode plugin
- Missing feature:reading-from-archive
-
-vio2sf.kpi + vio2sf.bin(put into same directory)
- KbMedia Player plugin
- Missing feature:replaygain(by-spec) tag-writing(by-spec) unicode-filename(by-spec) libs-in-archive-with-sub-directory(by-spec)
-
-History
--------
-
-0.23 (2010/01/19)
- Import desmume 0.9.4 generation SPU
- - fix bugs in ADPCM looping and PSG channels
- Add interpolation options (none,linear,cosine)
-
-0.22 (2009/10/16)
- Fixed: Failed to load libs by relative path.
- Fixed: Failed to read '_libN' tags.
-
-0.21 (2009/09/30)
- Fixed: Bufffer for several dsp plugins needed double space.
-
-0.20 (2009/07/22)
- Fixed: Skipped loading 2sflib described in '_lib2' tag without '_lib' tag.
-
-0.19 (2009/03/13)
- Removed: Experimental tag('_vio2sf_loader_type').
- Ignored: Inconsistency with priority of superimposing.
-
-0.18 (2009/03/10)
- Added: Experimental tag('_vio2sf_loader_type').
-
-0.17 (2009/03/07)
- Fixed:Obsolete config dialog for Winamp 2.x was not able to be displayed.
-
-0.16 (2009/03/06)
- Fixed:Skipped silent songs although these had length information.
-
-0.15 (2009/03/05)
- Fixed:ROM address mask was set to invalid value when 2sf had only single memory block.
-
-0.14 (2008/04/30)
- DeSmuMe 0.8.0
-
-0.13 (2008/03/05)
- Added:Plugin for foobar v0.8.x
- Fixed:Informed blank title last played to Winamp.
-
-0.12 (2008/03/04)
- Fixed:Loaded libs in nonstandard order.
- Clean up common code.
-
-0.11 (2008/02/11)
- Added:'_clockdown' tag support.
- Fixed:ARM coprocessor work memory is leaked.
-
-0.10 (2008/02/04)
- Fixed:Played with inaccurate pitch and timer speed.
- Added:'_frame' tag support.
- Added: Experimental tags('_vio2sf_sync_type','_vio2sf_arm9_clockdown_level','_vio2sf_arm7_clockdown_level').
- _vio2sf_sync_type=0(hsync:default),1(vsync:fast but inaccurate)
- _vio2sf_arm9_clockdown_level=0(default),1(Clock of ARM9 down to 1/2),2(Clock of ARM9 down to 1/4),3(Clock of ARM9 down to 1/8)
- _vio2sf_arm7_clockdown_level=0(default),1(Clock of ARM7 down to 1/2),2(Clock of ARM7 down to 1/4),3(Clock of ARM7 down to 1/8)
-
-0.09 (2008/02/03)
- Fixed:Crashed with memory access violation over rom length.
-
-0.08 (2008/02/02)
- Fixed:No samples clipped after mixing.
- Fixed:Wasted CPU cycles by looping ADPCM.
-
-0.07 (2008/02/01)
- SPU emulation based on DeSmuME v0.7.3wp1 mdn.
-
-0.06 / 0.05 / 0.04 (2008/02/01)
- Fixed:Invaid initial state of ARM9.
-
-0.03 (2008/01/30)
- Removed:Needless cpu emulation on loading process.
-
-0.02 (2008/01/29)
- Fixed:Erased system tags('_lib') by tag writer in Winamp.
- Fixed:Uncompressed buffers are leaked on loading process.
-
-
-0.01 (2008/01/28)
- First release.
-
-License
--------
-
-[DeSmuMe](GPL)
- DeSmuME
- _________________________________________
- Copyright (C) 2006 yopyop
- Copyright (C) 2006-2007 DeSmuME team
-
- DeSmuME is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
-Please refer to src.7z/src/vio2sf/desmume/COPYING.
-
-[zlib](ZLIBL)
-'zlib' general purpose compression library version 1.2.3, July 18th, 2005
-
-Copyright (C) 1995-2005 Jean-loup Gailly and Mark Adler
-
-Please refer to src.7z/src/vio2sf/zlib/zlib.h
-
-[loadpe](LGPL)
-libloadpe
-Copyright (C)2007 Ku-Zu
-
-Please refer to src.7z/src/loadpe/COPYING.LIB for redistributing.
diff --git a/tools/vio2sf/foo_input_vio2sf.vcproj b/tools/vio2sf/foo_input_vio2sf.vcproj
deleted file mode 100644
index 28a04116e..000000000
--- a/tools/vio2sf/foo_input_vio2sf.vcproj
+++ /dev/null
@@ -1,258 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/tools/vio2sf/foo_xsf8.dsp b/tools/vio2sf/foo_xsf8.dsp
deleted file mode 100644
index ef9d0e061..000000000
--- a/tools/vio2sf/foo_xsf8.dsp
+++ /dev/null
@@ -1,151 +0,0 @@
-# Microsoft Developer Studio Project File - Name="foo_xsf8" - Package Owner=<4>
-# Microsoft Developer Studio Generated Build File, Format Version 6.00
-# ** DO NOT EDIT **
-
-# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102
-
-CFG=foo_xsf8 - Win32 Debug
-!MESSAGE This is not a valid makefile. To build this project using NMAKE,
-!MESSAGE use the Export Makefile command and run
-!MESSAGE
-!MESSAGE NMAKE /f "foo_xsf8.mak".
-!MESSAGE
-!MESSAGE You can specify a configuration when running NMAKE
-!MESSAGE by defining the macro CFG on the command line. For example:
-!MESSAGE
-!MESSAGE NMAKE /f "foo_xsf8.mak" CFG="foo_xsf8 - Win32 Debug"
-!MESSAGE
-!MESSAGE Possible choices for configuration are:
-!MESSAGE
-!MESSAGE "foo_xsf8 - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library")
-!MESSAGE "foo_xsf8 - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library")
-!MESSAGE
-
-# Begin Project
-# PROP AllowPerConfigDependencies 0
-# PROP Scc_ProjName ""
-# PROP Scc_LocalPath ""
-CPP=cl.exe
-MTL=midl.exe
-RSC=rc.exe
-
-!IF "$(CFG)" == "foo_xsf8 - Win32 Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "foo_xsf8___Win32_Release"
-# PROP BASE Intermediate_Dir "foo_xsf8___Win32_Release"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "foo_xsf8___Win32_Release"
-# PROP Intermediate_Dir "foo_xsf8___Win32_Release"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "FOO_XSF8_EXPORTS" /YX /FD /c
-# ADD CPP /nologo /MD /W3 /GX /O2 /I "src" /I "src/foobar8" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "FOO_XSF8_EXPORTS" /YX /FD /c
-# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
-# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
-# ADD BASE RSC /l 0x411 /d "NDEBUG"
-# ADD RSC /l 0x411 /d "NDEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386
-# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386 /out:"OUTPUT\fb8\foo_8_vio2sf.dll"
-
-!ELSEIF "$(CFG)" == "foo_xsf8 - Win32 Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "foo_xsf8___Win32_Debug"
-# PROP BASE Intermediate_Dir "foo_xsf8___Win32_Debug"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir "foo_xsf8___Win32_Debug"
-# PROP Intermediate_Dir "foo_xsf8___Win32_Debug"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "FOO_XSF8_EXPORTS" /YX /FD /GZ /c
-# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "src/foobar8" /I "src" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "FOO_XSF8_EXPORTS" /YX /FD /GZ /c
-# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
-# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
-# ADD BASE RSC /l 0x411 /d "_DEBUG"
-# ADD RSC /l 0x411 /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept
-# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /out:"foo_8_vio2sf.dll" /pdbtype:sept
-
-!ENDIF
-
-# Begin Target
-
-# Name "foo_xsf8 - Win32 Release"
-# Name "foo_xsf8 - Win32 Debug"
-# Begin Group "loadpe"
-
-# PROP Default_Filter ""
-# Begin Source File
-
-SOURCE=.\src\loadpe\loadpe.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\src\loadpe\loadpe.h
-# End Source File
-# End Group
-# Begin Group "xsfc"
-
-# PROP Default_Filter ""
-# Begin Source File
-
-SOURCE=.\src\xsfc\foo_input_xsf8.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=.\src\xsfc\foo_input_xsfcfg8.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=.\src\xsfc\leakchk.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\src\xsfc\tagget.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\src\xsfc\xsfc.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=.\src\xsfc\xsfc.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\src\xsfc\xsfcfg.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=.\src\xsfc\xsfcfg.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\src\xsfc\xsfdrv.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\src\xsfc\xsfui.rc
-# End Source File
-# End Group
-# Begin Source File
-
-SOURCE=.\src\pversion.h
-# End Source File
-# End Target
-# End Project
diff --git a/tools/vio2sf/foo_xsf8.vcproj b/tools/vio2sf/foo_xsf8.vcproj
deleted file mode 100644
index afd7f0329..000000000
--- a/tools/vio2sf/foo_xsf8.vcproj
+++ /dev/null
@@ -1,374 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/tools/vio2sf/in_xsf.dsp b/tools/vio2sf/in_xsf.dsp
deleted file mode 100644
index 614119664..000000000
--- a/tools/vio2sf/in_xsf.dsp
+++ /dev/null
@@ -1,156 +0,0 @@
-# Microsoft Developer Studio Project File - Name="in_xsf" - Package Owner=<4>
-# Microsoft Developer Studio Generated Build File, Format Version 6.00
-# ** DO NOT EDIT **
-
-# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102
-
-CFG=in_xsf - Win32 Debug
-!MESSAGE This is not a valid makefile. To build this project using NMAKE,
-!MESSAGE use the Export Makefile command and run
-!MESSAGE
-!MESSAGE NMAKE /f "in_xsf.mak".
-!MESSAGE
-!MESSAGE You can specify a configuration when running NMAKE
-!MESSAGE by defining the macro CFG on the command line. For example:
-!MESSAGE
-!MESSAGE NMAKE /f "in_xsf.mak" CFG="in_xsf - Win32 Debug"
-!MESSAGE
-!MESSAGE Possible choices for configuration are:
-!MESSAGE
-!MESSAGE "in_xsf - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library")
-!MESSAGE "in_xsf - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library")
-!MESSAGE
-
-# Begin Project
-# PROP AllowPerConfigDependencies 0
-# PROP Scc_ProjName ""
-# PROP Scc_LocalPath ""
-CPP=cl.exe
-MTL=midl.exe
-RSC=rc.exe
-
-!IF "$(CFG)" == "in_xsf - Win32 Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "Release"
-# PROP BASE Intermediate_Dir "Release"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "Release_in_xsf"
-# PROP Intermediate_Dir "Release_in_xsf"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "IN_XSF_EXPORTS" /YX /FD /c
-# ADD CPP /nologo /MD /W3 /GX /O2 /I "src" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "IN_XSF_EXPORTS" /FD /c
-# SUBTRACT CPP /YX
-# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
-# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
-# ADD BASE RSC /l 0x411 /d "NDEBUG"
-# ADD RSC /l 0x411 /d "NDEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386
-# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /pdb:none /machine:I386 /out:"OUTPUT\winamp2\plugins\in_vio2sf.dll"
-
-!ELSEIF "$(CFG)" == "in_xsf - Win32 Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "Debug"
-# PROP BASE Intermediate_Dir "Debug"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir "Debug_in_xsf"
-# PROP Intermediate_Dir "Debug_in_xsf"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "IN_XSF_EXPORTS" /YX /FD /GZ /c
-# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "src/aosdk" /I "src/aosdk/zlib" /I "src" /D "LSB_FIRST" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "IN_XSF_EXPORTS" /YX /FD /GZ /c
-# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
-# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
-# ADD BASE RSC /l 0x411 /d "_DEBUG"
-# ADD RSC /l 0x411 /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept
-# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /out:"in_vio2sf.dll" /pdbtype:sept
-
-!ENDIF
-
-# Begin Target
-
-# Name "in_xsf - Win32 Release"
-# Name "in_xsf - Win32 Debug"
-# Begin Group "loadpe"
-
-# PROP Default_Filter ""
-# Begin Source File
-
-SOURCE=.\src\loadpe\loadpe.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\src\loadpe\loadpe.h
-# End Source File
-# End Group
-# Begin Group "xsfc"
-
-# PROP Default_Filter ""
-# Begin Source File
-
-SOURCE=.\src\xsfc\in_xsf.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=.\src\xsfc\in_xsfcfg.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=.\src\xsfc\in_xsfcfg.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\src\xsfc\leakchk.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\src\xsfc\tagget.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\src\xsfc\xsfc.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=.\src\xsfc\xsfc.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\src\xsfc\xsfcfg.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=.\src\xsfc\xsfcfg.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\src\xsfc\xsfdrv.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\src\xsfc\xsfui.rc
-# End Source File
-# End Group
-# Begin Source File
-
-SOURCE=.\src\pversion.h
-# End Source File
-# End Target
-# End Project
diff --git a/tools/vio2sf/in_xsf.vcproj b/tools/vio2sf/in_xsf.vcproj
deleted file mode 100644
index 94e881138..000000000
--- a/tools/vio2sf/in_xsf.vcproj
+++ /dev/null
@@ -1,374 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/tools/vio2sf/in_xsfu.dsp b/tools/vio2sf/in_xsfu.dsp
deleted file mode 100644
index b88afa93a..000000000
--- a/tools/vio2sf/in_xsfu.dsp
+++ /dev/null
@@ -1,156 +0,0 @@
-# Microsoft Developer Studio Project File - Name="in_xsfu" - Package Owner=<4>
-# Microsoft Developer Studio Generated Build File, Format Version 6.00
-# ** DO NOT EDIT **
-
-# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102
-
-CFG=in_xsfu - Win32 Debug
-!MESSAGE This is not a valid makefile. To build this project using NMAKE,
-!MESSAGE use the Export Makefile command and run
-!MESSAGE
-!MESSAGE NMAKE /f "in_xsfu.mak".
-!MESSAGE
-!MESSAGE You can specify a configuration when running NMAKE
-!MESSAGE by defining the macro CFG on the command line. For example:
-!MESSAGE
-!MESSAGE NMAKE /f "in_xsfu.mak" CFG="in_xsfu - Win32 Debug"
-!MESSAGE
-!MESSAGE Possible choices for configuration are:
-!MESSAGE
-!MESSAGE "in_xsfu - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library")
-!MESSAGE "in_xsfu - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library")
-!MESSAGE
-
-# Begin Project
-# PROP AllowPerConfigDependencies 0
-# PROP Scc_ProjName ""
-# PROP Scc_LocalPath ""
-CPP=cl.exe
-MTL=midl.exe
-RSC=rc.exe
-
-!IF "$(CFG)" == "in_xsfu - Win32 Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "Release"
-# PROP BASE Intermediate_Dir "Release"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "Release_in_xsfu"
-# PROP Intermediate_Dir "Release_in_xsfu"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "IN_XSF_EXPORTS" /YX /FD /c
-# ADD CPP /nologo /MD /W3 /GX /O2 /I "src/aosdk" /I "src/aosdk/zlib" /I "src" /D ENABLE_UNICODE_PLUGIN=1 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "IN_XSF_EXPORTS" /FD /c
-# SUBTRACT CPP /YX
-# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
-# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
-# ADD BASE RSC /l 0x411 /d "NDEBUG"
-# ADD RSC /l 0x411 /d "NDEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386
-# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /pdb:none /machine:I386 /out:"OUTPUT\winamp5\plugins\in_vio2sfu.dll"
-
-!ELSEIF "$(CFG)" == "in_xsfu - Win32 Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "Debug"
-# PROP BASE Intermediate_Dir "Debug"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir "Debug_in_xsfu"
-# PROP Intermediate_Dir "Debug_in_xsfu"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "IN_XSF_EXPORTS" /YX /FD /GZ /c
-# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "src/aosdk" /I "src/aosdk/zlib" /I "src" /D ENABLE_UNICODE_PLUGIN=1 /D "LSB_FIRST" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "IN_XSF_EXPORTS" /YX /FD /GZ /c
-# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
-# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
-# ADD BASE RSC /l 0x411 /d "_DEBUG"
-# ADD RSC /l 0x411 /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept
-# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /out:"in_vio2sfu.dll" /pdbtype:sept
-
-!ENDIF
-
-# Begin Target
-
-# Name "in_xsfu - Win32 Release"
-# Name "in_xsfu - Win32 Debug"
-# Begin Group "loadpe"
-
-# PROP Default_Filter ""
-# Begin Source File
-
-SOURCE=.\src\loadpe\loadpe.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\src\loadpe\loadpe.h
-# End Source File
-# End Group
-# Begin Group "xsfc"
-
-# PROP Default_Filter ""
-# Begin Source File
-
-SOURCE=.\src\xsfc\in_xsf.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=.\src\xsfc\in_xsfcfg.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=.\src\xsfc\in_xsfcfg.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\src\xsfc\leakchk.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\src\xsfc\tagget.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\src\xsfc\xsfc.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=.\src\xsfc\xsfc.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\src\xsfc\xsfcfg.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=.\src\xsfc\xsfcfg.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\src\xsfc\xsfdrv.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\src\xsfc\xsfui.rc
-# End Source File
-# End Group
-# Begin Source File
-
-SOURCE=.\src\pversion.h
-# End Source File
-# End Target
-# End Project
diff --git a/tools/vio2sf/in_xsfu.vcproj b/tools/vio2sf/in_xsfu.vcproj
deleted file mode 100644
index bc7e329d9..000000000
--- a/tools/vio2sf/in_xsfu.vcproj
+++ /dev/null
@@ -1,391 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/tools/vio2sf/kpixsf.dsp b/tools/vio2sf/kpixsf.dsp
deleted file mode 100644
index a82833e62..000000000
--- a/tools/vio2sf/kpixsf.dsp
+++ /dev/null
@@ -1,136 +0,0 @@
-# Microsoft Developer Studio Project File - Name="kpixsf" - Package Owner=<4>
-# Microsoft Developer Studio Generated Build File, Format Version 6.00
-# ** DO NOT EDIT **
-
-# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102
-
-CFG=kpixsf - Win32 Debug
-!MESSAGE This is not a valid makefile. To build this project using NMAKE,
-!MESSAGE use the Export Makefile command and run
-!MESSAGE
-!MESSAGE NMAKE /f "kpixsf.mak".
-!MESSAGE
-!MESSAGE You can specify a configuration when running NMAKE
-!MESSAGE by defining the macro CFG on the command line. For example:
-!MESSAGE
-!MESSAGE NMAKE /f "kpixsf.mak" CFG="kpixsf - Win32 Debug"
-!MESSAGE
-!MESSAGE Possible choices for configuration are:
-!MESSAGE
-!MESSAGE "kpixsf - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library")
-!MESSAGE "kpixsf - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library")
-!MESSAGE
-
-# Begin Project
-# PROP AllowPerConfigDependencies 0
-# PROP Scc_ProjName ""
-# PROP Scc_LocalPath ""
-CPP=cl.exe
-MTL=midl.exe
-RSC=rc.exe
-
-!IF "$(CFG)" == "kpixsf - Win32 Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "Release"
-# PROP BASE Intermediate_Dir "Release"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "Release_kpixsf"
-# PROP Intermediate_Dir "Release_kpixsf"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "KPIXSF_EXPORTS" /YX /FD /c
-# ADD CPP /nologo /MD /W3 /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "KPIXSF_EXPORTS" /FD /c
-# SUBTRACT CPP /YX
-# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
-# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
-# ADD BASE RSC /l 0x411 /d "NDEBUG"
-# ADD RSC /l 0x411 /d "NDEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386
-# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib shlwapi.lib /nologo /dll /pdb:none /machine:I386 /out:"output\kbmed\plugins\vio2sf.kpi"
-
-!ELSEIF "$(CFG)" == "kpixsf - Win32 Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "Debug"
-# PROP BASE Intermediate_Dir "Debug"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir "Debug_kpixsf"
-# PROP Intermediate_Dir "Debug_kpixsf"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "KPIXSF_EXPORTS" /YX /FD /GZ /c
-# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "KPIXSF_EXPORTS" /YX /FD /GZ /c
-# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
-# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
-# ADD BASE RSC /l 0x411 /d "_DEBUG"
-# ADD RSC /l 0x411 /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept
-# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib shlwapi.lib /nologo /dll /debug /machine:I386 /out:"vio2sf.kpi" /pdbtype:sept
-
-!ENDIF
-
-# Begin Target
-
-# Name "kpixsf - Win32 Release"
-# Name "kpixsf - Win32 Debug"
-# Begin Group "loadpe"
-
-# PROP Default_Filter ""
-# Begin Source File
-
-SOURCE=.\src\loadpe\loadpe.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\src\loadpe\loadpe.h
-# End Source File
-# End Group
-# Begin Group "kobarin"
-
-# PROP Default_Filter ""
-# Begin Source File
-
-SOURCE=.\src\kobarin\kmp_pi.h
-# End Source File
-# End Group
-# Begin Group "xsfc"
-
-# PROP Default_Filter ""
-# Begin Source File
-
-SOURCE=.\src\xsfc\kpixsf.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\src\xsfc\leakchk.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\src\xsfc\tagget.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\src\xsfc\xsfdrv.h
-# End Source File
-# End Group
-# Begin Source File
-
-SOURCE=.\src\pversion.h
-# End Source File
-# End Target
-# End Project
diff --git a/tools/vio2sf/kpixsf.vcproj b/tools/vio2sf/kpixsf.vcproj
deleted file mode 100644
index ee22dc130..000000000
--- a/tools/vio2sf/kpixsf.vcproj
+++ /dev/null
@@ -1,286 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/tools/vio2sf/readme.txt b/tools/vio2sf/readme.txt
deleted file mode 100644
index 693c61b7b..000000000
--- a/tools/vio2sf/readme.txt
+++ /dev/null
@@ -1,4 +0,0 @@
-First build every project in vio2sf.dsw. This will include the vio2sf project which will copy vio2sf.bin into all the plugin dirs.
-Then build foo_input_vio2sf from vio2sf.sln. This plugin my be built in a newer msvc.
-It has a dependency on vio2sf, which will then overwrite all vio2sf.bin in all directories with a vc9 version.
-This is safe since it doesn't import any CRT DLL, and it probably runs a little faster.
diff --git a/tools/vio2sf/src/Winamp/DSP.H b/tools/vio2sf/src/Winamp/DSP.H
deleted file mode 100644
index 54d90a337..000000000
--- a/tools/vio2sf/src/Winamp/DSP.H
+++ /dev/null
@@ -1,65 +0,0 @@
-#ifndef NULLSOFT_WINAMP_DSP_H
-#define NULLSOFT_WINAMP_DSP_H
-// DSP plugin interface
-
-// notes:
-// any window that remains in foreground should optimally pass unused
-// keystrokes to the parent (winamp's) window, so that the user
-// can still control it. As for storing configuration,
-// Configuration data should be stored in \plugin.ini
-// (look at the vis plugin for configuration code)
-
-typedef struct winampDSPModule {
- char *description; // description
- HWND hwndParent; // parent window (filled in by calling app)
- HINSTANCE hDllInstance; // instance handle to this DLL (filled in by calling app)
-
- void (*Config)(struct winampDSPModule *this_mod); // configuration dialog (if needed)
- int (*Init)(struct winampDSPModule *this_mod); // 0 on success, creates window, etc (if needed)
-
- // modify waveform samples: returns number of samples to actually write
- // (typically numsamples, but no more than twice numsamples, and no less than half numsamples)
- // numsamples should always be at least 128. should, but I'm not sure
- int (*ModifySamples)(struct winampDSPModule *this_mod, short int *samples, int numsamples, int bps, int nch, int srate);
-
- void (*Quit)(struct winampDSPModule *this_mod); // called when unloading
-
- void *userData; // user data, optional
-} winampDSPModule;
-
-typedef struct {
- int version; // DSP_HDRVER
- char *description; // description of library
- winampDSPModule* (*getModule)(int); // module retrieval function
- int (*sf)(int key); // DSP_HDRVER == 0x21
-} winampDSPHeader;
-
-// exported symbols
-#ifdef USE_DSP_HDR_HWND
-typedef winampDSPHeader* (*winampDSPGetHeaderType)(HWND);
-#define DSP_HDRVER 0x22
-
-#else
-
-typedef winampDSPHeader* (*winampDSPGetHeaderType)(HWND);
-// header version: 0x20 == 0.20 == winamp 2.0
-#define DSP_HDRVER 0x20
-#endif
-
-// return values from the winampUninstallPlugin(HINSTANCE hdll, HWND parent, int param)
-// which determine if we can uninstall the plugin immediately or on winamp restart
-#define DSP_PLUGIN_UNINSTALL_NOW 0x0
-#define DSP_PLUGIN_UNINSTALL_REBOOT 0x1
-//
-// uninstall support was added from 5.0+ and uninstall now support from 5.5+
-// it is down to you to ensure that if uninstall now is returned that it will not cause a crash
-// (ie don't use if you've been subclassing the main window)
-
-// Version note:
-//
-// Added passing of Winamp's main hwnd in the call to the exported winampDSPHeader()
-// which allows for primarily the use of localisation features with the bundled plugins.
-// If you want to use the new version then either you can edit you version of dsp.h or
-// you can add USE_DSP_HDR_HWND to your project's defined list or before use of dsp.h
-//
-#endif
\ No newline at end of file
diff --git a/tools/vio2sf/src/Winamp/GEN.H b/tools/vio2sf/src/Winamp/GEN.H
deleted file mode 100644
index a63da3461..000000000
--- a/tools/vio2sf/src/Winamp/GEN.H
+++ /dev/null
@@ -1,37 +0,0 @@
-#ifndef NULLSOFT_WINAMP_GEN_H
-#define NULLSOFT_WINAMP_GEN_H
-
-#include
-
-#define GEN_INIT_SUCCESS 0
-
-// return values from the winampUninstallPlugin(HINSTANCE hdll, HWND parent, int param)
-// which determine if we can uninstall the plugin immediately or on winamp restart
-//
-// uninstall support was added from 5.0+ and uninstall now support from 5.5+
-// it is down to you to ensure that if uninstall now is returned that it will not cause a crash
-// (ie don't use if you've been subclassing the main window)
-#define GEN_PLUGIN_UNINSTALL_NOW 0x1
-#define GEN_PLUGIN_UNINSTALL_REBOOT 0x0
-
-typedef struct {
- int version;
- char *description;
- int (*init)();
- void (*config)();
- void (*quit)();
- HWND hwndParent;
- HINSTANCE hDllInstance;
-} winampGeneralPurposePlugin;
-
-#define GPPHDR_VER 0x10
-#ifdef __cplusplus
-extern "C" {
-#endif
-//extern winampGeneralPurposePlugin *gen_plugins[256];
-typedef winampGeneralPurposePlugin * (*winampGeneralPurposePluginGetter)();
-#ifdef __cplusplus
-}
-#endif
-
-#endif
\ No newline at end of file
diff --git a/tools/vio2sf/src/Winamp/IN2.H b/tools/vio2sf/src/Winamp/IN2.H
deleted file mode 100644
index 41617668e..000000000
--- a/tools/vio2sf/src/Winamp/IN2.H
+++ /dev/null
@@ -1,138 +0,0 @@
-
-#ifndef NULLSOFT_WINAMP_IN2H
-#define NULLSOFT_WINAMP_IN2H
-#include "out.h"
-
-// note: exported symbol is now winampGetInModule2.
-
-#define IN_UNICODE 0x0F000000
-
-#ifdef UNICODE_INPUT_PLUGIN
-#define in_char wchar_t
-#define IN_VER (IN_UNICODE | 0x100)
-#else
-#define in_char char
-#define IN_VER 0x100
-#endif
-
-#define IN_MODULE_FLAG_USES_OUTPUT_PLUGIN 1
-// By default, Winamp assumes that your input plugin wants to use Winamp's EQ, and doesn't do replay gain
-// if you handle any of these yourself (EQ, Replay Gain adjustments), then set these flags accordingly
-#define IN_MODULE_FLAG_EQ 2 // set this if you do your own EQ
-#define IN_MODULE_FLAG_REPLAYGAIN 8 // set this if you adjusted volume for replay gain
- // for tracks with no replay gain metadata, you should clear this flag
- // UNLESS you handle "non_replaygain" gain adjustment yourself
-#define IN_MODULE_FLAG_REPLAYGAIN_PREAMP 16 // use this if you queried for the replay gain preamp parameter and used it
- // this parameter is new to 5.54
-typedef struct
-{
- int version; // module type (IN_VER)
- char *description; // description of module, with version string
-
- HWND hMainWindow; // winamp's main window (filled in by winamp)
- HINSTANCE hDllInstance; // DLL instance handle (Also filled in by winamp)
-
- char *FileExtensions; // "mp3\0Layer 3 MPEG\0mp2\0Layer 2 MPEG\0mpg\0Layer 1 MPEG\0"
- // May be altered from Config, so the user can select what they want
-
- int is_seekable; // is this stream seekable?
- int UsesOutputPlug; // does this plug-in use the output plug-ins? (musn't ever change, ever :)
- // note that this has turned into a "flags" field
- // see IN_MODULE_FLAG_*
-
- void (*Config)(HWND hwndParent); // configuration dialog
- void (*About)(HWND hwndParent); // about dialog
-
- void (*Init)(); // called at program init
- void (*Quit)(); // called at program quit
-
-#define GETFILEINFO_TITLE_LENGTH 2048
- void (*GetFileInfo)(const in_char *file, in_char *title, int *length_in_ms); // if file == NULL, current playing is used
-
-#define INFOBOX_EDITED 0
-#define INFOBOX_UNCHANGED 1
- int (*InfoBox)(const in_char *file, HWND hwndParent);
-
- int (*IsOurFile)(const in_char *fn); // called before extension checks, to allow detection of mms://, etc
- // playback stuff
- int (*Play)(const in_char *fn); // return zero on success, -1 on file-not-found, some other value on other (stopping winamp) error
- void (*Pause)(); // pause stream
- void (*UnPause)(); // unpause stream
- int (*IsPaused)(); // ispaused? return 1 if paused, 0 if not
- void (*Stop)(); // stop (unload) stream
-
- // time stuff
- int (*GetLength)(); // get length in ms
- int (*GetOutputTime)(); // returns current output time in ms. (usually returns outMod->GetOutputTime()
- 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()..
-
- // volume stuff
- void (*SetVolume)(int volume); // from 0 to 255.. usually just call outMod->SetVolume
- void (*SetPan)(int pan); // from -127 to 127.. usually just call outMod->SetPan
-
- // in-window builtin vis stuff
-
- void (*SAVSAInit)(int maxlatency_in_ms, int srate); // call once in Play(). maxlatency_in_ms should be the value returned from outMod->Open()
- // call after opening audio device with max latency in ms and samplerate
- void (*SAVSADeInit)(); // call in Stop()
-
-
- // simple vis supplying mode
- void (*SAAddPCMData)(void *PCMData, int nch, int bps, int timestamp);
- // sets the spec data directly from PCM data
- // quick and easy way to get vis working :)
- // needs at least 576 samples :)
-
- // advanced vis supplying mode, only use if you're cool. Use SAAddPCMData for most stuff.
- int (*SAGetMode)(); // gets csa (the current type (4=ws,2=osc,1=spec))
- // use when calling SAAdd()
- int (*SAAdd)(void *data, int timestamp, int csa); // sets the spec data, filled in by winamp
-
-
- // vis stuff (plug-in)
- // simple vis supplying mode
- void (*VSAAddPCMData)(void *PCMData, int nch, int bps, int timestamp); // sets the vis data directly from PCM data
- // quick and easy way to get vis working :)
- // needs at least 576 samples :)
-
- // advanced vis supplying mode, only use if you're cool. Use VSAAddPCMData for most stuff.
- int (*VSAGetMode)(int *specNch, int *waveNch); // use to figure out what to give to VSAAdd
- int (*VSAAdd)(void *data, int timestamp); // filled in by winamp, called by plug-in
-
-
- // call this in Play() to tell the vis plug-ins the current output params.
- void (*VSASetInfo)(int srate, int nch); // <-- Correct (benski, dec 2005).. old declaration had the params backwards
-
-
- // dsp plug-in processing:
- // (filled in by winamp, calld by input plug)
-
- // returns 1 if active (which means that the number of samples returned by dsp_dosamples
- // could be greater than went in.. Use it to estimate if you'll have enough room in the
- // output buffer
- int (*dsp_isactive)();
-
- // returns number of samples to output. This can be as much as twice numsamples.
- // be sure to allocate enough buffer for samples, then.
- int (*dsp_dosamples)(short int *samples, int numsamples, int bps, int nch, int srate);
-
-
- // eq stuff
- 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.
-
- // info setting (filled in by winamp)
- void (*SetInfo)(int bitrate, int srate, int stereo, int synched); // if -1, changes ignored? :)
-
- Out_Module *outMod; // filled in by winamp, optionally used :)
-} In_Module;
-
-// return values from the winampUninstallPlugin(HINSTANCE hdll, HWND parent, int param)
-// which determine if we can uninstall the plugin immediately or on winamp restart
-//
-// uninstall support was added from 5.0+ and uninstall now support from 5.5+
-// it is down to you to ensure that if uninstall now is returned that it will not cause a crash
-// (ie don't use if you've been subclassing the main window)
-#define IN_PLUGIN_UNINSTALL_NOW 0x1
-#define IN_PLUGIN_UNINSTALL_REBOOT 0x0
-
-#endif
\ No newline at end of file
diff --git a/tools/vio2sf/src/Winamp/OUT.H b/tools/vio2sf/src/Winamp/OUT.H
deleted file mode 100644
index af76e8273..000000000
--- a/tools/vio2sf/src/Winamp/OUT.H
+++ /dev/null
@@ -1,73 +0,0 @@
-#ifndef NULLSOFT_OUTH
-#define NULLSOFT_OUTH
-#include
-#include
-// ids:
-// waveout: 32
-// gapless: 64
-// xfade: 63
-// disk: 33
-// dsound: 38
-// NULL: 65
-// mm2: 69
-
-#if (_MSC_VER <= 1200)
-typedef int intptr_t;
-#endif
-
-#define OUT_VER 0x10
-
-typedef struct
-{
- int version; // module version (OUT_VER)
- char *description; // description of module, with version string
- intptr_t id; // module id. each input module gets its own. non-nullsoft modules should
- // be >= 65536.
-
- HWND hMainWindow; // winamp's main window (filled in by winamp)
- HINSTANCE hDllInstance; // DLL instance handle (filled in by winamp)
-
- void (*Config)(HWND hwndParent); // configuration dialog
- void (*About)(HWND hwndParent); // about dialog
-
- void (*Init)(); // called when loaded
- void (*Quit)(); // called when unloaded
-
- int (*Open)(int samplerate, int numchannels, int bitspersamp, int bufferlenms, int prebufferms);
- // returns >=0 on success, <0 on failure
-
- // NOTENOTENOTE: bufferlenms and prebufferms are ignored in most if not all output plug-ins.
- // ... so don't expect the max latency returned to be what you asked for.
- // returns max latency in ms (0 for diskwriters, etc)
- // bufferlenms and prebufferms must be in ms. 0 to use defaults.
- // prebufferms must be <= bufferlenms
- // pass bufferlenms==-666 to tell the output plugin that it's clock is going to be used to sync video
- // out_ds turns off silence-eating when -666 is passed
-
- void (*Close)(); // close the ol' output device.
-
- int (*Write)(char *buf, int len);
- // 0 on success. Len == bytes to write (<= 8192 always). buf is straight audio data.
- // 1 returns not able to write (yet). Non-blocking, always.
-
- int (*CanWrite)(); // returns number of bytes possible to write at a given time.
- // Never will decrease unless you call Write (or Close, heh)
-
- int (*IsPlaying)(); // non0 if output is still going or if data in buffers waiting to be
- // written (i.e. closing while IsPlaying() returns 1 would truncate the song
-
- int (*Pause)(int pause); // returns previous pause state
-
- void (*SetVolume)(int volume); // volume is 0-255
- void (*SetPan)(int pan); // pan is -128 to 128
-
- void (*Flush)(int t); // flushes buffers and restarts output at time t (in ms)
- // (used for seeking)
-
- int (*GetOutputTime)(); // returns played time in MS
- int (*GetWrittenTime)(); // returns time written in MS (used for synching up vis stuff)
-
-} Out_Module;
-
-
-#endif
\ No newline at end of file
diff --git a/tools/vio2sf/src/Winamp/ipc_pe.h b/tools/vio2sf/src/Winamp/ipc_pe.h
deleted file mode 100644
index 708d8a66d..000000000
--- a/tools/vio2sf/src/Winamp/ipc_pe.h
+++ /dev/null
@@ -1,56 +0,0 @@
-#ifndef __IPC_PE_H
-#define __IPC_PE_H
-
-#define IPC_PE_GETCURINDEX 100 // returns current idx
-#define IPC_PE_GETINDEXTOTAL 101 // returns number of items
-#define IPC_PE_GETINDEXINFO 102 // (copydata) lpData is of type callbackinfo, callback is called with copydata/fileinfo structure and msg IPC_PE_GETINDEXINFORESULT
-#define IPC_PE_GETINDEXINFORESULT 103 // callback message for IPC_PE_GETINDEXINFO
-#define IPC_PE_DELETEINDEX 104 // lParam = index
-#define IPC_PE_SWAPINDEX 105 // (lParam & 0xFFFF0000) >> 16 = from, (lParam & 0xFFFF) = to
-#define IPC_PE_INSERTFILENAME 106 // (copydata) lpData is of type fileinfo
-#define IPC_PE_GETDIRTY 107 // returns 1 if the playlist changed since the last IPC_PE_SETCLEAN
-#define IPC_PE_SETCLEAN 108 // resets the dirty flag until next modification
-#define IPC_PE_GETIDXFROMPOINT 109 // pass a point parm, return a playlist index
-#define IPC_PE_SAVEEND 110 // pass index to save from
-#define IPC_PE_RESTOREEND 111 // no parm
-#define IPC_PE_GETNEXTSELECTED 112 // same as IPC_PLAYLIST_GET_NEXT_SELECTED for the main window
-#define IPC_PE_GETSELECTEDCOUNT 113
-#define IPC_PE_INSERTFILENAMEW 114 // (copydata) lpData is of type fileinfoW
-#define IPC_PE_GETINDEXINFO_TITLE 115 // like IPC_PE_GETINDEXINFO, but writes the title to char file[MAX_PATH] instead of filename
-#define IPC_PE_GETINDEXINFORESULT_TITLE 116 // callback message for IPC_PE_GETINDEXINFO
-typedef struct {
- char file[MAX_PATH];
- int index;
- } fileinfo;
-
-typedef struct {
- wchar_t file[MAX_PATH];
- int index;
- } fileinfoW;
-
-typedef struct {
- HWND callback;
- int index;
- } callbackinfo;
-
-// the following messages are in_process ONLY
-
-#define IPC_PE_GETINDEXTITLE 200 // lParam = pointer to fileinfo2 struct
-#define IPC_PE_GETINDEXTITLEW 201 // lParam = pointer to fileinfo2W struct
-#define IPC_PE_GETINDEXINFO_INPROC 202 // lParam = pointer to fileinfo struct
-#define IPC_PE_GETINDEXINFOW_INPROC 203 // lParam = pointer to fileinfoW struct
-
-typedef struct {
- int fileindex;
- char filetitle[256];
- char filelength[16];
- } fileinfo2;
-
-typedef struct
-{
- int fileindex;
- wchar_t filetitle[256];
- wchar_t filelength[16];
- } fileinfo2W;
-
-#endif
\ No newline at end of file
diff --git a/tools/vio2sf/src/Winamp/wa_dlg.h b/tools/vio2sf/src/Winamp/wa_dlg.h
deleted file mode 100644
index df912b257..000000000
--- a/tools/vio2sf/src/Winamp/wa_dlg.h
+++ /dev/null
@@ -1,436 +0,0 @@
-/*
-** Copyright (C) 2003-2008 Nullsoft, Inc.
-**
-** This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held
-** liable for any damages arising from the use of this software.
-**
-** Permission is granted to anyone to use this software for any purpose, including commercial applications, and to
-** alter it and redistribute it freely, subject to the following restrictions:
-**
-** 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software.
-** If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
-**
-** 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
-**
-** 3. This notice may not be removed or altered from any source distribution.
-**
-*/
-
-#ifndef _WA_DLG_H_
-#define _WA_DLG_H_
-
-#include "wa_ipc.h"
-#ifdef __cplusplus
-extern "C" {
-#endif
-/*
- 1) gen.bmp has a generic window frame for plugins to use.
- its format is similar to the minibrowser's.
- In addition gen.bmp includes a font for the titlebar, in both
- highlight and no-highlight modes. The font is variable width,
- and it uses the first color before the letter A as the delimiter.
- The no-highlight form of letter must be the same width as the
- highlight form.
- 2) genex.bmp has button and scrollbar images, as well as some individual
- pixels that describe the colors for the dialog. The button and
- scrollbar images should be self explanatory (note that the buttons
- have 4 pixel sized edges that are not stretched, and the center is
- stretched), and the scrollbars do something similar.
- The colors start at (48,0) and run every other pixel. The meaning
- of each pixel is:
- x=48: item background (background to edits, listviews etc)
- x=50: item foreground (text color of edit/listview, etc)
- x=52: window background (used to set the bg color for the dialog)
- x=54: button text color
- x=56: window text color
- x=58: color of dividers and sunken borders
- x=60: selection color for playlists
- x=62: listview header background color
- x=64: listview header text color
- x=66: listview header frame top color
- x=68: listview header frame middle color
- x=70: listview header frame bottom color
- x=72: listview header empty color
- x=74: scrollbar foreground color
- x=76: scrollbar background color
- x=78: inverse scrollbar foreground color
- x=80: inverse scrollbar background color
- x=82: scrollbar dead area color
- x=84: listview/treeview selection bar text color (active)
- x=86: listview/treeview selection bar back color (active)
- x=88: listview/treeview selection bar text color (inactive)
- x=90: listview/treeview selection bar back color (inactive)
- x=92: alternate item background
- x=94: alternate item foreground
-*/
-
-#define DCW_SUNKENBORDER 0x00010000
-#define DCW_DIVIDER 0x00020000
-
-enum
-{
- WADLG_ITEMBG,
- WADLG_ITEMFG,
- WADLG_WNDBG,
- WADLG_BUTTONFG,
- WADLG_WNDFG,
- WADLG_HILITE,
- WADLG_SELCOLOR,
- WADLG_LISTHEADER_BGCOLOR,
- WADLG_LISTHEADER_FONTCOLOR,
- WADLG_LISTHEADER_FRAME_TOPCOLOR,
- WADLG_LISTHEADER_FRAME_MIDDLECOLOR,
- WADLG_LISTHEADER_FRAME_BOTTOMCOLOR,
- WADLG_LISTHEADER_EMPTY_BGCOLOR,
- WADLG_SCROLLBAR_FGCOLOR,
- WADLG_SCROLLBAR_BGCOLOR,
- WADLG_SCROLLBAR_INV_FGCOLOR,
- WADLG_SCROLLBAR_INV_BGCOLOR,
- WADLG_SCROLLBAR_DEADAREA_COLOR,
- WADLG_SELBAR_FGCOLOR,
- WADLG_SELBAR_BGCOLOR,
- WADLG_INACT_SELBAR_FGCOLOR,
- WADLG_INACT_SELBAR_BGCOLOR,
- WADLG_ITEMBG2,
- WADLG_ITEMFG2,
- WADLG_NUM_COLORS
-};
-
-typedef enum _WACURSOR // used in IPC_GETSKINCURSORS
-{
- WACURSOR_VOLUME = 0, // volume & balane
- WACURSOR_POSITION = 1, // position
- WACURSOR_BTN_WINSHADE = 2, // winshade
- WACURSOR_BTN_MINIMIZE = 3, // minimize
- WACURSOR_BTN_CLOSE = 4, // close
- WACURSOR_MENU = 5, // main menu
- WACURSOR_TITLEBAR = 6, // title bar
- WACURSOR_SONGNAME = 7,
- WACURSOR_NORMAL = 8,
- WACURSOR_WINSHADE_BTN_WINSHADE = 9,
- WACURSOR_WINSHADE_BTN_MINIMIZE = 10,
- WACURSOR_WINSHADE_POSITION = 11,
- WACURSOR_WINSHADE_BTN_CLOSE = 12,
- WACURSOR_WINSHADE_MENU = 13,
- WACURSOR_WINSHADE_NORMAL = 14,
- WACURSOR_PL_BTN_WINSHADE = 15,
- WACURSOR_PL_BTN_CLOSE = 16,
- WACURSOR_PL_TITLEBAR = 17,
- WACURSOR_PL_VSCROLL = 18,
- WACURSOR_PL_RESIZE = 19,
- WACURSOR_PL_NORMAL = 20,
- WACURSOR_PL_WINSHADE_BTN_WINSHADE = 21,
- WACURSOR_PL_WINSHADE_BTN_CLOSE = 22,
- WACURSOR_PL_WINSHADE_HSIZE = 23,
- WACURSOR_PL_WINSHADE_NORMAL = 24,
- WACURSOR_EQ_SLIDER = 25,
- WACURSOR_EQ_BTN_CLOSE = 26,
- WACURSOR_EQ_TITLEBAR = 27,
- WACURSOR_EQ_NORMAL = 28,
-} WACURSOR;
-
-void WADlg_init(HWND hwndWinamp); // call this on init, or on WM_DISPLAYCHANGE
-void WADlg_close();
-int WADlg_getColor(int idx);
-int WADlg_initted();
-
-LRESULT WADlg_handleDialogMsgs(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam); //
-void WADlg_DrawChildWindowBorders(HWND hwndDlg, int *tab, int tabsize); // each entry in tab would be the id | DCW_*
-
-HBITMAP WADlg_getBitmap();
-
-/// define WA_DLG_IMPLEMENT in one of your source files before including this .h
-// if you are making a media library plugin, you dont need to do this, look at view_ex for
-// an example of how to get the function *'s via an IPC message.
-#ifdef __cplusplus
-}
-#endif
-
-#ifdef WA_DLG_IMPLEMENT
-
-static HBRUSH wadlg_lastbrush=0;
-static HBITMAP wadlg_bitmap=0; // load this manually
-static int wadlg_colors[WADLG_NUM_COLORS];
-static int wadlg_defcolors[WADLG_NUM_COLORS]=
-{
- RGB(0,0,0),
- RGB(0,255,0),
- RGB(36,36,60),
- RGB(57,56,66),
- RGB(255,255,255),
- RGB(132,148,165),
- RGB(0,0,198),
- RGB(36*2,36*2,60*2),
- RGB(255,255,255),
- RGB(36*3,36*3,60*3),
- RGB(36,36,60),
- RGB(36*0.5,36*0.5,60*0.5),
- RGB(36,36,60),
- RGB(36*1,36*1,60*1),
- RGB(36*1,36*1,60*1),
- RGB(121,130,150),
- RGB(78,88,110),
- RGB(36*1,36*1,60*1),
- RGB(255,255,255),
- RGB(0,0,180),
- RGB(0,255,0),
- RGB(0,0,128),
- RGB(0,0,0),
- RGB(0,255,0),
-};
-
-int WADlg_initted()
-{
- return !!wadlg_bitmap;
-}
-
-int WADlg_getColor(int idx)
-{
- if (idx < 0 || idx >= WADLG_NUM_COLORS) return 0;
- return wadlg_colors[idx];
-}
-
-HBITMAP WADlg_getBitmap()
-{
- return wadlg_bitmap;
-}
-
-void WADlg_init(HWND hwndWinamp) // call this on init, or on WM_DISPLAYCHANGE
-{
- if (wadlg_bitmap) DeleteObject(wadlg_bitmap);
- wadlg_bitmap = (HBITMAP) SendMessage(hwndWinamp,WM_WA_IPC,0,IPC_GET_GENSKINBITMAP);
- if (wadlg_bitmap)
- {
- HDC tmpDC=CreateCompatibleDC(NULL);
- HGDIOBJ o=SelectObject(tmpDC,(HGDIOBJ)wadlg_bitmap);
- int defbgcol=GetPixel(tmpDC,111,0);
- for (int x = 0; x < WADLG_NUM_COLORS; x ++)
- {
- int a=GetPixel(tmpDC,48+x*2,0);
- if (a == CLR_INVALID || a == RGB(0,198,255) || a == defbgcol)
- {
- //defaults for old skins
- if (x == WADLG_SELBAR_FGCOLOR || x == WADLG_INACT_SELBAR_FGCOLOR) a=wadlg_colors[WADLG_WNDFG];
- else if (x == WADLG_SELBAR_BGCOLOR || x == WADLG_INACT_SELBAR_BGCOLOR)
- {
- a=wadlg_colors[WADLG_SELCOLOR];
- if (x == WADLG_INACT_SELBAR_BGCOLOR)
- a=((a/2)&0x7F7F7F)+(((wadlg_colors[WADLG_WNDBG])/2)&0x7F7F7F);
- }
- else if (x == WADLG_ITEMBG2)
- {
- a=wadlg_colors[WADLG_ITEMBG];
- }
- else if (x == WADLG_ITEMFG2)
- {
- a=wadlg_colors[WADLG_ITEMFG];
- }
- else a=wadlg_defcolors[x];
- }
- wadlg_colors[x]=a;
- }
-
- SelectObject(tmpDC,o);
- DeleteDC(tmpDC);
- }
-}
-
-void WADlg_close()
-{
- if (wadlg_bitmap) DeleteObject(wadlg_bitmap);
- wadlg_bitmap=0;
- if (wadlg_lastbrush) DeleteObject(wadlg_lastbrush);
- wadlg_lastbrush=0;
-}
-
-void WADlg_dotLine(HDC hdc, int left, int top, int len, int vert)
-{
- for(int i=(top&1);iCtlType == ODT_BUTTON) {
- wchar_t wt[256];
- RECT r;
- GetDlgItemTextW(hwndDlg,(INT)wParam,wt,sizeof(wt)/sizeof(*wt));
-
- HDC hdc = CreateCompatibleDC(di->hDC);
- HBITMAP hbmpOld = (HBITMAP)SelectObject(hdc, wadlg_bitmap);
-
- r=di->rcItem;
- SetStretchBltMode(di->hDC,COLORONCOLOR);
-
- int yoffs = (di->itemState & ODS_SELECTED) ? 15 : 0;
-
- BitBlt(di->hDC,r.left,r.top,4,4,hdc,0,yoffs,SRCCOPY); // top left
- StretchBlt(di->hDC,r.left+4,r.top,r.right-r.left-4-4,4,hdc,4,yoffs,47-4-4,4,SRCCOPY); // top center
- BitBlt(di->hDC,r.right-4,r.top,4,4,hdc,47-4,yoffs,SRCCOPY); // top right
-
- StretchBlt(di->hDC,r.left,r.top+4,4,r.bottom-r.top-4-4,hdc,0,4+yoffs,4,15-4-4,SRCCOPY); // left edge
- StretchBlt(di->hDC,r.right-4,r.top+4,4,r.bottom-r.top-4-4,hdc,47-4,4+yoffs,4,15-4-4,SRCCOPY); // right edge
-
- // center
- StretchBlt(di->hDC,r.left+4,r.top+4,r.right-r.left-4-4,r.bottom-r.top-4-4,hdc,4,4+yoffs,47-4-4,15-4-4,SRCCOPY);
-
- BitBlt(di->hDC,r.left,r.bottom-4,4,4,hdc,0,15-4+yoffs,SRCCOPY); // bottom left
- StretchBlt(di->hDC,r.left+4,r.bottom-4,r.right-r.left-4-4,4,hdc,4,15-4+yoffs,47-4-4,4,SRCCOPY); // bottom center
- BitBlt(di->hDC,r.right-4,r.bottom-4,4,4,hdc,47-4,15-4+yoffs,SRCCOPY); // bottom right
-
- // draw text
- SetBkMode(di->hDC,TRANSPARENT);
-
- // this will do a different style for the button text depending on enabled state of the button
- COLORREF colour = wadlg_colors[WADLG_BUTTONFG];
- if(!IsWindowEnabled(di->hwndItem)){
- COLORREF fg = wadlg_colors[WADLG_WNDFG],
- bg = wadlg_colors[WADLG_WNDBG];
- colour = RGB((GetRValue(fg)+GetRValue(bg))/2,
- (GetGValue(fg)+GetGValue(bg))/2,
- (GetBValue(fg)+GetBValue(bg))/2);
- }
- SetTextColor(di->hDC,colour);
-
- if (di->itemState & ODS_SELECTED) {r.left+=2; r.top+=2;}
- DrawTextW(di->hDC,wt,-1,&r,DT_VCENTER|DT_SINGLELINE|DT_CENTER);
-
- SelectObject(hdc, hbmpOld);
- DeleteDC(hdc);
-
- if(GetFocus()==di->hwndItem) {
- HPEN hpen, hpenOld;
- hpen =CreatePen(PS_SOLID,0,RGB(0,0,0));
- hpenOld = (HPEN)SelectObject(di->hDC, hpen);
- WADlg_dotLine(di->hDC,r.left+2,r.top+2,r.right-r.left-3,0);
- WADlg_dotLine(di->hDC,r.right-3,r.top+2,r.bottom-r.top-3,1);
- WADlg_dotLine(di->hDC,r.left+2,r.top+2,r.bottom-r.top-3,1);
- WADlg_dotLine(di->hDC,r.left+2,r.bottom-3,r.right-r.left-3,0);
- SelectObject(di->hDC, hpenOld);
- DeleteObject(hpen);
- }
- }
- }
-
- switch(uMsg)
- {
- case WM_CTLCOLORLISTBOX:
- case WM_CTLCOLORDLG:
- case WM_CTLCOLORBTN:
- case WM_CTLCOLORSTATIC:
- case WM_CTLCOLOREDIT:
- {
- int bgcolor=(uMsg == WM_CTLCOLOREDIT || uMsg == WM_CTLCOLORLISTBOX) ? wadlg_colors[WADLG_ITEMBG] : (uMsg == WM_CTLCOLORBTN ? wadlg_colors[WADLG_ITEMBG] : wadlg_colors[WADLG_WNDBG]);
- LOGBRUSH lb={BS_SOLID,GetNearestColor((HDC)wParam,bgcolor)};
- if (wadlg_lastbrush) DeleteObject(wadlg_lastbrush);
- wadlg_lastbrush=CreateBrushIndirect(&lb);
- SetTextColor((HDC)wParam,uMsg == WM_CTLCOLORSTATIC ? wadlg_colors[WADLG_WNDFG] : wadlg_colors[WADLG_ITEMFG]);
- SetBkColor((HDC)wParam,lb.lbColor);
- return (LRESULT)wadlg_lastbrush;
- }
- }
- return 0;
-}
-
-static int RectInRect(RECT *rect1, RECT *rect2)
-{
- // this has a bias towards true
-
- // this could probably be optimized a lot
- return ((rect1->top >= rect2->top && rect1->top <= rect2->bottom) ||
- (rect1->bottom >= rect2->top && rect1->bottom <= rect2->bottom) ||
- (rect2->top >= rect1->top && rect2->top <= rect1->bottom) ||
- (rect2->bottom >= rect1->top && rect2->bottom <= rect1->bottom)) // vertical intersect
- &&
- ((rect1->left >= rect2->left && rect1->left <= rect2->right) ||
- (rect1->right >= rect2->left && rect1->right <= rect2->right) ||
- (rect2->left >= rect1->left && rect2->left <= rect1->right) ||
- (rect2->right >= rect1->left && rect2->right <= rect1->right)) // horiz intersect
- ;
-}
-
-static void WADlg_removeFromRgn(HRGN hrgn, int left, int top, int right, int bottom)
-{
- HRGN rgn2=CreateRectRgn(left,top,right,bottom);
- CombineRgn(hrgn,hrgn,rgn2,RGN_DIFF);
- DeleteObject(rgn2);
-}
-
-void WADlg_DrawChildWindowBorders(HWND hwndDlg, int *tab, int tabsize)
-{
- PAINTSTRUCT ps;
- BeginPaint(hwndDlg,&ps);
- HRGN hrgn = (ps.fErase) ? CreateRectRgnIndirect(&ps.rcPaint) : NULL;
- HPEN pen = CreatePen(PS_SOLID, 0, wadlg_colors[WADLG_HILITE]);
- HGDIOBJ o = SelectObject(ps.hdc, pen);
-
- while (tabsize--)
- {
- RECT r;
- int a = *tab++;
- GetWindowRect(GetDlgItem(hwndDlg, a & 0xffff),&r);
- MapWindowPoints(HWND_DESKTOP, hwndDlg, (LPPOINT)&r, 2);
-
- if (RectInRect(&ps.rcPaint,&r))
- {
- if ((a & 0xffff0000) == DCW_SUNKENBORDER)
- {
- MoveToEx(ps.hdc,r.left,r.bottom,NULL);
- LineTo(ps.hdc,r.right,r.bottom);
- LineTo(ps.hdc,r.right,r.top-1);
- if(hrgn)
- {
- WADlg_removeFromRgn(hrgn,r.left,r.bottom,r.right,r.bottom+1);
- WADlg_removeFromRgn(hrgn,r.right,r.top,r.right+1,r.bottom);
- }
- }
- else if ((a & 0xffff0000) == DCW_DIVIDER)
- {
- if (r.right - r.left < r.bottom - r.top) // vertical
- {
- int left=(r.left+r.right)/2;
- MoveToEx(ps.hdc,left,r.top,NULL);
- LineTo(ps.hdc,left,r.bottom+1);
- if(hrgn) WADlg_removeFromRgn(hrgn,left,r.top,left+1,r.bottom);
- }
- else // horiz
- {
- int top=(r.top+r.bottom)/2;
- MoveToEx(ps.hdc,r.left,top,NULL);
- LineTo(ps.hdc,r.right+1,top);
- if(hrgn) WADlg_removeFromRgn(hrgn,r.left,top,r.right,top+1);
- }
- }
- }
- }
-
- SelectObject(ps.hdc, o);
- DeleteObject(pen);
-
- if(hrgn)
- {
- //erase bkgnd while clipping out our own drawn stuff (for flickerless display)
- HBRUSH b = CreateSolidBrush(wadlg_colors[WADLG_WNDBG]);
- FillRgn(ps.hdc,hrgn,b);
- DeleteObject(b);
- DeleteObject(hrgn);
- }
- EndPaint(hwndDlg,&ps);
-}
-#endif
-
-#endif//_WA_DLG_H_
\ No newline at end of file
diff --git a/tools/vio2sf/src/Winamp/wa_ipc.h b/tools/vio2sf/src/Winamp/wa_ipc.h
deleted file mode 100644
index 7e1f75d22..000000000
--- a/tools/vio2sf/src/Winamp/wa_ipc.h
+++ /dev/null
@@ -1,2470 +0,0 @@
-/*
-** Copyright (C) 1997-2008 Nullsoft, Inc.
-**
-** This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held
-** liable for any damages arising from the use of this software.
-**
-** Permission is granted to anyone to use this software for any purpose, including commercial applications, and to
-** alter it and redistribute it freely, subject to the following restrictions:
-**
-** 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software.
-** If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
-**
-** 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
-**
-** 3. This notice may not be removed or altered from any source distribution.
-**
-*/
-
-#ifndef _WA_IPC_H_
-#define _WA_IPC_H_
-
-#include
-#include
-#if (_MSC_VER <= 1200)
-typedef int intptr_t;
-#endif
-/*
-** This is the modern replacement for the classic 'frontend.h'. Most of these
-** updates are designed for in-process use, i.e. from a plugin.
-**
-*/
-
-/* Most of the IPC_* messages involve sending the message in the form of:
-** result = SendMessage(hwnd_winamp,WM_WA_IPC,(parameter),IPC_*);
-** Where different then this is specified (typically with WM_COPYDATA variants)
-**
-** When you use SendMessage(hwnd_winamp,WM_WA_IPC,(parameter),IPC_*) and specify a IPC_*
-** which is not currently implemented/supported by the Winamp version being used then it
-** will return 1 for 'result'. This is a good way of helping to check if an api being
-** used which returns a function pointer, etc is even going to be valid.
-*/
-
-#define WM_WA_IPC WM_USER
-
-#define WINAMP_VERSION_MAJOR(winampVersion) ((winampVersion & 0x0000FF00) >> 12)
-#define WINAMP_VERSION_MINOR(winampVersion) (winampVersion & 0x000000FF) // returns, i.e. 0x12 for 5.12 and 0x10 for 5.1...
-
-
-#define IPC_GETVERSION 0
-/* int version = SendMessage(hwnd_winamp,WM_WA_IPC,0,IPC_GETVERSION);
-**
-** The version returned will be 0x20yx for Winamp 2.yx.
-** Versions previous to Winamp 2.0 typically (but not always) use 0x1zyx for 1.zx.
-** Just a bit weird but that's the way it goes.
-**
-** For Winamp 5.x it uses the format 0x50yx for Winamp 5.yx
-** e.g. 5.01 -> 0x5001
-** 5.09 -> 0x5009
-** 5.1 -> 0x5010
-**
-** Notes: For 5.02 this api will return the same value as for a 5.01 build.
-** For 5.07 this api will return the same value as for a 5.06 build.
-*/
-
-
-#define IPC_GETVERSIONSTRING 1
-
-
-#define IPC_GETREGISTEREDVERSION 770
-/* (requires Winamp 5.0+)
-** SendMessage(hwnd_winamp,WM_WA_IPC,0,IPC_GETREGISTEREDVERSION);
-**
-** This will open the Winamp Preferences and show the Winamp Pro page.
-*/
-
-
-typedef struct {
- const char *filename;
- const char *title;
- int length;
-} enqueueFileWithMetaStruct; // send this to a IPC_PLAYFILE in a non WM_COPYDATA,
-// and you get the nice desired result. if title is NULL, it is treated as a "thing",
-// otherwise it's assumed to be a file (for speed)
-
-typedef struct {
- const wchar_t *filename;
- const wchar_t *title;
- int length;
-} enqueueFileWithMetaStructW;
-
-#define IPC_PLAYFILE 100 // dont be fooled, this is really the same as enqueufile
-#define IPC_ENQUEUEFILE 100
-#define IPC_PLAYFILEW 1100
-#define IPC_ENQUEUEFILEW 1100
-/* This is sent as a WM_COPYDATA with IPC_PLAYFILE as the dwData member and the string
-** of the file / playlist to be enqueued into the playlist editor as the lpData member.
-** This will just enqueue the file or files since you can use this to enqueue a playlist.
-** It will not clear the current playlist or change the playback state.
-**
-** COPYDATASTRUCT cds = {0};
-** cds.dwData = IPC_ENQUEUEFILE;
-** cds.lpData = (void*)"c:\\test\\folder\\test.mp3";
-** cds.cbData = lstrlen((char*)cds.lpData)+1; // include space for null char
-** SendMessage(hwnd_winamp,WM_COPYDATA,0,(LPARAM)&cds);
-**
-**
-** With 2.9+ and all of the 5.x versions you can send this as a normal WM_WA_IPC
-** (non WM_COPYDATA) with an enqueueFileWithMetaStruct as the param.
-** If the title member is null then it is treated as a "thing" otherwise it will be
-** assumed to be a file (for speed).
-**
-** enqueueFileWithMetaStruct eFWMS = {0};
-** eFWMS.filename = "c:\\test\\folder\\test.mp3";
-** eFWMS.title = "Whipping Good";
-** eFWMS.length = 300; // this is the number of seconds for the track
-** SendMessage(hwnd_winamp,WM_WA_IPC,(WPARAM)&eFWMS,IPC_ENQUEUEFILE);
-*/
-
-
-#define IPC_DELETE 101
-#define IPC_DELETE_INT 1101
-/* SendMessage(hwnd_winamp,WM_WA_IPC,0,IPC_DELETE);
-** Use this api to clear Winamp's internal playlist.
-** You should not need to use IPC_DELETE_INT since it is used internally by Winamp when
-** it is dealing with some lame Windows Explorer issues (hard to believe that!).
-*/
-
-
-#define IPC_STARTPLAY 102
-#define IPC_STARTPLAY_INT 1102
-/* SendMessage(hwnd_winamp,WM_WA_IPC,0,IPC_STARTPLAY);
-** Sending this will start playback and is almost the same as hitting the play button.
-** The IPC_STARTPLAY_INT version is used internally and you should not need to use it
-** since it won't be any fun.
-*/
-
-
-#define IPC_CHDIR 103
-/* This is sent as a WM_COPYDATA type message with IPC_CHDIR as the dwData value and the
-** directory you want to change to as the lpData member.
-**
-** COPYDATASTRUCT cds = {0};
-** cds.dwData = IPC_CHDIR;
-** cds.lpData = (void*)"c:\\download";
-** cds.cbData = lstrlen((char*)cds.lpData)+1; // include space for null char
-** SendMessage(hwnd_winamp,WM_COPYDATA,0,(LPARAM)&cds);
-**
-** The above example will make Winamp change to the directory 'C:\download'.
-*/
-
-
-#define IPC_ISPLAYING 104
-/* int res = SendMessage(hwnd_winamp,WM_WA_IPC,0,IPC_ISPLAYING);
-** This is sent to retrieve the current playback state of Winamp.
-** If it returns 1, Winamp is playing.
-** If it returns 3, Winamp is paused.
-** If it returns 0, Winamp is not playing.
-*/
-
-
-#define IPC_GETOUTPUTTIME 105
-/* int res = SendMessage(hwnd_winamp,WM_WA_IPC,mode,IPC_GETOUTPUTTIME);
-** This api can return two different sets of information about current playback status.
-**
-** If mode = 0 then it will return the position (in ms) of the currently playing track.
-** Will return -1 if Winamp is not playing.
-**
-** If mode = 1 then it will return the current track length (in seconds).
-** Will return -1 if there are no tracks (or possibly if Winamp cannot get the length).
-**
-** If mode = 2 then it will return the current track length (in milliseconds).
-** Will return -1 if there are no tracks (or possibly if Winamp cannot get the length).
-*/
-
-
-#define IPC_JUMPTOTIME 106
-/* (requires Winamp 1.60+)
-** SendMessage(hwnd_winamp,WM_WA_IPC,ms,IPC_JUMPTOTIME);
-** This api sets the current position (in milliseconds) for the currently playing song.
-** The resulting playback position may only be an approximate time since some playback
-** formats do not provide exact seeking e.g. mp3
-** This returns -1 if Winamp is not playing, 1 on end of file, or 0 if it was successful.
-*/
-
-
-#define IPC_GETMODULENAME 109
-#define IPC_EX_ISRIGHTEXE 666
-/* usually shouldnt bother using these, but here goes:
-** send a WM_COPYDATA with IPC_GETMODULENAME, and an internal
-** flag gets set, which if you send a normal WM_WA_IPC message with
-** IPC_EX_ISRIGHTEXE, it returns whether or not that filename
-** matches. lame, I know.
-*/
-
-
-#define IPC_WRITEPLAYLIST 120
-/* (requires Winamp 1.666+)
-** int cur = SendMessage(hwnd_winamp,WM_WA_IPC,0,IPC_WRITEPLAYLIST);
-**
-** IPC_WRITEPLAYLIST will write the current playlist to '\\Winamp.m3u' and
-** will also return the current playlist position (see IPC_GETLISTPOS).
-**
-** This is kinda obsoleted by some of the newer 2.x api items but it still is good for
-** use with a front-end program (instead of a plug-in) and you want to see what is in the
-** current playlist.
-**
-** This api will only save out extended file information in the #EXTINF entry if Winamp
-** has already read the data such as if the file was played of scrolled into view. If
-** Winamp has not read the data then you will only find the file with its filepath entry
-** (as is the base requirements for a m3u playlist).
-*/
-
-
-#define IPC_SETPLAYLISTPOS 121
-/* (requires Winamp 2.0+)
-** SendMessage(hwnd_winamp,WM_WA_IPC,position,IPC_SETPLAYLISTPOS)
-** IPC_SETPLAYLISTPOS sets the playlist position to the specified 'position'.
-** It will not change playback status or anything else. It will just set the current
-** position in the playlist and will update the playlist view if necessary.
-**
-** If you use SendMessage(hwnd_winamp,WM_COMMAND,MAKEWPARAM(WINAMP_BUTTON2,0),0);
-** after using IPC_SETPLAYLISTPOS then Winamp will start playing the file at 'position'.
-*/
-
-
-#define IPC_SETVOLUME 122
-/* (requires Winamp 2.0+)
-** SendMessage(hwnd_winamp,WM_WA_IPC,volume,IPC_SETVOLUME);
-** IPC_SETVOLUME sets the volume of Winamp (between the range of 0 to 255).
-**
-** If you pass 'volume' as -666 then the message will return the current volume.
-** int curvol = SendMessage(hwnd_winamp,WM_WA_IPC,-666,IPC_SETVOLUME);
-*/
-
-
-#define IPC_GETVOLUME(hwnd_winamp) SendMessage(hwnd_winamp,WM_WA_IPC,-666,IPC_SETVOLUME)
-/* (requires Winamp 2.0+)
-** int curvol = IPC_GETVOLUME(hwnd_winamp);
-** This will return the current volume of Winamp or
-*/
-
-
-#define IPC_SETPANNING 123
-/* (requires Winamp 2.0+)
-** SendMessage(hwnd_winamp,WM_WA_IPC,panning,IPC_SETPANNING);
-** IPC_SETPANNING sets the panning of Winamp from 0 (left) to 255 (right).
-**
-** At least in 5.x+ this works from -127 (left) to 127 (right).
-**
-** If you pass 'panning' as -666 to this api then it will return the current panning.
-** int curpan = SendMessage(hwnd_winamp,WM_WA_IPC,-666,IPC_SETPANNING);
-*/
-
-
-#define IPC_GETLISTLENGTH 124
-/* (requires Winamp 2.0+)
-** int length = SendMessage(hwnd_winamp,WM_WA_IPC,0,IPC_GETLISTLENGTH);
-** IPC_GETLISTLENGTH returns the length of the current playlist as the number of tracks.
-*/
-
-
-#define IPC_GETLISTPOS 125
-/* (requires Winamp 2.05+)
-** int pos=SendMessage(hwnd_winamp,WM_WA_IPC,0,IPC_GETLISTPOS);
-** IPC_GETLISTPOS returns the current playlist position (which is shown in the playlist
-** editor as a differently coloured text entry e.g is yellow for the classic skin).
-**
-** This api is a lot like IPC_WRITEPLAYLIST but a lot faster since it does not have to
-** write out the whole of the current playlist first.
-*/
-
-
-#define IPC_GETINFO 126
-/* (requires Winamp 2.05+)
-** int inf=SendMessage(hwnd_winamp,WM_WA_IPC,mode,IPC_GETINFO);
-** IPC_GETINFO returns info about the current playing song. The value
-** it returns depends on the value of 'mode'.
-** Mode Meaning
-** ------------------
-** 0 Samplerate, in kilohertz (i.e. 44)
-** 1 Bitrate (i.e. 128)
-** 2 Channels (i.e. 2)
-** 3 (5+) Video LOWORD=w HIWORD=h
-** 4 (5+) > 65536, string (video description)
-** 5 (5.25+) Samplerate, in hertz (i.e. 44100)
-*/
-
-
-#define IPC_GETEQDATA 127
-/* (requires Winamp 2.05+)
-** int data=SendMessage(hwnd_winamp,WM_WA_IPC,pos,IPC_GETEQDATA);
-** IPC_GETEQDATA queries the status of the EQ.
-** The value returned depends on what 'pos' is set to:
-** Value Meaning
-** ------------------
-** 0-9 The 10 bands of EQ data. 0-63 (+20db - -20db)
-** 10 The preamp value. 0-63 (+20db - -20db)
-** 11 Enabled. zero if disabled, nonzero if enabled.
-** 12 Autoload. zero if disabled, nonzero if enabled.
-*/
-
-
-#define IPC_SETEQDATA 128
-/* (requires Winamp 2.05+)
-** SendMessage(hwnd_winamp,WM_WA_IPC,pos,IPC_GETEQDATA);
-** SendMessage(hwnd_winamp,WM_WA_IPC,value,IPC_SETEQDATA);
-** IPC_SETEQDATA sets the value of the last position retrieved
-** by IPC_GETEQDATA. This is pretty lame, and we should provide
-** an extended version that lets you do a MAKELPARAM(pos,value).
-** someday...
-
- new (2.92+):
- if the high byte is set to 0xDB, then the third byte specifies
- which band, and the bottom word specifies the value.
-*/
-
-
-#define IPC_ADDBOOKMARK 129
-#define IPC_ADDBOOKMARKW 131
-/* (requires Winamp 2.4+)
-** This is sent as a WM_COPYDATA using IPC_ADDBOOKMARK as the dwData value and the
-** directory you want to change to as the lpData member. This will add the specified
-** file / url to the Winamp bookmark list.
-**
-** COPYDATASTRUCT cds = {0};
-** cds.dwData = IPC_ADDBOOKMARK;
-** cds.lpData = (void*)"http://www.blah.com/listen.pls";
-** cds.cbData = lstrlen((char*)cds.lpData)+1; // include space for null char
-** SendMessage(hwnd_winamp,WM_COPYDATA,0,(LPARAM)&cds);
-**
-**
-** In Winamp 5.0+ we use this as a normal WM_WA_IPC and the string is null separated as
-** the filename and then the title of the entry.
-**
-** SendMessage(hwnd_winamp,WM_WA_IPC,(WPARAM)(char*)"filename\0title\0",IPC_ADDBOOKMARK);
-**
-** This will notify the library / bookmark editor that a bookmark was added.
-** Note that using this message in this context does not actually add the bookmark.
-** Do not use, it is essentially just a notification type message :)
-*/
-
-
-#define IPC_INSTALLPLUGIN 130
-/* This is not implemented (and is very unlikely to be done due to safety concerns).
-** If it was then you could do a WM_COPYDATA with a path to a .wpz and it would then
-** install the plugin for you.
-**
-** COPYDATASTRUCT cds = {0};
-** cds.dwData = IPC_INSTALLPLUGIN;
-** cds.lpData = (void*)"c:\\path\\to\\file.wpz";
-** cds.cbData = lstrlen((char*)cds.lpData)+1; // include space for null char
-** SendMessage(hwnd_winamp,WM_COPYDATA,0,(LPARAM)&cds);
-*/
-
-
-#define IPC_RESTARTWINAMP 135
-/* (requires Winamp 2.2+)
-** SendMessage(hwnd_winamp,WM_WA_IPC,0,IPC_RESTARTWINAMP);
-** IPC_RESTARTWINAMP will restart Winamp (isn't that obvious ? :) )
-** If this fails to make Winamp start after closing then there is a good chance one (or
-** more) of the currently installed plugins caused Winamp to crash on exit (either as a
-** silent crash or a full crash log report before it could call itself start again.
-*/
-
-
-#define IPC_ISFULLSTOP 400
-/* (requires winamp 2.7+ I think)
-** int ret=SendMessage(hwnd_winamp,WM_WA_IPC,0,IPC_ISFULLSTOP);
-** This is useful for when you're an output plugin and you want to see if the stop/close
-** happening is a full stop or if you are just between tracks. This returns non zero if
-** it is a full stop or zero if it is just a new track.
-** benski> i think it's actually the other way around -
-** !0 for EOF and 0 for user pressing stop
-*/
-
-
-#define IPC_INETAVAILABLE 242
-/* (requires Winamp 2.05+)
-** int val=SendMessage(hwnd_winamp,WM_WA_IPC,0,IPC_INETAVAILABLE);
-** IPC_INETAVAILABLE will return 1 if an Internet connection is available for Winamp and
-** relates to the internet connection type setting on the main general preferences page
-** in the Winamp preferences.
-*/
-
-
-#define IPC_UPDTITLE 243
-/* (requires Winamp 2.2+)
-** SendMessage(hwnd_winamp,WM_WA_IPC,0,IPC_UPDTITLE);
-** IPC_UPDTITLE will ask Winamp to update the information about the current title and
-** causes GetFileInfo(..) in the input plugin associated with the current playlist entry
-** to be called. This can be called such as when an input plugin is buffering a file so
-** that it can cause the buffer percentage to appear in the playlist.
-*/
-
-
-#define IPC_REFRESHPLCACHE 247
-/* (requires Winamp 2.2+)
-** SendMessage(hwnd_winamp,WM_WA_IPC,0,IPC_REFRESHPLCACHE);
-** IPC_REFRESHPLCACHE will flush the playlist cache buffer and you send this if you want
-** Winamp to go refetch the titles for all of the entries in the current playlist.
-**
-** 5.3+: pass a wchar_t * string in wParam, and it'll do a strnicmp() before clearing the cache
-*/
-
-
-#define IPC_GET_SHUFFLE 250
-/* (requires Winamp 2.4+)
-** int val=SendMessage(hwnd_winamp,WM_WA_IPC,0,IPC_GET_SHUFFLE);
-** IPC_GET_SHUFFLE returns the status of the shuffle option.
-** If set then it will return 1 and if not set then it will return 0.
-*/
-
-
-#define IPC_GET_REPEAT 251
-/* (requires Winamp 2.4+)
-** int val=SendMessage(hwnd_winamp,WM_WA_IPC,0,IPC_GET_REPEAT);
-** IPC_GET_REPEAT returns the status of the repeat option.
-** If set then it will return 1 and if not set then it will return 0.
-*/
-
-
-#define IPC_SET_SHUFFLE 252
-/* (requires Winamp 2.4+)
-** SendMessage(hwnd_winamp,WM_WA_IPC,value,IPC_SET_SHUFFLE);
-** IPC_SET_SHUFFLE sets the status of the shuffle option.
-** If 'value' is 1 then shuffle is turned on.
-** If 'value' is 0 then shuffle is turned off.
-*/
-
-
-#define IPC_SET_REPEAT 253
-/* (requires Winamp 2.4+)
-** SendMessage(hwnd_winamp,WM_WA_IPC,value,IPC_SET_REPEAT);
-** IPC_SET_REPEAT sets the status of the repeat option.
-** If 'value' is 1 then shuffle is turned on.
-** If 'value' is 0 then shuffle is turned off.
-*/
-
-
-#define IPC_ENABLEDISABLE_ALL_WINDOWS 259 // 0xdeadbeef to disable
-/* (requires Winamp 2.9+)
-** SendMessage(hwnd_winamp,WM_WA_IPC,(enable?0:0xdeadbeef),IPC_ENABLEDISABLE_ALL_WINDOWS);
-** Sending this message with 0xdeadbeef as the param will disable all winamp windows and
-** any other values will enable all of the Winamp windows again. When disabled you won't
-** get any response on clicking or trying to do anything to the Winamp windows. If the
-** taskbar icon is shown then you may still have control ;)
-*/
-
-
-#define IPC_GETWND 260
-/* (requires Winamp 2.9+)
-** HWND h=SendMessage(hwnd_winamp,WM_WA_IPC,IPC_GETWND_xxx,IPC_GETWND);
-** returns the HWND of the window specified.
-*/
- #define IPC_GETWND_EQ 0 // use one of these for the param
- #define IPC_GETWND_PE 1
- #define IPC_GETWND_MB 2
- #define IPC_GETWND_VIDEO 3
-#define IPC_ISWNDVISIBLE 261 // same param as IPC_GETWND
-
-
-/************************************************************************
-***************** in-process only (WE LOVE PLUGINS)
-************************************************************************/
-
-#define IPC_SETSKINW 199
-#define IPC_SETSKIN 200
-/* (requires Winamp 2.04+, only usable from plug-ins (not external apps))
-** SendMessage(hwnd_winamp,WM_WA_IPC,(WPARAM)"skinname",IPC_SETSKIN);
-** IPC_SETSKIN sets the current skin to "skinname". Note that skinname
-** can be the name of a skin, a skin .zip file, with or without path.
-** If path isn't specified, the default search path is the winamp skins
-** directory.
-*/
-
-
-#define IPC_GETSKIN 201
-#define IPC_GETSKINW 1201
-/* (requires Winamp 2.04+, only usable from plug-ins (not external apps))
-** SendMessage(hwnd_winamp,WM_WA_IPC,(WPARAM)skinname_buffer,IPC_GETSKIN);
-** IPC_GETSKIN puts the directory where skin bitmaps can be found
-** into skinname_buffer.
-** skinname_buffer must be MAX_PATH characters in length.
-** When using a .zip'd skin file, it'll return a temporary directory
-** where the ZIP was decompressed.
-*/
-
-
-#define IPC_EXECPLUG 202
-/* (requires Winamp 2.04+, only usable from plug-ins (not external apps))
-** SendMessage(hwnd_winamp,WM_WA_IPC,(WPARAM)"vis_file.dll",IPC_EXECPLUG);
-** IPC_EXECPLUG executes a visualization plug-in pointed to by WPARAM.
-** the format of this string can be:
-** "vis_whatever.dll"
-** "vis_whatever.dll,0" // (first mod, file in winamp plug-in dir)
-** "C:\\dir\\vis_whatever.dll,1"
-*/
-
-
-#define IPC_GETPLAYLISTFILE 211
-#define IPC_GETPLAYLISTFILEW 214
-/* (requires Winamp 2.04+, only usable from plug-ins (not external apps))
-** char *name=SendMessage(hwnd_winamp,WM_WA_IPC,index,IPC_GETPLAYLISTFILE);
-** IPC_GETPLAYLISTFILE gets the filename of the playlist entry [index].
-** returns a pointer to it. returns NULL on error.
-*/
-
-
-#define IPC_GETPLAYLISTTITLE 212
-#define IPC_GETPLAYLISTTITLEW 213
-/* (requires Winamp 2.04+, only usable from plug-ins (not external apps))
-** char *name=SendMessage(hwnd_winamp,WM_WA_IPC,index,IPC_GETPLAYLISTTITLE);
-**
-** IPC_GETPLAYLISTTITLE gets the title of the playlist entry [index].
-** returns a pointer to it. returns NULL on error.
-*/
-
-
-#define IPC_GETHTTPGETTER 240
-/* retrieves a function pointer to a HTTP retrieval function.
-** if this is unsupported, returns 1 or 0.
-** the function should be:
-** int (*httpRetrieveFile)(HWND hwnd, char *url, char *file, char *dlgtitle);
-** if you call this function, with a parent window, a URL, an output file, and a dialog title,
-** it will return 0 on successful download, 1 on error.
-*/
-
-
-#define IPC_GETHTTPGETTERW 1240
-/* int (*httpRetrieveFileW)(HWND hwnd, char *url, wchar_t *file, wchar_t *dlgtitle); */
-
-
-#define IPC_MBOPEN 241
-/* (requires Winamp 2.05+)
-** SendMessage(hwnd_winamp,WM_WA_IPC,0,IPC_MBOPEN);
-** SendMessage(hwnd_winamp,WM_WA_IPC,(WPARAM)url,IPC_MBOPEN);
-** IPC_MBOPEN will open a new URL in the minibrowser. if url is NULL, it will open the Minibrowser window.
-*/
-
-
-#define IPC_CHANGECURRENTFILE 245
-/* (requires Winamp 2.05+)
-** SendMessage(hwnd_winamp,WM_WA_IPC,(WPARAM)file,IPC_CHANGECURRENTFILE);
-** IPC_CHANGECURRENTFILE will set the current playlist item.
-*/
-
-
-#define IPC_CHANGECURRENTFILEW 1245
-/* (requires Winamp 5.3+)
-** SendMessage(hwnd_winamp,WM_WA_IPC,(WPARAM)file,IPC_CHANGECURRENTFILEW);
-** IPC_CHANGECURRENTFILEW will set the current playlist item.
-*/
-
-
-#define IPC_GETMBURL 246
-/* (requires Winamp 2.2+)
-** char buffer[4096]; // Urls can be VERY long
-** SendMessage(hwnd_winamp,WM_WA_IPC,(WPARAM)buffer,IPC_GETMBURL);
-** IPC_GETMBURL will retrieve the current Minibrowser URL into buffer.
-** buffer must be at least 4096 bytes long.
-*/
-
-
-#define IPC_MBBLOCK 248
-/* (requires Winamp 2.4+)
-** SendMessage(hwnd_winamp,WM_WA_IPC,value,IPC_MBBLOCK);
-**
-** IPC_MBBLOCK will block the Minibrowser from updates if value is set to 1
-*/
-
-
-#define IPC_MBOPENREAL 249
-/* (requires Winamp 2.4+)
-** SendMessage(hwnd_winamp,WM_WA_IPC,(WPARAM)url,IPC_MBOPENREAL);
-**
-** IPC_MBOPENREAL works the same as IPC_MBOPEN except that it will works even if
-** IPC_MBBLOCK has been set to 1
-*/
-
-
-#define IPC_ADJUST_OPTIONSMENUPOS 280
-/* (requires Winamp 2.9+)
-** int newpos=SendMessage(hwnd_winamp,WM_WA_IPC,(WPARAM)adjust_offset,IPC_ADJUST_OPTIONSMENUPOS);
-** moves where winamp expects the Options menu in the main menu. Useful if you wish to insert a
-** menu item above the options/skins/vis menus.
-*/
-
-
-#define IPC_GET_HMENU 281
-/* (requires Winamp 2.9+)
-** HMENU hMenu=SendMessage(hwnd_winamp,WM_WA_IPC,(WPARAM)0,IPC_GET_HMENU);
-** values for data:
-** 0 : main popup menu
-** 1 : main menubar file menu
-** 2 : main menubar options menu
-** 3 : main menubar windows menu
-** 4 : main menubar help menu
-** other values will return NULL.
-*/
-
-
-#define IPC_GET_EXTENDED_FILE_INFO 290 //pass a pointer to the following struct in wParam
-#define IPC_GET_EXTENDED_FILE_INFO_HOOKABLE 296
-/* (requires Winamp 2.9+)
-** to use, create an extendedFileInfoStruct, point the values filename and metadata to the
-** filename and metadata field you wish to query, and ret to a buffer, with retlen to the
-** length of that buffer, and then SendMessage(hwnd_winamp,WM_WA_IPC,&struct,IPC_GET_EXTENDED_FILE_INFO);
-** the results should be in the buffer pointed to by ret.
-** returns 1 if the decoder supports a getExtendedFileInfo method
-*/
-typedef struct {
- const char *filename;
- const char *metadata;
- char *ret;
- size_t retlen;
-} extendedFileInfoStruct;
-
-
-#define IPC_GET_BASIC_FILE_INFO 291 //pass a pointer to the following struct in wParam
-typedef struct {
- const char *filename;
-
- int quickCheck; // set to 0 to always get, 1 for quick, 2 for default (if 2, quickCheck will be set to 0 if quick wasnot used)
-
- // filled in by winamp
- int length;
- char *title;
- int titlelen;
-} basicFileInfoStruct;
-
-
-#define IPC_GET_BASIC_FILE_INFOW 1291 //pass a pointer to the following struct in wParam
-typedef struct {
- const wchar_t *filename;
-
- int quickCheck; // set to 0 to always get, 1 for quick, 2 for default (if 2, quickCheck will be set to 0 if quick wasnot used)
-
- // filled in by winamp
- int length;
- wchar_t *title;
- int titlelen;
-} basicFileInfoStructW;
-
-
-#define IPC_GET_EXTLIST 292 //returns doublenull delimited. GlobalFree() it when done. if data is 0, returns raw extlist, if 1, returns something suitable for getopenfilename
-#define IPC_GET_EXTLISTW 1292 // wide char version of above
-
-
-#define IPC_INFOBOX 293
-typedef struct {
- HWND parent;
- char *filename;
-} infoBoxParam;
-
-
-#define IPC_INFOBOXW 1293
-typedef struct {
- HWND parent;
- const wchar_t *filename;
-} infoBoxParamW;
-
-
-#define IPC_SET_EXTENDED_FILE_INFO 294 //pass a pointer to the a extendedFileInfoStruct in wParam
-/* (requires Winamp 2.9+)
-** to use, create an extendedFileInfoStruct, point the values filename and metadata to the
-** filename and metadata field you wish to write in ret. (retlen is not used). and then
-** SendMessage(hwnd_winamp,WM_WA_IPC,&struct,IPC_SET_EXTENDED_FILE_INFO);
-** returns 1 if the metadata is supported
-** Call IPC_WRITE_EXTENDED_FILE_INFO once you're done setting all the metadata you want to update
-*/
-
-
-#define IPC_WRITE_EXTENDED_FILE_INFO 295
-/* (requires Winamp 2.9+)
-** writes all the metadata set thru IPC_SET_EXTENDED_FILE_INFO to the file
-** returns 1 if the file has been successfully updated, 0 if error
-*/
-
-
-#define IPC_FORMAT_TITLE 297
-typedef struct
-{
- char *spec; // NULL=default winamp spec
- void *p;
-
- char *out;
- int out_len;
-
- char * (*TAGFUNC)(const char * tag, void * p); //return 0 if not found
- void (*TAGFREEFUNC)(char * tag,void * p);
-} waFormatTitle;
-
-
-#define IPC_FORMAT_TITLE_EXTENDED 298 // similiar to IPC_FORMAT_TITLE, but falls back to Winamp's %tags% if your passed tag function doesn't handle it
-typedef struct
-{
- const wchar_t *filename;
- int useExtendedInfo; // set to 1 if you want the Title Formatter to query the input plugins for any tags that your tag function fails on
- const wchar_t *spec; // NULL=default winamp spec
- void *p;
-
- wchar_t *out;
- int out_len;
-
- wchar_t * (*TAGFUNC)(const wchar_t * tag, void * p); //return 0 if not found, -1 for empty tag
- void (*TAGFREEFUNC)(wchar_t *tag, void *p);
-} waFormatTitleExtended;
-
-
-#define IPC_COPY_EXTENDED_FILE_INFO 299
-typedef struct
-{
- const char *source;
- const char *dest;
-} copyFileInfoStruct;
-
-
-#define IPC_COPY_EXTENDED_FILE_INFOW 1299
-typedef struct
-{
- const wchar_t *source;
- const wchar_t *dest;
-} copyFileInfoStructW;
-
-
-typedef struct {
- int (*inflateReset)(void *strm);
- int (*inflateInit_)(void *strm,const char *version, int stream_size);
- int (*inflate)(void *strm, int flush);
- int (*inflateEnd)(void *strm);
- unsigned long (*crc32)(unsigned long crc, const unsigned char *buf, unsigned int len);
-} wa_inflate_struct;
-
-#define IPC_GETUNCOMPRESSINTERFACE 331
-/* returns a function pointer to uncompress().
-** int (*uncompress)(unsigned char *dest, unsigned long *destLen, const unsigned char *source, unsigned long sourceLen);
-** right out of zlib, useful for decompressing zlibbed data.
-** if you pass the parm of 0x10100000, it will return a wa_inflate_struct * to an inflate API.
-*/
-
-
-typedef struct _prefsDlgRec {
- HINSTANCE hInst; // dll instance containing the dialog resource
- int dlgID; // resource identifier of the dialog
- void *proc; // window proceedure for handling the dialog defined as
- // LRESULT CALLBACK PrefsPage(HWND,UINT,WPARAM,LPARAM)
-
- char *name; // name shown for the prefs page in the treelist
- intptr_t where; // section in the treelist the prefs page is to be added to
- // 0 for General Preferences
- // 1 for Plugins
- // 2 for Skins
- // 3 for Bookmarks (no longer in the 5.0+ prefs)
- // 4 for Prefs (the old 'Setup' section - no longer in 5.0+)
-
- intptr_t _id;
- struct _prefsDlgRec *next; // no longer implemented as a linked list, now used by Winamp for other means
-} prefsDlgRec;
-
-typedef struct _prefsDlgRecW {
- HINSTANCE hInst; // dll instance containing the dialog resource
- int dlgID; // resource identifier of the dialog
- void *proc; // window proceedure for handling the dialog defined as
- // LRESULT CALLBACK PrefsPage(HWND,UINT,WPARAM,LPARAM)
-
- wchar_t *name; // name shown for the prefs page in the treelist
- intptr_t where; // section in the treelist the prefs page is to be added to
- // 0 for General Preferences
- // 1 for Plugins
- // 2 for Skins
- // 3 for Bookmarks (no longer in the 5.0+ prefs)
- // 4 for Prefs (the old 'Setup' section - no longer in 5.0+)
-
- intptr_t _id;
- struct _prefsDlgRec *next; // no longer implemented as a linked list, now used by Winamp for other means
-} prefsDlgRecW;
-
-#define IPC_ADD_PREFS_DLG 332
-#define IPC_ADD_PREFS_DLGW 1332
-#define IPC_REMOVE_PREFS_DLG 333
-/* (requires Winamp 2.9+)
-** SendMessage(hwnd_winamp,WM_WA_IPC,(WPARAM)&prefsRec,IPC_ADD_PREFS_DLG);
-** SendMessage(hwnd_winamp,WM_WA_IPC,(WPARAM)&prefsRec,IPC_REMOVE_PREFS_DLG);
-**
-** IPC_ADD_PREFS_DLG:
-** To use this you need to allocate a prefsDlgRec structure (either on the heap or with
-** some global data but NOT on the stack) and then initialise the members of the structure
-** (see the definition of the prefsDlgRec structure above).
-**
-** hInst - dll instance of where the dialog resource is located.
-** dlgID - id of the dialog resource.
-** proc - dialog window procedure for the prefs dialog.
-** name - name of the prefs page as shown in the preferences list.
-** where - see above for the valid locations the page can be added.
-**
-** Then you do SendMessage(hwnd_winamp,WM_WA_IPC,(WPARAM)&prefsRec,IPC_ADD_PREFS_DLG);
-**
-** example:
-**
-** prefsDlgRec* prefsRec = 0;
-** prefsRec = GlobalAlloc(GPTR,sizeof(prefsDlgRec));
-** prefsRec->hInst = hInst;
-** prefsRec->dlgID = IDD_PREFDIALOG;
-** prefsRec->name = "Pref Page";
-** prefsRec->where = 0;
-** prefsRec->proc = PrefsPage;
-** SendMessage(hwnd_winamp,WM_WA_IPC,(WPARAM)&prefsRec,IPC_ADD_PREFS_DLG);
-**
-**
-** IPC_REMOVE_PREFS_DLG:
-** To use you pass the address of the same prefsRec you used when adding the prefs page
-** though you shouldn't really ever have to do this but it's good to clean up after you
-** when you're plugin is being unloaded.
-**
-** SendMessage(hwnd_winamp,WM_WA_IPC,(WPARAM)&prefsRec,IPC_REMOVE_PREFS_DLG);
-**
-** IPC_ADD_PREFS_DLGW
-** requires Winamp 5.53+
-*/
-
-
-#define IPC_OPENPREFSTOPAGE 380
-/* SendMessage(hwnd_winamp,WM_WA_IPC,(WPARAM)&prefsRec,IPC_OPENPREFSTOPAGE);
-**
-** There are two ways of opening a preferences page.
-**
-** The first is to pass an id of a builtin preferences page (see below for ids) or a
-** &prefsDlgRec of the preferences page to open and this is normally done if you are
-** opening a prefs page you added yourself.
-**
-** If the page id does not or the &prefsRec is not valid then the prefs dialog will be
-** opened to the first page available (usually the Winamp Pro page).
-**
-** (requires Winamp 5.04+)
-** Passing -1 for param will open the preferences dialog to the last page viewed.
-**
-** Note: v5.0 to 5.03 had a bug in this api
-**
-** On the first call then the correct prefs page would be opened to but on the next call
-** the prefs dialog would be brought to the front but the page would not be changed to the
-** specified.
-** In 5.04+ it will change to the prefs page specified if the prefs dialog is already open.
-*/
-
-/* Builtin Preference page ids (valid for 5.0+)
-** (stored in the lParam member of the TVITEM structure from the tree item)
-**
-** These can be useful if you want to detect a specific prefs page and add things to it
-** yourself or something like that ;)
-**
-** Winamp Pro 20
-** General Preferences 0
-** File Types 1
-** Playlist 23
-** Titles 21
-** Playback 42 (added in 5.25)
-** Station Info 41 (added in 5.11 & removed in 5.5)
-** Video 24
-** Localization 25 (added in 5.5)
-** Skins 40
-** Classic Skins 22
-** Plugins 30
-** Input 31
-** Output 32
-** Visualisation 33
-** DSP/Effect 34
-** General Purpose 35
-**
-** Note:
-** Custom page ids begin from 60
-** The value of the normal custom pages (Global Hotkeys, Jump To File, etc) is not
-** guaranteed since it depends on the order in which the plugins are loaded which can
-** change on different systems.
-**
-** Global Hotkeys, Jump To File, Media Library (under General Preferences and child pages),
-** Media Library (under Plugins), Portables, CD Ripping and Modern Skins are custom pages
-** created by the plugins shipped with Winamp.
-*/
-
-
-#define IPC_GETINIFILE 334
-/* (requires Winamp 2.9+)
-** char *ini=(char*)SendMessage(hwnd_winamp,WM_WA_IPC,0,IPC_GETINIFILE);
-** This returns a pointer to the full file path of winamp.ini.
-**
-** char ini_path[MAX_PATH] = {0};
-**
-** void GetIniFilePath(HWND hwnd){
-** if(SendMessage(hwnd_winamp,WM_WA_IPC,0,IPC_GETVERSION) >= 0x2900){
-** // this gets the string of the full ini file path
-** lstrcpyn(ini_path,(char*)SendMessage(hwnd_winamp,WM_WA_IPC,0,IPC_GETINIFILE),sizeof(ini_path));
-** }
-** else{
-** char* p = ini_path;
-** p += GetModuleFileName(0,ini_path,sizeof(ini_path)) - 1;
-** while(p && *p != '.'){p--;}
-** lstrcpyn(p+1,"ini",sizeof(ini_path));
-** }
-** }
-*/
-
-
-#define IPC_GETINIDIRECTORY 335
-/* (requires Winamp 2.9+)
-** char *dir=(char*)SendMessage(hwnd_winamp,WM_WA_IPC,0,IPC_GETINIDIRECTORY);
-** This returns a pointer to the directory where winamp.ini can be found and is
-** useful if you want store config files but you don't want to use winamp.ini.
-*/
-
-
-#define IPC_GETPLUGINDIRECTORY 336
-/* (requires Winamp 5.11+)
-** char *plugdir=(char*)SendMessage(hwnd_winamp,WM_WA_IPC,0,IPC_GETPLUGINDIRECTORY);
-** This returns a pointer to the directory where Winamp has its plugins stored and is
-** useful if you want store config files in plugins.ini in the plugins folder or for
-** accessing any local files in the plugins folder.
-*/
-
-
-#define IPC_GETM3UDIRECTORY 337
-/* (requires Winamp 5.11+)
-** char *m3udir=(char*)SendMessage(hwnd_winamp,WM_WA_IPC,0,IPC_GETM3UDIRECTORY);
-** This returns a pointer to the directory where winamp.m3u (and winamp.m3u8 if supported) is stored in.
-*/
-
-
-#define IPC_GETM3UDIRECTORYW 338
-/* (requires Winamp 5.3+)
-** wchar_t *m3udirW=(wchar_t*)SendMessage(hwnd_winamp,WM_WA_IPC,0,IPC_GETM3UDIRECTORYW);
-** This returns a pointer to the directory where winamp.m3u (and winamp.m3u8 if supported) is stored in.
-*/
-
-
-#define IPC_SPAWNBUTTONPOPUP 361 // param =
-// 0 = eject
-// 1 = previous
-// 2 = next
-// 3 = pause
-// 4 = play
-// 5 = stop
-
-
-#define IPC_OPENURLBOX 360
-/* (requires Winamp 5.0+)
-** HGLOBAL hglobal = (HGLOBAL)SendMessage(hwnd_winamp,WM_WA_IPC,(WPARAM)(HWND)parent,IPC_OPENURLBOX);
-** You pass a hwnd for the dialog to be parented to (which modern skin support uses).
-** This will return a HGLOBAL that needs to be freed with GlobalFree() if this worked.
-*/
-
-
-#define IPC_OPENFILEBOX 362
-/* (requires Winamp 5.0+)
-** SendMessage(hwnd_winamp,WM_WA_IPC,(WPARAM)(HWND)parent,IPC_OPENFILEBOX);
-** You pass a hwnd for the dialog to be parented to (which modern skin support uses).
-*/
-
-
-#define IPC_OPENDIRBOX 363
-/* (requires Winamp 5.0+)
-** SendMessage(hwnd_winamp,WM_WA_IPC,(WPARAM)(HWND)parent,IPC_OPENDIRBOX);
-** You pass a hwnd for the dialog to be parented to (which modern skin support uses).
-*/
-
-
-#define IPC_SETDIALOGBOXPARENT 364
-/* (requires Winamp 5.0+)
-** SendMessage(hwnd_winamp,WM_WA_IPC,(WPARAM)(HWND)parent,IPC_SETDIALOGBOXPARENT);
-** Pass 'parent' as the window which will be used as the parent for a number of the built
-** in Winamp dialogs and is useful when you are taking over the whole of the UI so that
-** the dialogs will not appear at the bottom right of the screen since the main winamp
-** window is located at 3000x3000 by gen_ff when this is used. Call this again with
-** parent = null to reset the parent back to the orginal Winamp window.
-*/
-
-#define IPC_GETDIALOGBOXPARENT 365
-/* (requires Winamp 5.51+)
-** HWND hwndParent = SendMessage(hwnd_winamp,WM_WA_IPC,(WPARAM)0, IPC_GETDIALOGBOXPARENT);
-** hwndParent can/must be passed to all modal dialogs (including MessageBox) thats uses winamp as a parent
-*/
-
-#define IPC_UPDATEDIALOGBOXPARENT 366
-/* (requires Winamp 5.53+)
-** if you previous called IPC_SETDIALOGBOXPARENT, call this every time your window resizes
-*/
-
-#define IPC_DRO_MIN 401 // reserved for DrO
-#define IPC_SET_JTF_COMPARATOR 409
-/* pass me an int (__cdecl *)(const char *, const char *) in wParam */
-#define IPC_SET_JTF_COMPARATOR_W 410
-/* pass me an int (__cdecl *)(const wchar_t *, const wchar_t *) in wParam ... maybe someday :) */
-#define IPC_SET_JTF_DRAWTEXT 416
-
-#define IPC_DRO_MAX 499
-
-
-// pass 0 for a copy of the skin HBITMAP
-// pass 1 for name of font to use for playlist editor likeness
-// pass 2 for font charset
-// pass 3 for font size
-#define IPC_GET_GENSKINBITMAP 503
-
-
-typedef struct
-{
- HWND me; //hwnd of the window
-
- #define EMBED_FLAGS_NORESIZE 0x1
- // set this bit to keep window from being resizable
-
- #define EMBED_FLAGS_NOTRANSPARENCY 0x2
- // set this bit to make gen_ff turn transparency off for this window
-
- #define EMBED_FLAGS_NOWINDOWMENU 0x4
- // set this bit to prevent gen_ff from automatically adding your window to the right-click menu
-
- #define EMBED_FLAGS_GUID 0x8
- // (5.31+) call SET_EMBED_GUID(yourEmbedWindowStateStruct, GUID) to define a GUID for this window
-
- #define SET_EMBED_GUID(windowState, windowGUID) { windowState->flags |= EMBED_FLAGS_GUID; *((GUID *)&windowState->extra_data[4])=windowGUID; }
- #define GET_EMBED_GUID(windowState) (*((GUID *)&windowState->extra_data[4]))
-
- int flags; // see above
-
- RECT r;
- void *user_ptr; // for application use
- int extra_data[64]; // for internal winamp use
-} embedWindowState;
-
-#define IPC_GET_EMBEDIF 505
-/* (requires Winamp 2.9+)
-** HWND myframe = (HWND)SendMessage(hwnd_winamp,WM_WA_IPC,(WPARAM)&wa_wnd,IPC_GET_EMBEDIF);
-**
-** or
-**
-** HWND myframe = 0;
-** HWND (*embed)(embedWindowState *params)=0;
-** *(void**)&embed = (void*)SendMessage(hwnd_winamp,WM_WA_IPC,0,IPC_GET_EMBEDIF);
-** myframe = embed(&wa_wnd);
-**
-** You pass an embedWindowState* and it will return a hwnd for the frame window or if you
-** pass wParam as null then it will return a HWND embedWindow(embedWindowState *);
-*/
-
-#define IPC_SKINWINDOW 534
-
-typedef struct __SKINWINDOWPARAM
-{
- HWND hwndToSkin;
- GUID windowGuid;
-} SKINWINDOWPARAM;
-
-
-
-#define IPC_EMBED_ENUM 532
-typedef struct embedEnumStruct
-{
- int (*enumProc)(embedWindowState *ws, struct embedEnumStruct *param); // return 1 to abort
- int user_data; // or more :)
-} embedEnumStruct;
- // pass
-
-
-#define IPC_EMBED_ISVALID 533
-/* (requires Winamp 2.9+)
-** int valid = SendMessage(hwnd_winamp,WM_WA_IPC,(WPARAM)embedhwnd,IPC_EMBED_ISVALID);
-** Pass a hwnd in the wParam to this to check if the hwnd is a valid embed window or not.
-*/
-
-
-#define IPC_CONVERTFILE 506
-/* (requires Winamp 2.92+)
-** Converts a given file to a different format (PCM, MP3, etc...)
-** To use, pass a pointer to a waFileConvertStruct struct
-** This struct can be either on the heap or some global
-** data, but NOT on the stack. At least, until the conversion is done.
-**
-** eg: SendMessage(hwnd_winamp,WM_WA_IPC,&myConvertStruct,IPC_CONVERTFILE);
-**
-** Return value:
-** 0: Can't start the conversion. Look at myConvertStruct->error for details.
-** 1: Conversion started. Status messages will be sent to the specified callbackhwnd.
-** Be sure to call IPC_CONVERTFILE_END when your callback window receives the
-** IPC_CB_CONVERT_DONE message.
-*/
-typedef struct
-{
- char *sourcefile; // "c:\\source.mp3"
- char *destfile; // "c:\\dest.pcm"
- intptr_t destformat[8]; // like 'PCM ',srate,nch,bps.
- //hack alert! you can set destformat[6]=mmioFOURCC('I','N','I',' '); and destformat[7]=(int)my_ini_file; (where my_ini_file is a char*)
- HWND callbackhwnd; // window that will receive the IPC_CB_CONVERT notification messages
-
- //filled in by winamp.exe
- char *error; //if IPC_CONVERTFILE returns 0, the reason will be here
-
- int bytes_done; //you can look at both of these values for speed statistics
- int bytes_total;
- int bytes_out;
-
- int killswitch; // don't set it manually, use IPC_CONVERTFILE_END
- intptr_t extra_data[64]; // for internal winamp use
-} convertFileStruct;
-
-
-#define IPC_CONVERTFILEW 515
-// (requires Winamp 5.36+)
-typedef struct
-{
- wchar_t *sourcefile; // "c:\\source.mp3"
- wchar_t *destfile; // "c:\\dest.pcm"
- intptr_t destformat[8]; // like 'PCM ',srate,nch,bps.
- //hack alert! you can set destformat[6]=mmioFOURCC('I','N','I',' '); and destformat[7]=(int)my_ini_file; (where my_ini_file is a char*)
- HWND callbackhwnd; // window that will receive the IPC_CB_CONVERT notification messages
-
- //filled in by winamp.exe
- wchar_t *error; //if IPC_CONVERTFILE returns 0, the reason will be here
-
- int bytes_done; //you can look at both of these values for speed statistics
- int bytes_total;
- int bytes_out;
-
- int killswitch; // don't set it manually, use IPC_CONVERTFILE_END
- intptr_t extra_data[64]; // for internal winamp use
-} convertFileStructW;
-
-
-#define IPC_CONVERTFILE_END 507
-/* (requires Winamp 2.92+)
-** Stop/ends a convert process started from IPC_CONVERTFILE
-** You need to call this when you receive the IPC_CB_CONVERTDONE message or when you
-** want to abort a conversion process
-**
-** eg: SendMessage(hwnd_winamp,WM_WA_IPC,&myConvertStruct,IPC_CONVERTFILE_END);
-**
-** No return value
-*/
-
-
-#define IPC_CONVERTFILEW_END 516
-// (requires Winamp 5.36+)
-
-typedef struct {
- HWND hwndParent;
- int format;
-
- //filled in by winamp.exe
- HWND hwndConfig;
- int extra_data[8];
- //hack alert! you can set extra_data[6]=mmioFOURCC('I','N','I',' '); and extra_data[7]=(int)my_ini_file; (where my_ini_file is a char*)
-} convertConfigStruct;
-
-
-#define IPC_CONVERT_CONFIG 508
-#define IPC_CONVERT_CONFIG_END 509
-
-typedef struct
-{
- void (*enumProc)(intptr_t user_data, const char *desc, int fourcc);
- intptr_t user_data;
-} converterEnumFmtStruct;
-#define IPC_CONVERT_CONFIG_ENUMFMTS 510
-/* (requires Winamp 2.92+)
-*/
-
-typedef struct
-{
- char cdletter;
- char *playlist_file;
- HWND callback_hwnd;
-
- //filled in by winamp.exe
- char *error;
-} burnCDStruct;
-#define IPC_BURN_CD 511
-/* (requires Winamp 5.0+)
-*/
-
-typedef struct
-{
- convertFileStruct *cfs;
- int priority;
-} convertSetPriority;
-
-
-#define IPC_CONVERT_SET_PRIORITY 512
-
-typedef struct
-{
- convertFileStructW *cfs;
- int priority;
-} convertSetPriorityW;
-
-
-#define IPC_CONVERT_SET_PRIORITYW 517
-// (requires Winamp 5.36+)
-
-typedef struct
-{
- unsigned int format; //fourcc value
- char *item; // config item, eg "bitrate"
- char *data; // buffer to recieve, or buffer that contains the data
- int len; // length of the data buffer (only used when getting a config item)
- char *configfile; // config file to read from
-} convertConfigItem;
-
-
-#define IPC_CONVERT_CONFIG_SET_ITEM 513 // returns TRUE if successful
-#define IPC_CONVERT_CONFIG_GET_ITEM 514 // returns TRUE if successful
-
-
-typedef struct
-{
- const char *filename;
- char *title; // 2048 bytes
- int length;
- int force_useformatting; // can set this to 1 if you want to force a url to use title formatting shit
-} waHookTitleStruct;
-
-#define IPC_HOOK_TITLES 850
-/* (requires Winamp 5.0+)
-** If you hook this message and modify the information then make sure to return TRUE.
-** If you don't hook the message then make sure you pass it on through the subclass chain.
-**
-** LRESULT CALLBACK WinampWndProc(HWND hwnd, UINT umsg, WPARAM wParam, LPARAM lParam)
-** {
-** LRESULT ret = CallWindowProc((WNDPROC)WinampProc,hwnd,umsg,wParam,lParam);
-**
-** if(message==WM_WA_IPC && lParam==IPC_HOOK_TITLES)
-** {
-** waHookTitleStruct *ht = (waHookTitleStruct *) wParam;
-** // Doing ATF stuff with ht->title, whatever...
-** return TRUE;
-** }
-** return ret;
-** }
-*/
-
-typedef struct
-{
- const wchar_t *filename;
- wchar_t *title; // 2048 characters
- int length;
- int force_useformatting; // can set this to 1 if you want to force a url to use title formatting shit
-} waHookTitleStructW;
-#define IPC_HOOK_TITLESW 851
-/* (requires Winamp 5.3+)
-** See information on IPC_HOOK_TITLES for how to process this.
-*/
-
-
-#define IPC_GETSADATAFUNC 800
-// 0: returns a char *export_sa_get() that returns 150 bytes of data
-// 1: returns a export_sa_setreq(int want);
-
-
-#define IPC_GETVUDATAFUNC 801
-// 0: returns a int export_vu_get(int channel) that returns 0-255 (or -1 for bad channel)
-
-
-#define IPC_ISMAINWNDVISIBLE 900
-/* (requires Winamp 5.0+)
-** int visible=SendMessage(hwnd_winamp,WM_WA_IPC,0,IPC_ISMAINWNDVISIBLE);
-** You send this to Winamp to query if the main window is visible or not such as by
-** unchecking the option in the main right-click menu. If the main window is visible then
-** this will return 1 otherwise it returns 0.
-*/
-
-
-typedef struct
-{
- int numElems;
- int *elems;
- HBITMAP bm; // set if you want to override
-} waSetPlColorsStruct;
-
-#define IPC_SETPLEDITCOLORS 920
-/* (requires Winamp 5.0+)
-** This is sent by gen_ff when a modern skin is being loaded to set the colour scheme for
-** the playlist editor. When sent numElems is usually 6 and matches with the 6 possible
-** colours which are provided be pledit.txt from the classic skins. The elems array is
-** defined as follows:
-**
-** elems = 0 => normal text
-** elems = 1 => current text
-** elems = 2 => normal background
-** elems = 3 => selected background
-** elems = 4 => minibroswer foreground
-** elems = 5 => minibroswer background
-**
-** if(uMsg == WM_WA_IPC && lParam == IPC_SETPLEDITCOLORS)
-** {
-** waSetPlColorsStruct* colStr = (waSetPlColorsStruct*)wp;
-** if(colStr)
-** {
-** // set or inspect the colours being used (basically for gen_ff's benefit)
-** }
-** }
-*/
-
-
-typedef struct
-{
- HWND wnd;
- int xpos; // in screen coordinates
- int ypos;
-} waSpawnMenuParms;
-
-// waSpawnMenuParms2 is used by the menubar submenus
-typedef struct
-{
- HWND wnd;
- int xpos; // in screen coordinates
- int ypos;
- int width;
- int height;
-} waSpawnMenuParms2;
-
-// the following IPC use waSpawnMenuParms as parameter
-#define IPC_SPAWNEQPRESETMENU 933
-#define IPC_SPAWNFILEMENU 934 //menubar
-#define IPC_SPAWNOPTIONSMENU 935 //menubar
-#define IPC_SPAWNWINDOWSMENU 936 //menubar
-#define IPC_SPAWNHELPMENU 937 //menubar
-#define IPC_SPAWNPLAYMENU 938 //menubar
-#define IPC_SPAWNPEFILEMENU 939 //menubar
-#define IPC_SPAWNPEPLAYLISTMENU 940 //menubar
-#define IPC_SPAWNPESORTMENU 941 //menubar
-#define IPC_SPAWNPEHELPMENU 942 //menubar
-#define IPC_SPAWNMLFILEMENU 943 //menubar
-#define IPC_SPAWNMLVIEWMENU 944 //menubar
-#define IPC_SPAWNMLHELPMENU 945 //menubar
-#define IPC_SPAWNPELISTOFPLAYLISTS 946
-
-
-#define WM_WA_SYSTRAY WM_USER+1
-/* This is sent by the system tray when an event happens (you might want to simulate it).
-**
-** if(uMsg == WM_WA_SYSTRAY)
-** {
-** switch(lParam)
-** {
-** // process the messages sent from the tray
-** }
-** }
-*/
-
-
-#define WM_WA_MPEG_EOF WM_USER+2
-/* Input plugins send this when they are done playing back the current file to inform
-** Winamp or anyother installed plugins that the current
-**
-** if(uMsg == WM_WA_MPEG_EOF)
-** {
-** // do what is needed here
-** }
-*/
-
-
-//// video stuff
-
-#define IPC_IS_PLAYING_VIDEO 501 // returns >1 if playing, 0 if not, 1 if old version (so who knows):)
-#define IPC_GET_IVIDEOOUTPUT 500 // see below for IVideoOutput interface
-#define VIDEO_MAKETYPE(A,B,C,D) ((A) | ((B)<<8) | ((C)<<16) | ((D)<<24))
-#define VIDUSER_SET_INFOSTRING 0x1000
-#define VIDUSER_GET_VIDEOHWND 0x1001
-#define VIDUSER_SET_VFLIP 0x1002
-#define VIDUSER_SET_TRACKSELINTERFACE 0x1003 // give your ITrackSelector interface as param2
-#define VIDUSER_OPENVIDEORENDERER 0x1004
-#define VIDUSER_CLOSEVIDEORENDERER 0x1005
-#define VIDUSER_GETPOPUPMENU 0x1006
-#define VIDUSER_SET_INFOSTRINGW 0x1007
-
-typedef struct
-{
- int w;
- int h;
- int vflip;
- double aspectratio;
- unsigned int fmt;
-} VideoOpenStruct;
-
-#ifndef NO_IVIDEO_DECLARE
-#ifdef __cplusplus
-
-class VideoOutput;
-class SubsItem;
-
-#ifndef _NSV_DEC_IF_H_
-struct YV12_PLANE {
- unsigned char* baseAddr;
- long rowBytes;
-} ;
-
-struct YV12_PLANES {
- YV12_PLANE y;
- YV12_PLANE u;
- YV12_PLANE v;
-};
-#endif
-
-class IVideoOutput
-{
- public:
- virtual ~IVideoOutput() { }
- virtual int open(int w, int h, int vflip, double aspectratio, unsigned int fmt)=0;
- virtual void setcallback(LRESULT (*msgcallback)(void *token, HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam), void *token) { (void)token; (void)msgcallback; /* to eliminate warning C4100 */ }
- virtual void close()=0;
- virtual void draw(void *frame)=0;
- virtual void drawSubtitle(SubsItem *item) {UNREFERENCED_PARAMETER(item); }
- virtual void showStatusMsg(const char *text) {UNREFERENCED_PARAMETER(text); }
- virtual int get_latency() { return 0; }
- virtual void notifyBufferState(int bufferstate) { UNREFERENCED_PARAMETER(bufferstate); } /* 0-255*/
- virtual INT_PTR extended(INT_PTR param1, INT_PTR param2, INT_PTR param3) { UNREFERENCED_PARAMETER(param1); UNREFERENCED_PARAMETER(param2); UNREFERENCED_PARAMETER(param3); return 0; } // Dispatchable, eat this!
-};
-
-class ITrackSelector
-{
- public:
- virtual int getNumAudioTracks()=0;
- virtual void enumAudioTrackName(int n, const char *buf, int size)=0;
- virtual int getCurAudioTrack()=0;
- virtual int getNumVideoTracks()=0;
- virtual void enumVideoTrackName(int n, const char *buf, int size)=0;
- virtual int getCurVideoTrack()=0;
-
- virtual void setAudioTrack(int n)=0;
- virtual void setVideoTrack(int n)=0;
-};
-
-#endif //cplusplus
-#endif//NO_IVIDEO_DECLARE
-
-// these messages are callbacks that you can grab by subclassing the winamp window
-
-// wParam =
-#define IPC_CB_WND_EQ 0 // use one of these for the param
-#define IPC_CB_WND_PE 1
-#define IPC_CB_WND_MB 2
-#define IPC_CB_WND_VIDEO 3
-#define IPC_CB_WND_MAIN 4
-
-#define IPC_CB_ONSHOWWND 600
-#define IPC_CB_ONHIDEWND 601
-
-#define IPC_CB_GETTOOLTIP 602
-
-#define IPC_CB_MISC 603
- #define IPC_CB_MISC_TITLE 0 // start of playing/stop/pause
- #define IPC_CB_MISC_VOLUME 1 // volume/pan
- #define IPC_CB_MISC_STATUS 2 // start playing/stop/pause/ffwd/rwd
- #define IPC_CB_MISC_EQ 3
- #define IPC_CB_MISC_INFO 4
- #define IPC_CB_MISC_VIDEOINFO 5
- #define IPC_CB_MISC_TITLE_RATING 6 // (5.5+ for when the rating is changed via the songticker menu on current file)
-
-/* Example of using IPC_CB_MISC_STATUS to detect the start of track playback with 5.x
-**
-** if(lParam == IPC_CB_MISC && wParam == IPC_CB_MISC_STATUS)
-** {
-** if(SendMessage(hwnd_winamp,WM_WA_IPC,0,IPC_ISPLAYING) == 1 &&
-** !SendMessage(hwnd_winamp,WM_WA_IPC,0,IPC_GETOUTPUTTIME))
-** {
-** char* file = (char*)SendMessage(hwnd_winamp,WM_WA_IPC,
-** SendMessage(hwnd_winamp,WM_WA_IPC,0,IPC_GETLISTPOS),IPC_GETPLAYLISTFILE);
-** // only output if a valid file was found
-** if(file)
-** {
-** MessageBox(hwnd_winamp,file,"starting",0);
-** // or do something else that you need to do
-** }
-** }
-** }
-*/
-
-
-#define IPC_CB_CONVERT_STATUS 604 // param value goes from 0 to 100 (percent)
-#define IPC_CB_CONVERT_DONE 605
-
-
-#define IPC_ADJUST_FFWINDOWSMENUPOS 606
-/* (requires Winamp 2.9+)
-** int newpos=SendMessage(hwnd_winamp,WM_WA_IPC,(WPARAM)adjust_offset,IPC_ADJUST_FFWINDOWSMENUPOS);
-** This will move where Winamp expects the freeform windows in the menubar windows main
-** menu. This is useful if you wish to insert a menu item above extra freeform windows.
-*/
-
-
-#define IPC_ISDOUBLESIZE 608
-/* (requires Winamp 5.0+)
-** int dsize=SendMessage(hwnd_winamp,WM_WA_IPC,0,IPC_ISDOUBLESIZE);
-** You send this to Winamp to query if the double size mode is enabled or not.
-** If it is on then this will return 1 otherwise it will return 0.
-*/
-
-
-#define IPC_ADJUST_FFOPTIONSMENUPOS 609
-/* (requires Winamp 2.9+)
-** int newpos=SendMessage(hwnd_winamp,WM_WA_IPC,(WPARAM)adjust_offset,IPC_ADJUST_FFOPTIONSMENUPOS);
-** moves where winamp expects the freeform preferences item in the menubar windows main
-** menu. This is useful if you wish to insert a menu item above the preferences item.
-**
-** Note: This setting was ignored by gen_ff until it was fixed in 5.1
-** gen_ff would assume thatthe menu position was 11 in all cases and so when you
-** had two plugins attempting to add entries into the main right click menu it
-** would cause the 'colour themes' submenu to either be incorrectly duplicated or
-** to just disappear.instead.
-*/
-
-
-#define IPC_GETTIMEDISPLAYMODE 610
-/* (requires Winamp 5.0+)
-** int mode=SendMessage(hwnd_winamp,WM_WA_IPC,0,IPC_GETTIMEDISPLAYMODE);
-** This will return the status of the time display i.e. shows time elapsed or remaining.
-** This returns 0 if Winamp is displaying time elapsed or 1 for the time remaining.
-*/
-
-
-#define IPC_SETVISWND 611
-/* (requires Winamp 5.0+)
-** int viswnd=(HWND)SendMessage(hwnd_winamp,WM_WA_IPC,(WPARAM)(HWND)viswnd,IPC_SETVISWND);
-** This allows you to set a window to receive the following message commands (which are
-** used as part of the modern skin integration).
-** When you have finished or your visualisation is closed then send wParam as zero to
-** ensure that things are correctly tidied up.
-*/
-
-/* The following messages are received as the LOWORD(wParam) of the WM_COMMAND message.
-** See %SDK%\winamp\wa5vis.txt for more info about visualisation integration in Winamp.
-*/
-#define ID_VIS_NEXT 40382
-#define ID_VIS_PREV 40383
-#define ID_VIS_RANDOM 40384
-#define ID_VIS_FS 40389
-#define ID_VIS_CFG 40390
-#define ID_VIS_MENU 40391
-
-
-#define IPC_GETVISWND 612
-/* (requires Winamp 5.0+)
-** int viswnd=(HWND)SendMessage(hwnd_winamp,WM_WA_IPC,0,IPC_GETVISWND);
-** This returns a HWND to the visualisation command handler window if set by IPC_SETVISWND.
-*/
-
-
-#define IPC_ISVISRUNNING 613
-/* (requires Winamp 5.0+)
-** int visrunning=SendMessage(hwnd_winamp,WM_WA_IPC,0,IPC_ISVISRUNNING);
-** This will return 1 if a visualisation is currently running and 0 if one is not running.
-*/
-
-
-#define IPC_CB_VISRANDOM 628 // param is status of random
-
-
-#define IPC_SETIDEALVIDEOSIZE 614
-/* (requires Winamp 5.0+)
-** This is sent by Winamp back to itself so it can be trapped and adjusted as needed with
-** the desired width in HIWORD(wParam) and the desired height in LOWORD(wParam).
-**
-** if(uMsg == WM_WA_IPC){
-** if(lParam == IPC_SETIDEALVIDEOSIZE){
-** wParam = MAKEWPARAM(height,width);
-** }
-** }
-*/
-
-
-#define IPC_GETSTOPONVIDEOCLOSE 615
-/* (requires Winamp 5.0+)
-** int sovc=SendMessage(hwnd_winamp,WM_WA_IPC,0,IPC_GETSTOPONVIDEOCLOSE);
-** This will return 1 if 'stop on video close' is enabled and 0 if it is disabled.
-*/
-
-
-#define IPC_SETSTOPONVIDEOCLOSE 616
-/* (requires Winamp 5.0+)
-** int sovc=SendMessage(hwnd_winamp,WM_WA_IPC,enabled,IPC_SETSTOPONVIDEOCLOSE);
-** Set enabled to 1 to enable and 0 to disable the 'stop on video close' option.
-*/
-
-
-typedef struct {
- HWND hwnd;
- int uMsg;
- WPARAM wParam;
- LPARAM lParam;
-} transAccelStruct;
-
-#define IPC_TRANSLATEACCELERATOR 617
-/* (requires Winamp 5.0+)
-** (deprecated as of 5.53x+)
-*/
-
-typedef struct {
- int cmd;
- int x;
- int y;
- int align;
-} windowCommand; // send this as param to an IPC_PLCMD, IPC_MBCMD, IPC_VIDCMD
-
-
-#define IPC_CB_ONTOGGLEAOT 618
-
-
-#define IPC_GETPREFSWND 619
-/* (requires Winamp 5.0+)
-** HWND prefs = (HWND)SendMessage(hwnd_winamp,WM_WA_IPC,0,IPC_GETPREFSWND);
-** This will return a handle to the preferences dialog if it is open otherwise it will
-** return zero. A simple check with the OS api IsWindow(..) is a good test if it's valid.
-**
-** e.g. this will open (or close if already open) the preferences dialog and show if we
-** managed to get a valid
-** SendMessage(hwnd_winamp,WM_COMMAND,MAKEWPARAM(WINAMP_OPTIONS_PREFS,0),0);
-** MessageBox(hwnd_winamp,(IsWindow((HWND)SendMessage(hwnd_winamp,WM_WA_IPC,0,IPC_GETPREFSWND))?"Valid":"Not Open"),0,MB_OK);
-*/
-
-
-#define IPC_SET_PE_WIDTHHEIGHT 620
-/* (requires Winamp 5.0+)
-** SendMessage(hwnd_winamp,WM_WA_IPC,(WPARAM)&point,IPC_SET_PE_WIDTHHEIGHT);
-** You pass a pointer to a POINT structure which holds the width and height and Winamp
-** will set the playlist editor to that size (this is used by gen_ff on skin changes).
-** There does not appear to be any bounds limiting with this so it is possible to create
-** a zero size playlist editor window (which is a pretty silly thing to do).
-*/
-
-
-#define IPC_GETLANGUAGEPACKINSTANCE 621
-/* (requires Winamp 5.0+)
-** HINSTANCE hInst = (HINSTANCE)SendMessage(hwnd_winamp,WM_WA_IPC,0,IPC_GETLANGUAGEPACKINSTANCE);
-** This will return the HINSTANCE to the currently used language pack file for winamp.exe
-**
-** (5.5+)
-** If you pass 1 in wParam then you will have zero returned if a language pack is in use.
-** if(!SendMessage(hwnd_winamp,WM_WA_IPC,1,IPC_GETLANGUAGEPACKINSTANCE)){
-** // winamp is currently using a language pack
-** }
-**
-** If you pass 2 in wParam then you will get the path to the language pack folder.
-** wchar_t* lngpackfolder = (wchar_t*)SendMessage(hwnd_winamp,WM_WA_IPC,2,IPC_GETLANGUAGEPACKINSTANCE);
-**
-** If you pass 3 in wParam then you will get the path to the currently extracted language pack.
-** wchar_t* lngpack = (wchar_t*)SendMessage(hwnd_winamp,WM_WA_IPC,3,IPC_GETLANGUAGEPACKINSTANCE);
-**
-** If you pass 4 in wParam then you will get the name of the currently used language pack.
-** wchar_t* lngname = (char*)SendMessage(hwnd_winamp,WM_WA_IPC,4,IPC_GETLANGUAGEPACKINSTANCE);
-*/
-#define LANG_IDENT_STR 0
-#define LANG_LANG_CODE 1
-#define LANG_COUNTRY_CODE 2
-/*
-** (5.51+)
-** If you pass 5 in LOWORD(wParam) then you will get the ident string/code string
-** (based on the param passed in the HIWORD(wParam) of the currently used language pack.
-** The string returned with LANG_IDENT_STR is used to represent the language that the
-** language pack is intended for following ISO naming conventions for consistancy.
-**
-** wchar_t* ident_str = (wchar_t*)SendMessage(hwnd_winamp,WM_WA_IPC,MAKEWPARAM(5,LANG_XXX),IPC_GETLANGUAGEPACKINSTANCE);
-**
-** e.g.
-** For the default language it will return the following for the different LANG_XXX codes
-** LANG_IDENT_STR -> "en-US" (max buffer size of this is 9 wchar_t)
-** LANG_LANG_CODE -> "en" (language code)
-** LANG_COUNTRY_CODE -> "US" (country code)
-**
-** On pre 5.51 installs you can get LANG_IDENT_STR using the following method
-** (you'll have to custom process the string returned if you want the langugage or country but that's easy ;) )
-**
-** #define LANG_PACK_LANG_ID 65534 (if you don't have lang.h)
-** HINSTANCE hInst = (HINSTANCE)SendMessage(hwnd_winamp,WM_WA_IPC,0,IPC_GETLANGUAGEPACKINSTANCE);
-** TCHAR buffer[9] = {0};
-** LoadString(hInst,LANG_PACK_LANG_ID,buffer,sizeof(buffer));
-**
-**
-**
-** The following example shows how using the basic api will allow you to load the playlist
-** context menu resource from the currently loaded language pack or it will fallback to
-** the default winamp.exe instance.
-**
-** HINSTANCE lang = (HINSTANCE)SendMessage(hwnd_winamp,WM_WA_IPC,0,IPC_GETLANGUAGEPACKINSTANCE);
-** HMENU popup = GetSubMenu(GetSubMenu((LoadMenu(lang?lang:GetModuleHandle(0),MAKEINTRESOURCE(101))),2),5);
-** // do processing as needed on the menu before displaying it
-** TrackPopupMenuEx(orig,TPM_LEFTALIGN|TPM_LEFTBUTTON|TPM_RIGHTBUTTON,rc.left,rc.bottom,hwnd_owner,0);
-** DestroyMenu(popup);
-**
-** If you need a specific menu handle then look at IPC_GET_HMENU for more information.
-*/
-
-
-#define IPC_CB_PEINFOTEXT 622 // data is a string, ie: "04:21/45:02"
-
-
-#define IPC_CB_OUTPUTCHANGED 623 // output plugin was changed in config
-
-
-#define IPC_GETOUTPUTPLUGIN 625
-/* (requires Winamp 5.0+)
-** char* outdll = (char*)SendMessage(hwnd_winamp,WM_WA_IPC,0,IPC_GETOUTPUTPLUGIN);
-** This returns a string of the current output plugin's dll name.
-** e.g. if the directsound plugin was selected then this would return 'out_ds.dll'.
-*/
-
-
-#define IPC_SETDRAWBORDERS 626
-/* (requires Winamp 5.0+)
-** SendMessage(hwnd_winamp,WM_WA_IPC,enabled,IPC_SETDRAWBORDERS);
-** Set enabled to 1 to enable and 0 to disable drawing of the playlist editor and winamp
-** gen class windows (used by gen_ff to allow it to draw its own window borders).
-*/
-
-
-#define IPC_DISABLESKINCURSORS 627
-/* (requires Winamp 5.0+)
-** SendMessage(hwnd_winamp,WM_WA_IPC,enabled,IPC_DISABLESKINCURSORS);
-** Set enabled to 1 to enable and 0 to disable the use of skinned cursors.
-*/
-
-
-#define IPC_GETSKINCURSORS 628
-/* (requires Winamp 5.36+)
-** data = (WACURSOR)cursorId. (check wa_dlg.h for values)
-*/
-
-
-#define IPC_CB_RESETFONT 629
-
-
-#define IPC_IS_FULLSCREEN 630
-/* (requires Winamp 5.0+)
-** int val=SendMessage(hwnd_winamp,WM_WA_IPC,0,IPC_IS_FULLSCREEN);
-** This will return 1 if the video or visualisation is in fullscreen mode or 0 otherwise.
-*/
-
-
-#define IPC_SET_VIS_FS_FLAG 631
-/* (requires Winamp 5.0+)
-** A vis should send this message with 1/as param to notify winamp that it has gone to or has come back from fullscreen mode
-*/
-
-
-#define IPC_SHOW_NOTIFICATION 632
-
-
-#define IPC_GETSKININFO 633
-#define IPC_GETSKININFOW 1633
-/* (requires Winamp 5.0+)
-** This is a notification message sent to the main Winamp window by itself whenever it
-** needs to get information to be shown about the current skin in the 'Current skin
-** information' box on the main Skins page in the Winamp preferences.
-**
-** When this notification is received and the current skin is one you are providing the
-** support for then you return a valid buffer for Winamp to be able to read from with
-** information about it such as the name of the skin file.
-**
-** if(uMsg == WM_WA_IPC && lParam == IPC_GETSKININFO){
-** if(is_our_skin()){
-** return is_our_skin_name();
-** }
-** }
-*/
-
-
-#define IPC_GET_MANUALPLADVANCE 634
-/* (requires Winamp 5.03+)
-** int val=SendMessage(hwnd_winamp,WM_WA_IPC,0,IPC_GET_MANUALPLADVANCE);
-** IPC_GET_MANUALPLADVANCE returns the status of the Manual Playlist Advance.
-** If enabled this will return 1 otherwise it will return 0.
-*/
-
-
-#define IPC_SET_MANUALPLADVANCE 635
-/* (requires Winamp 5.03+)
-** SendMessage(hwnd_winamp,WM_WA_IPC,value,IPC_SET_MANUALPLADVANCE);
-** IPC_SET_MANUALPLADVANCE sets the status of the Manual Playlist Advance option.
-** Set value = 1 to turn it on and value = 0 to turn it off.
-*/
-
-
-#define IPC_GET_NEXT_PLITEM 636
-/* (requires Winamp 5.04+)
-** SendMessage(hwnd_winamp,WM_WA_IPC,0,IPC_EOF_GET_NEXT_PLITEM);
-**
-** Sent to Winamp's main window when an item has just finished playback or the next
-** button has been pressed and requesting the new playlist item number to go to.
-**
-** Subclass this message in your application to return the new item number.
-** Return -1 for normal Winamp operation (default) or the new item number in
-** the playlist to be played instead of the originally selected next track.
-**
-** This is primarily provided for the JTFE plugin (gen_jumpex.dll).
-*/
-
-
-#define IPC_GET_PREVIOUS_PLITEM 637
-/* (requires Winamp 5.04+)
-** SendMessage(hwnd_winamp,WM_WA_IPC,0,IPC_EOF_GET_PREVIOUS_PLITEM);
-**
-** Sent to Winamp's main window when the previous button has been pressed and Winamp is
-** requesting the new playlist item number to go to.
-**
-** Return -1 for normal Winamp operation (default) or the new item number in
-** the playlist to be played instead of the originally selected previous track.
-**
-** This is primarily provided for the JTFE plugin (gen_jumpex.dll).
-*/
-
-
-#define IPC_IS_WNDSHADE 638
-/* (requires Winamp 5.04+)
-** int is_shaded=SendMessage(hwnd_winamp,WM_WA_IPC,wnd,IPC_IS_WNDSHADE);
-** Pass 'wnd' as an id as defined for IPC_GETWND or pass -1 to query the status of the
-** main window. This returns 1 if the window is in winshade mode and 0 if it is not.
-** Make sure you only test for this on a 5.04+ install otherwise you get a false result.
-** (See the notes about unhandled WM_WA_IPC messages).
-*/
-
-
-#define IPC_SETRATING 639
-/* (requires Winamp 5.04+ with ML)
-** int rating=SendMessage(hwnd_winamp,WM_WA_IPC,rating,IPC_SETRATING);
-** This will allow you to set the 'rating' on the current playlist entry where 'rating'
-** is an integer value from 0 (no rating) to 5 (5 stars).
-**
-** The following example should correctly allow you to set the rating for any specified
-** playlist entry assuming of course that you're trying to get a valid playlist entry.
-**
-** void SetPlaylistItemRating(int item_to_set, int rating_to_set){
-** int cur_pos=SendMessage(hwnd_winamp,WM_WA_IPC,0,IPC_GETLISTPOS);
-** SendMessage(hwnd_winamp,WM_WA_IPC,item_to_set,IPC_SETPLAYLISTPOS);
-** SendMessage(hwnd_winamp,WM_WA_IPC,rating_to_set,IPC_SETRATING);
-** SendMessage(hwnd_winamp,WM_WA_IPC,cur_pos,IPC_SETPLAYLISTPOS);
-** }
-*/
-
-
-#define IPC_GETRATING 640
-/* (requires Winamp 5.04+ with ML)
-** int rating=SendMessage(hwnd_winamp,WM_WA_IPC,0,IPC_GETRATING);
-** This returns the current playlist entry's rating between 0 (no rating) to 5 (5 stars).
-**
-** The following example should correctly allow you to get the rating for any specified
-** playlist entry assuming of course that you're trying to get a valid playlist entry.
-**
-** int GetPlaylistItemRating(int item_to_get, int rating_to_set){
-** int cur_pos=SendMessage(hwnd_winamp,WM_WA_IPC,0,IPC_GETLISTPOS), rating = 0;
-** SendMessage(hwnd_winamp,WM_WA_IPC,item_to_get,IPC_SETPLAYLISTPOS);
-** rating = SendMessage(hwnd_winamp,WM_WA_IPC,0,IPC_GETRATING);
-** SendMessage(hwnd_winamp,WM_WA_IPC,cur_pos,IPC_SETPLAYLISTPOS);
-** return rating;
-** }
-*/
-
-
-#define IPC_GETNUMAUDIOTRACKS 641
-/* (requires Winamp 5.04+)
-** int n = SendMessage(hwnd_winamp,WM_WA_IPC,0,IPC_GETNUMAUDIOTRACKS);
-** This will return the number of audio tracks available from the currently playing item.
-*/
-
-
-#define IPC_GETNUMVIDEOTRACKS 642
-/* (requires Winamp 5.04+)
-** int n = SendMessage(hwnd_winamp,WM_WA_IPC,0,IPC_GETNUMVIDEOTRACKS);
-** This will return the number of video tracks available from the currently playing item.
-*/
-
-
-#define IPC_GETAUDIOTRACK 643
-/* (requires Winamp 5.04+)
-** int cur = SendMessage(hwnd_winamp,WM_WA_IPC,0,IPC_GETAUDIOTRACK);
-** This will return the id of the current audio track for the currently playing item.
-*/
-
-
-#define IPC_GETVIDEOTRACK 644
-/* (requires Winamp 5.04+)
-** int cur = SendMessage(hwnd_winamp,WM_WA_IPC,0,IPC_GETVIDEOTRACK);
-** This will return the id of the current video track for the currently playing item.
-*/
-
-
-#define IPC_SETAUDIOTRACK 645
-/* (requires Winamp 5.04+)
-** SendMessage(hwnd_winamp,WM_WA_IPC,track,IPC_SETAUDIOTRACK);
-** This allows you to switch to a new audio track (if supported) in the current playing file.
-*/
-
-
-#define IPC_SETVIDEOTRACK 646
-/* (requires Winamp 5.04+)
-** SendMessage(hwnd_winamp,WM_WA_IPC,track,IPC_SETVIDEOTRACK);
-** This allows you to switch to a new video track (if supported) in the current playing file.
-*/
-
-
-#define IPC_PUSH_DISABLE_EXIT 647
-/* (requires Winamp 5.04+)
-** SendMessage(hwnd_winamp,WM_WA_IPC,0,IPC_PUSH_DISABLE_EXIT);
-** This will let you disable or re-enable the UI exit functions (close button, context
-** menu, alt-f4). Remember to call IPC_POP_DISABLE_EXIT when you are done doing whatever
-** was required that needed to prevent exit otherwise you have to kill the Winamp process.
-*/
-
-
-#define IPC_POP_DISABLE_EXIT 648
-/* (requires Winamp 5.04+)
-** SendMessage(hwnd_winamp,WM_WA_IPC,0,IPC_POP_DISABLE_EXIT);
-** See IPC_PUSH_DISABLE_EXIT
-*/
-
-
-#define IPC_IS_EXIT_ENABLED 649
-/* (requires Winamp 5.04+)
-** SendMessage(hwnd_winamp,WM_WA_IPC,0,IPC_IS_EXIT_ENABLED);
-** This will return 0 if the 'exit' option of Winamp's menu is disabled and 1 otherwise.
-*/
-
-
-#define IPC_IS_AOT 650
-/* (requires Winamp 5.04+)
-** SendMessage(hwnd_winamp,WM_WA_IPC,0,IPC_IS_AOT);
-** This will return the status of the always on top flag.
-** Note: This may not match the actual TOPMOST window flag while another fullscreen
-** application is focused if the user has the 'Disable always on top while fullscreen
-** applications are focused' option under the General Preferences page is checked.
-*/
-
-
-#define IPC_USES_RECYCLEBIN 651
-/* (requires Winamp 5.09+)
-** int use_bin=SendMessage(hwnd_winamp,WM_WA_IPC,0,IPC_USES_RECYCLEBIN);
-** This will return 1 if the deleted file should be sent to the recycle bin or
-** 0 if deleted files should be deleted permanently (default action for < 5.09).
-**
-** Note: if you use this on pre 5.09 installs of Winamp then it will return 1 which is
-** not correct but is due to the way that SendMessage(..) handles un-processed messages.
-** Below is a quick case for checking if the returned value is correct.
-**
-** if(SendMessage(hwnd_winamp,WM_WA_IPC,0,IPC_USES_RECYCLEBIN) &&
-** SendMessage(hwnd_winamp,WM_WA_IPC,0,IPC_GETVERSION)>=0x5009)
-** {
-** // can safely follow the option to recycle the file
-** }
-** else
-* {
-** // need to do a permanent delete of the file
-** }
-*/
-
-
-#define IPC_FLUSHAUDITS 652
-/*
-** SendMessage(hwnd_winamp,WM_WA_IPC,0,IPC_FLUSHAUDITS);
-**
-** Will flush any pending audits in the global audits queue
-**
-*/
-
-#define IPC_GETPLAYITEM_START 653
-#define IPC_GETPLAYITEM_END 654
-
-
-#define IPC_GETVIDEORESIZE 655
-#define IPC_SETVIDEORESIZE 656
-
-
-#define IPC_INITIAL_SHOW_STATE 657
-/* (requires Winamp 5.36+)
-** int show_state = SendMessage(hwnd_winamp,WM_WA_IPC,0,IPC_INITIAL_SHOW_STATE);
-** returns the processed value of nCmdShow when Winamp was started
-** (see MSDN documentation the values passed to WinMain(..) for what this should be)
-**
-** e.g.
-** if(SendMessage(hwnd_winamp,WM_WA_IPC,0,IPC_INITIAL_SHOW_STATE) == SW_SHOWMINIMIZED){
-** // we are starting minimised so process as needed (keep our window hidden)
-** }
-**
-** Useful for seeing if winamp was run minimised on startup so you can act accordingly.
-** On pre-5.36 versions this will effectively return SW_NORMAL/SW_SHOWNORMAL due to the
-** handling of unknown apis returning 1 from Winamp.
-*/
-
-// >>>>>>>>>>> Next is 658
-
-#define IPC_PLCMD 1000
-
-#define PLCMD_ADD 0
-#define PLCMD_REM 1
-#define PLCMD_SEL 2
-#define PLCMD_MISC 3
-#define PLCMD_LIST 4
-
-//#define IPC_MBCMD 1001
-
-#define MBCMD_BACK 0
-#define MBCMD_FORWARD 1
-#define MBCMD_STOP 2
-#define MBCMD_RELOAD 3
-#define MBCMD_MISC 4
-
-#define IPC_VIDCMD 1002
-
-#define VIDCMD_FULLSCREEN 0
-#define VIDCMD_1X 1
-#define VIDCMD_2X 2
-#define VIDCMD_LIB 3
-#define VIDPOPUP_MISC 4
-
-//#define IPC_MBURL 1003 //sets the URL
-//#define IPC_MBGETCURURL 1004 //copies the current URL into wParam (have a 4096 buffer ready)
-//#define IPC_MBGETDESC 1005 //copies the current URL description into wParam (have a 4096 buffer ready)
-//#define IPC_MBCHECKLOCFILE 1006 //checks that the link file is up to date (otherwise updates it). wParam=parent HWND
-//#define IPC_MBREFRESH 1007 //refreshes the "now playing" view in the library
-//#define IPC_MBGETDEFURL 1008 //copies the default URL into wParam (have a 4096 buffer ready)
-
-#define IPC_STATS_LIBRARY_ITEMCNT 1300 // updates library count status
-
-/*
-** IPC's in the message range 2000 - 3000 are reserved internally for freeform messages.
-** These messages are taken from ff_ipc.h which is part of the Modern skin integration.
-*/
-
-#define IPC_FF_FIRST 2000
-
-#define IPC_FF_COLOURTHEME_CHANGE IPC_FF_ONCOLORTHEMECHANGED
-#define IPC_FF_ONCOLORTHEMECHANGED IPC_FF_FIRST + 3
-/*
-** This is a notification message sent when the user changes the colour theme in a Modern
-** skin and can also be detected when the Modern skin is first loaded as the gen_ff plugin
-** applies relevant settings and styles (like the colour theme).
-**
-** The value of wParam is the name of the new color theme being switched to.
-** SendMessage(hwnd_winamp,WM_WA_IPC,(WPARAM)(const char*)colour_theme_name,IPC_FF_ONCOLORTHEMECHANGED);
-**
-** (IPC_FF_COLOURTHEME_CHANGE is the name i (DrO) was using before getting a copy of
-** ff_ipc.h with the proper name in it).
-*/
-
-
-#define IPC_FF_ISMAINWND IPC_FF_FIRST + 4
-/*
-** int ismainwnd = (HWND)SendMessage(hwnd_winamp,WM_WA_IPC,(WPARAM)(HWND)test_wnd,IPC_FF_ISMAINWND);
-**
-** This allows you to determine if the window handle passed to it is a modern skin main
-** window or not. If it is a main window or any of its windowshade variants then it will
-** return 1.
-**
-** Because of the way modern skins are implemented, it is possible for this message to
-** return a positive test result for a number of window handles within the current Winamp
-** process. This appears to be because you can have a visible main window, a compact main
-** window and also a winshaded version.
-**
-** The following code example below is one way of seeing how this api works since it will
-** enumerate all windows related to Winamp at the time and allows you to process as
-** required when a detection happens.
-**
-**
-** EnumThreadWindows(GetCurrentThreadId(),enumWndProc,0);
-**
-** BOOL CALLBACK enumWndProc(HWND hwnd, LPARAM lParam){
-**
-** if(SendMessage(hwnd_winamp,WM_WA_IPC,(WPARAM)hwnd,IPC_FF_ISMAINWND)){
-** // do processing in here
-** // or continue the enum for other main windows (if they exist)
-** // and just comment out the line below
-** return 0;
-** }
-** return 1;
-** }
-*/
-
-
-#define IPC_FF_GETCONTENTWND IPC_FF_FIRST + 5
-/*
-** HWND wa2embed = (HWND)SendMessage(hwnd_winamp,WM_WA_IPC,(WPARAM)(HWND)test_wnd,IPC_FF_GETCONTENTWND);
-**
-** This will return the Winamp 2 window that is embedded in the window's container
-** i.e. if hwnd is the playlist editor windowshade hwnd then it will return the Winamp 2
-** playlist editor hwnd.
-**
-** If no content is found such as the window has nothing embedded then this will return
-** the hwnd passed to it.
-*/
-
-
-#define IPC_FF_NOTIFYHOTKEY IPC_FF_FIRST + 6
-/*
-** This is a notification message sent when the user uses a global hotkey combination
-** which had been registered with the gen_hotkeys plugin.
-**
-** The value of wParam is the description of the hotkey as passed to gen_hotkeys.
-** SendMessage(hwnd_winamp,WM_WA_IPC,(WPARAM)(const char*)hotkey_desc,IPC_FF_NOTIFYHOTKEY);
-*/
-
-#define IPC_FF_LAST 3000
-
-
-/*
-** General IPC messages in Winamp
-**
-** All notification messages appear in the lParam of the main window message proceedure.
-*/
-
-
-#define IPC_GETDROPTARGET 3001
-/* (requires Winamp 5.0+)
-** IDropTarget* IDrop = (IDropTarget*)SendMessage(hwnd_winamp,WM_WA_IPC,0,IPC_GETDROPTARGET);
-**
-** You call this to retrieve a copy of the IDropTarget interface which Winamp created for
-** handling external drag and drop operations on to it's Windows. This is only really
-** useful if you're providing an alternate interface and want your Windows to provide the
-** same drag and drop support as Winamp normally provides the user. Check out MSDN or
-** your prefered search facility for more information about the IDropTarget interface and
-** what's needed to handle it in your own instance.
-*/
-
-
-#define IPC_PLAYLIST_MODIFIED 3002
-/* (requires Winamp 5.0+)
-** This is a notification message sent to the main Winamp window whenever the playlist is
-** modified in any way e.g. the addition/removal of a playlist entry.
-**
-** It is not a good idea to do large amounts of processing in this notification since it
-** will slow down Winamp as playlist entries are modified (especially when you're adding
-** in a large playlist).
-**
-** if(uMsg == WM_WA_IPC && lParam == IPC_PLAYLIST_MODIFIED)
-** {
-** // do what you need to do here
-** }
-*/
-
-
-#define IPC_PLAYING_FILE 3003
-/* (requires Winamp 5.0+)
-** This is a notification message sent to the main Winamp window when playback begins for
-** a file. This passes the full filepath in the wParam of the message received.
-**
-** if(uMsg == WM_WA_IPC && lParam == IPC_PLAYING_FILE)
-** {
-** // do what you need to do here, e.g.
-** process_file((char*)wParam);
-** }
-*/
-
-
-#define IPC_PLAYING_FILEW 13003
-/* (requires Winamp 5.0+)
-** This is a notification message sent to the main Winamp window when playback begins for
-** a file. This passes the full filepath in the wParam of the message received.
-**
-** if(uMsg == WM_WA_IPC && lParam == IPC_PLAYING_FILEW)
-** {
-** // do what you need to do here, e.g.
-** process_file((wchar_t*)wParam);
-** }
-*/
-
-
-#define IPC_FILE_TAG_MAY_HAVE_UPDATED 3004
-#define IPC_FILE_TAG_MAY_HAVE_UPDATEDW 3005
-/* (requires Winamp 5.0+)
-** This is a notification message sent to the main Winamp window when a file's tag
-** (e.g. id3) may have been updated. This appears to be sent when the InfoBox(..) function
-** of the associated input plugin returns a 1 (which is the file information dialog/editor
-** call normally).
-**
-** if(uMsg == WM_WA_IPC && lParam == IPC_FILE_TAG_MAY_HAVE_UPDATED)
-** {
-** // do what you need to do here, e.g.
-** update_info_on_file_update((char*)wParam);
-** }
-*/
-
-
-#define IPC_ALLOW_PLAYTRACKING 3007
-/* (requires Winamp 5.0+)
-** SendMessage(hwnd_winamp,WM_WA_IPC,allow,IPC_ALLOW_PLAYTRACKING);
-** Send allow as nonzero to allow play tracking and zero to disable the mode.
-*/
-
-
-#define IPC_HOOK_OKTOQUIT 3010
-/* (requires Winamp 5.0+)
-** This is a notification message sent to the main Winamp window asking if it's okay to
-** close or not. Return zero to prevent Winamp from closing or return anything non-zero
-** to allow Winamp to close.
-**
-** The best implementation of this option is to let the message pass through to the
-** original window proceedure since another plugin may want to have a say in the matter
-** with regards to Winamp closing.
-**
-** if(uMsg == WM_WA_IPC && lParam == IPC_HOOK_OKTOQUIT)
-** {
-** // do what you need to do here, e.g.
-** if(no_shut_down())
-** {
-** return 1;
-** }
-** }
-*/
-
-
-#define IPC_WRITECONFIG 3011
-/* (requires Winamp 5.0+)
-** SendMessage(hwnd_winamp,WM_WA_IPC,write_type,IPC_WRITECONFIG);
-**
-** Send write_type as 2 to write all config settings and the current playlist.
-**
-** Send write_type as 1 to write the playlist and common settings.
-** This won't save the following ini settings::
-**
-** defext, titlefmt, proxy, visplugin_name, dspplugin_name, check_ft_startup,
-** visplugin_num, pe_fontsize, visplugin_priority, visplugin_autoexec, dspplugin_num,
-** sticon, splash, taskbar, dropaotfs, ascb_new, ttips, riol, minst, whichicon,
-** whichicon2, addtolist, snap, snaplen, parent, hilite, disvis, rofiob, shownumsinpl,
-** keeponscreen, eqdsize, usecursors, fixtitles, priority, shuffle_morph_rate,
-** useexttitles, bifont, inet_mode, ospb, embedwnd_freesize, no_visseh
-** (the above was valid for 5.1)
-**
-** Send write_type as 0 to write the common and less common settings and no playlist.
-*/
-
-
-#define IPC_UPDATE_URL 3012
-// pass the URL (char *) in lparam, will be free()'d on done.
-
-
-#define IPC_GET_RANDFUNC 3015 // returns a function to get a random number
-/* (requires Winamp 5.1+)
-** int (*randfunc)(void) = (int(*)(void))SendMessage(plugin.hwndParent,WM_WA_IPC,0,IPC_GET_RANDFUNC);
-** if(randfunc && randfunc != 1){
-** randfunc();
-** }
-**
-** This will return a positive 32-bit number (essentially 31-bit).
-** The check for a returned value of 1 is because that's the default return value from
-** SendMessage(..) when it is not handled so is good to check for it in this situation.
-*/
-
-
-#define IPC_METADATA_CHANGED 3017
-/* (requires Winamp 5.1+)
-** int changed=SendMessage(hwnd_winamp,WM_WA_IPC,(WPARAM)(char*)field,IPC_METADATA_CHANGED);
-** a plugin can SendMessage this to winamp if internal metadata has changes.
-** wParam should be a char * of what field changed
-**
-** Currently used for internal actions (and very few at that) the intent of this api is
-** to allow a plugin to call it when metadata has changed in the current playlist entry
-** e.g.a new id3v2 tag was found in a stream
-**
-** The wparam value can either be NULL or a pointer to an ansi string for the metadata
-** which has changed. This can be thought of as an advanced version of IPC_UPDTITLE and
-** could be used to allow for update of the current title when a specific tag changed.
-**
-** Not recommended to be used since there is not the complete handling implemented in
-** Winamp for it at the moment.
-*/
-
-
-#define IPC_SKIN_CHANGED 3018
-/* (requires Winamp 5.1+)
-** This is a notification message sent to the main Winamp window by itself whenever
-** the skin in use is changed. There is no information sent by the wParam for this.
-**
-** if(message == WM_WA_IPC && lparam == IPC_SKIN_CHANGED)
-** {
-** // do what you need to do to handle skin changes, e.g. call WADlg_init(hwnd_winamp);
-** }
-*/
-
-
-#define IPC_REGISTER_LOWORD_COMMAND 3019
-/* (requires Winamp 5.1+)
-** WORD id = SendMessage(hwnd_winamp,WM_WA_IPC,0,IPC_REGISTER_LOWORD_COMMAND);
-** This will assign you a unique id for making your own commands such as for extra menu
-** entries. The starting value returned by this message will potentially change as and
-** when the main resource file of Winamp is updated with extra data so assumptions cannot
-** be made on what will be returned and plugin loading order will affect things as well.
-
-** 5.33+
-** If you want to reserve more than one id, you can pass the number of ids required in wParam
-*/
-
-
-#define IPC_GET_DISPATCH_OBJECT 3020 // gets winamp main IDispatch * (for embedded webpages)
-#define IPC_GET_UNIQUE_DISPATCH_ID 3021 // gives you a unique dispatch ID that won't conflict with anything in winamp's IDispatch *
-#define IPC_ADD_DISPATCH_OBJECT 3022 // add your own dispatch object into winamp's. This lets embedded webpages access your functions
-// pass a pointer to DispatchInfo (see below). Winamp makes a copy of all this data so you can safely delete it later
-typedef struct
-{
- wchar_t *name; // filled in by plugin, make sure it's a unicode string!! (i.e. L"myObject" instead of "myObject).
- struct IDispatch *dispatch; // filled in by plugin
- DWORD id; // filled in by winamp on return
-} DispatchInfo;
-
-// see IPC_JSAPI2_GET_DISPATCH_OBJECT for version 2 of the Dispatchable scripting interface
-
-#define IPC_GET_PROXY_STRING 3023
-/* (requires Winamp 5.11+)
-** char* proxy_string=(char*)SendMessage(hwnd_winamp,WM_WA_IPC,0,IPC_GET_PROXY_STRING);
-** This will return the same string as is shown on the General Preferences page.
-*/
-
-
-#define IPC_USE_REGISTRY 3024
-/* (requires Winamp 5.11+)
-** int reg_enabled=SendMessage(hwnd_winamp,WM_WA_IPC,0,IPC_USE_REGISTRY);
-** This will return 0 if you should leave your grubby hands off the registry (i.e. for
-** lockdown mode). This is useful if Winamp is run from a USB drive and you can't alter
-** system settings, etc.
-*/
-
-
-#define IPC_GET_API_SERVICE 3025
-/* (requires Winamp 5.12+)
-** api_service* api_service = (api_service)SendMessage(hwnd_winamp,WM_WA_IPC,0,IPC_GET_API_SERVICE);
-** This api will return Winamp's api_service pointer (which is what Winamp3 used, heh).
-** If this api is not supported in the Winamp version that is being used at the time then
-** the returned value from this api will be 1 which is a good version check.
-**
-** As of 5.12 there is support for .w5s plugins which reside in %WinampDir%\System and
-** are intended for common code that can be shared amongst other plugins e.g. jnetlib.w5s
-** which contains jnetlib in one instance instead of being duplicated multiple times in
-** all of the plugins which need internet access.
-**
-** Details on the .w5s specifications will come at some stage (possibly).
-*/
-
-
-typedef struct {
- const wchar_t *filename;
- const wchar_t *metadata;
- wchar_t *ret;
- size_t retlen;
-} extendedFileInfoStructW;
-
-#define IPC_GET_EXTENDED_FILE_INFOW 3026
-/* (requires Winamp 5.13+)
-** Pass a pointer to the above struct in wParam
-*/
-
-
-#define IPC_GET_EXTENDED_FILE_INFOW_HOOKABLE 3027
-#define IPC_SET_EXTENDED_FILE_INFOW 3028
-/* (requires Winamp 5.13+)
-** Pass a pointer to the above struct in wParam
-*/
-
-
-#define IPC_PLAYLIST_GET_NEXT_SELECTED 3029
-/* (requires 5.2+)
-** int pl_item = SendMessage(hwnd_winamp,WM_WA_IPC,start,IPC_PLAYLIST_GET_NEXT_SELECTED);
-**
-** This works just like the ListView_GetNextItem(..) macro for ListView controls.
-** 'start' is the index of the playlist item that you want to begin the search after or
-** set this as -1 for the search to begin with the first item of the current playlist.
-**
-** This will return the index of the selected playlist according to the 'start' value or
-** it returns -1 if there is no selection or no more selected items according to 'start'.
-**
-** Quick example:
-**
-** int sel = -1;
-** // keep incrementing the start of the search so we get all of the selected entries
-** while((sel = SendMessage(hwnd_winamp,WM_WA_IPC,sel,IPC_PLAYLIST_GET_NEXT_SELECTED))!=-1){
-** // show the playlist file entry of the selected item(s) if there were any
-** MessageBox(hwnd_winamp,(char*)SendMessage(hwnd_winamp,WM_WA_IPC,sel,IPC_GETPLAYLISTFILE),0,0);
-** }
-*/
-
-
-#define IPC_PLAYLIST_GET_SELECTED_COUNT 3030
-/* (requires 5.2+)
-** int selcnt = SendMessage(hwnd_winamp,WM_WA_IPC,0,IPC_PLAYLIST_GET_SELECTED_COUNT);
-** This will return the number of selected playlist entries.
-*/
-
-
-#define IPC_GET_PLAYING_FILENAME 3031
-// returns wchar_t * of the currently playing filename
-
-#define IPC_OPEN_URL 3032
-// send either ANSI or Unicode string (it'll figure it out, but it MUST start with "h"!, so don't send ftp:// or anything funny)
-// you can also send this one from another process via WM_COPYDATA (unicode only)
-
-
-#define IPC_USE_UXTHEME_FUNC 3033
-/* (requires Winamp 5.35+)
-** int ret = SendMessage(hwnd_winamp,WM_WA_IPC,param,IPC_USE_UXTHEME_FUNC);
-** param can be IPC_ISWINTHEMEPRESENT or IPC_ISAEROCOMPOSITIONACTIVE or a valid hwnd.
-**
-** If you pass a hwnd then it will apply EnableThemeDialogTexture(ETDT_ENABLETAB)
-** so your tabbed dialogs can use the correct theme (on supporting OSes ie XP+).
-**
-** Otherwise this will return a value based on the param passed (as defined below).
-** For compatability, the return value will be zero on success (as 1 is returned
-** for unsupported ipc calls on older Winamp versions)
-*/
- #define IPC_ISWINTHEMEPRESENT 0
-/* This will return 0 if uxtheme.dll is present
-** int isthemethere = !SendMessage(hwnd_winamp,WM_WA_IPC,IPC_ISWINTHEMEPRESENT,IPC_USE_UXTHEME_FUNC);
-*/
- #define IPC_ISAEROCOMPOSITIONACTIVE 1
-/* This will return 0 if aero composition is active
-** int isaero = !SendMessage(hwnd_winamp,WM_WA_IPC,IPC_ISAEROCOMPOSITIONACTIVE,IPC_USE_UXTHEME_FUNC);
-*/
-
-
-#define IPC_GET_PLAYING_TITLE 3034
-// returns wchar_t * of the current title
-
-
-#define IPC_CANPLAY 3035
-// pass const wchar_t *, returns an in_mod * or 0
-
-
-typedef struct {
- // fill these in...
- size_t size; // init to sizeof(artFetchData)
- HWND parent; // parent window of the dialogue
-
- // fill as much of these in as you can, otherwise leave them 0
- const wchar_t *artist;
- const wchar_t *album;
- int year, amgArtistId, amgAlbumId;
-
- int showCancelAll; // if set to 1, this shows a "Cancel All" button on the dialogue
-
- // winamp will fill these in if the call returns successfully:
- void* imgData; // a buffer filled with compressed image data. free with WASABI_API_MEMMGR->sysFree()
- int imgDataLen; // the size of the buffer
- wchar_t type[10]; // eg: "jpg"
- const wchar_t *gracenoteFileId; // if you know it
-} artFetchData;
-
-#define IPC_FETCH_ALBUMART 3036
-/* pass an artFetchData*. This will show a dialog guiding the use through choosing art, and return when it's finished
-** return values:
-** 1: error showing dialog
-** 0: success
-** -1: cancel was pressed
-** -2: cancel all was pressed
-*/
-
-#define IPC_JSAPI2_GET_DISPATCH_OBJECT 3037
-/* pass your service's unique ID, as a wchar_t * string, in wParam
-** Winamp will copy the string, so don't worry about keeping it around
-** An IDispatch * object will be returned (cast the return value from SendMessage)
-** This IDispatch can be used for scripting/automation/VB interaction
-** Pass to IE via IDocHostUIHandler::GetExternal and it will become window.external in javscript
-*/
-
-#define IPC_REGISTER_WINAMP_IPCMESSAGE 65536
-/* (requires Winamp 5.0+)
-** DWORD id = SendMessage(hwnd_winamp,WM_WA_IPC,(WPARAM)name,IPC_REGISTER_WINAMP_IPCMESSAGE);
-** The value 'id' returned is > 65536 and is incremented on subsequent calls for unique
-** 'name' values passed to it. By using the same 'name' in different plugins will allow a
-** common runtime api to be provided for the currently running instance of Winamp
-** e.g.
-** PostMessage(hwnd_winamp,WM_WA_IPC,(WPARAM)my_param,registered_ipc);
-** Have a look at wa_hotkeys.h for an example on how this api is used in practice for a
-** custom WM_WA_IPC message.
-**
-** if(uMsg == WM_WA_IPC && lParam == id_from_register_winamp_ipcmessage){
-** // do things
-** }
-*/
-
-#endif//_WA_IPC_H_
\ No newline at end of file
diff --git a/tools/vio2sf/src/foobar/SDK-test.sln b/tools/vio2sf/src/foobar/SDK-test.sln
deleted file mode 100644
index 5d8e7a4a3..000000000
--- a/tools/vio2sf/src/foobar/SDK-test.sln
+++ /dev/null
@@ -1,73 +0,0 @@
-サソ
-Microsoft Visual Studio Solution File, Format Version 10.00
-# Visual Studio 2008
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "foobar2000_SDK", "foobar2000\SDK\foobar2000_SDK.vcproj", "{E8091321-D79D-4575-86EF-064EA1A4A20D}"
- ProjectSection(ProjectDependencies) = postProject
- {EBFFFB4E-261D-44D3-B89C-957B31A0BF9C} = {EBFFFB4E-261D-44D3-B89C-957B31A0BF9C}
- EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "foobar2000_ATL_helpers", "foobar2000\ATLHelpers\foobar2000_ATL_helpers.vcproj", "{622E8B19-8109-4717-BD4D-9657AA78363E}"
- ProjectSection(ProjectDependencies) = postProject
- {E8091321-D79D-4575-86EF-064EA1A4A20D} = {E8091321-D79D-4575-86EF-064EA1A4A20D}
- {EE47764E-A202-4F85-A767-ABDAB4AFF35F} = {EE47764E-A202-4F85-A767-ABDAB4AFF35F}
- EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "foobar2000_component_client", "foobar2000\foobar2000_component_client\foobar2000_component_client.vcproj", "{71AD2674-065B-48F5-B8B0-E1F9D3892081}"
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "foobar2000_sdk_helpers", "foobar2000\helpers\foobar2000_sdk_helpers.vcproj", "{EE47764E-A202-4F85-A767-ABDAB4AFF35F}"
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "pfc", "pfc\pfc.vcproj", "{EBFFFB4E-261D-44D3-B89C-957B31A0BF9C}"
-EndProject
-Global
- GlobalSection(SolutionConfigurationPlatforms) = preSolution
- Debug|Win32 = Debug|Win32
- Debug|x64 = Debug|x64
- Release|Win32 = Release|Win32
- Release|x64 = Release|x64
- EndGlobalSection
- GlobalSection(ProjectConfigurationPlatforms) = postSolution
- {E8091321-D79D-4575-86EF-064EA1A4A20D}.Debug|Win32.ActiveCfg = Debug|Win32
- {E8091321-D79D-4575-86EF-064EA1A4A20D}.Debug|Win32.Build.0 = Debug|Win32
- {E8091321-D79D-4575-86EF-064EA1A4A20D}.Debug|x64.ActiveCfg = Debug|x64
- {E8091321-D79D-4575-86EF-064EA1A4A20D}.Debug|x64.Build.0 = Debug|x64
- {E8091321-D79D-4575-86EF-064EA1A4A20D}.Release|Win32.ActiveCfg = Release|Win32
- {E8091321-D79D-4575-86EF-064EA1A4A20D}.Release|Win32.Build.0 = Release|Win32
- {E8091321-D79D-4575-86EF-064EA1A4A20D}.Release|x64.ActiveCfg = Release|x64
- {E8091321-D79D-4575-86EF-064EA1A4A20D}.Release|x64.Build.0 = Release|x64
- {622E8B19-8109-4717-BD4D-9657AA78363E}.Debug|Win32.ActiveCfg = Debug|Win32
- {622E8B19-8109-4717-BD4D-9657AA78363E}.Debug|Win32.Build.0 = Debug|Win32
- {622E8B19-8109-4717-BD4D-9657AA78363E}.Debug|x64.ActiveCfg = Debug|x64
- {622E8B19-8109-4717-BD4D-9657AA78363E}.Debug|x64.Build.0 = Debug|x64
- {622E8B19-8109-4717-BD4D-9657AA78363E}.Release|Win32.ActiveCfg = Release|Win32
- {622E8B19-8109-4717-BD4D-9657AA78363E}.Release|Win32.Build.0 = Release|Win32
- {622E8B19-8109-4717-BD4D-9657AA78363E}.Release|x64.ActiveCfg = Release|x64
- {622E8B19-8109-4717-BD4D-9657AA78363E}.Release|x64.Build.0 = Release|x64
- {71AD2674-065B-48F5-B8B0-E1F9D3892081}.Debug|Win32.ActiveCfg = Debug|Win32
- {71AD2674-065B-48F5-B8B0-E1F9D3892081}.Debug|Win32.Build.0 = Debug|Win32
- {71AD2674-065B-48F5-B8B0-E1F9D3892081}.Debug|x64.ActiveCfg = Debug|x64
- {71AD2674-065B-48F5-B8B0-E1F9D3892081}.Debug|x64.Build.0 = Debug|x64
- {71AD2674-065B-48F5-B8B0-E1F9D3892081}.Release|Win32.ActiveCfg = Release|Win32
- {71AD2674-065B-48F5-B8B0-E1F9D3892081}.Release|Win32.Build.0 = Release|Win32
- {71AD2674-065B-48F5-B8B0-E1F9D3892081}.Release|x64.ActiveCfg = Release|x64
- {71AD2674-065B-48F5-B8B0-E1F9D3892081}.Release|x64.Build.0 = Release|x64
- {EE47764E-A202-4F85-A767-ABDAB4AFF35F}.Debug|Win32.ActiveCfg = Debug|Win32
- {EE47764E-A202-4F85-A767-ABDAB4AFF35F}.Debug|Win32.Build.0 = Debug|Win32
- {EE47764E-A202-4F85-A767-ABDAB4AFF35F}.Debug|x64.ActiveCfg = Debug|x64
- {EE47764E-A202-4F85-A767-ABDAB4AFF35F}.Debug|x64.Build.0 = Debug|x64
- {EE47764E-A202-4F85-A767-ABDAB4AFF35F}.Release|Win32.ActiveCfg = Release|Win32
- {EE47764E-A202-4F85-A767-ABDAB4AFF35F}.Release|Win32.Build.0 = Release|Win32
- {EE47764E-A202-4F85-A767-ABDAB4AFF35F}.Release|x64.ActiveCfg = Release|x64
- {EE47764E-A202-4F85-A767-ABDAB4AFF35F}.Release|x64.Build.0 = Release|x64
- {EBFFFB4E-261D-44D3-B89C-957B31A0BF9C}.Debug|Win32.ActiveCfg = Debug|Win32
- {EBFFFB4E-261D-44D3-B89C-957B31A0BF9C}.Debug|Win32.Build.0 = Debug|Win32
- {EBFFFB4E-261D-44D3-B89C-957B31A0BF9C}.Debug|x64.ActiveCfg = Debug|x64
- {EBFFFB4E-261D-44D3-B89C-957B31A0BF9C}.Debug|x64.Build.0 = Debug|x64
- {EBFFFB4E-261D-44D3-B89C-957B31A0BF9C}.Release|Win32.ActiveCfg = Release|Win32
- {EBFFFB4E-261D-44D3-B89C-957B31A0BF9C}.Release|Win32.Build.0 = Release|Win32
- {EBFFFB4E-261D-44D3-B89C-957B31A0BF9C}.Release|x64.ActiveCfg = Release|x64
- {EBFFFB4E-261D-44D3-B89C-957B31A0BF9C}.Release|x64.Build.0 = Release|x64
- EndGlobalSection
- GlobalSection(SolutionProperties) = preSolution
- HideSolutionNode = FALSE
- EndGlobalSection
-EndGlobal
diff --git a/tools/vio2sf/src/foobar/foobar2000/SDK/abort_callback.cpp b/tools/vio2sf/src/foobar/foobar2000/SDK/abort_callback.cpp
deleted file mode 100644
index affc69ff2..000000000
--- a/tools/vio2sf/src/foobar/foobar2000/SDK/abort_callback.cpp
+++ /dev/null
@@ -1,17 +0,0 @@
-#include "foobar2000.h"
-
-void abort_callback::check() const {
- if (is_aborting()) throw exception_aborted();
-}
-
-void abort_callback::sleep(double p_timeout_seconds) const {
- if (!sleep_ex(p_timeout_seconds)) throw exception_aborted();
-}
-
-bool abort_callback::sleep_ex(double p_timeout_seconds) const {
-#ifdef _WIN32
- return !win32_event::g_wait_for(get_abort_event(),p_timeout_seconds);
-#else
-#error PORTME
-#endif
-}
\ No newline at end of file
diff --git a/tools/vio2sf/src/foobar/foobar2000/SDK/abort_callback.h b/tools/vio2sf/src/foobar/foobar2000/SDK/abort_callback.h
deleted file mode 100644
index 97ed3afea..000000000
--- a/tools/vio2sf/src/foobar/foobar2000/SDK/abort_callback.h
+++ /dev/null
@@ -1,76 +0,0 @@
-#ifndef _foobar2000_sdk_abort_callback_h_
-#define _foobar2000_sdk_abort_callback_h_
-
-namespace foobar2000_io {
-
-PFC_DECLARE_EXCEPTION(exception_aborted,pfc::exception,"User abort");
-
-#ifdef _WIN32
-typedef HANDLE abort_callback_event;
-#else
-#error PORTME
-#endif
-
-//! This class is used to signal underlying worker code whether user has decided to abort a potentially time-consuming operation. It is commonly required by all file related operations. Code that receives an abort_callback object should periodically check it and abort any operations being performed if it is signaled, typically throwing exception_aborted. \n
-//! See abort_callback_impl for an implementation.
-class NOVTABLE abort_callback
-{
-public:
- //! Returns whether user has requested the operation to be aborted.
- virtual bool is_aborting() const = 0;
-
- //! Retrieves event object that can be used with some OS calls. The even object becomes signaled when abort is triggered. On win32, this is equivalent to win32 event handle (see: CreateEvent). \n
- //! You must not close this handle or call any methods that change this handle's state (SetEvent() or ResetEvent()), you can only wait for it.
- virtual abort_callback_event get_abort_event() const = 0;
-
- //! Checks if user has requested the operation to be aborted, and throws exception_aborted if so.
- void check() const;
-
- //! For compatibility with old code. Do not call.
- inline void check_e() const {check();}
-
-
- //! Sleeps p_timeout_seconds or less when aborted, throws exception_aborted on abort.
- void sleep(double p_timeout_seconds) const;
- //! Sleeps p_timeout_seconds or less when aborted, returns true when execution should continue, false when not.
- bool sleep_ex(double p_timeout_seconds) const;
-protected:
- abort_callback() {}
- ~abort_callback() {}
-};
-
-
-
-//! Implementation of abort_callback interface.
-class abort_callback_impl : public abort_callback {
-public:
- abort_callback_impl() : m_aborting(false) {
- m_event.create(true,false);
- }
- inline void abort() {set_state(true);}
- inline void reset() {set_state(false);}
-
- void set_state(bool p_state) {m_aborting = p_state; m_event.set_state(p_state);}
-
- bool is_aborting() const {return m_aborting;}
-
- abort_callback_event get_abort_event() const {return m_event.get();}
-
-private:
- abort_callback_impl(const abort_callback_impl &) {throw pfc::exception_not_implemented();}
- const abort_callback_impl & operator=(const abort_callback_impl&) {throw pfc::exception_not_implemented();}
-
- volatile bool m_aborting;
-#ifdef WIN32
- win32_event m_event;
-#endif
-};
-
-//! Dummy abort_callback that never gets aborted. To be possibly optimized in the future.
-typedef abort_callback_impl abort_callback_dummy;
-
-}
-
-using namespace foobar2000_io;
-
-#endif //_foobar2000_sdk_abort_callback_h_
diff --git a/tools/vio2sf/src/foobar/foobar2000/SDK/advconfig.h b/tools/vio2sf/src/foobar/foobar2000/SDK/advconfig.h
deleted file mode 100644
index 3b2198953..000000000
--- a/tools/vio2sf/src/foobar/foobar2000/SDK/advconfig.h
+++ /dev/null
@@ -1,266 +0,0 @@
-//! Entrypoint class for adding items to Advanced Preferences page. \n
-//! Implementations must derive from one of subclasses: advconfig_branch, advconfig_entry_checkbox, advconfig_entry_string. \n
-//! Implementations are typically registered using static service_factory_single_t, or using provided helper classes in case of standard implementations declared in this header.
-class NOVTABLE advconfig_entry : public service_base {
-public:
- virtual void get_name(pfc::string_base & p_out) = 0;
- virtual GUID get_guid() = 0;
- virtual GUID get_parent() = 0;
- virtual void reset() = 0;
- virtual double get_sort_priority() = 0;
-
- static bool g_find(service_ptr_t& out, const GUID & id) {
- service_enum_t e; service_ptr_t ptr; while(e.next(ptr)) { if (ptr->get_guid() == id) {out = ptr; return true;} } return false;
- }
-
- static const GUID guid_root;
- static const GUID guid_branch_tagging,guid_branch_decoding,guid_branch_tools,guid_branch_playback,guid_branch_display;
-
- FB2K_MAKE_SERVICE_INTERFACE_ENTRYPOINT(advconfig_entry);
-};
-
-//! Creates a new branch in Advanced Preferences. \n
-//! Implementation: see advconfig_branch_impl / advconfig_branch_factory.
-class NOVTABLE advconfig_branch : public advconfig_entry {
-public:
- FB2K_MAKE_SERVICE_INTERFACE(advconfig_branch,advconfig_entry);
-};
-
-//! Creates a checkbox/radiocheckbox entry in Advanced Preferences. \n
-//! The difference between checkboxes and radiocheckboxes is different icon (obviously) and that checking a radiocheckbox unchecks all other radiocheckboxes in the same branch. \n
-//! Implementation: see advconfig_entry_checkbox_impl / advconfig_checkbox_factory_t.
-class NOVTABLE advconfig_entry_checkbox : public advconfig_entry {
-public:
- virtual bool get_state() = 0;
- virtual void set_state(bool p_state) = 0;
- virtual bool is_radio() = 0;
-
- FB2K_MAKE_SERVICE_INTERFACE(advconfig_entry_checkbox,advconfig_entry);
-};
-
-//! Creates a string/integer editbox entry in Advanced Preferences.\n
-//! Implementation: see advconfig_entry_string_impl / advconfig_string_factory.
-class NOVTABLE advconfig_entry_string : public advconfig_entry {
-public:
- virtual void get_state(pfc::string_base & p_out) = 0;
- virtual void set_state(const char * p_string,t_size p_length = infinite) = 0;
- virtual t_uint32 get_flags() = 0;
-
- enum {
- flag_is_integer = 1 << 0,
- flag_is_signed = 1 << 1,
- };
-
- FB2K_MAKE_SERVICE_INTERFACE(advconfig_entry_string,advconfig_entry);
-};
-
-
-//! Standard implementation of advconfig_branch. \n
-//! Usage: no need to use this class directly - use advconfig_branch_factory instead.
-class advconfig_branch_impl : public advconfig_branch {
-public:
- advconfig_branch_impl(const char * p_name,const GUID & p_guid,const GUID & p_parent,double p_priority) : m_name(p_name), m_guid(p_guid), m_parent(p_parent), m_priority(p_priority) {}
- void get_name(pfc::string_base & p_out) {p_out = m_name;}
- GUID get_guid() {return m_guid;}
- GUID get_parent() {return m_parent;}
- void reset() {}
- double get_sort_priority() {return m_priority;}
-private:
- pfc::string8 m_name;
- GUID m_guid,m_parent;
- const double m_priority;
-};
-
-//! Standard implementation of advconfig_entry_checkbox. \n
-//! p_is_radio parameter controls whether we're implementing a checkbox or a radiocheckbox (see advconfig_entry_checkbox description for more details).
-template
-class advconfig_entry_checkbox_impl : public advconfig_entry_checkbox {
-public:
- advconfig_entry_checkbox_impl(const char * p_name,const GUID & p_guid,const GUID & p_parent,double p_priority,bool p_initialstate)
- : m_name(p_name), m_initialstate(p_initialstate), m_state(p_guid,p_initialstate), m_parent(p_parent), m_priority(p_priority) {}
-
- void get_name(pfc::string_base & p_out) {p_out = m_name;}
- GUID get_guid() {return m_state.get_guid();}
- GUID get_parent() {return m_parent;}
- void reset() {m_state = m_initialstate;}
- bool get_state() {return m_state;}
- void set_state(bool p_state) {m_state = p_state;}
- bool is_radio() {return p_is_radio;}
- double get_sort_priority() {return m_priority;}
- bool get_state_() const {return m_state;}
-private:
- pfc::string8 m_name;
- const bool m_initialstate;
- cfg_bool m_state;
- GUID m_parent;
- const double m_priority;
-};
-
-//! Service factory helper around standard advconfig_branch implementation. Use this class to register your own Advanced Preferences branches. \n
-//! Usage: static advconfig_branch_factory mybranch(name, branchID, parentBranchID, priority);
-class advconfig_branch_factory : public service_factory_single_t {
-public:
- advconfig_branch_factory(const char * p_name,const GUID & p_guid,const GUID & p_parent,double p_priority)
- : service_factory_single_t(p_name,p_guid,p_parent,p_priority) {}
-};
-
-//! Service factory helper around standard advconfig_entry_checkbox implementation. Use this class to register your own Advanced Preferences checkbox/radiocheckbox entries. \n
-//! Usage: static advconfig_entry_checkbox mybox(name, itemID, parentID, priority, initialstate);
-template
-class advconfig_checkbox_factory_t : public service_factory_single_t > {
-public:
- advconfig_checkbox_factory_t(const char * p_name,const GUID & p_guid,const GUID & p_parent,double p_priority,bool p_initialstate)
- : service_factory_single_t >(p_name,p_guid,p_parent,p_priority,p_initialstate) {}
-
- bool get() const {return get_static_instance().get_state_();}
- void set(bool val) {get_static_instance().set_state(val);}
- operator bool() const {return get();}
- bool operator=(bool val) {set(val); return val;}
-};
-
-//! Service factory helper around standard advconfig_entry_checkbox implementation, specialized for checkboxes (rather than radiocheckboxes). See advconfig_checkbox_factory_t<> for more details.
-typedef advconfig_checkbox_factory_t advconfig_checkbox_factory;
-//! Service factory helper around standard advconfig_entry_checkbox implementation, specialized for radiocheckboxes (rather than standard checkboxes). See advconfig_checkbox_factory_t<> for more details.
-typedef advconfig_checkbox_factory_t advconfig_radio_factory;
-
-
-//! Standard advconfig_entry_string implementation. Use advconfig_string_factory to register your own string entries in Advanced Preferences instead of using this class directly.
-class advconfig_entry_string_impl : public advconfig_entry_string {
-public:
- advconfig_entry_string_impl(const char * p_name,const GUID & p_guid,const GUID & p_parent,double p_priority,const char * p_initialstate)
- : m_name(p_name), m_parent(p_parent), m_priority(p_priority), m_initialstate(p_initialstate), m_state(p_guid,p_initialstate) {}
- void get_name(pfc::string_base & p_out) {p_out = m_name;}
- GUID get_guid() {return m_state.get_guid();}
- GUID get_parent() {return m_parent;}
- void reset() {core_api::ensure_main_thread();m_state = m_initialstate;}
- double get_sort_priority() {return m_priority;}
- void get_state(pfc::string_base & p_out) {core_api::ensure_main_thread();p_out = m_state;}
- void set_state(const char * p_string,t_size p_length = infinite) {core_api::ensure_main_thread();m_state.set_string(p_string,p_length);}
- t_uint32 get_flags() {return 0;}
-private:
- const pfc::string8 m_initialstate, m_name;
- cfg_string m_state;
- const double m_priority;
- const GUID m_parent;
-};
-
-//! Service factory helper around standard advconfig_entry_string implementation. Use this class to register your own string entries in Advanced Preferences. \n
-//! Usage: static advconfig_string_factory mystring(name, itemID, branchID, priority, initialValue);
-class advconfig_string_factory : public service_factory_single_t {
-public:
- advconfig_string_factory(const char * p_name,const GUID & p_guid,const GUID & p_parent,double p_priority,const char * p_initialstate)
- : service_factory_single_t(p_name,p_guid,p_parent,p_priority,p_initialstate) {}
-
- void get(pfc::string_base & out) {get_static_instance().get_state(out);}
- void set(const char * in) {get_static_instance().set_state(in);}
-};
-
-
-//! Special advconfig_entry_string implementation - implements integer entries. Use advconfig_integer_factory to register your own integer entries in Advanced Preferences instead of using this class directly.
-class advconfig_entry_integer_impl : public advconfig_entry_string {
-public:
- advconfig_entry_integer_impl(const char * p_name,const GUID & p_guid,const GUID & p_parent,double p_priority,t_uint64 p_initialstate,t_uint64 p_min,t_uint64 p_max)
- : m_name(p_name), m_parent(p_parent), m_priority(p_priority), m_initval(p_initialstate), m_min(p_min), m_max(p_max), m_state(p_guid,p_initialstate) {}
- void get_name(pfc::string_base & p_out) {p_out = m_name;}
- GUID get_guid() {return m_state.get_guid();}
- GUID get_parent() {return m_parent;}
- void reset() {m_state = m_initval;}
- double get_sort_priority() {return m_priority;}
- void get_state(pfc::string_base & p_out) {p_out = pfc::format_uint(m_state.get_value());}
- void set_state(const char * p_string,t_size p_length) {set_state_int(pfc::atoui64_ex(p_string,p_length));}
- t_uint32 get_flags() {return advconfig_entry_string::flag_is_integer;}
-
- t_uint64 get_state_int() const {return m_state;}
- void set_state_int(t_uint64 val) {m_state = pfc::clip_t(val,m_min,m_max);}
-private:
- cfg_int_t m_state;
- const double m_priority;
- const t_uint64 m_initval, m_min, m_max;
- const GUID m_parent;
- const pfc::string8 m_name;
-};
-
-//! Service factory helper around integer-specialized advconfig_entry_string implementation. Use this class to register your own integer entries in Advanced Preferences. \n
-//! Usage: static advconfig_integer_factory myint(name, itemID, parentID, priority, initialValue, minValue, maxValue);
-class advconfig_integer_factory : public service_factory_single_t {
-public:
- advconfig_integer_factory(const char * p_name,const GUID & p_guid,const GUID & p_parent,double p_priority,t_uint64 p_initialstate,t_uint64 p_min,t_uint64 p_max)
- : service_factory_single_t(p_name,p_guid,p_parent,p_priority,p_initialstate,p_min,p_max) {}
-
- t_uint64 get() const {return get_static_instance().get_state_int();}
- void set(t_uint64 val) {get_static_instance().set_state_int(val);}
-
- operator t_uint64() const {return get();}
- t_uint64 operator=(t_uint64 val) {set(val); return val;}
-};
-
-
-//! Not currently used, reserved for future use.
-class NOVTABLE advconfig_entry_enum : public advconfig_entry {
-public:
- virtual t_size get_value_count() = 0;
- virtual void enum_value(pfc::string_base & p_out,t_size p_index) = 0;
- virtual t_size get_state() = 0;
- virtual void set_state(t_size p_value) = 0;
-
- FB2K_MAKE_SERVICE_INTERFACE(advconfig_entry_enum,advconfig_entry);
-};
-
-
-
-
-//! Special version if advconfig_entry_string_impl that allows the value to be retrieved from worker threads.
-class advconfig_entry_string_impl_MT : public advconfig_entry_string {
-public:
- advconfig_entry_string_impl_MT(const char * p_name,const GUID & p_guid,const GUID & p_parent,double p_priority,const char * p_initialstate)
- : m_name(p_name), m_parent(p_parent), m_priority(p_priority), m_initialstate(p_initialstate), m_state(p_guid,p_initialstate) {}
- void get_name(pfc::string_base & p_out) {p_out = m_name;}
- GUID get_guid() {return m_state.get_guid();}
- GUID get_parent() {return m_parent;}
- void reset() {
- insync(m_sync);
- m_state = m_initialstate;
- }
- double get_sort_priority() {return m_priority;}
- void get_state(pfc::string_base & p_out) {
- insync(m_sync);
- p_out = m_state;
- }
- void set_state(const char * p_string,t_size p_length = infinite) {
- insync(m_sync);
- m_state.set_string(p_string,p_length);
- }
- t_uint32 get_flags() {return 0;}
-private:
- const pfc::string8 m_initialstate, m_name;
- cfg_string m_state;
- critical_section m_sync;
- const double m_priority;
- const GUID m_parent;
-};
-
-//! Special version if advconfig_string_factory that allows the value to be retrieved from worker threads.
-class advconfig_string_factory_MT : public service_factory_single_t {
-public:
- advconfig_string_factory_MT(const char * p_name,const GUID & p_guid,const GUID & p_parent,double p_priority,const char * p_initialstate)
- : service_factory_single_t(p_name,p_guid,p_parent,p_priority,p_initialstate) {}
-
- void get(pfc::string_base & out) {get_static_instance().get_state(out);}
- void set(const char * in) {get_static_instance().set_state(in);}
-};
-
-
-
-
-/*
- Advanced Preferences variable declaration examples
-
- static advconfig_string_factory mystring("name goes here",myguid,parentguid,0,"asdf");
- to retrieve state: pfc::string8 val; mystring.get(val);
-
- static advconfig_checkbox_factory mycheckbox("name goes here",myguid,parentguid,0,false);
- to retrieve state: mycheckbox.get();
-
- static advconfig_integer_factory myint("name goes here",myguid,parentguid,0,initialValue,minimumValue,maximumValue);
- to retrieve state: myint.get();
-*/
diff --git a/tools/vio2sf/src/foobar/foobar2000/SDK/album_art.cpp b/tools/vio2sf/src/foobar/foobar2000/SDK/album_art.cpp
deleted file mode 100644
index 1fea648a0..000000000
--- a/tools/vio2sf/src/foobar/foobar2000/SDK/album_art.cpp
+++ /dev/null
@@ -1,17 +0,0 @@
-#include "foobar2000.h"
-
-bool album_art_editor::g_get_interface(service_ptr_t & out,const char * path) {
- service_enum_t e; ptr ptr;
- pfc::string_extension ext(path);
- while(e.next(ptr)) {
- if (ptr->is_our_path(path,ext)) {
- out = ptr; return true;
- }
- }
- return false;
-}
-
-bool album_art_editor::g_is_supported_path(const char * path) {
- ptr ptr;
- return g_get_interface(ptr,path);
-}
\ No newline at end of file
diff --git a/tools/vio2sf/src/foobar/foobar2000/SDK/album_art.h b/tools/vio2sf/src/foobar/foobar2000/SDK/album_art.h
deleted file mode 100644
index 6f16d9090..000000000
--- a/tools/vio2sf/src/foobar/foobar2000/SDK/album_art.h
+++ /dev/null
@@ -1,222 +0,0 @@
-//new in 0.9.5
-
-//! Common class for handling picture data. \n
-//! Type of contained picture data is unknown and to be determined according to memory block contents by code parsing/rendering the picture. Commonly encountered types are: BMP, PNG, JPEG and GIF. \n
-//! Implementation: use album_art_data_impl.
-class NOVTABLE album_art_data : public service_base {
-public:
- //! Retrieves a pointer to a memory block containing the picture.
- virtual const void * get_ptr() const = 0;
- //! Retrieves size of the memory block containing the picture.
- virtual t_size get_size() const = 0;
-
- //! Determine whether two album_art_data objects store the same picture data.
- static bool equals(album_art_data const & v1, album_art_data const & v2) {
- const t_size s = v1.get_size();
- if (s != v2.get_size()) return false;
- return memcmp(v1.get_ptr(), v2.get_ptr(),s) == 0;
- }
- bool operator==(const album_art_data & other) const {return equals(*this,other);}
- bool operator!=(const album_art_data & other) const {return !equals(*this,other);}
-
- FB2K_MAKE_SERVICE_INTERFACE(album_art_data,service_base);
-};
-
-typedef service_ptr_t album_art_data_ptr;
-
-//! Implements album_art_data.
-class album_art_data_impl : public album_art_data {
-public:
- const void * get_ptr() const {return m_content.get_ptr();}
- t_size get_size() const {return m_content.get_size();}
-
- void * get_ptr() {return m_content.get_ptr();}
- void set_size(t_size p_size) {m_content.set_size(p_size);}
-
- //! Reads picture data from the specified stream object.
- void from_stream(stream_reader * p_stream,t_size p_bytes,abort_callback & p_abort) {
- set_size(p_bytes); p_stream->read_object(get_ptr(),p_bytes,p_abort);
- }
-
- //! Creates an album_art_data object from picture data contained in a memory buffer.
- static album_art_data_ptr g_create(const void * p_buffer,t_size p_bytes) {
- service_ptr_t instance = new service_impl_t();
- instance->set_size(p_bytes);
- memcpy(instance->get_ptr(),p_buffer,p_bytes);
- return instance;
- }
- //! Creates an album_art_data object from picture data contained in a stream.
- static album_art_data_ptr g_create(stream_reader * p_stream,t_size p_bytes,abort_callback & p_abort) {
- service_ptr_t instance = new service_impl_t();
- instance->from_stream(p_stream,p_bytes,p_abort);
- return instance;
- }
-
-private:
- pfc::array_t m_content;
-};
-
-//! Namespace containing identifiers of album art types.
-namespace album_art_ids {
- //! Front cover.
- static const GUID cover_front = { 0xf1e66f4e, 0xfe09, 0x4b94, { 0x91, 0xa3, 0x67, 0xc2, 0x3e, 0xd1, 0x44, 0x5e } };
- //! Back cover.
- static const GUID cover_back = { 0xcb552d19, 0x86d5, 0x434c, { 0xac, 0x77, 0xbb, 0x24, 0xed, 0x56, 0x7e, 0xe4 } };
- //! Picture of a disc or other storage media.
- static const GUID disc = { 0x3dba9f36, 0xf928, 0x4fa4, { 0x87, 0x9c, 0xd3, 0x40, 0x47, 0x59, 0x58, 0x7e } };
- //! Album-specific icon (NOT a file type icon).
- static const GUID icon = { 0x74cdf5b4, 0x7053, 0x4b3d, { 0x9a, 0x3c, 0x54, 0x69, 0xf5, 0x82, 0x6e, 0xec } };
-};
-
-PFC_DECLARE_EXCEPTION(exception_album_art_not_found,exception_io_not_found,"Album Art Not Found");
-PFC_DECLARE_EXCEPTION(exception_album_art_unsupported_entry,exception_io_data,"Unsupported Album Art Entry");
-
-//! Class encapsulating access to album art stored in a media file. Use album_art_extractor class obtain album_art_extractor_instance referring to specified media file.
-class NOVTABLE album_art_extractor_instance : public service_base {
-public:
- //! Throws exception_album_art_not_found when the requested album art entry could not be found in the referenced media file.
- virtual album_art_data_ptr query(const GUID & p_what,abort_callback & p_abort) = 0;
-
- FB2K_MAKE_SERVICE_INTERFACE(album_art_extractor_instance,service_base);
-};
-
-//! Class encapsulating access to album art stored in a media file. Use album_art_editor class to obtain album_art_editor_instance referring to specified media file.
-class NOVTABLE album_art_editor_instance : public album_art_extractor_instance {
-public:
- //! Throws exception_album_art_unsupported_entry when the file format we're dealing with does not support specific entry.
- virtual void set(const GUID & p_what,album_art_data_ptr p_data,abort_callback & p_abort) = 0;
-
- //! Removes the requested entry. Fails silently when the entry doesn't exist.
- virtual void remove(const GUID & p_what) = 0;
-
- //! Finalizes file tag update operation.
- virtual void commit(abort_callback & p_abort) = 0;
-
-
- FB2K_MAKE_SERVICE_INTERFACE(album_art_editor_instance,album_art_extractor_instance);
-};
-
-typedef service_ptr_t album_art_extractor_instance_ptr;
-typedef service_ptr_t album_art_editor_instance_ptr;
-
-//! Entrypoint class for accessing album art extraction functionality. Register your own implementation to allow album art extraction from your media file format. \n
-//! If you want to extract album art from a media file, it's recommended that you use album_art_manager API instead of calling album_art_extractor directly.
-class NOVTABLE album_art_extractor : public service_base {
-public:
- //! Returns whether the specified file is one of formats supported by our album_art_extractor implementation.
- //! @param p_path Path to file being queried.
- //! @param p_extension Extension of file being queried (also present in p_path parameter) - provided as a separate parameter for performance reasons.
- virtual bool is_our_path(const char * p_path,const char * p_extension) = 0;
-
- //! Instantiates album_art_extractor_instance providing access to album art stored in a specified media file. \n
- //! Throws one of I/O exceptions on failure; exception_album_art_not_found when the file has no album art record at all.
- //! @param p_filehint Optional; specifies a file interface to use for accessing the specified file; can be null - in that case, the implementation will open and close the file internally.
- virtual album_art_extractor_instance_ptr open(file_ptr p_filehint,const char * p_path,abort_callback & p_abort) = 0;
-
- FB2K_MAKE_SERVICE_INTERFACE_ENTRYPOINT(album_art_extractor);
-};
-
-//! Entrypoint class for accessing album art editing functionality. Register your own implementation to allow album art editing on your media file format.
-class NOVTABLE album_art_editor : public service_base {
-public:
- //! Returns whether the specified file is one of formats supported by our album_art_editor implementation.
- //! @param p_path Path to file being queried.
- //! @param p_extension Extension of file being queried (also present in p_path parameter) - provided as a separate parameter for performance reasons.
- virtual bool is_our_path(const char * p_path,const char * p_extension) = 0;
-
- //! Instantiates album_art_editor_instance providing access to album art stored in a specified media file. \n
- //! @param p_filehint Optional; specifies a file interface to use for accessing the specified file; can be null - in that case, the implementation will open and close the file internally.
- virtual album_art_editor_instance_ptr open(file_ptr p_filehint,const char * p_path,abort_callback & p_abort) = 0;
-
- //! Helper; attempts to retrieve an album_art_editor service pointer that supports the specified file.
- //! @returns True on success, false on failure (no registered album_art_editor supports this file type).
- static bool g_get_interface(service_ptr_t & out,const char * path);
- //! Helper; returns whether one of registered album_art_editor implementations is capable of opening the specified file.
- static bool g_is_supported_path(const char * path);
-
- FB2K_MAKE_SERVICE_INTERFACE_ENTRYPOINT(album_art_editor);
-};
-
-//! Primary API for interfacing with foobar2000 core's album art extraction functionality. \n
-//! Use static_api_ptr_t()->instantiate() to obtain a pointer to album_art_manager_instance. \n
-//! The main difference between using album_art_manager_instance and calling album_art_extractor methods directly is that
-//! album_art_manager_instance will fall back to returning pictures found in the folder containing the specified media file
-//! in case requested album art entries can't be extracted from the media file itself.
-class NOVTABLE album_art_manager_instance : public service_base {
-public:
- //! @returns True when the newly requested file has different album art than the old one, false when album art we're referencing is the same as before.
- virtual bool open(const char * p_file,abort_callback & p_abort) = 0;
- //! Resets internal data.
- virtual void close() = 0;
-
- //! Queries album art data for currently open media file. Throws exception_album_art_not_found when the requested album art entry isn't present.
- virtual album_art_data_ptr query(const GUID & p_what,abort_callback & p_abort) = 0;
-
- //! Queries for stub image to display when there's no album art to show. \n
- //! May fail with exception_album_art_not_found as well when we have no stub image configured.
- virtual album_art_data_ptr query_stub_image(abort_callback & p_abort) = 0;
-
- FB2K_MAKE_SERVICE_INTERFACE(album_art_manager_instance,service_base);
-};
-
-typedef service_ptr_t album_art_manager_instance_ptr;
-
-//! Entrypoint API for accessing album art loading functionality provided by foobar2000 core. Usage: static_api_ptr_t. \n
-//! This API was introduced in 0.9.5.
-class NOVTABLE album_art_manager : public service_base {
-public:
- virtual album_art_manager_instance_ptr instantiate() = 0;
-
- FB2K_MAKE_SERVICE_INTERFACE_ENTRYPOINT(album_art_manager);
-};
-
-
-//! Helper - simple implementation of album_art_extractor_instance.
-class album_art_extractor_instance_simple : public album_art_extractor_instance {
-public:
- void set(const GUID & p_what,album_art_data_ptr p_content) {m_content.set(p_what,p_content);}
- bool have_item(const GUID & p_what) {return m_content.have_item(p_what);}
- album_art_data_ptr query(const GUID & p_what,abort_callback & p_abort) {
- album_art_data_ptr temp;
- if (!m_content.query(p_what,temp)) throw exception_album_art_not_found();
- return temp;
- }
- bool is_empty() const {return m_content.get_count() == 0;}
-private:
- pfc::map_t m_content;
-};
-
-//! Helper API for extracting album art from APEv2 tags - introduced in 0.9.5.
-class NOVTABLE tag_processor_album_art_utils : public service_base {
-public:
-
- //! Throws one of I/O exceptions on failure; exception_album_art_not_found when the file has no album art record at all.
- virtual album_art_extractor_instance_ptr open(file_ptr p_file,abort_callback & p_abort) = 0;
-
- //! Currently not implemented. Reserved for future use.
- virtual album_art_editor_instance_ptr edit(file_ptr p_file,abort_callback & p_abort) = 0;
-
- FB2K_MAKE_SERVICE_INTERFACE_ENTRYPOINT(tag_processor_album_art_utils)
-};
-
-//! Helper implementation of album_art_extractor - reads album art from arbitrary file formats that comply with APEv2 tagging specification.
-class album_art_extractor_impl_stdtags : public album_art_extractor {
-public:
- //! @param exts Semicolon-separated list of file format extensions to support.
- album_art_extractor_impl_stdtags(const char * exts) {
- pfc::splitStringSimple_toList(m_extensions,";",exts);
- }
-
- bool is_our_path(const char * p_path,const char * p_extension) {
- return m_extensions.have_item(p_extension);
- }
-
- album_art_extractor_instance_ptr open(file_ptr p_filehint,const char * p_path,abort_callback & p_abort) {
- PFC_ASSERT( is_our_path(p_path, pfc::string_extension(p_path) ) );
- file_ptr l_file ( p_filehint );
- if (l_file.is_empty()) filesystem::g_open_read(l_file, p_path, p_abort);
- return static_api_ptr_t()->open( l_file, p_abort );
- }
-private:
- pfc::avltree_t m_extensions;
-};
diff --git a/tools/vio2sf/src/foobar/foobar2000/SDK/app_close_blocker.cpp b/tools/vio2sf/src/foobar/foobar2000/SDK/app_close_blocker.cpp
deleted file mode 100644
index 6611e0b56..000000000
--- a/tools/vio2sf/src/foobar/foobar2000/SDK/app_close_blocker.cpp
+++ /dev/null
@@ -1,12 +0,0 @@
-#include "foobar2000.h"
-
-bool app_close_blocker::g_query()
-{
- service_ptr_t ptr;
- service_enum_t e;
- while(e.next(ptr))
- {
- if (!ptr->query()) return false;
- }
- return true;
-}
\ No newline at end of file
diff --git a/tools/vio2sf/src/foobar/foobar2000/SDK/app_close_blocker.h b/tools/vio2sf/src/foobar/foobar2000/SDK/app_close_blocker.h
deleted file mode 100644
index b63659d2f..000000000
--- a/tools/vio2sf/src/foobar/foobar2000/SDK/app_close_blocker.h
+++ /dev/null
@@ -1,45 +0,0 @@
-//! (DEPRECATED) This service is used to signal whether something is currently preventing main window from being closed and app from being shut down.
-class NOVTABLE app_close_blocker : public service_base
-{
-public:
- //! Checks whether this service is currently preventing main window from being closed and app from being shut down.
- virtual bool query() = 0;
-
- //! Static helper function, checks whether any of registered app_close_blocker services is currently preventing main window from being closed and app from being shut down.
- static bool g_query();
-
- FB2K_MAKE_SERVICE_INTERFACE_ENTRYPOINT(app_close_blocker);
-};
-
-//! An interface encapsulating a task preventing the foobar2000 application from being closed. Instances of this class need to be registered using app_close_blocking_task_manager methods. \n
-//! Implementation: it's recommended that you derive from app_close_blocking_task_impl class instead of deriving from app_close_blocking_task directly, it manages registration/unregistration behind-the-scenes.
-class NOVTABLE app_close_blocking_task {
-public:
- virtual void query_task_name(pfc::string_base & out) = 0;
-
-protected:
- app_close_blocking_task() {}
- ~app_close_blocking_task() {}
-
- PFC_CLASS_NOT_COPYABLE_EX(app_close_blocking_task);
-};
-
-//! Entrypoint class for registering app_close_blocking_task instances. Introduced in 0.9.5.1. \n
-//! Usage: static_api_ptr_t(). May fail if user runs pre-0.9.5.1. It's recommended that you use app_close_blocking_task_impl class instead of calling app_close_blocking_task_manager directly.
-class NOVTABLE app_close_blocking_task_manager : public service_base {
-public:
- virtual void register_task(app_close_blocking_task * task) = 0;
- virtual void unregister_task(app_close_blocking_task * task) = 0;
-
-
- FB2K_MAKE_SERVICE_INTERFACE_ENTRYPOINT(app_close_blocking_task_manager);
-};
-
-//! Helper; implements standard functionality required by app_close_blocking_task implementations - registers/unregisters the task on construction/destruction.
-class app_close_blocking_task_impl : public app_close_blocking_task {
-public:
- app_close_blocking_task_impl() { try { static_api_ptr_t()->register_task(this); } catch(exception_service_not_found) {/*user runs pre-0.9.5.1*/}}
- ~app_close_blocking_task_impl() { try { static_api_ptr_t()->unregister_task(this); } catch(exception_service_not_found) {/*user runs pre-0.9.5.1*/}}
-
- void query_task_name(pfc::string_base & out) { out = ""; }
-};
diff --git a/tools/vio2sf/src/foobar/foobar2000/SDK/audio_chunk.cpp b/tools/vio2sf/src/foobar/foobar2000/SDK/audio_chunk.cpp
deleted file mode 100644
index 13dc73a46..000000000
--- a/tools/vio2sf/src/foobar/foobar2000/SDK/audio_chunk.cpp
+++ /dev/null
@@ -1,335 +0,0 @@
-#include "foobar2000.h"
-
-void audio_chunk::set_data(const audio_sample * src,t_size samples,unsigned nch,unsigned srate,unsigned channel_config)
-{
- t_size size = samples * nch;
- set_data_size(size);
- if (src)
- pfc::memcpy_t(get_data(),src,size);
- else
- pfc::memset_t(get_data(),(audio_sample)0,size);
- set_sample_count(samples);
- set_channels(nch,channel_config);
- set_srate(srate);
-}
-
-static bool check_exclusive(unsigned val, unsigned mask)
-{
- return (val&mask)!=0 && (val&mask)!=mask;
-}
-
-namespace {
-
- template class msvc6_sucks_v2 { public:
- inline static void do_fixedpoint_convert(const void * source,unsigned bps,t_size count,audio_sample* buffer)
- {
- const char * src = (const char *) source;
- unsigned bytes = bps>>3;
- t_size n;
- T max = ((T)1)<<(bps-1);
-
- T negmask = - max;
-
- ASSUME(bytes<=sizeof(T));
-
- const double div = 1.0 / (double)(1<<(bps-1));
- for(n=0;n(src);
- if (b_swap) temp = pfc::byteswap_t(temp);
- }
-
-
-
- if (!b_signed) temp ^= max;
-
- if (b_pad)
- {
- if (temp & max) temp |= negmask;
- }
-
- if (b_pad)
- src += bytes;
- else
- src += sizeof(T);
-
-
- buffer[n] = (audio_sample) ( (double)temp * div );
- }
- }
- };
-
- template class msvc6_sucks { public:
- inline static void do_fixedpoint_convert(bool b_swap,bool b_signed,const void * source,unsigned bps,t_size count,audio_sample* buffer)
- {
- if (sizeof(T)==1)
- {
- if (b_signed)
- {
- msvc6_sucks_v2::do_fixedpoint_convert(source,bps,count,buffer);
- }
- else
- {
- msvc6_sucks_v2::do_fixedpoint_convert(source,bps,count,buffer);
- }
- }
- else if (b_swap)
- {
- if (b_signed)
- {
- msvc6_sucks_v2::do_fixedpoint_convert(source,bps,count,buffer);
- }
- else
- {
- msvc6_sucks_v2::do_fixedpoint_convert(source,bps,count,buffer);
- }
- }
- else
- {
- if (b_signed)
- {
- msvc6_sucks_v2::do_fixedpoint_convert(source,bps,count,buffer);
- }
- else
- {
- msvc6_sucks_v2::do_fixedpoint_convert(source,bps,count,buffer);
- }
- }
- }
- };
-
-
-};
-
-
-void audio_chunk::set_data_fixedpoint_ex(const void * source,t_size size,unsigned srate,unsigned nch,unsigned bps,unsigned flags,unsigned p_channel_config)
-{
- assert( check_exclusive(flags,FLAG_SIGNED|FLAG_UNSIGNED) );
- assert( check_exclusive(flags,FLAG_LITTLE_ENDIAN|FLAG_BIG_ENDIAN) );
-
- bool need_swap = !!(flags & FLAG_BIG_ENDIAN);
- if (pfc::byte_order_is_big_endian) need_swap = !need_swap;
-
- t_size count = size / (bps/8);
- set_data_size(count);
- audio_sample * buffer = get_data();
- bool b_signed = !!(flags & FLAG_SIGNED);
-
- switch(bps)
- {
- case 8:
- msvc6_sucks::do_fixedpoint_convert(need_swap,b_signed,source,bps,count,buffer);
- break;
- case 16:
- if (!need_swap && b_signed) audio_math::convert_from_int16((const t_int16*)source,count,buffer,1.0);
- else msvc6_sucks::do_fixedpoint_convert(need_swap,b_signed,source,bps,count,buffer);
- break;
- case 24:
- msvc6_sucks::do_fixedpoint_convert(need_swap,b_signed,source,bps,count,buffer);
- break;
- case 32:
- if (!need_swap && b_signed) audio_math::convert_from_int32((const t_int32*)source,count,buffer,1.0);
- else msvc6_sucks::do_fixedpoint_convert(need_swap,b_signed,source,bps,count,buffer);
- break;
- default:
- //unknown size, cant convert
- pfc::memset_t(buffer,(audio_sample)0,count);
- break;
- }
- set_sample_count(count/nch);
- set_srate(srate);
- set_channels(nch,p_channel_config);
-}
-
-template
-static void process_float_multi(audio_sample * p_out,const t_float * p_in,const t_size p_count)
-{
- t_size n;
- for(n=0;n
-static void process_float_multi_swap(audio_sample * p_out,const t_float * p_in,const t_size p_count)
-{
- t_size n;
- for(n=0;n(ptr),count);
- else
- process_float_multi(out,reinterpret_cast(ptr),count);
- }
- else if (bps == 64)
- {
- if (use_swap)
- process_float_multi_swap(out,reinterpret_cast(ptr),count);
- else
- process_float_multi(out,reinterpret_cast(ptr),count);
- }
- else throw exception_io_data("invalid bit depth");
-
- set_sample_count(count/nch);
- set_srate(srate);
- set_channels(nch,p_channel_config);
-}
-
-bool audio_chunk::is_valid() const
-{
- unsigned nch = get_channels();
- if (nch==0 || nch>256) return false;
- if (!g_is_valid_sample_rate(get_srate())) return false;
- t_size samples = get_sample_count();
- if (samples==0 || samples >= 0x80000000 / (sizeof(audio_sample) * nch) ) return false;
- t_size size = get_data_size();
- if (samples * nch > size) return false;
- if (!get_data()) return false;
- return true;
-}
-
-
-void audio_chunk::pad_with_silence_ex(t_size samples,unsigned hint_nch,unsigned hint_srate) {
- if (is_empty())
- {
- if (hint_srate && hint_nch) {
- return set_data(0,samples,hint_nch,hint_srate);
- } else throw exception_io_data();
- }
- else
- {
- if (hint_srate && hint_srate != get_srate()) samples = MulDiv_Size(samples,get_srate(),hint_srate);
- if (samples > get_sample_count())
- {
- t_size old_size = get_sample_count() * get_channels();
- t_size new_size = samples * get_channels();
- set_data_size(new_size);
- pfc::memset_t(get_data() + old_size,(audio_sample)0,new_size - old_size);
- set_sample_count(samples);
- }
- }
-}
-
-void audio_chunk::pad_with_silence(t_size samples) {
- if (samples > get_sample_count())
- {
- t_size old_size = get_sample_count() * get_channels();
- t_size new_size = pfc::multiply_guarded(samples,get_channels());
- set_data_size(new_size);
- pfc::memset_t(get_data() + old_size,(audio_sample)0,new_size - old_size);
- set_sample_count(samples);
- }
-}
-
-void audio_chunk::insert_silence_fromstart(t_size samples) {
- t_size old_size = get_sample_count() * get_channels();
- t_size delta = samples * get_channels();
- t_size new_size = old_size + delta;
- set_data_size(new_size);
- audio_sample * ptr = get_data();
- pfc::memmove_t(ptr+delta,ptr,old_size);
- pfc::memset_t(ptr,(audio_sample)0,delta);
- set_sample_count(get_sample_count() + samples);
-}
-
-t_size audio_chunk::skip_first_samples(t_size samples_delta)
-{
- t_size samples_old = get_sample_count();
- if (samples_delta >= samples_old)
- {
- set_sample_count(0);
- set_data_size(0);
- return samples_old;
- }
- else
- {
- t_size samples_new = samples_old - samples_delta;
- unsigned nch = get_channels();
- audio_sample * ptr = get_data();
- pfc::memmove_t(ptr,ptr+nch*samples_delta,nch*samples_new);
- set_sample_count(samples_new);
- set_data_size(nch*samples_new);
- return samples_delta;
- }
-}
-
-audio_sample audio_chunk::get_peak(audio_sample p_peak) const {
- return pfc::max_t(p_peak, get_peak());
-}
-
-audio_sample audio_chunk::get_peak() const {
- return audio_math::calculate_peak(get_data(),get_sample_count() * get_channels());
-}
-
-void audio_chunk::scale(audio_sample p_value)
-{
- audio_sample * ptr = get_data();
- audio_math::scale(ptr,get_sample_count() * get_channels(),ptr,p_value);
-}
-
-
-static void render_8bit(const audio_sample * in, t_size inLen, void * out) {
- t_int8 * outWalk = reinterpret_cast(out);
- for(t_size walk = 0; walk < inLen; ++walk) {
- *outWalk++ = (t_int8)pfc::clip_t(audio_math::rint32( in[walk] * 0x80 ), -128, 127);
- }
-}
-static void render_24bit(const audio_sample * in, t_size inLen, void * out) {
- t_uint8 * outWalk = reinterpret_cast(out);
- for(t_size walk = 0; walk < inLen; ++walk) {
- const t_int32 v = pfc::clip_t(audio_math::rint32( in[walk] * 0x800000 ), -128 * 256 * 256, 128 * 256 * 256 - 1);
- *(outWalk ++) = (t_uint8) (v & 0xFF);
- *(outWalk ++) = (t_uint8) ((v >> 8) & 0xFF);
- *(outWalk ++) = (t_uint8) ((v >> 16) & 0xFF);
- }
-}
-
-bool audio_chunk::to_raw_data(mem_block_container & out, t_uint32 bps) const {
- const t_size samples = get_sample_count();
- const t_size dataLen = pfc::multiply_guarded(samples, (t_size)get_channel_count());
- switch(bps) {
- case 8:
- out.set_size(dataLen);
- render_8bit(get_data(), dataLen, out.get_ptr());
- break;
- case 16:
- out.set_size(dataLen * 2);
- audio_math::convert_to_int16(get_data(), dataLen, reinterpret_cast(out.get_ptr()), 1.0);
- break;
- case 24:
- out.set_size(dataLen * 3);
- render_24bit(get_data(), dataLen, out.get_ptr());
- break;
- case 32:
- pfc::static_assert();
- out.set(get_data(), dataLen * sizeof(audio_sample));
- break;
- default:
- return false;
- }
- return true;
-}
diff --git a/tools/vio2sf/src/foobar/foobar2000/SDK/audio_chunk.h b/tools/vio2sf/src/foobar/foobar2000/SDK/audio_chunk.h
deleted file mode 100644
index 32988a94f..000000000
--- a/tools/vio2sf/src/foobar/foobar2000/SDK/audio_chunk.h
+++ /dev/null
@@ -1,342 +0,0 @@
-//! Thrown when audio_chunk sample rate or channel mapping changes in mid-stream and the code receiving audio_chunks can't deal with that scenario.
-PFC_DECLARE_EXCEPTION(exception_unexpected_audio_format_change, exception_io_data, "Unexpected audio format change" );
-
-//! Interface to container of a chunk of audio data. See audio_chunk_impl for an implementation.
-class NOVTABLE audio_chunk {
-public:
-
- enum {
- sample_rate_min = 1000, sample_rate_max = 1000000
- };
- static bool g_is_valid_sample_rate(t_uint32 p_val) {return p_val >= sample_rate_min && p_val <= sample_rate_max;}
-
- //! Channel map flag declarations. Note that order of interleaved channel data in the stream is same as order of these flags.
- enum
- {
- channel_front_left = 1<<0,
- channel_front_right = 1<<1,
- channel_front_center = 1<<2,
- channel_lfe = 1<<3,
- channel_back_left = 1<<4,
- channel_back_right = 1<<5,
- channel_front_center_left = 1<<6,
- channel_front_center_right = 1<<7,
- channel_back_center = 1<<8,
- channel_side_left = 1<<9,
- channel_side_right = 1<<10,
- channel_top_center = 1<<11,
- channel_top_front_left = 1<<12,
- channel_top_front_center = 1<<13,
- channel_top_front_right = 1<<14,
- channel_top_back_left = 1<<15,
- channel_top_back_center = 1<<16,
- channel_top_back_right = 1<<17,
-
- channel_config_mono = channel_front_center,
- channel_config_stereo = channel_front_left | channel_front_right,
- channel_config_5point1 = channel_front_left | channel_front_right | channel_back_left | channel_back_right | channel_front_center | channel_lfe,
-
- defined_channel_count = 18,
- };
-
- //! Helper function; guesses default channel map for specified channel count.
- static unsigned g_guess_channel_config(unsigned count);
-
-#ifdef _WIN32
- //! Helper function; translates audio_chunk channel map to WAVEFORMATEXTENSIBLE channel map.
- static DWORD g_channel_config_to_wfx(unsigned p_config);
- //! Helper function; translates WAVEFORMATEXTENSIBLE channel map to audio_chunk channel map.
- static unsigned g_channel_config_from_wfx(DWORD p_wfx);
-#endif
-
- //! Extracts flag describing Nth channel from specified map. Usable to figure what specific channel in a stream means.
- static unsigned g_extract_channel_flag(unsigned p_config,unsigned p_index);
- //! Counts channels specified by channel map.
- static unsigned g_count_channels(unsigned p_config);
- //! Calculates index of a channel specified by p_flag in a stream where channel map is described by p_config.
- static unsigned g_channel_index_from_flag(unsigned p_config,unsigned p_flag);
-
-
-
- //! Retrieves audio data buffer pointer (non-const version). Returned pointer is for temporary use only; it is valid until next set_data_size call, or until the object is destroyed. \n
- //! Size of returned buffer is equal to get_data_size() return value (in audio_samples). Amount of actual data may be smaller, depending on sample count and channel count. Conditions where sample count * channel count are greater than data size should not be possible.
- virtual audio_sample * get_data() = 0;
- //! Retrieves audio data buffer pointer (const version). Returned pointer is for temporary use only; it is valid until next set_data_size call, or until the object is destroyed. \n
- //! Size of returned buffer is equal to get_data_size() return value (in audio_samples). Amount of actual data may be smaller, depending on sample count and channel count. Conditions where sample count * channel count are greater than data size should not be possible.
- virtual const audio_sample * get_data() const = 0;
- //! Retrieves size of allocated buffer space, in audio_samples.
- virtual t_size get_data_size() const = 0;
- //! Resizes audio data buffer to specified size. Throws std::bad_alloc on failure.
- virtual void set_data_size(t_size p_new_size) = 0;
-
- //! Retrieves sample rate of contained audio data.
- virtual unsigned get_srate() const = 0;
- //! Sets sample rate of contained audio data.
- virtual void set_srate(unsigned val) = 0;
- //! Retrieves channel count of contained audio data.
- virtual unsigned get_channels() const = 0;
- //! Helper - for consistency - same as get_channels().
- inline unsigned get_channel_count() const {return get_channels();}
- //! Retrieves channel map of contained audio data. Conditions where number of channels specified by channel map don't match get_channels() return value should not be possible.
- virtual unsigned get_channel_config() const = 0;
- //! Sets channel count / channel map.
- virtual void set_channels(unsigned p_count,unsigned p_config) = 0;
-
- //! Retrieves number of valid samples in the buffer. \n
- //! Note that a "sample" means a unit of interleaved PCM data representing states of each channel at given point of time, not a single PCM value. \n
- //! For an example, duration of contained audio data is equal to sample count / sample rate, while actual size of contained data is equal to sample count * channel count.
- virtual t_size get_sample_count() const = 0;
-
- //! Sets number of valid samples in the buffer. WARNING: sample count * channel count should never be above allocated buffer size.
- virtual void set_sample_count(t_size val) = 0;
-
- //! Helper, same as get_srate().
- inline unsigned get_sample_rate() const {return get_srate();}
- //! Helper, same as set_srate().
- inline void set_sample_rate(unsigned val) {set_srate(val);}
-
- //! Helper; sets channel count to specified value and uses default channel map for this channel count.
- void set_channels(unsigned val) {set_channels(val,g_guess_channel_config(val));}
-
-
- //! Helper; resizes audio data buffer when it's current size is smaller than requested.
- inline void grow_data_size(t_size p_requested) {if (p_requested > get_data_size()) set_data_size(p_requested);}
-
-
- //! Retrieves duration of contained audio data, in seconds.
- inline double get_duration() const
- {
- double rv = 0;
- t_size srate = get_srate (), samples = get_sample_count();
- if (srate>0 && samples>0) rv = (double)samples/(double)srate;
- return rv;
- }
-
- //! Returns whether the chunk is empty (contains no audio data).
- inline bool is_empty() const {return get_channels()==0 || get_srate()==0 || get_sample_count()==0;}
-
- //! Returns whether the chunk contents are valid (for bug check purposes).
- bool is_valid() const;
-
- //! Returns actual amount of audio data contained in the buffer (sample count * channel count). Must not be greater than data size (see get_data_size()).
- inline t_size get_data_length() const {return get_sample_count() * get_channels();}
-
- //! Resets all audio_chunk data.
- inline void reset() {
- set_sample_count(0);
- set_srate(0);
- set_channels(0);
- set_data_size(0);
- }
-
- //! Helper, sets chunk data to contents of specified buffer, with specified number of channels / sample rate / channel map.
- void set_data(const audio_sample * src,t_size samples,unsigned nch,unsigned srate,unsigned channel_config);
-
- //! Helper, sets chunk data to contents of specified buffer, with specified number of channels / sample rate, using default channel map for specified channel count.
- inline void set_data(const audio_sample * src,t_size samples,unsigned nch,unsigned srate) {set_data(src,samples,nch,srate,g_guess_channel_config(nch));}
-
- //! Helper, sets chunk data to contents of specified buffer, using default win32/wav conventions for signed/unsigned switch.
- inline void set_data_fixedpoint(const void * ptr,t_size bytes,unsigned srate,unsigned nch,unsigned bps,unsigned channel_config) {
- set_data_fixedpoint_ex(ptr,bytes,srate,nch,bps,(bps==8 ? FLAG_UNSIGNED : FLAG_SIGNED) | flags_autoendian(), channel_config);
- }
-
- inline void set_data_fixedpoint_unsigned(const void * ptr,t_size bytes,unsigned srate,unsigned nch,unsigned bps,unsigned channel_config) {
- return set_data_fixedpoint_ex(ptr,bytes,srate,nch,bps,FLAG_UNSIGNED | flags_autoendian(), channel_config);
- }
-
- inline void set_data_fixedpoint_signed(const void * ptr,t_size bytes,unsigned srate,unsigned nch,unsigned bps,unsigned channel_config) {
- return set_data_fixedpoint_ex(ptr,bytes,srate,nch,bps,FLAG_SIGNED | flags_autoendian(), channel_config);
- }
-
- enum
- {
- FLAG_LITTLE_ENDIAN = 1,
- FLAG_BIG_ENDIAN = 2,
- FLAG_SIGNED = 4,
- FLAG_UNSIGNED = 8,
- };
-
- inline static unsigned flags_autoendian() {
- return pfc::byte_order_is_big_endian ? FLAG_BIG_ENDIAN : FLAG_LITTLE_ENDIAN;
- }
-
- void set_data_fixedpoint_ex(const void * ptr,t_size bytes,unsigned p_sample_rate,unsigned p_channels,unsigned p_bits_per_sample,unsigned p_flags,unsigned p_channel_config);//p_flags - see FLAG_* above
-
- void set_data_floatingpoint_ex(const void * ptr,t_size bytes,unsigned p_sample_rate,unsigned p_channels,unsigned p_bits_per_sample,unsigned p_flags,unsigned p_channel_config);//signed/unsigned flags dont apply
-
- inline void set_data_32(const float * src,t_size samples,unsigned nch,unsigned srate) {return set_data(src,samples,nch,srate);}
-
- void pad_with_silence_ex(t_size samples,unsigned hint_nch,unsigned hint_srate);
- void pad_with_silence(t_size samples);
- void insert_silence_fromstart(t_size samples);
- t_size skip_first_samples(t_size samples);
-
- //! Simple function to get original PCM stream back. Assumes host's endianness, integers are signed - including the 8bit mode; 32bit mode assumed to be float.
- //! @returns false when the conversion could not be performed because of unsupported bit depth etc.
- bool to_raw_data(class mem_block_container & out, t_uint32 bps) const;
-
-
- //! Helper, calculates peak value of data in the chunk. The optional parameter specifies initial peak value, to simplify calling code.
- audio_sample get_peak(audio_sample p_peak) const;
- audio_sample get_peak() const;
-
- //! Helper function; scales entire chunk content by specified value.
- void scale(audio_sample p_value);
-
- //! Helper; copies content of another audio chunk to this chunk.
- void copy(const audio_chunk & p_source) {
- set_data(p_source.get_data(),p_source.get_sample_count(),p_source.get_channels(),p_source.get_srate(),p_source.get_channel_config());
- }
-
- const audio_chunk & operator=(const audio_chunk & p_source) {
- copy(p_source);
- return *this;
- }
-protected:
- audio_chunk() {}
- ~audio_chunk() {}
-};
-
-//! Implementation of audio_chunk. Takes pfc allocator template as template parameter.
-template class t_alloc = pfc::alloc_standard>
-class audio_chunk_impl_t : public audio_chunk {
- typedef audio_chunk_impl_t t_self;
- pfc::array_t m_data;
- unsigned m_srate,m_nch,m_setup;
- t_size m_samples;
-public:
- audio_chunk_impl_t() : m_srate(0), m_nch(0), m_samples(0), m_setup(0) {}
- audio_chunk_impl_t(const audio_sample * src,unsigned samples,unsigned nch,unsigned srate) : m_srate(0), m_nch(0), m_samples(0)
- {set_data(src,samples,nch,srate);}
- audio_chunk_impl_t(const audio_chunk & p_source) : m_srate(0), m_nch(0), m_samples(0), m_setup(0) {copy(p_source);}
- audio_chunk_impl_t(const t_self & p_source) : m_srate(0), m_nch(0), m_samples(0), m_setup(0) {copy(p_source);}
-
- virtual audio_sample * get_data() {return m_data.get_ptr();}
- virtual const audio_sample * get_data() const {return m_data.get_ptr();}
- virtual t_size get_data_size() const {return m_data.get_size();}
- virtual void set_data_size(t_size new_size) {m_data.set_size(new_size);}
-
- virtual unsigned get_srate() const {return m_srate;}
- virtual void set_srate(unsigned val) {m_srate=val;}
- virtual unsigned get_channels() const {return m_nch;}
- virtual unsigned get_channel_config() const {return m_setup;}
- virtual void set_channels(unsigned val,unsigned setup) {m_nch = val;m_setup = setup;}
- void set_channels(unsigned val) {set_channels(val,g_guess_channel_config(val));}
-
- virtual t_size get_sample_count() const {return m_samples;}
- virtual void set_sample_count(t_size val) {m_samples = val;}
-
- const t_self & operator=(const audio_chunk & p_source) {copy(p_source);return *this;}
- const t_self & operator=(const t_self & p_source) {copy(p_source);return *this;}
-};
-
-typedef audio_chunk_impl_t<> audio_chunk_impl;
-typedef audio_chunk_impl_t audio_chunk_impl_temporary;
-typedef audio_chunk_impl audio_chunk_i;//for compatibility
-
-//! Implements const methods of audio_chunk only, referring to an external buffer. For temporary use only (does not maintain own storage), e.g.: somefunc( audio_chunk_temp_impl(mybuffer,....) );
-class audio_chunk_temp_impl : public audio_chunk {
-public:
- audio_chunk_temp_impl(const audio_sample * p_data,t_size p_samples,t_uint32 p_sample_rate,t_uint32 p_channels,t_uint32 p_channel_config) :
- m_data(p_data), m_samples(p_samples), m_sample_rate(p_sample_rate), m_channels(p_channels), m_channel_config(p_channel_config)
- {
- PFC_ASSERT(is_valid());
- }
-
- audio_sample * get_data() {throw pfc::exception_not_implemented();}
- const audio_sample * get_data() const {return m_data;}
- t_size get_data_size() const {return m_samples * m_channels;}
- void set_data_size(t_size p_new_size) {throw pfc::exception_not_implemented();}
-
- unsigned get_srate() const {return m_sample_rate;}
- void set_srate(unsigned val) {throw pfc::exception_not_implemented();}
- unsigned get_channels() const {return m_channels;}
- unsigned get_channel_config() const {return m_channel_config;}
- void set_channels(unsigned p_count,unsigned p_config) {throw pfc::exception_not_implemented();}
-
- t_size get_sample_count() const {return m_samples;}
-
- void set_sample_count(t_size val) {throw pfc::exception_not_implemented();}
-
-private:
- t_size m_samples;
- t_uint32 m_sample_rate,m_channels,m_channel_config;
- const audio_sample * m_data;
-};
-
-
-
-//! Duration counter class - accumulates duration using sample values, without any kind of rounding error accumulation.
-class duration_counter {
-public:
- duration_counter() : m_offset() {
- }
- void set(double v) {
- m_sampleCounts.remove_all();
- m_offset = v;
- }
- void reset() {
- set(0);
- }
-
- void add(double v) {m_offset += v;}
- void subtract(double v) {m_offset -= v;}
-
- double query() const {
- double acc = m_offset;
- for(t_map::const_iterator walk = m_sampleCounts.first(); walk.is_valid(); ++walk) {
- acc += audio_math::samples_to_time(walk->m_value, walk->m_key);
- }
- return acc;
- }
- void add(const audio_chunk & c) {
- add(c.get_sample_count(), c.get_sample_rate());
- }
- void add(t_uint64 sampleCount, t_uint32 sampleRate) {
- PFC_ASSERT( sampleRate > 0 );
- if (sampleRate > 0 && sampleCount > 0) {
- m_sampleCounts.find_or_add(sampleRate) += sampleCount;
- }
- }
- void add(const duration_counter & other) {
- add(other.m_offset);
- for(t_map::const_iterator walk = other.m_sampleCounts.first(); walk.is_valid(); ++walk) {
- add(walk->m_value, walk->m_key);
- }
- }
- void subtract(const duration_counter & other) {
- subtract(other.m_offset);
- for(t_map::const_iterator walk = other.m_sampleCounts.first(); walk.is_valid(); ++walk) {
- subtract(walk->m_value, walk->m_key);
- }
- }
- void subtract(t_uint64 sampleCount, t_uint32 sampleRate) {
- PFC_ASSERT( sampleRate > 0 );
- if (sampleRate > 0 && sampleCount > 0) {
- t_uint64 * val = m_sampleCounts.query_ptr(sampleRate);
- if (val == NULL) throw pfc::exception_invalid_params();
- if (*val < sampleCount) throw pfc::exception_invalid_params();
- else if (*val == sampleCount) {
- m_sampleCounts.remove(sampleRate);
- } else {
- *val -= sampleCount;
- }
-
- }
- }
- void subtract(const audio_chunk & c) {
- subtract(c.get_sample_count(), c.get_sample_rate());
- }
- template duration_counter & operator+=(const t_source & source) {add(source); return *this;}
- template duration_counter & operator-=(const t_source & source) {subtract(source); return *this;}
- template duration_counter & operator=(const t_source & source) {reset(); add(source); return *this;}
-private:
- double m_offset;
- typedef pfc::map_t t_map;
- t_map m_sampleCounts;
-};
-
-class audio_chunk_partial_ref : public audio_chunk_temp_impl {
-public:
- audio_chunk_partial_ref(const audio_chunk & chunk, t_size base, t_size count) : audio_chunk_temp_impl(chunk.get_data() + base * chunk.get_channels(), count, chunk.get_sample_rate(), chunk.get_channels(), chunk.get_channel_config()) {}
-};
diff --git a/tools/vio2sf/src/foobar/foobar2000/SDK/audio_chunk_channel_config.cpp b/tools/vio2sf/src/foobar/foobar2000/SDK/audio_chunk_channel_config.cpp
deleted file mode 100644
index 16caed4c0..000000000
--- a/tools/vio2sf/src/foobar/foobar2000/SDK/audio_chunk_channel_config.cpp
+++ /dev/null
@@ -1,131 +0,0 @@
-#include "foobar2000.h"
-
-#ifdef _WIN32
-#include
-#include
-
-#if 0
-#define SPEAKER_FRONT_LEFT 0x1
-#define SPEAKER_FRONT_RIGHT 0x2
-#define SPEAKER_FRONT_CENTER 0x4
-#define SPEAKER_LOW_FREQUENCY 0x8
-#define SPEAKER_BACK_LEFT 0x10
-#define SPEAKER_BACK_RIGHT 0x20
-#define SPEAKER_FRONT_LEFT_OF_CENTER 0x40
-#define SPEAKER_FRONT_RIGHT_OF_CENTER 0x80
-#define SPEAKER_BACK_CENTER 0x100
-#define SPEAKER_SIDE_LEFT 0x200
-#define SPEAKER_SIDE_RIGHT 0x400
-#define SPEAKER_TOP_CENTER 0x800
-#define SPEAKER_TOP_FRONT_LEFT 0x1000
-#define SPEAKER_TOP_FRONT_CENTER 0x2000
-#define SPEAKER_TOP_FRONT_RIGHT 0x4000
-#define SPEAKER_TOP_BACK_LEFT 0x8000
-#define SPEAKER_TOP_BACK_CENTER 0x10000
-#define SPEAKER_TOP_BACK_RIGHT 0x20000
-#endif
-
-static struct {DWORD m_wfx; unsigned m_native; } const g_translation_table[] =
-{
- {SPEAKER_FRONT_LEFT, audio_chunk::channel_front_left},
- {SPEAKER_FRONT_RIGHT, audio_chunk::channel_front_right},
- {SPEAKER_FRONT_CENTER, audio_chunk::channel_front_center},
- {SPEAKER_LOW_FREQUENCY, audio_chunk::channel_lfe},
- {SPEAKER_BACK_LEFT, audio_chunk::channel_back_left},
- {SPEAKER_BACK_RIGHT, audio_chunk::channel_back_right},
- {SPEAKER_FRONT_LEFT_OF_CENTER, audio_chunk::channel_front_center_left},
- {SPEAKER_FRONT_RIGHT_OF_CENTER, audio_chunk::channel_front_center_right},
- {SPEAKER_BACK_CENTER, audio_chunk::channel_back_center},
- {SPEAKER_SIDE_LEFT, audio_chunk::channel_side_left},
- {SPEAKER_SIDE_RIGHT, audio_chunk::channel_side_right},
- {SPEAKER_TOP_CENTER, audio_chunk::channel_top_center},
- {SPEAKER_TOP_FRONT_LEFT, audio_chunk::channel_top_front_left},
- {SPEAKER_TOP_FRONT_CENTER, audio_chunk::channel_top_front_center},
- {SPEAKER_TOP_FRONT_RIGHT, audio_chunk::channel_top_front_right},
- {SPEAKER_TOP_BACK_LEFT, audio_chunk::channel_top_back_left},
- {SPEAKER_TOP_BACK_CENTER, audio_chunk::channel_top_back_center},
- {SPEAKER_TOP_BACK_RIGHT, audio_chunk::channel_top_back_right},
-};
-
-
-DWORD audio_chunk::g_channel_config_to_wfx(unsigned p_config)
-{
- DWORD ret = 0;
- unsigned n;
- for(n=0;n= tabsize(g_audio_channel_config_table)) return 0;
- return g_audio_channel_config_table[count];
-}
-
-
-unsigned audio_chunk::g_channel_index_from_flag(unsigned p_config,unsigned p_flag) {
- unsigned index = 0;
- for(unsigned walk = 0; walk < 32; walk++) {
- unsigned query = 1 << walk;
- if (p_flag & query) return index;
- if (p_config & query) index++;
- }
- return infinite;
-}
-
-unsigned audio_chunk::g_extract_channel_flag(unsigned p_config,unsigned p_index)
-{
- unsigned toskip = p_index;
- unsigned flag = 1;
- while(flag)
- {
- if (p_config & flag)
- {
- if (toskip == 0) break;
- toskip--;
- }
- flag <<= 1;
- }
- return flag;
-}
-
-unsigned audio_chunk::g_count_channels(unsigned p_config)
-{
- unsigned ret = 0;
- while(p_config) {
- ret += (p_config & 1);
- p_config >>= 1;
- }
- return ret;
-}
diff --git a/tools/vio2sf/src/foobar/foobar2000/SDK/audio_postprocessor.h b/tools/vio2sf/src/foobar/foobar2000/SDK/audio_postprocessor.h
deleted file mode 100644
index 4153d2865..000000000
--- a/tools/vio2sf/src/foobar/foobar2000/SDK/audio_postprocessor.h
+++ /dev/null
@@ -1,25 +0,0 @@
-//! This class handles conversion of audio data (audio_chunk) to various linear PCM types, with optional dithering.
-
-class NOVTABLE audio_postprocessor : public service_base
-{
-public:
- //! Processes one chunk of audio data.
- //! @param p_chunk Chunk of audio data to process.
- //! @param p_output Receives output linear signed PCM data.
- //! @param p_out_bps Desired bit depth of output.
- //! @param p_out_bps_physical Desired physical word width of output. Must be either 8, 16, 24 or 32, greater or equal to p_out_bps. This is typically set to same value as p_out_bps.
- //! @param p_dither Indicates whether dithering should be used. Note that dithering is CPU-heavy.
- //! @param p_prescale Value to scale all audio samples by when converting. Set to 1.0 to do nothing.
-
- virtual void run(const audio_chunk & p_chunk,
- mem_block_container & p_output,
- t_uint32 p_out_bps,
- t_uint32 p_out_bps_physical,
- bool p_dither,
- audio_sample p_prescale
- ) = 0;
-
-
-
- FB2K_MAKE_SERVICE_INTERFACE_ENTRYPOINT(audio_postprocessor);
-};
diff --git a/tools/vio2sf/src/foobar/foobar2000/SDK/autoplaylist.h b/tools/vio2sf/src/foobar/foobar2000/SDK/autoplaylist.h
deleted file mode 100644
index 6417fd375..000000000
--- a/tools/vio2sf/src/foobar/foobar2000/SDK/autoplaylist.h
+++ /dev/null
@@ -1,106 +0,0 @@
-/*
- Autoplaylist APIs
- These APIs were introduced in foobar2000 0.9.5, to reduce amount of code required to create your own autoplaylists. Creation of autoplaylists is was also possible before through playlist lock APIs.
- In most cases, you'll want to turn regular playlists into autoplaylists using the following code:
- static_api_ptr_t()->add_client_simple(querypattern, sortpattern, playlistindex, forceSort ? autoplaylist_flag_sort : 0);
- If you require more advanced functionality, such as using your own code to filter which part of user's Media Library should be placed in specific autoplaylist, you must implement autoplaylist_client (to let autoplaylist manager invoke your handlers when needed) / autoplaylist_client_factory (to re-instantiate your autoplaylist_client after a foobar2000 restart cycle).
-*/
-
-enum {
- //! When set, core will keep the autoplaylist sorted and prevent user from reordering it.
- autoplaylist_flag_sort = 1 << 0,
-};
-//! Main class controlling autoplaylist behaviors. Implemented by autoplaylist client in scenarios where simple query/sort strings are not enough (core provides a standard implementation for simple queries).
-class NOVTABLE autoplaylist_client : public service_base {
-public:
- virtual GUID get_guid() = 0;
- //! Called only inside a metadb lock for performance reasons.
- virtual void filter(metadb_handle_list_cref data, bool * out) = 0;
- //! Return true when you have filled p_orderbuffer with a permutation to apply to p_items, false when you don't support sorting (core's own sort scheme will be applied).
- virtual bool sort(metadb_handle_list_cref p_items,t_size * p_orderbuffer) = 0;
- //! Retrieves your configuration data to be used later when re-instantiating your autoplaylist_client after a restart.
- virtual void get_configuration(stream_writer * p_stream,abort_callback & p_abort) = 0;
-
- virtual void show_ui(t_size p_source_playlist) = 0;
-
- //! Helper.
- template void get_configuration(t_array & p_out) {
- pfc::static_assert();
- typedef pfc::array_t t_temp; t_temp temp;
- get_configuration(&stream_writer_buffer_append_ref_t(temp),abort_callback_impl());
- p_out = temp;
- }
-
-
- FB2K_MAKE_SERVICE_INTERFACE(autoplaylist_client,service_base)
-};
-
-typedef service_ptr_t autoplaylist_client_ptr;
-
-//! Supported from 0.9.5.3 up.
-class NOVTABLE autoplaylist_client_v2 : public autoplaylist_client {
-public:
- //! Sets a completion_notify object that the autoplaylist_client implementation should call when its filtering behaviors have changed so the whole playlist needs to be rebuilt. \n
- //! completion_notify::on_completion() status parameter meaning: \n
- //! 0.9.5.3 : ignored. \n
- //! 0.9.5.4 and newer: set to 1 to indicate that your configuration has changed as well (for an example as a result of user edits) to get a get_configuration() call as well as cause the playlist to be rebuilt; set to zero otherwise - when the configuration hasn't changed but the playlist needs to be rebuilt as a result of some other event.
- virtual void set_full_refresh_notify(completion_notify::ptr notify) = 0;
-
- //! Returns whether the show_ui() method is available / does anything useful with out implementation (not everyone implements show_ui).
- virtual bool show_ui_available() = 0;
-
- //! Returns a human-readable autoplaylist implementer's label to display in playlist's context menu / description / etc.
- virtual void get_display_name(pfc::string_base & out) = 0;
-
- FB2K_MAKE_SERVICE_INTERFACE(autoplaylist_client_v2, autoplaylist_client);
-};
-
-//! Class needed to re-instantiate autoplaylist_client after a restart. Not directly needed to set up an autoplaylist_client, but without it, your autoplaylist will be lost after a restart.
-class NOVTABLE autoplaylist_client_factory : public service_base {
-public:
- //! Must return same GUID as your autoplaylist_client::get_guid()
- virtual GUID get_guid() = 0;
- //! Instantiates your autoplaylist_client with specified configuration.
- virtual autoplaylist_client_ptr instantiate(stream_reader * p_stream,t_size p_sizehint,abort_callback & p_abort) = 0;
-
- FB2K_MAKE_SERVICE_INTERFACE_ENTRYPOINT(autoplaylist_client_factory)
-};
-
-PFC_DECLARE_EXCEPTION(exception_autoplaylist,pfc::exception,"Autoplaylist error")
-
-PFC_DECLARE_EXCEPTION(exception_autoplaylist_already_owned,exception_autoplaylist,"This playlist is already an autoplaylist")
-PFC_DECLARE_EXCEPTION(exception_autoplaylist_not_owned,exception_autoplaylist,"This playlist is not an autoplaylist")
-PFC_DECLARE_EXCEPTION(exception_autoplaylist_lock_failure,exception_autoplaylist,"Playlist could not be locked")
-
-
-//! Primary class for managing autoplaylists. Implemented by core, do not reimplement; instantiate using static_api_ptr_t.
-class NOVTABLE autoplaylist_manager : public service_base {
-public:
- //! Throws exception_autoplaylist or one of its subclasses on failure.
- //! @param p_flags See autoplaylist_flag_* constants.
- virtual void add_client(autoplaylist_client_ptr p_client,t_size p_playlist,t_uint32 p_flags) = 0;
- virtual bool is_client_present(t_size p_playlist) = 0;
- //! Throws exception_autoplaylist or one of its subclasses on failure (eg. not an autoplaylist).
- virtual autoplaylist_client_ptr query_client(t_size p_playlist) = 0;
- virtual void remove_client(t_size p_playlist) = 0;
- //! Helper; sets up an autoplaylist using standard autoplaylist_client implementation based on simple query/sort strings. When using this, you don't need to maintain own autoplaylist_client/autoplaylist_client_factory implementations, and autoplaylists that you create will not be lost when your DLL is removed, as opposed to using add_client() directly.
- //! Throws exception_autoplaylist or one of its subclasses on failure.
- //! @param p_flags See autoplaylist_flag_* constants.
- virtual void add_client_simple(const char * p_query,const char * p_sort,t_size p_playlist,t_uint32 p_flags) = 0;
-
- FB2K_MAKE_SERVICE_INTERFACE_ENTRYPOINT(autoplaylist_manager)
-};
-
-//! \since 0.9.5.4
-//! Extended version of autoplaylist_manager, available from 0.9.5.4 up, with methods allowing modification of autoplaylist flags.
-class NOVTABLE autoplaylist_manager_v2 : public autoplaylist_manager {
- FB2K_MAKE_SERVICE_INTERFACE(autoplaylist_manager_v2, autoplaylist_manager)
-public:
- virtual t_uint32 get_client_flags(t_size playlist) = 0;
- virtual void set_client_flags(t_size playlist, t_uint32 newFlags) = 0;
-
- //! For use with autoplaylist client configuration dialogs. It's recommended not to call this from anything else.
- virtual t_uint32 get_client_flags(autoplaylist_client::ptr client) = 0;
- //! For use with autoplaylist client configuration dialogs. It's recommended not to call this from anything else.
- virtual void set_client_flags(autoplaylist_client::ptr client, t_uint32 newFlags) = 0;
-};
diff --git a/tools/vio2sf/src/foobar/foobar2000/SDK/cfg_var.cpp b/tools/vio2sf/src/foobar/foobar2000/SDK/cfg_var.cpp
deleted file mode 100644
index b37401416..000000000
--- a/tools/vio2sf/src/foobar/foobar2000/SDK/cfg_var.cpp
+++ /dev/null
@@ -1,57 +0,0 @@
-#include "foobar2000.h"
-
-cfg_var_reader * cfg_var_reader::g_list = NULL;
-cfg_var_writer * cfg_var_writer::g_list = NULL;
-
-void cfg_var_reader::config_read_file(stream_reader * p_stream,abort_callback & p_abort)
-{
- pfc::map_t vars;
- for(cfg_var_reader * walk = g_list; walk != NULL; walk = walk->m_next) {
- vars.set(walk->m_guid,walk);
- }
- for(;;) {
-
- GUID guid;
- t_uint32 size;
-
- if (p_stream->read(&guid,sizeof(guid),p_abort) != sizeof(guid)) break;
- guid = pfc::byteswap_if_be_t(guid);
- p_stream->read_lendian_t(size,p_abort);
-
- cfg_var_reader * var;
- if (vars.query(guid,var)) {
- stream_reader_limited_ref wrapper(p_stream,size);
- try {
- var->set_data_raw(&wrapper,size,p_abort);
- } catch(exception_io_data) {}
- wrapper.flush_remaining(p_abort);
- } else {
- p_stream->skip_object(size,p_abort);
- }
- }
-}
-
-void cfg_var_writer::config_write_file(stream_writer * p_stream,abort_callback & p_abort) {
- cfg_var_writer * ptr;
- pfc::array_t temp;
- for(ptr = g_list; ptr; ptr = ptr->m_next) {
- temp.set_size(0);
- ptr->get_data_raw(&stream_writer_buffer_append_ref_t >(temp),p_abort);
- p_stream->write_lendian_t(ptr->m_guid,p_abort);
- p_stream->write_lendian_t(pfc::downcast_guarded(temp.get_size()),p_abort);
- if (temp.get_size() > 0) {
- p_stream->write_object(temp.get_ptr(),temp.get_size(),p_abort);
- }
- }
-}
-
-
-void cfg_string::get_data_raw(stream_writer * p_stream,abort_callback & p_abort) {
- p_stream->write_object(get_ptr(),length(),p_abort);
-}
-
-void cfg_string::set_data_raw(stream_reader * p_stream,t_size p_sizehint,abort_callback & p_abort) {
- pfc::string8_fastalloc temp;
- p_stream->read_string_raw(temp,p_abort);
- set_string(temp);
-}
diff --git a/tools/vio2sf/src/foobar/foobar2000/SDK/cfg_var.h b/tools/vio2sf/src/foobar/foobar2000/SDK/cfg_var.h
deleted file mode 100644
index e3f00388e..000000000
--- a/tools/vio2sf/src/foobar/foobar2000/SDK/cfg_var.h
+++ /dev/null
@@ -1,235 +0,0 @@
-#ifndef _FOOBAR2000_SDK_CFG_VAR_H_
-#define _FOOBAR2000_SDK_CFG_VAR_H_
-
-#define CFG_VAR_ASSERT_SAFEINIT PFC_ASSERT(!core_api::are_services_available());/*imperfect check for nonstatic instantiation*/
-
-
-//! Reader part of cfg_var object. In most cases, you should use cfg_var instead of using cfg_var_reader directly.
-class NOVTABLE cfg_var_reader {
-public:
- //! @param p_guid GUID of the variable, used to identify variable implementations owning specific configuration file entries when reading the configuration file back. You must generate a new GUID every time you declare a new cfg_var.
- cfg_var_reader(const GUID & guid) : m_guid(guid) { CFG_VAR_ASSERT_SAFEINIT; m_next = g_list; g_list = this; }
- ~cfg_var_reader() { CFG_VAR_ASSERT_SAFEINIT; }
-
- //! Sets state of the variable. Called only from main thread, when reading configuration file.
- //! @param p_stream Stream containing new state of the variable.
- //! @param p_sizehint Number of bytes contained in the stream; reading past p_sizehint bytes will fail (EOF).
- virtual void set_data_raw(stream_reader * p_stream,t_size p_sizehint,abort_callback & p_abort) = 0;
-
- //! For internal use only, do not call.
- static void config_read_file(stream_reader * p_stream,abort_callback & p_abort);
-
- const GUID m_guid;
-private:
- static cfg_var_reader * g_list;
- cfg_var_reader * m_next;
-
- PFC_CLASS_NOT_COPYABLE_EX(cfg_var_reader)
-};
-
-//! Writer part of cfg_var object. In most cases, you should use cfg_var instead of using cfg_var_writer directly.
-class NOVTABLE cfg_var_writer {
-public:
- //! @param p_guid GUID of the variable, used to identify variable implementations owning specific configuration file entries when reading the configuration file back. You must generate a new GUID every time you declare a new cfg_var.
- cfg_var_writer(const GUID & guid) : m_guid(guid) { CFG_VAR_ASSERT_SAFEINIT; m_next = g_list; g_list = this;}
- ~cfg_var_writer() { CFG_VAR_ASSERT_SAFEINIT; }
-
- //! Retrieves state of the variable. Called only from main thread, when writing configuration file.
- //! @param p_stream Stream receiving state of the variable.
- virtual void get_data_raw(stream_writer * p_stream,abort_callback & p_abort) = 0;
-
- //! For internal use only, do not call.
- static void config_write_file(stream_writer * p_stream,abort_callback & p_abort);
-
- const GUID m_guid;
-private:
- static cfg_var_writer * g_list;
- cfg_var_writer * m_next;
-
- PFC_CLASS_NOT_COPYABLE_EX(cfg_var_writer)
-};
-
-//! Base class for configuration variable classes; provides self-registration mechaisms and methods to set/retrieve configuration data; those methods are automatically called for all registered instances by backend when configuration file is being read or written.\n
-//! Note that cfg_var class and its derivatives may be only instantiated statically (as static objects or members of other static objects), NEVER dynamically (operator new, local variables, members of objects instantiated as such).
-class NOVTABLE cfg_var : public cfg_var_reader, public cfg_var_writer {
-protected:
- //! @param p_guid GUID of the variable, used to identify variable implementations owning specific configuration file entries when reading the configuration file back. You must generate a new GUID every time you declare a new cfg_var.
- cfg_var(const GUID & p_guid) : cfg_var_reader(p_guid), cfg_var_writer(p_guid) {}
-public:
- GUID get_guid() const {return cfg_var_reader::m_guid;}
-};
-
-//! Generic integer config variable class. Template parameter can be used to specify integer type to use.\n
-//! Note that cfg_var class and its derivatives may be only instantiated statically (as static objects or members of other static objects), NEVER dynamically (operator new, local variables, members of objects instantiated as such).
-template
-class cfg_int_t : public cfg_var {
-private:
- t_inttype m_val;
-protected:
- void get_data_raw(stream_writer * p_stream,abort_callback & p_abort) {p_stream->write_lendian_t(m_val,p_abort);}
- void set_data_raw(stream_reader * p_stream,t_size p_sizehint,abort_callback & p_abort) {
- t_inttype temp;
- p_stream->read_lendian_t(temp,p_abort);//alter member data only on success, this will throw an exception when something isn't right
- m_val = temp;
- }
-
-public:
- //! @param p_guid GUID of the variable, used to identify variable implementations owning specific configuration file entries when reading the configuration file back. You must generate a new GUID every time you declare a new cfg_var.
- //! @param p_default Default value of the variable.
- explicit inline cfg_int_t(const GUID & p_guid,t_inttype p_default) : cfg_var(p_guid), m_val(p_default) {}
-
- inline const cfg_int_t & operator=(const cfg_int_t & p_val) {m_val=p_val.m_val;return *this;}
- inline t_inttype operator=(t_inttype p_val) {m_val=p_val;return m_val;}
-
- inline operator t_inttype() const {return m_val;}
-
- inline t_inttype get_value() const {return m_val;}
-};
-
-typedef cfg_int_t cfg_int;
-typedef cfg_int_t cfg_uint;
-//! Since relevant byteswapping functions also understand GUIDs, this can be abused to declare a cfg_guid.
-typedef cfg_int_t cfg_guid;
-typedef cfg_int_t cfg_bool;
-
-//! String config variable. Stored in the stream with int32 header containing size in bytes, followed by non-null-terminated UTF-8 data.\n
-//! Note that cfg_var class and its derivatives may be only instantiated statically (as static objects or members of other static objects), NEVER dynamically (operator new, local variables, members of objects instantiated as such).
-class cfg_string : public cfg_var, public pfc::string8
-{
-protected:
- void get_data_raw(stream_writer * p_stream,abort_callback & p_abort);
- void set_data_raw(stream_reader * p_stream,t_size p_sizehint,abort_callback & p_abort);
-
-public:
- //! @param p_guid GUID of the variable, used to identify variable implementations owning specific configuration file entries when reading the configuration file back. You must generate a new GUID every time you declare a new cfg_var.
- //! @param p_defaultval Default/initial value of the variable.
- explicit inline cfg_string(const GUID & p_guid,const char * p_defaultval) : cfg_var(p_guid), pfc::string8(p_defaultval) {}
-
- inline const cfg_string& operator=(const cfg_string & p_val) {set_string(p_val);return *this;}
- inline const cfg_string& operator=(const char* p_val) {set_string(p_val);return *this;}
-
- inline operator const char * () const {return get_ptr();}
-
-};
-
-//! Struct config variable template. Warning: not endian safe, should be used only for nonportable code.\n
-//! Note that cfg_var class and its derivatives may be only instantiated statically (as static objects or members of other static objects), NEVER dynamically (operator new, local variables, members of objects instantiated as such).
-template
-class cfg_struct_t : public cfg_var {
-private:
- t_struct m_val;
-protected:
-
- void get_data_raw(stream_writer * p_stream,abort_callback & p_abort) {p_stream->write_object(&m_val,sizeof(m_val),p_abort);}
- void set_data_raw(stream_reader * p_stream,t_size p_sizehint,abort_callback & p_abort) {
- t_struct temp;
- p_stream->read_object(&temp,sizeof(temp),p_abort);
- m_val = temp;
- }
-public:
- //! @param p_guid GUID of the variable, used to identify variable implementations owning specific configuration file entries when reading the configuration file back. You must generate a new GUID every time you declare a new cfg_var.
- inline cfg_struct_t(const GUID & p_guid,const t_struct & p_val) : cfg_var(p_guid), m_val(p_val) {}
- //! @param p_guid GUID of the variable, used to identify variable implementations owning specific configuration file entries when reading the configuration file back. You must generate a new GUID every time you declare a new cfg_var.
- inline cfg_struct_t(const GUID & p_guid,int filler) : cfg_var(p_guid) {memset(&m_val,filler,sizeof(t_struct));}
-
- inline const cfg_struct_t & operator=(const cfg_struct_t & p_val) {m_val = p_val.get_value();return *this;}
- inline const cfg_struct_t & operator=(const t_struct & p_val) {m_val = p_val;return *this;}
-
- inline const t_struct& get_value() const {return m_val;}
- inline t_struct& get_value() {return m_val;}
- inline operator t_struct() const {return m_val;}
-};
-
-
-template
-class cfg_objList : public cfg_var, public pfc::list_t {
-public:
- cfg_objList(const GUID& guid) : cfg_var(guid) {}
- template cfg_objList(const GUID& guid, const TSource (& source)[Count]) : cfg_var(guid) {
- reset(source);
- }
- template void reset(const TSource (& source)[Count]) {
- set_size(Count); for(t_size walk = 0; walk < Count; ++walk) (*this)[walk] = source[walk];
- }
- void get_data_raw(stream_writer * p_stream,abort_callback & p_abort) {
- stream_writer_formatter<> out(*p_stream,p_abort);
- out << pfc::downcast_guarded(get_size());
- for(t_size walk = 0; walk < get_size(); ++walk) out << (*this)[walk];
- }
- void set_data_raw(stream_reader * p_stream,t_size p_sizehint,abort_callback & p_abort) {
- try {
- stream_reader_formatter<> in(*p_stream,p_abort);
- t_uint32 count; in >> count;
- set_count(count);
- for(t_uint32 walk = 0; walk < count; ++walk) in >> (*this)[walk];
- } catch(...) {
- remove_all();
- throw;
- }
- }
-};
-template
-class cfg_objListEx : public cfg_var, public TList {
-public:
- cfg_objListEx(const GUID & guid) : cfg_var(guid) {}
- void get_data_raw(stream_writer * p_stream, abort_callback & p_abort) {
- stream_writer_formatter<> out(*p_stream,p_abort);
- out << pfc::downcast_guarded(this->get_count());
- for(typename TList::const_iterator walk = this->first(); walk.is_valid(); ++walk) out << *walk;
- }
- void set_data_raw(stream_reader * p_stream,t_size p_sizehint,abort_callback & p_abort) {
- remove_all();
- stream_reader_formatter<> in(*p_stream,p_abort);
- t_uint32 count; in >> count;
- for(t_uint32 walk = 0; walk < count; ++walk) {
- typename TList::t_item item; in >> item; this->add_item(item);
- }
- }
-};
-
-template
-class cfg_obj : public cfg_var, public TObj {
-public:
- cfg_obj(const GUID& guid) : cfg_var(guid), TObj() {}
- template cfg_obj(const GUID& guid,const TInitData& initData) : cfg_var(guid), TObj(initData) {}
-
- TObj & val() {return *this;}
- TObj const & val() const {return *this;}
-
- void get_data_raw(stream_writer * p_stream,abort_callback & p_abort) {
- stream_writer_formatter<> out(*p_stream,p_abort);
- const TObj * ptr = this;
- out << *ptr;
- }
- void set_data_raw(stream_reader * p_stream,t_size p_sizehint,abort_callback & p_abort) {
- stream_reader_formatter<> in(*p_stream,p_abort);
- TObj * ptr = this;
- in >> *ptr;
- }
-};
-
-template class cfg_objListImporter : private cfg_var_reader {
-public:
- typedef cfg_objList TMasterVar;
- cfg_objListImporter(TMasterVar & var, const GUID & guid) : m_var(var), cfg_var_reader(guid) {}
-
-private:
- void set_data_raw(stream_reader * p_stream,t_size p_sizehint,abort_callback & p_abort) {
- TImport temp;
- try {
- stream_reader_formatter<> in(*p_stream,p_abort);
- t_uint32 count; in >> count;
- m_var.set_count(count);
- for(t_uint32 walk = 0; walk < count; ++walk) {
- in >> temp;
- m_var[walk] = temp;
- }
- } catch(...) {
- m_var.remove_all();
- throw;
- }
- }
- TMasterVar & m_var;
-};
-
-#endif
diff --git a/tools/vio2sf/src/foobar/foobar2000/SDK/chapterizer.cpp b/tools/vio2sf/src/foobar/foobar2000/SDK/chapterizer.cpp
deleted file mode 100644
index e933088d1..000000000
--- a/tools/vio2sf/src/foobar/foobar2000/SDK/chapterizer.cpp
+++ /dev/null
@@ -1,24 +0,0 @@
-#include "foobar2000.h"
-
-void chapter_list::copy(const chapter_list & p_source)
-{
- t_size n, count = p_source.get_chapter_count();
- set_chapter_count(count);
- for(n=0;n & p_out,const char * p_path,abort_callback & p_abort)
-{
- service_ptr_t ptr;
- service_enum_t e;
- while(e.next(ptr))
- {
- if (ptr->is_our_file(p_path,p_abort))
- {
- p_out = ptr;
- return true;
- }
- }
- return false;
-}
\ No newline at end of file
diff --git a/tools/vio2sf/src/foobar/foobar2000/SDK/chapterizer.h b/tools/vio2sf/src/foobar/foobar2000/SDK/chapterizer.h
deleted file mode 100644
index 0e340aecd..000000000
--- a/tools/vio2sf/src/foobar/foobar2000/SDK/chapterizer.h
+++ /dev/null
@@ -1,72 +0,0 @@
-//! Interface for object storing list of chapters.
-class NOVTABLE chapter_list {
-public:
- //! Returns number of chapters.
- virtual t_size get_chapter_count() const = 0;
- //! Queries description of specified chapter.
- //! @param p_chapter Index of chapter to query, greater or equal zero and less than get_chapter_count() value. If p_chapter value is out of valid range, results are undefined (e.g. crash).
- //! @returns reference to file_info object describing specified chapter (length part of file_info indicates distance between beginning of this chapter and next chapter mark). Returned reference value for temporary use only, becomes invalid after any non-const operation on the chapter_list object.
- virtual const file_info & get_info(t_size p_chapter) const = 0;
-
- //! Sets number of chapters.
- virtual void set_chapter_count(t_size p_count) = 0;
- //! Modifies description of specified chapter.
- //! @param p_chapter_index Index of chapter to modify, greater or equal zero and less than get_chapter_count() value. If p_chapter value is out of valid range, results are undefined (e.g. crash).
- //! @param p_info New chapter description. Note that length part of file_info is used to calculate chapter marks.
- virtual void set_info(t_size p_chapter,const file_info & p_info) = 0;
-
- //! Copies contents of specified chapter_list object to this object.
- void copy(const chapter_list & p_source);
-
- inline const chapter_list & operator=(const chapter_list & p_source) {copy(p_source); return *this;}
-
-protected:
- chapter_list() {}
- ~chapter_list() {}
-};
-
-//! Implements chapter_list.
-class chapter_list_impl : public chapter_list
-{
-public:
- chapter_list_impl(const chapter_list_impl & p_source) {copy(p_source);}
- chapter_list_impl(const chapter_list & p_source) {copy(p_source);}
- chapter_list_impl() {}
-
- const chapter_list_impl & operator=(const chapter_list_impl & p_source) {copy(p_source); return *this;}
- const chapter_list_impl & operator=(const chapter_list & p_source) {copy(p_source); return *this;}
-
- t_size get_chapter_count() const {return m_infos.get_size();}
- const file_info & get_info(t_size p_chapter) const {return m_infos[p_chapter];}
-
- void set_chapter_count(t_size p_count) {m_infos.set_size(p_count);}
- void set_info(t_size p_chapter,const file_info & p_info) {m_infos[p_chapter] = p_info;}
-private:
- pfc::array_t m_infos;
-};
-
-
-//! This service implements chapter list editing operations for various file formats, e.g. for MP4 chapters or CD images with embedded cuesheets. Used by converter "encode single file with chapters" feature.
-class NOVTABLE chapterizer : public service_base {
-public:
- //! Tests whether specified path is supported by this implementation.
- //! @param p_path Path of file to examine.
- //! @param p_abort abort_callback object signaling user aborting the operation.
- virtual bool is_our_file(const char * p_path,abort_callback & p_abort) = 0;
-
- //! Writes new chapter list to specified file.
- //! @param p_path Path of file to modify.
- //! @param p_list New chapter list to write.
- //! @param p_abort abort_callback object signaling user aborting the operation.
- virtual void set_chapters(const char * p_path,chapter_list const & p_list,abort_callback & p_abort) = 0;
- //! Retrieves chapter list from specified file.
- //! @param p_path Path of file to examine.
- //! @param p_list Object receiving chapter list.
- //! @param p_abort abort_callback object signaling user aborting the operation.
- virtual void get_chapters(const char * p_path,chapter_list & p_list,abort_callback & p_abort) = 0;
-
- //! Static helper, tries to find chapterizer interface that supports specified file.
- static bool g_find(service_ptr_t & p_out,const char * p_path,abort_callback & p_abort);
-
- FB2K_MAKE_SERVICE_INTERFACE_ENTRYPOINT(chapterizer);
-};
diff --git a/tools/vio2sf/src/foobar/foobar2000/SDK/commandline.cpp b/tools/vio2sf/src/foobar/foobar2000/SDK/commandline.cpp
deleted file mode 100644
index 34708c3dd..000000000
--- a/tools/vio2sf/src/foobar/foobar2000/SDK/commandline.cpp
+++ /dev/null
@@ -1,24 +0,0 @@
-#include "foobar2000.h"
-
-void commandline_handler_metadb_handle::on_file(const char * url)
-{
-
- abort_callback_dummy blah;
-
- {
- playlist_loader_callback_impl callback(blah);
-
- bool fail = false;
- try {
- playlist_loader::g_process_path_ex(url,callback);
- } catch(std::exception const & e) {
- console::complain("Unhandled exception in playlist loader", e);
- fail = true;
- }
-
- if (!fail) {
- t_size n,m=callback.get_count();
- for(n=0;n on_token() => deletion
- scenario #2:
- creation => on_token() returning RESULT_PROCESSED_EXPECT_FILES => on_file(), on_file().... => on_files_done() => deletion
-*/
-
-template
-class commandline_handler_factory_t : public service_factory_t {};
diff --git a/tools/vio2sf/src/foobar/foobar2000/SDK/completion_notify.cpp b/tools/vio2sf/src/foobar/foobar2000/SDK/completion_notify.cpp
deleted file mode 100644
index 0a183a8b0..000000000
--- a/tools/vio2sf/src/foobar/foobar2000/SDK/completion_notify.cpp
+++ /dev/null
@@ -1,25 +0,0 @@
-#include "foobar2000.h"
-
-namespace {
- class main_thread_callback_myimpl : public main_thread_callback {
- public:
- void callback_run() {
- m_notify->on_completion(m_code);
- }
-
- main_thread_callback_myimpl(completion_notify_ptr p_notify,unsigned p_code) : m_notify(p_notify), m_code(p_code) {}
- private:
- completion_notify_ptr m_notify;
- unsigned m_code;
- };
-}
-
-void completion_notify::g_signal_completion_async(completion_notify_ptr p_notify,unsigned p_code) {
- if (p_notify.is_valid()) {
- static_api_ptr_t()->add_callback(new service_impl_t(p_notify,p_code));
- }
-}
-
-void completion_notify::on_completion_async(unsigned p_code) {
- static_api_ptr_t()->add_callback(new service_impl_t(this,p_code));
-}
\ No newline at end of file
diff --git a/tools/vio2sf/src/foobar/foobar2000/SDK/completion_notify.h b/tools/vio2sf/src/foobar/foobar2000/SDK/completion_notify.h
deleted file mode 100644
index f16c57361..000000000
--- a/tools/vio2sf/src/foobar/foobar2000/SDK/completion_notify.h
+++ /dev/null
@@ -1,89 +0,0 @@
-//! Generic service for receiving notifications about async operation completion. Used by various other services.
-class completion_notify : public service_base {
-public:
- //! Called when an async operation has been completed. Note that on_completion is always called from main thread. You can use on_completion_async() helper if you need to signal completion while your context is in another thread.\n
- //! IMPLEMENTATION WARNING: If process being completed creates a window taking caller's window as parent, you must not destroy the parent window inside on_completion(). If you need to do so, use PostMessage() or main_thread_callback to delay the deletion.
- //! @param p_code Context-specific status code. Possible values depend on the operation being performed.
- virtual void on_completion(unsigned p_code) = 0;
-
- //! Helper. Queues a notification, using main_thread_callback.
- void on_completion_async(unsigned p_code);
-
- //! Helper. Checks for null ptr and calls on_completion_async when the ptr is not null.
- static void g_signal_completion_async(service_ptr_t p_notify,unsigned p_code);
-
- FB2K_MAKE_SERVICE_INTERFACE(completion_notify,service_base);
-};
-
-//! Implementation helper.
-class completion_notify_dummy : public completion_notify {
-public:
- void on_completion(unsigned p_code) {}
-};
-
-//! Implementation helper.
-class completion_notify_orphanable : public completion_notify {
-public:
- virtual void orphan() = 0;
-};
-
-//! Helper implementation.
-//! IMPLEMENTATION WARNING: If process being completed creates a window taking caller's window as parent, you must not destroy the parent window inside on_task_completion(). If you need to do so, use PostMessage() or main_thread_callback to delay the deletion.
-template
-class completion_notify_impl : public completion_notify_orphanable {
-public:
- void on_completion(unsigned p_code) {
- if (m_receiver != NULL) {
- m_receiver->on_task_completion(m_taskid,p_code);
- }
- }
- void setup(t_receiver * p_receiver, unsigned p_task_id) {m_receiver = p_receiver; m_taskid = p_task_id;}
- void orphan() {m_receiver = NULL; m_taskid = 0;}
-private:
- t_receiver * m_receiver;
- unsigned m_taskid;
-};
-
-template
-service_ptr_t completion_notify_create(t_receiver * p_receiver,unsigned p_taskid) {
- service_ptr_t > instance = new service_impl_t >();
- instance->setup(p_receiver,p_taskid);
- return instance;
-}
-
-typedef service_ptr_t completion_notify_ptr;
-typedef service_ptr_t completion_notify_orphanable_ptr;
-
-//! Helper base class for classes that manage nonblocking tasks and get notified back thru completion_notify interface.
-class completion_notify_receiver {
-public:
- completion_notify_ptr create_task(unsigned p_id) {
- completion_notify_orphanable_ptr ptr;
- if (m_tasks.query(p_id,ptr)) ptr->orphan();
- ptr = completion_notify_create(this,p_id);
- m_tasks.set(p_id,ptr);
- return ptr;
- }
- bool have_task(unsigned p_id) const {
- return m_tasks.have_item(p_id);
- }
- void orphan_task(unsigned p_id) {
- completion_notify_orphanable_ptr ptr;
- if (m_tasks.query(p_id,ptr)) {
- ptr->orphan();
- m_tasks.remove(p_id);
- }
- }
- ~completion_notify_receiver() {
- orphan_all_tasks();
- }
- void orphan_all_tasks() {
- m_tasks.enumerate(orphanfunc);
- m_tasks.remove_all();
- }
-
- virtual void on_task_completion(unsigned p_id,unsigned p_status) {}
-private:
- static void orphanfunc(unsigned,completion_notify_orphanable_ptr p_item) {p_item->orphan();}
- pfc::map_t m_tasks;
-};
diff --git a/tools/vio2sf/src/foobar/foobar2000/SDK/component.h b/tools/vio2sf/src/foobar/foobar2000/SDK/component.h
deleted file mode 100644
index 7ae5cc556..000000000
--- a/tools/vio2sf/src/foobar/foobar2000/SDK/component.h
+++ /dev/null
@@ -1,44 +0,0 @@
-#ifndef _COMPONENT_H_
-#define _COMPONENT_H_
-
-#include "foobar2000.h"
-
-class NOVTABLE foobar2000_client
-{
-public:
- typedef service_factory_base* pservice_factory_base;
-
- enum {FOOBAR2000_CLIENT_VERSION_COMPATIBLE = 70, FOOBAR2000_CLIENT_VERSION = 73}; //changes everytime global compatibility is broken
- virtual t_uint32 FB2KAPI get_version() = 0;
- virtual pservice_factory_base FB2KAPI get_service_list() = 0;
-
- virtual void FB2KAPI get_config(stream_writer * p_stream,abort_callback & p_abort) = 0;
- virtual void FB2KAPI set_config(stream_reader * p_stream,abort_callback & p_abort) = 0;
- virtual void FB2KAPI set_library_path(const char * path,const char * name) = 0;
- virtual void FB2KAPI services_init(bool val) = 0;
- virtual bool is_debug() = 0;
-protected:
- foobar2000_client() {}
- ~foobar2000_client() {}
-};
-
-class NOVTABLE foobar2000_api
-{
-public:
- virtual service_class_ref FB2KAPI service_enum_find_class(const GUID & p_guid) = 0;
- virtual bool FB2KAPI service_enum_create(service_ptr_t & p_out,service_class_ref p_class,t_size p_index) = 0;
- virtual t_size FB2KAPI service_enum_get_count(service_class_ref p_class) = 0;
- virtual HWND FB2KAPI get_main_window()=0;
- virtual bool FB2KAPI assert_main_thread()=0;
- virtual bool FB2KAPI is_main_thread()=0;
- virtual bool FB2KAPI is_shutting_down()=0;
- virtual pcchar FB2KAPI get_profile_path()=0;
- virtual bool FB2KAPI is_initializing() = 0;
-protected:
- foobar2000_api() {}
- ~foobar2000_api() {}
-};
-
-extern foobar2000_api * g_api;
-
-#endif
diff --git a/tools/vio2sf/src/foobar/foobar2000/SDK/component_client.h b/tools/vio2sf/src/foobar/foobar2000/SDK/component_client.h
deleted file mode 100644
index 46aa84888..000000000
--- a/tools/vio2sf/src/foobar/foobar2000/SDK/component_client.h
+++ /dev/null
@@ -1,6 +0,0 @@
-#ifndef _COMPONENT_CLIENT_H_
-#define _COMPONENT_CLIENT_H_
-
-
-
-#endif //_COMPONENT_CLIENT_H_
\ No newline at end of file
diff --git a/tools/vio2sf/src/foobar/foobar2000/SDK/components_menu.h b/tools/vio2sf/src/foobar/foobar2000/SDK/components_menu.h
deleted file mode 100644
index 835237331..000000000
--- a/tools/vio2sf/src/foobar/foobar2000/SDK/components_menu.h
+++ /dev/null
@@ -1,7 +0,0 @@
-#ifndef _COMPONENTS_MENU_H_
-#define _COMPONENTS_MENU_H_
-
-#error deprecated, see menu_item.h
-
-
-#endif
\ No newline at end of file
diff --git a/tools/vio2sf/src/foobar/foobar2000/SDK/componentversion.h b/tools/vio2sf/src/foobar/foobar2000/SDK/componentversion.h
deleted file mode 100644
index 85ba58924..000000000
--- a/tools/vio2sf/src/foobar/foobar2000/SDK/componentversion.h
+++ /dev/null
@@ -1,56 +0,0 @@
-//! Entrypoint interface for declaring component's version information. Instead of implementing this directly, use DECLARE_COMPONENT_VERSION().
-class NOVTABLE componentversion : public service_base {
-public:
- virtual void get_file_name(pfc::string_base & out)=0;
- virtual void get_component_name(pfc::string_base & out)=0;
- virtual void get_component_version(pfc::string_base & out)=0;
- virtual void get_about_message(pfc::string_base & out)=0;//about message uses "\n" for line separators
-
- FB2K_MAKE_SERVICE_INTERFACE_ENTRYPOINT(componentversion);
-};
-
-//! Implementation helper.
-class componentversion_impl_simple : public componentversion {
- const char * name,*version,*about;
-public:
- //do not derive/override
- virtual void get_file_name(pfc::string_base & out) {out.set_string(core_api::get_my_file_name());}
- virtual void get_component_name(pfc::string_base & out) {out.set_string(name?name:"");}
- virtual void get_component_version(pfc::string_base & out) {out.set_string(version?version:"");}
- virtual void get_about_message(pfc::string_base & out) {out.set_string(about?about:"");}
- explicit componentversion_impl_simple(const char * p_name,const char * p_version,const char * p_about) : name(p_name), version(p_version), about(p_about ? p_about : "") {}
-};
-
-//! Implementation helper.
-class componentversion_impl_copy : public componentversion {
- pfc::string8 name,version,about;
-public:
- //do not derive/override
- virtual void get_file_name(pfc::string_base & out) {out.set_string(core_api::get_my_file_name());}
- virtual void get_component_name(pfc::string_base & out) {out.set_string(name);}
- virtual void get_component_version(pfc::string_base & out) {out.set_string(version);}
- virtual void get_about_message(pfc::string_base & out) {out.set_string(about);}
- explicit componentversion_impl_copy(const char * p_name,const char * p_version,const char * p_about) : name(p_name), version(p_version), about(p_about ? p_about : "") {}
-};
-
-typedef service_factory_single_transparent_t __componentversion_impl_simple_factory;
-typedef service_factory_single_transparent_t __componentversion_impl_copy_factory;
-
-class componentversion_impl_simple_factory : public __componentversion_impl_simple_factory {
-public:
- componentversion_impl_simple_factory(const char * p_name,const char * p_version,const char * p_about) : __componentversion_impl_simple_factory(p_name,p_version,p_about) {}
-};
-
-class componentversion_impl_copy_factory : public __componentversion_impl_copy_factory {
-public:
- componentversion_impl_copy_factory(const char * p_name,const char * p_version,const char * p_about) : __componentversion_impl_copy_factory(p_name,p_version,p_about) {}
-};
-
-//! Use this to declare your component's version information. Parameters must ba plain const char * string constants. The ABOUT string can be NULL if you don't provide any information to show in the "About" dialog. \n
-//! Example: DECLARE_COMPONENT_VERSION("blah","v1.337",NULL)
-#define DECLARE_COMPONENT_VERSION(NAME,VERSION,ABOUT) \
- static componentversion_impl_simple_factory g_componentversion_service(NAME,VERSION,ABOUT);
-
-//! Same as DECLARE_COMPONENT_VERSION(), but parameters can be dynamically generated strings rather than compile-time constants.
-#define DECLARE_COMPONENT_VERSION_COPY(NAME,VERSION,ABOUT) \
- static componentversion_impl_copy_factory g_componentversion_service(NAME,VERSION,ABOUT);
diff --git a/tools/vio2sf/src/foobar/foobar2000/SDK/config_io_callback.h b/tools/vio2sf/src/foobar/foobar2000/SDK/config_io_callback.h
deleted file mode 100644
index 16474a458..000000000
--- a/tools/vio2sf/src/foobar/foobar2000/SDK/config_io_callback.h
+++ /dev/null
@@ -1,15 +0,0 @@
-//! Implementing this interface lets you maintain your own configuration files rather than depending on the cfg_var system. \n
-//! Note that you must not make assumptions about what happens first: config_io_callback::on_read(), initialization of cfg_var values or config_io_callback::on_read() in other components. Order of these things is undefined and will change with each run. \n
-//! Use service_factory_single_t to register your implementations. Do not call other people's implementations, core is responsible for doing that when appropriate.
-class NOVTABLE config_io_callback : public service_base {
-public:
- //! Called on startup. You can read your configuration file from here. \n
- //! Hint: use core_api::get_profile_path() to retrieve the path of the folder where foobar2000 configuration files are stored.
- virtual void on_read() = 0;
- //! Called on shutdown. You can write your configuration file from here.
- //! Hint: use core_api::get_profile_path() to retrieve the path of the folder where foobar2000 configuration files are stored.
- //! @param reset If set to true, our configuration is being reset, so you should wipe your files rather than rewrite them with current configuration.
- virtual void on_write(bool reset) = 0;
-
- FB2K_MAKE_SERVICE_INTERFACE_ENTRYPOINT(config_io_callback);
-};
diff --git a/tools/vio2sf/src/foobar/foobar2000/SDK/config_object.cpp b/tools/vio2sf/src/foobar/foobar2000/SDK/config_object.cpp
deleted file mode 100644
index 058c664c0..000000000
--- a/tools/vio2sf/src/foobar/foobar2000/SDK/config_object.cpp
+++ /dev/null
@@ -1,206 +0,0 @@
-#include "foobar2000.h"
-
-void config_object_notify_manager::g_on_changed(const service_ptr_t & p_object)
-{
- if (core_api::assert_main_thread())
- {
- service_enum_t e;
- service_ptr_t ptr;
- while(e.next(ptr))
- ptr->on_changed(p_object);
- }
-}
-
-bool config_object::g_find(service_ptr_t & p_out,const GUID & p_guid)
-{
- service_ptr_t ptr;
- service_enum_t e;
- while(e.next(ptr))
- {
- if (ptr->get_guid() == p_guid)
- {
- p_out = ptr;
- return true;
- }
- }
- return false;
-}
-
-void config_object::g_get_data_string(const GUID & p_guid,pfc::string_base & p_out)
-{
- service_ptr_t ptr;
- if (!g_find(ptr,p_guid)) throw exception_service_not_found();
- ptr->get_data_string(p_out);
-}
-
-void config_object::g_set_data_string(const GUID & p_guid,const char * p_data,t_size p_length)
-{
- service_ptr_t ptr;
- if (!g_find(ptr,p_guid)) throw exception_service_not_found();
- ptr->set_data_string(p_data,p_length);
-}
-
-void config_object::get_data_int32(t_int32 & p_out)
-{
- t_int32 temp;
- get_data_struct_t(temp);
- byte_order::order_le_to_native_t(temp);
- p_out = temp;
-}
-
-void config_object::set_data_int32(t_int32 p_val)
-{
- t_int32 temp = p_val;
- byte_order::order_native_to_le_t(temp);
- set_data_struct_t(temp);
-}
-
-bool config_object::get_data_bool_simple(bool p_default) {
- try {
- bool ret = p_default;
- get_data_bool(ret);
- return ret;
- } catch(...) {return p_default;}
-}
-
-t_int32 config_object::get_data_int32_simple(t_int32 p_default) {
- try {
- t_int32 ret = p_default;
- get_data_int32(ret);
- return ret;
- } catch(...) {return p_default;}
-}
-
-void config_object::g_get_data_int32(const GUID & p_guid,t_int32 & p_out) {
- service_ptr_t ptr;
- if (!g_find(ptr,p_guid)) throw exception_service_not_found();
- ptr->get_data_int32(p_out);
-}
-
-void config_object::g_set_data_int32(const GUID & p_guid,t_int32 p_val) {
- service_ptr_t ptr;
- if (!g_find(ptr,p_guid)) throw exception_service_not_found();
- ptr->set_data_int32(p_val);
-}
-
-bool config_object::g_get_data_bool_simple(const GUID & p_guid,bool p_default)
-{
- service_ptr_t ptr;
- if (!g_find(ptr,p_guid)) throw exception_service_not_found();
- return ptr->get_data_bool_simple(p_default);
-}
-
-t_int32 config_object::g_get_data_int32_simple(const GUID & p_guid,t_int32 p_default)
-{
- service_ptr_t ptr;
- if (!g_find(ptr,p_guid)) throw exception_service_not_found();
- return ptr->get_data_int32_simple(p_default);
-}
-
-void config_object::get_data_bool(bool & p_out) {get_data_struct_t(p_out);}
-void config_object::set_data_bool(bool p_val) {set_data_struct_t(p_val);}
-
-void config_object::g_get_data_bool(const GUID & p_guid,bool & p_out) {g_get_data_struct_t(p_guid,p_out);}
-void config_object::g_set_data_bool(const GUID & p_guid,bool p_val) {g_set_data_struct_t(p_guid,p_val);}
-
-namespace {
- class stream_writer_string : public stream_writer {
- public:
- void write(const void * p_buffer,t_size p_bytes,abort_callback & p_abort) {
- m_out.add_string((const char*)p_buffer,p_bytes);
- }
- stream_writer_string(pfc::string_base & p_out) : m_out(p_out) {m_out.reset();}
- private:
- pfc::string_base & m_out;
- };
-
- class stream_writer_fixedbuffer : public stream_writer {
- public:
- void write(const void * p_buffer,t_size p_bytes,abort_callback & p_abort) {
- if (p_bytes > 0) {
- if (p_bytes > m_bytes - m_bytes_read) throw pfc::exception_overflow();
- memcpy((t_uint8*)m_out,p_buffer,p_bytes);
- m_bytes_read += p_bytes;
- }
- }
- stream_writer_fixedbuffer(void * p_out,t_size p_bytes,t_size & p_bytes_read) : m_out(p_out), m_bytes(p_bytes), m_bytes_read(p_bytes_read) {m_bytes_read = 0;}
- private:
- void * m_out;
- t_size m_bytes;
- t_size & m_bytes_read;
- };
-
-
-
- class stream_writer_get_length : public stream_writer {
- public:
- void write(const void * p_buffer,t_size p_bytes,abort_callback & p_abort) {
- m_length += p_bytes;
- }
- stream_writer_get_length(t_size & p_length) : m_length(p_length) {m_length = 0;}
- private:
- t_size & m_length;
- };
-};
-
-t_size config_object::get_data_raw(void * p_out,t_size p_bytes) {
- t_size ret = 0;
- get_data(&stream_writer_fixedbuffer(p_out,p_bytes,ret),abort_callback_impl());
- return ret;
-}
-
-t_size config_object::get_data_raw_length() {
- t_size ret = 0;
- get_data(&stream_writer_get_length(ret),abort_callback_impl());
- return ret;
-}
-
-void config_object::set_data_raw(const void * p_data,t_size p_bytes, bool p_notify) {
- set_data(&stream_reader_memblock_ref(p_data,p_bytes),abort_callback_impl(),p_notify);
-}
-
-void config_object::set_data_string(const char * p_data,t_size p_length) {
- set_data_raw(p_data,pfc::strlen_max(p_data,p_length));
-}
-
-void config_object::get_data_string(pfc::string_base & p_out) {
- get_data(&stream_writer_string(p_out),abort_callback_impl());
-}
-
-
-//config_object_impl stuff
-
-
-void config_object_impl::get_data(stream_writer * p_stream,abort_callback & p_abort) const {
- insync(m_sync);
- p_stream->write_object(m_data.get_ptr(),m_data.get_size(),p_abort);
-}
-
-void config_object_impl::set_data(stream_reader * p_stream,abort_callback & p_abort,bool p_notify) {
- core_api::ensure_main_thread();
-
- {
- insync(m_sync);
- m_data.set_size(0);
- enum {delta = 1024};
- t_uint8 buffer[delta];
- for(;;)
- {
- t_size delta_done = p_stream->read(buffer,delta,p_abort);
-
- if (delta_done > 0)
- {
- m_data.append_fromptr(buffer,delta_done);
- }
-
- if (delta_done != delta) break;
- }
- }
-
- if (p_notify) config_object_notify_manager::g_on_changed(this);
-}
-
-config_object_impl::config_object_impl(const GUID & p_guid,const void * p_data,t_size p_bytes) : cfg_var(p_guid)
-{
- m_data.set_data_fromptr((const t_uint8*)p_data,p_bytes);
-}
diff --git a/tools/vio2sf/src/foobar/foobar2000/SDK/config_object.h b/tools/vio2sf/src/foobar/foobar2000/SDK/config_object.h
deleted file mode 100644
index e460dc540..000000000
--- a/tools/vio2sf/src/foobar/foobar2000/SDK/config_object.h
+++ /dev/null
@@ -1,85 +0,0 @@
-#ifndef _CONFIG_OBJECT_H_
-#define _CONFIG_OBJECT_H_
-
-class config_object;
-
-class NOVTABLE config_object_notify_manager : public service_base
-{
-public:
- virtual void on_changed(const service_ptr_t & p_object) = 0;
- static void g_on_changed(const service_ptr_t & p_object);
-
-
- FB2K_MAKE_SERVICE_INTERFACE_ENTRYPOINT(config_object_notify_manager);
-};
-
-class NOVTABLE config_object : public service_base
-{
-public:
- //interface
- virtual GUID get_guid() const = 0;
- virtual void get_data(stream_writer * p_stream,abort_callback & p_abort) const = 0;
- virtual void set_data(stream_reader * p_stream,abort_callback & p_abort,bool p_sendnotify = true) = 0;
-
- //helpers
- static bool g_find(service_ptr_t & p_out,const GUID & p_guid);
-
- void set_data_raw(const void * p_data,t_size p_bytes,bool p_sendnotify = true);
- t_size get_data_raw(void * p_out,t_size p_bytes);
- t_size get_data_raw_length();
-
- template void get_data_struct_t(T& p_out);
- template void set_data_struct_t(const T& p_in);
- template static void g_get_data_struct_t(const GUID & p_guid,T & p_out);
- template static void g_set_data_struct_t(const GUID & p_guid,const T & p_in);
-
- void set_data_string(const char * p_data,t_size p_length);
- void get_data_string(pfc::string_base & p_out);
-
- void get_data_bool(bool & p_out);
- void set_data_bool(bool p_val);
- void get_data_int32(t_int32 & p_out);
- void set_data_int32(t_int32 p_val);
- bool get_data_bool_simple(bool p_default);
- t_int32 get_data_int32_simple(t_int32 p_default);
-
- static void g_get_data_string(const GUID & p_guid,pfc::string_base & p_out);
- static void g_set_data_string(const GUID & p_guid,const char * p_data,t_size p_length = ~0);
-
- static void g_get_data_bool(const GUID & p_guid,bool & p_out);
- static void g_set_data_bool(const GUID & p_guid,bool p_val);
- static void g_get_data_int32(const GUID & p_guid,t_int32 & p_out);
- static void g_set_data_int32(const GUID & p_guid,t_int32 p_val);
- static bool g_get_data_bool_simple(const GUID & p_guid,bool p_default);
- static t_int32 g_get_data_int32_simple(const GUID & p_guid,t_int32 p_default);
-
-
- FB2K_MAKE_SERVICE_INTERFACE_ENTRYPOINT(config_object);
-};
-
-class standard_config_objects
-{
-public:
- static const GUID bool_remember_window_positions, bool_ui_always_on_top,bool_playlist_stop_after_current;
- static const GUID bool_playback_follows_cursor, bool_cursor_follows_playback;
- static const GUID bool_show_keyboard_shortcuts_in_menus;
- static const GUID string_gui_last_directory_media,string_gui_last_directory_playlists;
- static const GUID int32_dynamic_bitrate_display_rate;
-
-
- inline static bool query_show_keyboard_shortcuts_in_menus() {return config_object::g_get_data_bool_simple(standard_config_objects::bool_show_keyboard_shortcuts_in_menus,true);}
- inline static bool query_remember_window_positions() {return config_object::g_get_data_bool_simple(standard_config_objects::bool_remember_window_positions,true);}
-
-};
-
-class config_object_notify : public service_base
-{
-public:
- virtual t_size get_watched_object_count() = 0;
- virtual GUID get_watched_object(t_size p_index) = 0;
- virtual void on_watched_object_changed(const service_ptr_t & p_object) = 0;
-
- FB2K_MAKE_SERVICE_INTERFACE_ENTRYPOINT(config_object_notify);
-};
-
-#endif _CONFIG_OBJECT_H_
diff --git a/tools/vio2sf/src/foobar/foobar2000/SDK/config_object_impl.h b/tools/vio2sf/src/foobar/foobar2000/SDK/config_object_impl.h
deleted file mode 100644
index 00e3451cc..000000000
--- a/tools/vio2sf/src/foobar/foobar2000/SDK/config_object_impl.h
+++ /dev/null
@@ -1,174 +0,0 @@
-#ifndef _CONFIG_OBJECT_IMPL_H_
-#define _CONFIG_OBJECT_IMPL_H_
-
-//template function bodies from config_object class
-
-template
-void config_object::get_data_struct_t(T& p_out) {
- if (get_data_raw(&p_out,sizeof(T)) != sizeof(T)) throw exception_io_data_truncation();
-}
-
-template
-void config_object::set_data_struct_t(const T& p_in) {
- return set_data_raw(&p_in,sizeof(T));
-}
-
-template
-void config_object::g_get_data_struct_t(const GUID & p_guid,T & p_out) {
- service_ptr_t ptr;
- if (!g_find(ptr,p_guid)) throw exception_service_not_found();
- return ptr->get_data_struct_t(p_out);
-}
-
-template
-void config_object::g_set_data_struct_t(const GUID & p_guid,const T & p_in) {
- service_ptr_t ptr;
- if (!g_find(ptr,p_guid)) throw exception_service_not_found();
- return ptr->set_data_struct_t(p_in);
-}
-
-
-class config_object_impl : public config_object, private cfg_var
-{
-public:
- GUID get_guid() const {return cfg_var::get_guid();}
- void get_data(stream_writer * p_stream,abort_callback & p_abort) const ;
- void set_data(stream_reader * p_stream,abort_callback & p_abort,bool p_notify);
-
- config_object_impl(const GUID & p_guid,const void * p_data,t_size p_bytes);
-private:
-
- //cfg_var methods
- void get_data_raw(stream_writer * p_stream,abort_callback & p_abort) {get_data(p_stream,p_abort);}
- void set_data_raw(stream_reader * p_stream,t_size p_sizehint,abort_callback & p_abort) {set_data(p_stream,p_abort,false);}
-
- mutable critical_section m_sync;
- pfc::array_t m_data;
-};
-
-typedef service_factory_single_transparent_t config_object_factory;
-
-template
-class config_object_fixed_const_impl_t : public config_object {
-public:
- config_object_fixed_const_impl_t(const GUID & p_guid, const void * p_data) : m_guid(p_guid) {memcpy(m_data,p_data,p_size);}
- GUID get_guid() const {return m_guid;}
-
- void get_data(stream_writer * p_stream, abort_callback & p_abort) const { p_stream->write_object(m_data,p_size,p_abort); }
- void set_data(stream_reader * p_stream, abort_callback & p_abort, bool p_notify) { PFC_ASSERT(!"Should not get here."); }
-
-private:
- t_uint8 m_data[p_size];
- const GUID m_guid;
-};
-
-template
-class config_object_fixed_impl_t : public config_object, private cfg_var {
-public:
- GUID get_guid() const {return cfg_var::get_guid();}
-
- void get_data(stream_writer * p_stream,abort_callback & p_abort) const {
- insync(m_sync);
- p_stream->write_object(m_data,p_size,p_abort);
- }
-
- void set_data(stream_reader * p_stream,abort_callback & p_abort,bool p_notify) {
- core_api::ensure_main_thread();
-
- {
- t_uint8 temp[p_size];
- p_stream->read_object(temp,p_size,p_abort);
- insync(m_sync);
- memcpy(m_data,temp,p_size);
- }
-
- if (p_notify) config_object_notify_manager::g_on_changed(this);
- }
-
- config_object_fixed_impl_t (const GUID & p_guid,const void * p_data)
- : cfg_var(p_guid)
- {
- memcpy(m_data,p_data,p_size);
- }
-
-private:
- //cfg_var methods
- void get_data_raw(stream_writer * p_stream,abort_callback & p_abort) {get_data(p_stream,p_abort);}
- void set_data_raw(stream_reader * p_stream,t_size p_sizehint,abort_callback & p_abort) {set_data(p_stream,p_abort,false);}
-
- mutable critical_section m_sync;
- t_uint8 m_data[p_size];
-
-};
-
-template class _config_object_fixed_impl_switch;
-template class _config_object_fixed_impl_switch { public: typedef config_object_fixed_impl_t type; };
-template class _config_object_fixed_impl_switch { public: typedef config_object_fixed_const_impl_t type; };
-
-template
-class config_object_fixed_factory_t : public service_factory_single_transparent_t< typename _config_object_fixed_impl_switch::type >
-{
-public:
- config_object_fixed_factory_t(const GUID & p_guid,const void * p_initval)
- :
- service_factory_single_transparent_t< typename _config_object_fixed_impl_switch::type >
- (p_guid,p_initval)
- {}
-};
-
-
-class config_object_string_factory : public config_object_factory
-{
-public:
- config_object_string_factory(const GUID & p_guid,const char * p_string,t_size p_string_length = infinite)
- : config_object_factory(p_guid,p_string,pfc::strlen_max(p_string,infinite)) {}
-
-};
-
-template
-class config_object_bool_factory_t : public config_object_fixed_factory_t<1,isConst> {
-public:
- config_object_bool_factory_t(const GUID & p_guid,bool p_initval)
- : config_object_fixed_factory_t<1,isConst>(p_guid,&p_initval) {}
-};
-typedef config_object_bool_factory_t<> config_object_bool_factory;
-
-template
-class config_object_int_factory_t : public config_object_fixed_factory_t
-{
-private:
- template
- struct t_initval
- {
- T m_initval;
- t_initval(T p_initval) : m_initval(p_initval) {byte_order::order_native_to_le_t(m_initval);}
- T * get_ptr() {return &m_initval;}
- };
-public:
- config_object_int_factory_t(const GUID & p_guid,T p_initval)
- : config_object_fixed_factory_t(p_guid,t_initval(p_initval).get_ptr() )
- {}
-};
-
-typedef config_object_int_factory_t config_object_int32_factory;
-
-
-
-class config_object_notify_impl_simple : public config_object_notify
-{
-public:
- t_size get_watched_object_count() {return 1;}
- GUID get_watched_object(t_size p_index) {return m_guid;}
- void on_watched_object_changed(const service_ptr_t & p_object) {m_func(p_object);}
-
- typedef void (*t_func)(const service_ptr_t &);
-
- config_object_notify_impl_simple(const GUID & p_guid,t_func p_func) : m_guid(p_guid), m_func(p_func) {}
-private:
- GUID m_guid;
- t_func m_func;
-};
-
-typedef service_factory_single_transparent_t config_object_notify_simple_factory;
-
-#endif _CONFIG_OBJECT_IMPL_H_
diff --git a/tools/vio2sf/src/foobar/foobar2000/SDK/console.cpp b/tools/vio2sf/src/foobar/foobar2000/SDK/console.cpp
deleted file mode 100644
index 1becba922..000000000
--- a/tools/vio2sf/src/foobar/foobar2000/SDK/console.cpp
+++ /dev/null
@@ -1,50 +0,0 @@
-#include "foobar2000.h"
-
-
-void console::info(const char * p_message) {print(p_message);}
-void console::error(const char * p_message) {complain("Error", p_message);}
-void console::warning(const char * p_message) {complain("Warning", p_message);}
-
-void console::info_location(const playable_location & src) {print_location(src);}
-void console::info_location(const metadb_handle_ptr & src) {print_location(src);}
-
-void console::print_location(const metadb_handle_ptr & src)
-{
- print_location(src->get_location());
-}
-
-void console::print_location(const playable_location & src)
-{
- formatter() << src;
-}
-
-void console::complain(const char * what, const char * msg) {
- formatter() << what << ": " << msg;
-}
-void console::complain(const char * what, std::exception const & e) {
- complain(what, e.what());
-}
-
-void console::print(const char* p_message)
-{
- if (core_api::are_services_available()) {
- service_ptr_t ptr;
- service_enum_t e;
- while(e.next(ptr)) ptr->print(p_message,infinite);
- }
-}
-
-void console::printf(const char* p_format,...)
-{
- va_list list;
- va_start(list,p_format);
- printfv(p_format,list);
- va_end(list);
-}
-
-void console::printfv(const char* p_format,va_list p_arglist)
-{
- pfc::string8_fastalloc temp;
- uPrintfV(temp,p_format,p_arglist);
- print(temp);
-}
\ No newline at end of file
diff --git a/tools/vio2sf/src/foobar/foobar2000/SDK/console.h b/tools/vio2sf/src/foobar/foobar2000/SDK/console.h
deleted file mode 100644
index 0b591c620..000000000
--- a/tools/vio2sf/src/foobar/foobar2000/SDK/console.h
+++ /dev/null
@@ -1,31 +0,0 @@
-//! Namespace with functions for sending text to console. All functions are fully multi-thread safe, though they must not be called during dll initialization or deinitialization (e.g. static object constructors or destructors) when service system is not available.
-namespace console
-{
- void info(const char * p_message);
- void error(const char * p_message);
- void warning(const char * p_message);
- void info_location(const playable_location & src);
- void info_location(const metadb_handle_ptr & src);
- void print_location(const playable_location & src);
- void print_location(const metadb_handle_ptr & src);
-
- void print(const char*);
- void printf(const char*,...);
- void printfv(const char*,va_list p_arglist);
-
- //! Usage: console::formatter() << "blah " << somenumber << " asdf" << somestring;
- class formatter : public pfc::string_formatter {
- public:
- ~formatter() {if (!is_empty()) console::print(get_ptr());}
- };
- void complain(const char * what, const char * msg);
- void complain(const char * what, std::exception const & e);
-};
-
-//! Interface receiving console output. Do not call directly; use console namespace functions instead.
-class NOVTABLE console_receiver : public service_base {
-public:
- virtual void print(const char * p_message,t_size p_message_length) = 0;
-
- FB2K_MAKE_SERVICE_INTERFACE_ENTRYPOINT(console_receiver);
-};
diff --git a/tools/vio2sf/src/foobar/foobar2000/SDK/contextmenu.h b/tools/vio2sf/src/foobar/foobar2000/SDK/contextmenu.h
deleted file mode 100644
index 1c601ef96..000000000
--- a/tools/vio2sf/src/foobar/foobar2000/SDK/contextmenu.h
+++ /dev/null
@@ -1,242 +0,0 @@
-//! Reserved for future use.
-typedef void * t_glyph;
-
-
-class NOVTABLE contextmenu_item_node {
-public:
- enum t_flags {
- FLAG_CHECKED = 1,
- FLAG_DISABLED = 2,
- FLAG_GRAYED = 4,
- FLAG_DISABLED_GRAYED = FLAG_DISABLED|FLAG_GRAYED,
- FLAG_RADIOCHECKED = 8, //new in 0.9.5.2 - overrides FLAG_CHECKED, set together with FLAG_CHECKED for backwards compatibility.
- };
-
- enum t_type {
- TYPE_POPUP,TYPE_COMMAND,TYPE_SEPARATOR
- };
-
- virtual bool get_display_data(pfc::string_base & p_out,unsigned & p_displayflags,metadb_handle_list_cref p_data,const GUID & p_caller) = 0;
- virtual t_type get_type() = 0;
- virtual void execute(metadb_handle_list_cref p_data,const GUID & p_caller) = 0;
- virtual t_glyph get_glyph(metadb_handle_list_cref p_data,const GUID & p_caller) {return 0;}//RESERVED
- virtual t_size get_children_count() = 0;
- virtual contextmenu_item_node * get_child(t_size p_index) = 0;
- virtual bool get_description(pfc::string_base & p_out) = 0;
- virtual GUID get_guid() = 0;
- virtual bool is_mappable_shortcut() = 0;
-
-protected:
- contextmenu_item_node() {}
- ~contextmenu_item_node() {}
-};
-
-class NOVTABLE contextmenu_item_node_root : public contextmenu_item_node
-{
-public:
- virtual ~contextmenu_item_node_root() {}
-};
-
-class NOVTABLE contextmenu_item_node_leaf : public contextmenu_item_node
-{
-public:
- t_type get_type() {return TYPE_COMMAND;}
- t_size get_children_count() {return 0;}
- contextmenu_item_node * get_child(t_size) {return NULL;}
-};
-
-class NOVTABLE contextmenu_item_node_root_leaf : public contextmenu_item_node_root
-{
-public:
- t_type get_type() {return TYPE_COMMAND;}
- t_size get_children_count() {return 0;}
- contextmenu_item_node * get_child(t_size) {return NULL;}
-};
-
-class NOVTABLE contextmenu_item_node_popup : public contextmenu_item_node
-{
-public:
- t_type get_type() {return TYPE_POPUP;}
- void execute(metadb_handle_list_cref data,const GUID & caller) {}
- bool get_description(pfc::string_base & p_out) {return false;}
-};
-
-class NOVTABLE contextmenu_item_node_root_popup : public contextmenu_item_node_root
-{
-public:
- t_type get_type() {return TYPE_POPUP;}
- void execute(metadb_handle_list_cref data,const GUID & caller) {}
- bool get_description(pfc::string_base & p_out) {return false;}
-};
-
-class contextmenu_item_node_separator : public contextmenu_item_node
-{
-public:
- t_type get_type() {return TYPE_SEPARATOR;}
- void execute(metadb_handle_list_cref data,const GUID & caller) {}
- bool get_description(pfc::string_base & p_out) {return false;}
- t_size get_children_count() {return 0;}
- bool get_display_data(pfc::string_base & p_out,unsigned & p_displayflags,metadb_handle_list_cref p_data,const GUID & p_caller)
- {
- p_displayflags = 0;
- p_out = "---";
- return true;
- }
- contextmenu_item_node * get_child(t_size) {return NULL;}
- GUID get_guid() {return pfc::guid_null;}
- bool is_mappable_shortcut() {return false;}
-};
-
-/*!
-Service class for declaring context menu commands.\n
-See contextmenu_item_simple for implementation helper without dynamic menu generation features.\n
-All methods are valid from main app thread only.
-*/
-class NOVTABLE contextmenu_item : public service_base {
-public:
- enum t_enabled_state {
- FORCE_OFF,
- DEFAULT_OFF,
- DEFAULT_ON,
- };
-
- //! Retrieves number of menu items provided by this contextmenu_item implementation.
- virtual unsigned get_num_items() = 0;
- //! Instantiates a context menu item (including sub-node tree for items that contain dynamically-generated sub-items).
- virtual contextmenu_item_node_root * instantiate_item(unsigned p_index,metadb_handle_list_cref p_data,const GUID & p_caller) = 0;
- //! Retrieves GUID of the context menu item.
- virtual GUID get_item_guid(unsigned p_index) = 0;
- //! Retrieves human-readable name of the context menu item.
- virtual void get_item_name(unsigned p_index,pfc::string_base & p_out) = 0;
- //! Retrieves default path of the context menu item ("" for root).
- virtual void get_item_default_path(unsigned p_index,pfc::string_base & p_out) = 0;
- //! Retrieves item's description to show in the status bar. Set p_out to the string to be displayed and return true if you provide a description, return false otherwise.
- virtual bool get_item_description(unsigned p_index,pfc::string_base & p_out) = 0;
- //! Signals whether the item should be forcefully hidden (FORCE_OFF), hidden by default but possible to add (DEFAULT_OFF) or shown by default (DEFAULT_ON).
- virtual t_enabled_state get_enabled_state(unsigned p_index) = 0;
- //! Executes the menu item command without going thru the instantiate_item path. For items with dynamically-generated sub-items, p_node is identifies of the sub-item command to execute.
- virtual void item_execute_simple(unsigned p_index,const GUID & p_node,metadb_handle_list_cref p_data,const GUID & p_caller) = 0;
-
- bool item_get_display_data_root(pfc::string_base & p_out,unsigned & displayflags,unsigned p_index,metadb_handle_list_cref p_data,const GUID & p_caller);
- bool item_get_display_data(pfc::string_base & p_out,unsigned & displayflags,unsigned p_index,const GUID & p_node,metadb_handle_list_cref p_data,const GUID & p_caller);
-
- //! Deprecated - use caller_active_playlist_selection instead.
- static const GUID caller_playlist;
-
- static const GUID caller_active_playlist_selection, caller_active_playlist, caller_playlist_manager, caller_now_playing, caller_keyboard_shortcut_list, caller_media_library_viewer;
- static const GUID caller_undefined;
-
- FB2K_MAKE_SERVICE_INTERFACE_ENTRYPOINT(contextmenu_item);
-};
-
-//! contextmenu_item implementation helper for implementing non-dynamically-generated context menu items; derive from this instead of from contextmenu_item directly if your menu items are static.
-class NOVTABLE contextmenu_item_simple : public contextmenu_item {
-private:
-public:
- //! Same as contextmenu_item_node::t_flags.
- enum t_flags
- {
- FLAG_CHECKED = 1,
- FLAG_DISABLED = 2,
- FLAG_GRAYED = 4,
- FLAG_DISABLED_GRAYED = FLAG_DISABLED|FLAG_GRAYED,
- FLAG_RADIOCHECKED = 8, //new in 0.9.5.2 - overrides FLAG_CHECKED, set together with FLAG_CHECKED for backwards compatibility.
- };
-
-
- // Functions to be overridden by implementers (some are not mandatory).
- virtual t_enabled_state get_enabled_state(unsigned p_index) {return contextmenu_item::DEFAULT_ON;}
- virtual unsigned get_num_items() = 0;
- virtual void get_item_name(unsigned p_index,pfc::string_base & p_out) = 0;
- virtual void get_item_default_path(unsigned p_index,pfc::string_base & p_out) = 0;
- virtual void context_command(unsigned p_index,metadb_handle_list_cref p_data,const GUID& p_caller) = 0;
- virtual bool context_get_display(unsigned p_index,metadb_handle_list_cref p_data,pfc::string_base & p_out,unsigned & p_displayflags,const GUID & p_caller) {
- PFC_ASSERT(p_index>=0 && p_indexget_display_data(m_index,p_data,p_out,p_displayflags,p_caller);}
- void execute(metadb_handle_list_cref p_data,const GUID & p_caller) {m_owner->context_command(m_index,p_data,p_caller);}
- bool get_description(pfc::string_base & p_out) {return m_owner->get_item_description(m_index,p_out);}
- GUID get_guid() {return pfc::guid_null;}
- bool is_mappable_shortcut() {return m_owner->item_is_mappable_shortcut(m_index);}
- private:
- service_ptr_t m_owner;
- unsigned m_index;
- };
-
- contextmenu_item_node_root * instantiate_item(unsigned p_index,metadb_handle_list_cref p_data,const GUID & p_caller)
- {
- return new contextmenu_item_node_impl(this,p_index);
- }
-
-
- void item_execute_simple(unsigned p_index,const GUID & p_node,metadb_handle_list_cref p_data,const GUID & p_caller)
- {
- if (p_node == pfc::guid_null)
- context_command(p_index,p_data,p_caller);
- }
-
- virtual bool item_is_mappable_shortcut(unsigned p_index)
- {
- return true;
- }
-
-
- virtual bool get_display_data(unsigned n,metadb_handle_list_cref data,pfc::string_base & p_out,unsigned & displayflags,const GUID & caller)
- {
- bool rv = false;
- assert(n>=0 && n0)
- {
- rv = context_get_display(n,data,p_out,displayflags,caller);
- }
- return rv;
- }
-
-};
-
-
-//! Helper.
-template
-class contextmenu_item_factory_t : public service_factory_single_t {};
-
-
-//! Helper.
-#define DECLARE_CONTEXT_MENU_ITEM(P_CLASSNAME,P_NAME,P_DEFAULTPATH,P_FUNC,P_GUID,P_DESCRIPTION) \
- namespace { \
- class P_CLASSNAME : public contextmenu_item_simple { \
- public: \
- unsigned get_num_items() {return 1;} \
- void get_item_name(unsigned p_index,pfc::string_base & p_out) {p_out = P_NAME;} \
- void get_item_default_path(unsigned p_index,pfc::string_base & p_out) {p_out = P_DEFAULTPATH;} \
- void context_command(unsigned p_index,metadb_handle_list_cref p_data,const GUID& p_caller) {P_FUNC(p_data);} \
- GUID get_item_guid(unsigned p_index) {return P_GUID;} \
- bool get_item_description(unsigned p_index,pfc::string_base & p_out) {if (P_DESCRIPTION[0] == 0) return false;p_out = P_DESCRIPTION; return true;} \
- }; \
- static contextmenu_item_factory_t g_##P_CLASSNAME##_factory; \
- }
-
-
-
-
-//! New in 0.9.5.1. Static methods safe to use in prior versions as it will use slow fallback mode when the service isn't present. \n
-//! Functionality provided by menu_item_resolver methods isn't much different from just walking all registered contextmenu_item / mainmenu_commands implementations to find the command we want, but it uses a hint map to locate the service we're looking for without walking all of them which may be significantly faster in certain scenarios.
-class menu_item_resolver : public service_base {
-public:
- virtual bool resolve_context_command(const GUID & id, service_ptr_t & out, t_uint32 & out_index) = 0;
- virtual bool resolve_main_command(const GUID & id, service_ptr_t & out, t_uint32 & out_index) = 0;
-
- static bool g_resolve_context_command(const GUID & id, service_ptr_t & out, t_uint32 & out_index);
- static bool g_resolve_main_command(const GUID & id, service_ptr_t & out, t_uint32 & out_index);
-
- FB2K_MAKE_SERVICE_INTERFACE_ENTRYPOINT(menu_item_resolver)
-};
diff --git a/tools/vio2sf/src/foobar/foobar2000/SDK/contextmenu_manager.h b/tools/vio2sf/src/foobar/foobar2000/SDK/contextmenu_manager.h
deleted file mode 100644
index 8bcbb21b0..000000000
--- a/tools/vio2sf/src/foobar/foobar2000/SDK/contextmenu_manager.h
+++ /dev/null
@@ -1,109 +0,0 @@
-class NOVTABLE keyboard_shortcut_manager : public service_base
-{
-public:
- static bool g_get(service_ptr_t & p_out) {return service_enum_create_t(p_out,0);}
-
- enum shortcut_type
- {
- TYPE_MAIN,
- TYPE_CONTEXT,
- TYPE_CONTEXT_PLAYLIST,
- TYPE_CONTEXT_NOW_PLAYING,
- };
-
-
- virtual bool process_keydown(shortcut_type type,const pfc::list_base_const_t & data,unsigned keycode)=0;
- virtual bool process_keydown_ex(shortcut_type type,const pfc::list_base_const_t & data,unsigned keycode,const GUID & caller)=0;
- bool on_keydown(shortcut_type type,WPARAM wp);
- bool on_keydown_context(const pfc::list_base_const_t & data,WPARAM wp,const GUID & caller);
-
- bool on_keydown_auto(WPARAM wp);
- bool on_keydown_auto_playlist(WPARAM wp);
- bool on_keydown_auto_context(const pfc::list_base_const_t & data,WPARAM wp,const GUID & caller);
-
- bool on_keydown_restricted_auto(WPARAM wp);
- bool on_keydown_restricted_auto_playlist(WPARAM wp);
- bool on_keydown_restricted_auto_context(const pfc::list_base_const_t & data,WPARAM wp,const GUID & caller);
-
- virtual bool get_key_description_for_action(const GUID & p_command,const GUID & p_subcommand, pfc::string_base & out, shortcut_type type, bool is_global)=0;
-
- static bool is_text_key(t_uint32 vkCode);
- static bool is_typing_key(t_uint32 vkCode);
- static bool is_typing_key_combo(t_uint32 vkCode, t_uint32 modifiers);
- static bool is_typing_modifier(t_uint32 flags);
- static bool is_typing_message(HWND editbox, const MSG * msg);
- static bool is_typing_message(const MSG * msg);
-
- FB2K_MAKE_SERVICE_INTERFACE_ENTRYPOINT(keyboard_shortcut_manager);
-};
-
-
-//! New in 0.9.5.
-class keyboard_shortcut_manager_v2 : public keyboard_shortcut_manager {
-public:
- //! Deprecates old keyboard_shortcut_manager methods. If the action requires selected items, they're obtained from ui_selection_manager API automatically.
- virtual bool process_keydown_simple(t_uint32 keycode) = 0;
-
- //! Helper for use with message filters.
- bool pretranslate_message(const MSG * msg, HWND thisPopupWnd);
-
- FB2K_MAKE_SERVICE_INTERFACE(keyboard_shortcut_manager_v2,keyboard_shortcut_manager);
-};
-
-class NOVTABLE contextmenu_node {
-public:
- virtual contextmenu_item_node::t_type get_type()=0;
- virtual const char * get_name()=0;
- virtual t_size get_num_children()=0;//TYPE_POPUP only
- virtual contextmenu_node * get_child(t_size n)=0;//TYPE_POPUP only
- virtual unsigned get_display_flags()=0;//TYPE_COMMAND/TYPE_POPUP only, see contextmenu_item::FLAG_*
- virtual unsigned get_id()=0;//TYPE_COMMAND only, returns zero-based index (helpful for win32 menu command ids)
- virtual void execute()=0;//TYPE_COMMAND only
- virtual bool get_description(pfc::string_base & out)=0;//TYPE_COMMAND only
- virtual bool get_full_name(pfc::string_base & out)=0;//TYPE_COMMAND only
- virtual void * get_glyph()=0;//RESERVED, do not use
-protected:
- contextmenu_node() {}
- ~contextmenu_node() {}
-};
-
-
-
-class NOVTABLE contextmenu_manager : public service_base
-{
-public:
- enum
- {
- FLAG_SHOW_SHORTCUTS = 1,
- FLAG_SHOW_SHORTCUTS_GLOBAL = 2,
- };
- virtual void init_context(const pfc::list_base_const_t & data,unsigned flags)=0;//flags - see FLAG_* above
- virtual void init_context_playlist(unsigned flags)=0;
- virtual contextmenu_node * get_root()=0;//releasing contextmenu_manager service releaases nodes; root may be null in case of error or something
- virtual contextmenu_node * find_by_id(unsigned id)=0;
- virtual void set_shortcut_preference(const keyboard_shortcut_manager::shortcut_type * data,unsigned count)=0;
-
-
-
- static void g_create(service_ptr_t & p_out) {p_out = standard_api_create_t();}
-
-#ifdef WIN32
- static void win32_build_menu(HMENU menu,contextmenu_node * parent,int base_id,int max_id);//menu item identifiers are base_id<=N & data, const POINT * pt = 0,unsigned flags = 0);
- static void win32_run_menu_context_playlist(HWND parent,const POINT * pt = 0,unsigned flags = 0);
- void win32_run_menu_popup(HWND parent,const POINT * pt = 0);
- void win32_build_menu(HMENU menu,int base_id,int max_id) {win32_build_menu(menu,get_root(),base_id,max_id);}
-
-
-#endif
-
- virtual void init_context_ex(const pfc::list_base_const_t & data,unsigned flags,const GUID & caller)=0;
- virtual bool init_context_now_playing(unsigned flags)=0;//returns false if not playing
-
- bool execute_by_id(unsigned id);
-
- bool get_description_by_id(unsigned id,pfc::string_base & out);
-
-
- FB2K_MAKE_SERVICE_INTERFACE_ENTRYPOINT(contextmenu_manager);
-};
diff --git a/tools/vio2sf/src/foobar/foobar2000/SDK/core_api.h b/tools/vio2sf/src/foobar/foobar2000/SDK/core_api.h
deleted file mode 100644
index 19fc53fd4..000000000
--- a/tools/vio2sf/src/foobar/foobar2000/SDK/core_api.h
+++ /dev/null
@@ -1,33 +0,0 @@
-#ifndef _CORE_API_H_
-#define _CORE_API_H_
-
-namespace core_api {
-
- //! Exception thrown by APIs locked to main app thread when called from another thread.
- PFC_DECLARE_EXCEPTION(exception_wrong_thread,pfc::exception_bug_check,"This method can be called only from the main thread");
-
- //! Retrieves HINSTANCE of calling DLL.
- HINSTANCE get_my_instance();
- //! Retrieves filename of calling dll, excluding extension, e.g. "foo_asdf"
- const char * get_my_file_name();
- //! Retrieves full path of calling dll, e.g. file://c:\blah\foobar2000\foo_asdf.dll
- const char * get_my_full_path();
- //! Retrieves main app window. WARNING: this is provided for parent of dialog windows and such only; using it for anything else (such as hooking windowproc to alter app behaviors) is absolutely illegal.
- HWND get_main_window();
- //! Tests whether services are available at this time. They are not available only during DLL startup or shutdown (e.g. inside static object constructors or destructors).
- bool are_services_available();
- //! Tests whether calling thread is main app thread, and shows diagnostic message in debugger output if it's not.
- bool assert_main_thread();
- //! Throws exception_wrong_thread if calling thread is not main app thread.
- void ensure_main_thread();
- //! Returns true if calling thread is main app thread, false otherwise.
- bool is_main_thread();
- //! Returns whether the app is currently shutting down.
- bool is_shutting_down();
- //! Returns whether the app is currently initializing.
- bool is_initializing();
- //! Returns filesystem path to directory with user settings, e.g. file://c:\documents_and_settings\username\blah\foobar2000
- const char * get_profile_path();
-};
-
-#endif
diff --git a/tools/vio2sf/src/foobar/foobar2000/SDK/coreversion.h b/tools/vio2sf/src/foobar/foobar2000/SDK/coreversion.h
deleted file mode 100644
index f786444b4..000000000
--- a/tools/vio2sf/src/foobar/foobar2000/SDK/coreversion.h
+++ /dev/null
@@ -1,36 +0,0 @@
-class NOVTABLE core_version_info : public service_base {
-public:
- virtual const char * get_version_string() = 0;
- static const char * g_get_version_string() {return static_api_ptr_t()->get_version_string();}
- FB2K_MAKE_SERVICE_INTERFACE_ENTRYPOINT(core_version_info);
-};
-
-struct t_core_version_data {
- t_uint32 m_major, m_minor1, m_minor2, m_minor3;
-};
-
-//! New (0.9.4.2)
-class NOVTABLE core_version_info_v2 : public core_version_info {
-public:
- virtual const char * get_name() = 0;//"foobar2000"
- virtual const char * get_version_as_text() = 0;//"N.N.N.N"
- virtual t_core_version_data get_version() = 0;
-
- //! Determine whether running foobar2000 version is newer or equal to the specified version, eg. test_version(0,9,5,0) for 0.9.5.
- bool test_version(t_uint32 major, t_uint32 minor1, t_uint32 minor2, t_uint32 minor3) {
- const t_core_version_data v = get_version();
- if (v.m_major < major) return false;
- else if (v.m_major > major) return true;
- // major version matches
- else if (v.m_minor1 < minor1) return false;
- else if (v.m_minor1 > minor1) return true;
- // minor1 version matches
- else if (v.m_minor2 < minor2) return false;
- else if (v.m_minor2 > minor2) return true;
- // minor2 version matches
- else if (v.m_minor3 < minor3) return false;
- else return true;
- }
-
- FB2K_MAKE_SERVICE_INTERFACE(core_version_info_v2, core_version_info);
-};
diff --git a/tools/vio2sf/src/foobar/foobar2000/SDK/dsp.cpp b/tools/vio2sf/src/foobar/foobar2000/SDK/dsp.cpp
deleted file mode 100644
index d7b39d5e0..000000000
--- a/tools/vio2sf/src/foobar/foobar2000/SDK/dsp.cpp
+++ /dev/null
@@ -1,395 +0,0 @@
-#include "foobar2000.h"
-#include
-
-t_size dsp_chunk_list_impl::get_count() const {return m_data.get_count();}
-
-audio_chunk * dsp_chunk_list_impl::get_item(t_size n) const {return n>=0 && n=0 && idxmax) idx = max;
- pfc::rcptr_t ret;
- if (m_recycled.get_count()>0)
- {
- t_size best;
- if (hint_size>0)
- {
- best = 0;
- t_size best_found = m_recycled[0]->get_data_size(), n, total = m_recycled.get_count();
- for(n=1;nget_data_size();
- int delta_old = abs((int)best_found - (int)hint_size), delta_new = abs((int)size - (int)hint_size);
- if (delta_new < delta_old)
- {
- best_found = size;
- best = n;
- }
- }
- }
- else best = m_recycled.get_count()-1;
-
- ret = m_recycled.remove_by_idx(best);
- ret->set_sample_count(0);
- ret->set_channels(0);
- ret->set_srate(0);
- }
- else ret = pfc::rcnew_t();
- if (idx==max) m_data.add_item(ret);
- else m_data.insert_item(ret,idx);
- return &*ret;
-}
-
-void dsp_chunk_list::remove_bad_chunks()
-{
- bool blah = false;
- t_size idx;
- for(idx=0;idxis_valid())
- {
- chunk->reset();
- remove_by_idx(idx);
- blah = true;
- }
- else idx++;
- }
- if (blah) console::info("one or more bad chunks removed from dsp chunk list");
-}
-
-
-bool dsp_entry::g_instantiate(service_ptr_t & p_out,const dsp_preset & p_preset)
-{
- service_ptr_t ptr;
- if (!g_get_interface(ptr,p_preset.get_owner())) return false;
- return ptr->instantiate(p_out,p_preset);
-}
-
-bool dsp_entry::g_instantiate_default(service_ptr_t & p_out,const GUID & p_guid)
-{
- service_ptr_t ptr;
- if (!g_get_interface(ptr,p_guid)) return false;
- dsp_preset_impl preset;
- if (!ptr->get_default_preset(preset)) return false;
- return ptr->instantiate(p_out,preset);
-}
-
-bool dsp_entry::g_name_from_guid(pfc::string_base & p_out,const GUID & p_guid)
-{
- service_ptr_t ptr;
- if (!g_get_interface(ptr,p_guid)) return false;
- ptr->get_name(p_out);
- return true;
-}
-
-bool dsp_entry::g_dsp_exists(const GUID & p_guid)
-{
- service_ptr_t blah;
- return g_get_interface(blah,p_guid);
-}
-
-bool dsp_entry::g_get_default_preset(dsp_preset & p_out,const GUID & p_guid)
-{
- service_ptr_t ptr;
- if (!g_get_interface(ptr,p_guid)) return false;
- return ptr->get_default_preset(p_out);
-}
-
-void dsp_chain_config::contents_to_stream(stream_writer * p_stream,abort_callback & p_abort) const {
- t_size n, count = get_count();
- p_stream->write_lendian_t(count,p_abort);
- for(n=0;nread_lendian_t(count,p_abort);
-
- dsp_preset_impl temp;
-
- for(n=0;n & p_out)
-{
- p_out.remove_all();
- t_size n, m = get_count();
- for(n=0;n temp;
- if (dsp_entry::g_instantiate(temp,get_item(n)))
- p_out.add_item(temp);
- }
-}
-
-t_size dsp_chain_config_impl::get_count() const
-{
- return m_data.get_count();
-}
-
-const dsp_preset & dsp_chain_config_impl::get_item(t_size p_index) const
-{
- return *m_data[p_index];
-}
-
-void dsp_chain_config_impl::replace_item(const dsp_preset & p_data,t_size p_index)
-{
- *m_data[p_index] = p_data;
-}
-
-void dsp_chain_config_impl::insert_item(const dsp_preset & p_data,t_size p_index)
-{
- m_data.insert_item(new dsp_preset_impl(p_data),p_index);
-}
-
-void dsp_chain_config_impl::remove_mask(const bit_array & p_mask)
-{
- m_data.delete_mask(p_mask);
-}
-
-dsp_chain_config_impl::~dsp_chain_config_impl()
-{
- m_data.delete_all();
-}
-
-void dsp_preset::contents_to_stream(stream_writer * p_stream,abort_callback & p_abort) const {
- t_size size = get_data_size();
- p_stream->write_lendian_t(get_owner(),p_abort);
- p_stream->write_lendian_t(size,p_abort);
- if (size > 0) {
- p_stream->write_object(get_data(),size,p_abort);
- }
-}
-
-void dsp_preset::contents_from_stream(stream_reader * p_stream,abort_callback & p_abort) {
- t_uint32 size;
- GUID guid;
- p_stream->read_lendian_t(guid,p_abort);
- set_owner(guid);
- p_stream->read_lendian_t(size,p_abort);
- if (size > 1024*1024*32) throw exception_io_data();
- set_data_from_stream(p_stream,size,p_abort);
-}
-
-void dsp_preset::g_contents_from_stream_skip(stream_reader * p_stream,abort_callback & p_abort) {
- t_uint32 size;
- GUID guid;
- p_stream->read_lendian_t(guid,p_abort);
- p_stream->read_lendian_t(size,p_abort);
- if (size > 1024*1024*32) throw exception_io_data();
- p_stream->skip_object(size,p_abort);
-}
-
-void dsp_preset_impl::set_data_from_stream(stream_reader * p_stream,t_size p_bytes,abort_callback & p_abort) {
- m_data.set_size(p_bytes);
- if (p_bytes > 0) p_stream->read_object(m_data.get_ptr(),p_bytes,p_abort);
-}
-
-void dsp_chain_config::copy(const dsp_chain_config & p_source) {
- remove_all();
- t_size n, m = p_source.get_count();
- for(n=0;n entry;
- if (!g_get_interface(entry,p_guid)) return false;
- return entry->have_config_popup();
-}
-
-bool dsp_entry::g_have_config_popup(const dsp_preset & p_preset)
-{
- return g_have_config_popup(p_preset.get_owner());
-}
-
-bool dsp_entry::g_show_config_popup(dsp_preset & p_preset,HWND p_parent)
-{
- service_ptr_t entry;
- if (!g_get_interface(entry,p_preset.get_owner())) return false;
- return entry->show_config_popup(p_preset,p_parent);
-}
-
-void dsp_entry::g_show_config_popup_v2(const dsp_preset & p_preset,HWND p_parent,dsp_preset_edit_callback & p_callback) {
- service_ptr_t entry;
- if (g_get_interface(entry,p_preset.get_owner())) {
- service_ptr_t entry_v2;
- if (entry->service_query_t(entry_v2)) {
- entry_v2->show_config_popup_v2(p_preset,p_parent,p_callback);
- } else {
- dsp_preset_impl temp(p_preset);
- if (entry->show_config_popup(temp,p_parent)) p_callback.on_preset_changed(temp);
- }
- }
-}
-
-bool dsp_entry::g_get_interface(service_ptr_t & p_out,const GUID & p_guid)
-{
- service_ptr_t ptr;
- service_enum_t e;
- e.reset();
- while(e.next(ptr))
- {
- if (ptr->get_guid() == p_guid)
- {
- p_out = ptr;
- return true;
- }
- }
- return false;
-}
-
-bool resampler_entry::g_get_interface(service_ptr_t & p_out,unsigned p_srate_from,unsigned p_srate_to)
-{
- service_ptr_t ptr_dsp;
- service_ptr_t