summaryrefslogtreecommitdiff
path: root/win32/plugins
diff options
context:
space:
mode:
authorSND\weimingzhi_cp <SND\weimingzhi_cp@e17a0e51-4ae3-4d35-97c3-1a29b211df97>2010-08-12 02:56:43 +0000
committerSND\weimingzhi_cp <SND\weimingzhi_cp@e17a0e51-4ae3-4d35-97c3-1a29b211df97>2010-08-12 02:56:43 +0000
commit8297a92012e3f42ed74d47fc3d11a3003c14b4ae (patch)
treefc781551eb9e024428de1c4b2a194c1e1c444be2 /win32/plugins
parentd4840a37d9adf0b9124fad722a5ae5faae4bb639 (diff)
downloadpcsxr-8297a92012e3f42ed74d47fc3d11a3003c14b4ae.tar.gz
dfsound: readded windows support.
gtk gui: increased number of savestate slots. git-svn-id: https://pcsxr.svn.codeplex.com/svn/pcsxr@56022 e17a0e51-4ae3-4d35-97c3-1a29b211df97
Diffstat (limited to 'win32/plugins')
-rw-r--r--win32/plugins/dfsound/DFSound.dsp266
-rw-r--r--win32/plugins/dfsound/winsrc/DFSound.def46
-rw-r--r--win32/plugins/dfsound/winsrc/DFSound.rc467
-rw-r--r--win32/plugins/dfsound/winsrc/bitmap1.bmpbin0 -> 230 bytes
-rw-r--r--win32/plugins/dfsound/winsrc/bitmap2.bmpbin0 -> 230 bytes
-rw-r--r--win32/plugins/dfsound/winsrc/bitmap3.bmpbin0 -> 230 bytes
-rw-r--r--win32/plugins/dfsound/winsrc/bitmap4.bmpbin0 -> 230 bytes
-rw-r--r--win32/plugins/dfsound/winsrc/bitmap5.bmpbin0 -> 1626 bytes
-rw-r--r--win32/plugins/dfsound/winsrc/cfg.c256
-rw-r--r--win32/plugins/dfsound/winsrc/debug.c372
-rw-r--r--win32/plugins/dfsound/winsrc/debug.h29
-rw-r--r--win32/plugins/dfsound/winsrc/dsound.c277
-rw-r--r--win32/plugins/dfsound/winsrc/psemu.c101
-rw-r--r--win32/plugins/dfsound/winsrc/record.c188
-rw-r--r--win32/plugins/dfsound/winsrc/record.h11
-rw-r--r--win32/plugins/dfsound/winsrc/resource.h148
-rw-r--r--win32/plugins/dfsound/winsrc/winmain.c34
17 files changed, 2195 insertions, 0 deletions
diff --git a/win32/plugins/dfsound/DFSound.dsp b/win32/plugins/dfsound/DFSound.dsp
new file mode 100644
index 00000000..940bf3ce
--- /dev/null
+++ b/win32/plugins/dfsound/DFSound.dsp
@@ -0,0 +1,266 @@
+# Microsoft Developer Studio Project File - Name="DFSound" - Package Owner=<4>
+# Microsoft Developer Studio Generated Build File, Format Version 6.00
+# ** DO NOT EDIT **
+
+# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102
+
+CFG=DFSound - 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 "DFSound.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 "DFSound.mak" CFG="DFSound - Win32 Debug"
+!MESSAGE
+!MESSAGE Possible choices for configuration are:
+!MESSAGE
+!MESSAGE "DFSound - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library")
+!MESSAGE "DFSound - 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)" == "DFSound - 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"
+# PROP Intermediate_Dir "Release"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c
+# ADD CPP /nologo /G5 /MD /W3 /GX /O2 /I ".\winsrc" /I "..\..\..\plugins\dfsound" /I "..\..\glue" /I "..\..\..\libpcsxcore" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /FR /YX /FD /c
+# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
+# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
+# ADD BASE RSC /l 0x407 /d "NDEBUG"
+# ADD RSC /l 0x407 /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 /subsystem:windows /dll /machine:I386
+# ADD LINK32 dsound.lib winmm.lib user32.lib gdi32.lib advapi32.lib /nologo /subsystem:windows /dll /machine:I386
+
+!ELSEIF "$(CFG)" == "DFSound - 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"
+# PROP Intermediate_Dir "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" /YX /FD /GZ /c
+# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I ".\winsrc" /I "..\..\..\plugins\dfsound" /I "..\..\glue" /I "..\..\..\libpcsxcore" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /GZ /c
+# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
+# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
+# ADD BASE RSC /l 0x407 /d "_DEBUG"
+# ADD RSC /l 0x407 /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 /subsystem:windows /dll /debug /machine:I386 /pdbtype:sept
+# ADD LINK32 dsound.lib winmm.lib user32.lib gdi32.lib advapi32.lib /nologo /subsystem:windows /dll /debug /machine:I386 /pdbtype:sept
+
+!ENDIF
+
+# Begin Target
+
+# Name "DFSound - Win32 Release"
+# Name "DFSound - Win32 Debug"
+# Begin Group "winsrc"
+
+# PROP Default_Filter ""
+# Begin Source File
+
+SOURCE=.\winsrc\bitmap1.bmp
+# End Source File
+# Begin Source File
+
+SOURCE=.\winsrc\bitmap2.bmp
+# End Source File
+# Begin Source File
+
+SOURCE=.\winsrc\bitmap3.bmp
+# End Source File
+# Begin Source File
+
+SOURCE=.\winsrc\bitmap4.bmp
+# End Source File
+# Begin Source File
+
+SOURCE=.\winsrc\bitmap5.bmp
+# End Source File
+# Begin Source File
+
+SOURCE=.\winsrc\cfg.c
+# End Source File
+# Begin Source File
+
+SOURCE=.\winsrc\debug.c
+# End Source File
+# Begin Source File
+
+SOURCE=.\winsrc\debug.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\winsrc\DFSound.def
+# End Source File
+# Begin Source File
+
+SOURCE=.\winsrc\DFSound.rc
+# End Source File
+# Begin Source File
+
+SOURCE=.\winsrc\dsound.c
+# End Source File
+# Begin Source File
+
+SOURCE=.\winsrc\psemu.c
+# End Source File
+# Begin Source File
+
+SOURCE=.\winsrc\record.c
+# End Source File
+# Begin Source File
+
+SOURCE=.\winsrc\record.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\winsrc\resource.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\winsrc\winmain.c
+# End Source File
+# End Group
+# Begin Group "dfsound"
+
+# PROP Default_Filter ""
+# Begin Source File
+
+SOURCE=..\..\..\plugins\dfsound\adsr.c
+
+!IF "$(CFG)" == "DFSound - Win32 Release"
+
+# PROP Exclude_From_Build 1
+
+!ELSEIF "$(CFG)" == "DFSound - Win32 Debug"
+
+!ENDIF
+
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\plugins\dfsound\adsr.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\plugins\dfsound\dma.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\plugins\dfsound\dma.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\plugins\dfsound\dsoundoss.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\plugins\dfsound\externals.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\plugins\dfsound\freeze.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\plugins\dfsound\gauss_i.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\plugins\dfsound\psemuxa.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\plugins\dfsound\registers.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\plugins\dfsound\registers.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\plugins\dfsound\regs.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\plugins\dfsound\reverb.c
+
+!IF "$(CFG)" == "DFSound - Win32 Release"
+
+# PROP Exclude_From_Build 1
+
+!ELSEIF "$(CFG)" == "DFSound - Win32 Debug"
+
+!ENDIF
+
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\plugins\dfsound\reverb.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\plugins\dfsound\spu.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\plugins\dfsound\spu.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\plugins\dfsound\stdafx.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\plugins\dfsound\xa.c
+
+!IF "$(CFG)" == "DFSound - Win32 Release"
+
+# PROP Exclude_From_Build 1
+
+!ELSEIF "$(CFG)" == "DFSound - Win32 Debug"
+
+!ENDIF
+
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\plugins\dfsound\xa.h
+# End Source File
+# End Group
+# End Target
+# End Project
diff --git a/win32/plugins/dfsound/winsrc/DFSound.def b/win32/plugins/dfsound/winsrc/DFSound.def
new file mode 100644
index 00000000..74540525
--- /dev/null
+++ b/win32/plugins/dfsound/winsrc/DFSound.def
@@ -0,0 +1,46 @@
+; Declares the module parameters for the DLL.
+
+LIBRARY "DFSound"
+DESCRIPTION 'DFSOUND'
+
+EXPORTS
+ ; Explicit exports can go here
+ PSEgetLibType @2
+ PSEgetLibName @3
+ PSEgetLibVersion @4
+ SPUconfigure @5
+ SPUabout @6
+ SPUinit @7
+ SPUshutdown @8
+ SPUtest @9
+ SPUopen @10
+ SPUclose @11
+
+ SPUplayADPCMchannel @12
+ SPUwriteRegister @13
+ SPUreadRegister @14
+ SPUregisterCallback @15
+
+ SPUwriteDMA @16
+ SPUreadDMA @17
+ SPUregisterCDDAVolume @18
+ SPUwriteDMAMem @19
+ SPUreadDMAMem @20
+ SPUfreeze @21
+ ;SPUupdate @22
+ SPUasync @23
+
+ SPUplayCDDAchannel @24
+
+ SPUgetOne @25
+ SPUputOne @26
+ SPUplaySample @27
+ SPUsetAddr @28
+ SPUsetPitch @29
+ SPUsetVolumeL @30
+ SPUsetVolumeR @31
+ SPUstartChannels1 @32
+ SPUstartChannels2 @33
+ SPUstopChannels1 @34
+ SPUstopChannels2 @35
+ SPUplaySector @36
diff --git a/win32/plugins/dfsound/winsrc/DFSound.rc b/win32/plugins/dfsound/winsrc/DFSound.rc
new file mode 100644
index 00000000..4e885ed3
--- /dev/null
+++ b/win32/plugins/dfsound/winsrc/DFSound.rc
@@ -0,0 +1,467 @@
+//Microsoft Developer Studio generated resource script.
+//
+#include "resource.h"
+
+#define APSTUDIO_READONLY_SYMBOLS
+/////////////////////////////////////////////////////////////////////////////
+//
+// Generated from the TEXTINCLUDE 2 resource.
+//
+#include "afxres.h"
+
+/////////////////////////////////////////////////////////////////////////////
+#undef APSTUDIO_READONLY_SYMBOLS
+
+/////////////////////////////////////////////////////////////////////////////
+// Neutral resources
+
+#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_NEU)
+#ifdef _WIN32
+LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
+#pragma code_page(936)
+#endif //_WIN32
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// Dialog
+//
+
+IDD_ABOUT DIALOGEX 0, 0, 239, 175
+STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
+CAPTION "About"
+FONT 8, "MS Sans Serif"
+BEGIN
+ DEFPUSHBUTTON "OK",IDOK,98,155,44,14
+ RTEXT "Version :",IDC_STATIC,5,5,74,9
+ RTEXT "Based on :",IDC_STATIC,5,16,74,9
+ RTEXT "Coded by :",IDC_STATIC,5,27,74,9
+ RTEXT "Pete's EMail :",IDC_STATIC,5,40,74,9
+ RTEXT "Pete's homepage :",IDC_STATIC,5,51,74,9
+ LTEXT "1.0",IDC_STATIC,82,5,154,9
+ LTEXT "P.E.Op.S DSound PSX SPU Audio Driver",IDC_STATIC,81,16,
+ 154,9
+ LTEXT "Pete Bernert and the P.E.Op.S. team",IDC_STATIC,81,27,
+ 154,9
+ LTEXT "BlackDove@addcom.de",IDC_STATIC,81,40,154,9
+ LTEXT "http://www.pbernert.com",IDC_STATIC,81,51,154,9
+ CONTROL "",IDC_STATIC,"Static",SS_ETCHEDFRAME,9,107,218,41,
+ WS_EX_DLGMODALFRAME
+ RTEXT "Greetings to:",IDC_STATIC,16,116,45,9
+ LTEXT "_Demo_, Null2, Iori, Andy, Ben, Bilgerat, linuzappz and everybody else who is trying to create nice psx emu sounds :)",
+ IDC_STATIC,65,116,153,27
+ RTEXT "P.E.Op.S. homepage :",IDC_STATIC,5,91,74,9
+ LTEXT "https://sourceforge.net/projects/peops/",IDC_STATIC,81,
+ 91,154,9
+ RTEXT "linuzappz :",IDC_STATIC,10,63,69,10
+ LTEXT "http://www.pcsx.net",IDC_STATIC,81,63,142,10
+ RTEXT "kode54 :",IDC_STATIC,10,75,69,10
+ LTEXT "http://home.earthlink.net/~kode54/",IDC_STATIC,81,75,
+ 142,10
+END
+
+IDD_CFGDLG DIALOG DISCARDABLE 0, 0, 253, 207
+STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
+CAPTION "Configure the P.E.Op.S. DSound PSX SPU Audio Driver..."
+FONT 8, "MS Sans Serif"
+BEGIN
+ COMBOBOX IDC_USETIMER,54,14,186,44,CBS_DROPDOWNLIST | WS_VSCROLL |
+ WS_TABSTOP
+ COMBOBOX IDC_VOLUME,54,30,186,62,CBS_DROPDOWNLIST | WS_VSCROLL |
+ WS_TABSTOP
+ COMBOBOX IDC_USEREVERB,54,46,186,44,CBS_DROPDOWNLIST | WS_VSCROLL |
+ WS_TABSTOP
+ COMBOBOX IDC_INTERPOL,54,62,186,62,CBS_DROPDOWNLIST | WS_VSCROLL |
+ WS_TABSTOP
+ CONTROL "Change XA speed, if it is played too fast (more cpu power needed)",
+ IDC_XAPITCH,"Button",BS_AUTOCHECKBOX | BS_LEFT |
+ BS_VCENTER | WS_TABSTOP,14,97,225,10
+ CONTROL "SPU IRQ - wait for CPU action (Valkyrie Profile && MGS + SPUasync)",
+ IDC_IRQWAIT,"Button",BS_AUTOCHECKBOX | BS_LEFT |
+ BS_VCENTER | WS_TABSTOP,14,128,231,10
+ CONTROL "Mono sound mode (for slower PCs/sound cards)",
+ IDC_DISSTEREO,"Button",BS_AUTOCHECKBOX | BS_LEFT |
+ BS_VCENTER | WS_TABSTOP,14,140,229,10
+ CONTROL "Enable developer debug mode",IDC_DEBUGMODE,"Button",
+ BS_AUTOCHECKBOX | BS_LEFT | BS_VCENTER | WS_TABSTOP,14,
+ 152,229,10
+ CONTROL "Enable sound recording window",IDC_RECORDMODE,"Button",
+ BS_AUTOCHECKBOX | BS_LEFT | BS_VCENTER | WS_TABSTOP,14,
+ 164,229,10
+ DEFPUSHBUTTON "OK",IDOK,51,186,45,14
+ PUSHBUTTON "Cancel",IDCANCEL,157,186,45,14
+ RTEXT "Volume:",IDC_STATIC,22,32,29,10,SS_CENTERIMAGE
+ GROUPBOX "General settings",IDC_STATIC,4,2,245,81
+ GROUPBOX "XA music",IDC_STATIC,4,85,245,27
+ GROUPBOX "Misc",IDC_STATIC,4,115,245,69
+ RTEXT "Reverb:",IDC_STATIC,22,48,29,10,SS_CENTERIMAGE
+ RTEXT "Mode:",IDC_STATIC,20,16,29,10,SS_CENTERIMAGE
+ RTEXT "Interpolation:",IDC_STATIC,8,64,43,10,SS_CENTERIMAGE
+END
+
+IDD_DEBUG DIALOG DISCARDABLE 0, 0, 397, 314
+STYLE DS_MODALFRAME | DS_CENTER | WS_MINIMIZEBOX | WS_POPUP | WS_VISIBLE |
+ WS_CAPTION | WS_SYSMENU
+CAPTION "Sound debug screen"
+FONT 8, "MS Sans Serif"
+BEGIN
+ GROUPBOX "XA",IDC_STATIC,201,249,92,61
+ LTEXT "",IDC_SAREA,4,12,150,288,WS_BORDER
+ CONTROL "",IDC_MUTE1,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,158,
+ 14,9,9
+ CONTROL "1",IDC_CHAN1,"Button",BS_AUTORADIOBUTTON,168,14,22,9
+ CONTROL "",IDC_MUTE2,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,158,
+ 26,9,9
+ CONTROL "2",IDC_CHAN2,"Button",BS_AUTORADIOBUTTON,168,26,22,9
+ CONTROL "",IDC_MUTE3,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,158,
+ 38,9,9
+ CONTROL "3",IDC_CHAN3,"Button",BS_AUTORADIOBUTTON,168,38,22,9
+ CONTROL "",IDC_MUTE4,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,158,
+ 50,9,9
+ CONTROL "4",IDC_CHAN4,"Button",BS_AUTORADIOBUTTON,168,50,22,9
+ CONTROL "",IDC_MUTE5,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,158,
+ 62,9,9
+ CONTROL "5",IDC_CHAN5,"Button",BS_AUTORADIOBUTTON,168,62,22,9
+ CONTROL "",IDC_MUTE6,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,158,
+ 74,9,9
+ CONTROL "6",IDC_CHAN6,"Button",BS_AUTORADIOBUTTON,168,74,22,9
+ CONTROL "",IDC_MUTE7,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,158,
+ 86,9,9
+ CONTROL "7",IDC_CHAN7,"Button",BS_AUTORADIOBUTTON,168,86,22,9
+ CONTROL "",IDC_MUTE8,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,158,
+ 98,9,9
+ CONTROL "8",IDC_CHAN8,"Button",BS_AUTORADIOBUTTON,168,98,22,9
+ CONTROL "",IDC_MUTE9,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,158,
+ 110,9,9
+ CONTROL "9",IDC_CHAN9,"Button",BS_AUTORADIOBUTTON,168,110,22,9
+ CONTROL "",IDC_MUTE10,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,158,
+ 122,9,9
+ CONTROL "10",IDC_CHAN10,"Button",BS_AUTORADIOBUTTON,168,122,22,9
+ CONTROL "",IDC_MUTE11,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,158,
+ 134,9,9
+ CONTROL "11",IDC_CHAN11,"Button",BS_AUTORADIOBUTTON,168,134,22,9
+ CONTROL "",IDC_MUTE12,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,158,
+ 146,9,9
+ CONTROL "12",IDC_CHAN12,"Button",BS_AUTORADIOBUTTON,168,146,22,9
+ CONTROL "",IDC_MUTE13,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,158,
+ 158,9,9
+ CONTROL "13",IDC_CHAN13,"Button",BS_AUTORADIOBUTTON,168,158,22,9
+ CONTROL "",IDC_MUTE14,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,158,
+ 170,9,9
+ CONTROL "14",IDC_CHAN14,"Button",BS_AUTORADIOBUTTON,168,170,22,9
+ CONTROL "",IDC_MUTE15,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,158,
+ 182,9,9
+ CONTROL "15",IDC_CHAN15,"Button",BS_AUTORADIOBUTTON,168,182,22,9
+ CONTROL "",IDC_MUTE16,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,158,
+ 194,9,9
+ CONTROL "16",IDC_CHAN16,"Button",BS_AUTORADIOBUTTON,168,194,22,9
+ CONTROL "",IDC_MUTE17,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,158,
+ 206,9,9
+ CONTROL "17",IDC_CHAN17,"Button",BS_AUTORADIOBUTTON,168,206,22,9
+ CONTROL "",IDC_MUTE18,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,158,
+ 218,9,9
+ CONTROL "18",IDC_CHAN18,"Button",BS_AUTORADIOBUTTON,168,218,22,9
+ CONTROL "",IDC_MUTE19,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,158,
+ 230,9,9
+ CONTROL "19",IDC_CHAN19,"Button",BS_AUTORADIOBUTTON,168,230,22,9
+ CONTROL "",IDC_MUTE20,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,158,
+ 242,9,9
+ CONTROL "20",IDC_CHAN20,"Button",BS_AUTORADIOBUTTON,168,242,22,9
+ CONTROL "",IDC_MUTE21,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,158,
+ 254,9,9
+ CONTROL "21",IDC_CHAN21,"Button",BS_AUTORADIOBUTTON,168,254,22,9
+ CONTROL "",IDC_MUTE22,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,158,
+ 266,9,9
+ CONTROL "22",IDC_CHAN22,"Button",BS_AUTORADIOBUTTON,168,266,22,9
+ CONTROL "",IDC_MUTE23,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,158,
+ 278,9,9
+ CONTROL "23",IDC_CHAN23,"Button",BS_AUTORADIOBUTTON,168,278,22,9
+ CONTROL "",IDC_MUTE24,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,158,
+ 290,9,9
+ CONTROL "24",IDC_CHAN24,"Button",BS_AUTORADIOBUTTON,168,290,22,9
+ LTEXT "Streams",IDC_STATIC,6,2,55,8
+ CTEXT "Mute/Select",IDC_STATIC,144,2,55,8
+ LTEXT "",IDC_ADSR,208,25,176,55,WS_BORDER
+ RTEXT "Attack:",IDC_STATIC,221,84,30,9
+ RTEXT "Decay:",IDC_STATIC,221,95,30,9
+ RTEXT "Sustain:",IDC_STATIC,221,106,30,9
+ RTEXT "Release:",IDC_STATIC,221,117,30,9
+ LTEXT "---",IDC_SADSR1,254,84,44,9
+ LTEXT "---",IDC_SADSR2,254,95,44,9
+ LTEXT "---",IDC_SADSR3,254,106,44,9
+ LTEXT "---",IDC_SADSR4,254,117,42,9
+ RTEXT "Sustain level:",IDC_STATIC,302,84,44,9
+ LTEXT "---",IDC_SADSR5,349,84,38,9
+ RTEXT "Sustain inc.:",IDC_STATIC,302,95,44,9
+ LTEXT "---",IDC_SADSR6,349,95,38,9
+ RTEXT "Channel:",IDC_STATIC,204,2,30,8
+ GROUPBOX "ADSR channel info",IDC_STATIC,201,14,190,119
+ LTEXT "1",IDC_CHANNUM,238,2,33,8
+ CONTROL 136,IDC_STATIC,"Static",SS_BITMAP | SS_CENTERIMAGE |
+ SS_REALSIZEIMAGE,208,83,11,10
+ CONTROL 137,IDC_STATIC,"Static",SS_BITMAP | SS_CENTERIMAGE |
+ SS_REALSIZEIMAGE,208,94,11,10
+ CONTROL 138,IDC_STATIC,"Static",SS_BITMAP | SS_CENTERIMAGE |
+ SS_REALSIZEIMAGE,208,105,11,10
+ CONTROL 139,IDC_STATIC,"Static",SS_BITMAP | SS_CENTERIMAGE |
+ SS_REALSIZEIMAGE,208,116,11,10
+ CONTROL 140,IDC_STATIC,"Static",SS_BITMAP | SS_REALSIZEIMAGE,4,
+ 302,150,8
+ PUSHBUTTON "M0",IDC_MUTEOFF,157,300,15,10
+ PUSHBUTTON "M1",IDC_MUTEON,174,300,15,10
+ GROUPBOX "Generic channel info",IDC_STATIC,201,134,190,114
+ RTEXT "On:",IDC_STATIC,210,146,41,9
+ RTEXT "Stop:",IDC_STATIC,210,157,41,9
+ RTEXT "Reverb:",IDC_STATIC,210,190,41,9
+ RTEXT "Start pos:",IDC_STATIC,301,146,35,9
+ RTEXT "Curr pos:",IDC_STATIC,301,157,35,9
+ RTEXT "Loop pos:",IDC_STATIC,301,168,35,9
+ RTEXT "Act freq:",IDC_STATIC,300,223,35,9
+ RTEXT "Used freq:",IDC_STATIC,300,234,35,9
+ RTEXT "Right vol:",IDC_STATIC,300,190,35,9
+ RTEXT "Left vol:",IDC_STATIC,300,201,35,9
+ RTEXT "Rvb active:",IDC_STATIC,210,201,41,9
+ RTEXT "Rvb offset:",IDC_STATIC,210,223,41,9
+ RTEXT "Rvb repeat:",IDC_STATIC,210,234,41,9
+ RTEXT "Noise:",IDC_STATIC,210,168,41,9
+ RTEXT "FMod:",IDC_STATIC,210,179,41,9
+ RTEXT "Rvb number:",IDC_STATIC,210,212,41,9
+ RTEXT "Irq addr.:",IDC_STATIC,300,262,35,9
+ RTEXT "Curr adsr vol.:",IDC_STATIC,302,106,44,9
+ LTEXT "---",IDC_SADSR7,349,106,38,9
+ LTEXT "---",IDC_CI1,254,146,39,9
+ LTEXT "---",IDC_CI2,254,157,39,9
+ LTEXT "---",IDC_CI3,254,168,39,9
+ LTEXT "---",IDC_CI4,254,179,39,9
+ LTEXT "---",IDC_CI5,254,190,39,9
+ LTEXT "---",IDC_CI6,254,201,39,9
+ LTEXT "---",IDC_CI7,254,212,39,9
+ LTEXT "---",IDC_CI8,254,223,39,9
+ LTEXT "---",IDC_CI9,254,234,39,9
+ LTEXT "---",IDC_CI10,339,146,46,9
+ GROUPBOX "Spu states",IDC_STATIC,297,249,94,61
+ LTEXT "---",IDC_CI11,339,157,46,9
+ LTEXT "---",IDC_CI12,339,168,46,9
+ LTEXT "---",IDC_CI13,339,190,23,9
+ LTEXT "---",IDC_CI14,339,201,22,9
+ LTEXT "---",IDC_CI15,339,223,46,9
+ LTEXT "---",IDC_CI16,339,234,46,9
+ LTEXT "---",IDC_STA1,339,262,46,9
+ RTEXT "Raw envelope:",IDC_STATIC,296,117,50,9
+ LTEXT "---",IDC_SADSR8,349,117,38,9
+ RTEXT "Ctrl:",IDC_STATIC,300,273,35,9
+ LTEXT "---",IDC_STA2,340,273,46,9
+ RTEXT "Stat:",IDC_STATIC,300,284,35,9
+ LTEXT "---",IDC_STA3,340,284,46,9
+ RTEXT "Spu mem:",IDC_STATIC,300,295,35,9
+ LTEXT "---",IDC_STA4,340,295,46,9
+ RTEXT "Freq:",IDC_STATIC,204,258,31,9
+ RTEXT "Stereo:",IDC_STATIC,204,268,31,9
+ RTEXT "Samples:",IDC_STATIC,204,278,31,9
+ RTEXT "Buffered:",IDC_STATIC,204,288,31,9
+ LTEXT "---",IDC_XA1,239,258,46,9
+ LTEXT "---",IDC_XA2,239,268,17,9
+ LTEXT "---",IDC_XA3,239,278,46,9
+ LTEXT "---",IDC_XA4,239,288,46,9
+ LTEXT "---",IDC_CI17,367,190,18,9
+ LTEXT "---",IDC_CI18,367,201,18,9
+ LTEXT "---",IDC_XA5,239,298,22,9
+ LTEXT "---",IDC_XA6,266,298,22,9
+ RTEXT "Volume:",IDC_STATIC,204,298,31,9
+END
+
+IDD_RECORD DIALOG DISCARDABLE 0, 0, 248, 18
+STYLE DS_MODALFRAME | WS_MINIMIZEBOX | WS_POPUP | WS_VISIBLE | WS_CAPTION |
+ WS_SYSMENU
+CAPTION "P.E.Op.S. sound recording"
+FONT 8, "MS Sans Serif"
+BEGIN
+ RTEXT "Filename:",IDC_STATIC,3,5,33,9
+ EDITTEXT IDC_WAVFILE,41,3,134,12,ES_AUTOHSCROLL
+ PUSHBUTTON "Start recording",IDC_RECORD,180,3,61,12
+END
+
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// DESIGNINFO
+//
+
+#ifdef APSTUDIO_INVOKED
+GUIDELINES DESIGNINFO MOVEABLE PURE
+BEGIN
+ IDD_ABOUT, DIALOG
+ BEGIN
+ LEFTMARGIN, 7
+ RIGHTMARGIN, 232
+ TOPMARGIN, 7
+ BOTTOMMARGIN, 168
+ END
+
+ IDD_CFGDLG, DIALOG
+ BEGIN
+ LEFTMARGIN, 7
+ RIGHTMARGIN, 246
+ TOPMARGIN, 7
+ BOTTOMMARGIN, 200
+ END
+
+ IDD_DEBUG, DIALOG
+ BEGIN
+ LEFTMARGIN, 7
+ RIGHTMARGIN, 390
+ TOPMARGIN, 7
+ BOTTOMMARGIN, 307
+ END
+
+ IDD_RECORD, DIALOG
+ BEGIN
+ LEFTMARGIN, 7
+ RIGHTMARGIN, 241
+ TOPMARGIN, 7
+ BOTTOMMARGIN, 11
+ END
+END
+#endif // APSTUDIO_INVOKED
+
+
+#ifndef _MAC
+/////////////////////////////////////////////////////////////////////////////
+//
+// Version
+//
+
+VS_VERSION_INFO VERSIONINFO
+ FILEVERSION 1,0,9,0
+ PRODUCTVERSION 1,0,9,0
+ FILEFLAGSMASK 0x3fL
+#ifdef _DEBUG
+ FILEFLAGS 0x1L
+#else
+ FILEFLAGS 0x0L
+#endif
+ FILEOS 0x4L
+ FILETYPE 0x2L
+ FILESUBTYPE 0x0L
+BEGIN
+ BLOCK "StringFileInfo"
+ BEGIN
+ BLOCK "040904b0"
+ BEGIN
+ VALUE "Comments", "Based on P.E.Op.S. DSound PSX SPU Audio driver by Pete Bernert and the P.E.Op.S. team\0"
+ VALUE "CompanyName", "\0"
+ VALUE "FileDescription", "DFSound\0"
+ VALUE "FileVersion", "1, 0, 9, 0\0"
+ VALUE "InternalName", "DFSound\0"
+ VALUE "LegalCopyright", "\0"
+ VALUE "LegalTrademarks", "\0"
+ VALUE "OriginalFilename", "DFSound.DLL\0"
+ VALUE "PrivateBuild", "\0"
+ VALUE "ProductName", "DFSound\0"
+ VALUE "ProductVersion", "1, 0, 9, 0\0"
+ VALUE "SpecialBuild", "\0"
+ END
+ END
+ BLOCK "VarFileInfo"
+ BEGIN
+ VALUE "Translation", 0x409, 1200
+ END
+END
+
+#endif // !_MAC
+
+#endif // Neutral resources
+/////////////////////////////////////////////////////////////////////////////
+
+
+/////////////////////////////////////////////////////////////////////////////
+// Polish resources
+
+#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_PLK)
+#ifdef _WIN32
+LANGUAGE LANG_POLISH, SUBLANG_DEFAULT
+#pragma code_page(1250)
+#endif //_WIN32
+
+#ifdef APSTUDIO_INVOKED
+/////////////////////////////////////////////////////////////////////////////
+//
+// TEXTINCLUDE
+//
+
+1 TEXTINCLUDE MOVEABLE PURE
+BEGIN
+ "resource.h\0"
+END
+
+2 TEXTINCLUDE MOVEABLE PURE
+BEGIN
+ "#include ""afxres.h""\r\n"
+ "\0"
+END
+
+3 TEXTINCLUDE MOVEABLE PURE
+BEGIN
+ "#define _AFX_NO_SPLITTER_RESOURCES\r\n"
+ "#define _AFX_NO_OLE_RESOURCES\r\n"
+ "#define _AFX_NO_TRACKER_RESOURCES\r\n"
+ "#define _AFX_NO_PROPERTY_RESOURCES\r\n"
+ "\r\n"
+ "#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)\r\n"
+ "#ifdef _WIN32\r\n"
+ "LANGUAGE 9, 1\r\n"
+ "#pragma code_page(1252)\r\n"
+ "#endif\r\n"
+ "#include ""afxres.rc"" // Standard components\r\n"
+ "#endif\0"
+END
+
+#endif // APSTUDIO_INVOKED
+
+#endif // Polish resources
+/////////////////////////////////////////////////////////////////////////////
+
+
+/////////////////////////////////////////////////////////////////////////////
+// German (Germany) resources
+
+#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_DEU)
+#ifdef _WIN32
+LANGUAGE LANG_GERMAN, SUBLANG_GERMAN
+#pragma code_page(1252)
+#endif //_WIN32
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// Bitmap
+//
+
+IDB_BITMAP1 BITMAP MOVEABLE PURE "bitmap1.bmp"
+IDB_BITMAP2 BITMAP MOVEABLE PURE "bitmap2.bmp"
+IDB_BITMAP3 BITMAP MOVEABLE PURE "bitmap3.bmp"
+IDB_BITMAP4 BITMAP MOVEABLE PURE "bitmap4.bmp"
+IDB_BITMAP5 BITMAP MOVEABLE PURE "bitmap5.bmp"
+#endif // German (Germany) resources
+/////////////////////////////////////////////////////////////////////////////
+
+
+
+#ifndef APSTUDIO_INVOKED
+/////////////////////////////////////////////////////////////////////////////
+//
+// Generated from the TEXTINCLUDE 3 resource.
+//
+#define _AFX_NO_SPLITTER_RESOURCES
+#define _AFX_NO_OLE_RESOURCES
+#define _AFX_NO_TRACKER_RESOURCES
+#define _AFX_NO_PROPERTY_RESOURCES
+
+#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
+#ifdef _WIN32
+LANGUAGE 9, 1
+#pragma code_page(1252)
+#endif
+#include "afxres.rc" // Standard components
+#endif
+/////////////////////////////////////////////////////////////////////////////
+#endif // not APSTUDIO_INVOKED
+
diff --git a/win32/plugins/dfsound/winsrc/bitmap1.bmp b/win32/plugins/dfsound/winsrc/bitmap1.bmp
new file mode 100644
index 00000000..8238be91
--- /dev/null
+++ b/win32/plugins/dfsound/winsrc/bitmap1.bmp
Binary files differ
diff --git a/win32/plugins/dfsound/winsrc/bitmap2.bmp b/win32/plugins/dfsound/winsrc/bitmap2.bmp
new file mode 100644
index 00000000..9dece3b5
--- /dev/null
+++ b/win32/plugins/dfsound/winsrc/bitmap2.bmp
Binary files differ
diff --git a/win32/plugins/dfsound/winsrc/bitmap3.bmp b/win32/plugins/dfsound/winsrc/bitmap3.bmp
new file mode 100644
index 00000000..947605ff
--- /dev/null
+++ b/win32/plugins/dfsound/winsrc/bitmap3.bmp
Binary files differ
diff --git a/win32/plugins/dfsound/winsrc/bitmap4.bmp b/win32/plugins/dfsound/winsrc/bitmap4.bmp
new file mode 100644
index 00000000..c866e9ab
--- /dev/null
+++ b/win32/plugins/dfsound/winsrc/bitmap4.bmp
Binary files differ
diff --git a/win32/plugins/dfsound/winsrc/bitmap5.bmp b/win32/plugins/dfsound/winsrc/bitmap5.bmp
new file mode 100644
index 00000000..cee6e84c
--- /dev/null
+++ b/win32/plugins/dfsound/winsrc/bitmap5.bmp
Binary files differ
diff --git a/win32/plugins/dfsound/winsrc/cfg.c b/win32/plugins/dfsound/winsrc/cfg.c
new file mode 100644
index 00000000..4ac6ee94
--- /dev/null
+++ b/win32/plugins/dfsound/winsrc/cfg.c
@@ -0,0 +1,256 @@
+/***************************************************************************
+ cfg.c - description
+ -------------------
+ begin : Wed May 15 2002
+ copyright : (C) 2002 by Pete Bernert
+ email : BlackDove@addcom.de
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * This program 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. See also the license.txt file for *
+ * additional informations. *
+ * *
+ ***************************************************************************/
+
+#include "stdafx.h"
+
+#define _IN_CFG
+
+#include "externals.h"
+
+////////////////////////////////////////////////////////////////////////
+// WINDOWS CONFIG/ABOUT HANDLING
+////////////////////////////////////////////////////////////////////////
+
+#include "resource.h"
+
+////////////////////////////////////////////////////////////////////////
+// simple about dlg handler
+////////////////////////////////////////////////////////////////////////
+
+BOOL CALLBACK AboutDlgProc(HWND hW, UINT uMsg, WPARAM wParam, LPARAM lParam)
+{
+ switch(uMsg)
+ {
+ case WM_COMMAND:
+ {
+ switch(LOWORD(wParam))
+ {case IDOK: EndDialog(hW,TRUE);return TRUE;}
+ }
+ }
+ return FALSE;
+}
+
+////////////////////////////////////////////////////////////////////////
+// READ CONFIG: from win registry
+////////////////////////////////////////////////////////////////////////
+
+void ReadConfig(void)
+{
+ HKEY myKey;
+ DWORD temp;
+ DWORD type;
+ DWORD size;
+
+ iVolume=1; // init vars
+ iXAPitch=1;
+ iUseTimer=2;
+ iSPUIRQWait=1;
+ iDebugMode=0;
+ iRecordMode=0;
+ iUseReverb=2;
+ iUseInterpolation=2;
+ iDisStereo=0;
+
+ if (RegOpenKeyEx(HKEY_CURRENT_USER,"Software\\Vision Thing\\PSEmu Pro\\SPU\\PeopsSound",0,KEY_ALL_ACCESS,&myKey)==ERROR_SUCCESS)
+ {
+ size = 4;
+ if(RegQueryValueEx(myKey,"Volume",0,&type,(LPBYTE)&temp,&size)==ERROR_SUCCESS)
+ iVolume=(int)temp;
+ size = 4;
+ if(RegQueryValueEx(myKey,"XAPitch",0,&type,(LPBYTE)&temp,&size)==ERROR_SUCCESS)
+ iXAPitch=(int)temp;
+ size = 4;
+ if(RegQueryValueEx(myKey,"UseTimer",0,&type,(LPBYTE)&temp,&size)==ERROR_SUCCESS)
+ iUseTimer=(int)temp;
+ size = 4;
+ if(RegQueryValueEx(myKey,"SPUIRQWait",0,&type,(LPBYTE)&temp,&size)==ERROR_SUCCESS)
+ iSPUIRQWait=(int)temp;
+ size = 4;
+ if(RegQueryValueEx(myKey,"DebugMode",0,&type,(LPBYTE)&temp,&size)==ERROR_SUCCESS)
+ iDebugMode=(int)temp;
+ size = 4;
+ if(RegQueryValueEx(myKey,"RecordMode",0,&type,(LPBYTE)&temp,&size)==ERROR_SUCCESS)
+ iRecordMode=(int)temp;
+ size = 4;
+ if(RegQueryValueEx(myKey,"UseReverb",0,&type,(LPBYTE)&temp,&size)==ERROR_SUCCESS)
+ iUseReverb=(int)temp;
+ size = 4;
+ if(RegQueryValueEx(myKey,"UseInterpolation",0,&type,(LPBYTE)&temp,&size)==ERROR_SUCCESS)
+ iUseInterpolation=(int)temp;
+ size = 4;
+ if(RegQueryValueEx(myKey,"DisStereo",0,&type,(LPBYTE)&temp,&size)==ERROR_SUCCESS)
+ iDisStereo=(int)temp;
+
+ RegCloseKey(myKey);
+ }
+
+ if(iUseTimer>2) iUseTimer=2; // some checks
+ if(iVolume<1) iVolume=1;
+ if(iVolume>4) iVolume=4;
+}
+
+////////////////////////////////////////////////////////////////////////
+// WRITE CONFIG: in win registry
+////////////////////////////////////////////////////////////////////////
+
+void WriteConfig(void)
+{
+ HKEY myKey;
+ DWORD myDisp;
+ DWORD temp;
+
+ RegCreateKeyEx(HKEY_CURRENT_USER,"Software\\Vision Thing\\PSEmu Pro\\SPU\\PeopsSound",0,NULL,REG_OPTION_NON_VOLATILE,KEY_ALL_ACCESS,NULL,&myKey,&myDisp);
+ temp=iVolume;
+ RegSetValueEx(myKey,"Volume",0,REG_DWORD,(LPBYTE) &temp,sizeof(temp));
+ temp=iXAPitch;
+ RegSetValueEx(myKey,"XAPitch",0,REG_DWORD,(LPBYTE) &temp,sizeof(temp));
+ temp=iUseTimer;
+ RegSetValueEx(myKey,"UseTimer",0,REG_DWORD,(LPBYTE) &temp,sizeof(temp));
+ temp=iSPUIRQWait;
+ RegSetValueEx(myKey,"SPUIRQWait",0,REG_DWORD,(LPBYTE) &temp,sizeof(temp));
+ temp=iDebugMode;
+ RegSetValueEx(myKey,"DebugMode",0,REG_DWORD,(LPBYTE) &temp,sizeof(temp));
+ temp=iRecordMode;
+ RegSetValueEx(myKey,"RecordMode",0,REG_DWORD,(LPBYTE) &temp,sizeof(temp));
+ temp=iUseReverb;
+ RegSetValueEx(myKey,"UseReverb",0,REG_DWORD,(LPBYTE) &temp,sizeof(temp));
+ temp=iUseInterpolation;
+ RegSetValueEx(myKey,"UseInterpolation",0,REG_DWORD,(LPBYTE) &temp,sizeof(temp));
+ temp=iDisStereo;
+ RegSetValueEx(myKey,"DisStereo",0,REG_DWORD,(LPBYTE) &temp,sizeof(temp));
+
+ RegCloseKey(myKey);
+}
+
+////////////////////////////////////////////////////////////////////////
+// INIT WIN CFG DIALOG
+////////////////////////////////////////////////////////////////////////
+
+BOOL OnInitDSoundDialog(HWND hW)
+{
+ HWND hWC;
+
+ ReadConfig();
+
+ if(iXAPitch) CheckDlgButton(hW,IDC_XAPITCH,TRUE);
+
+ hWC=GetDlgItem(hW,IDC_VOLUME);
+ ComboBox_AddString(hWC, "0: low");
+ ComboBox_AddString(hWC, "1: medium");
+ ComboBox_AddString(hWC, "2: loud");
+ ComboBox_AddString(hWC, "3: loudest");
+ ComboBox_SetCurSel(hWC,4-iVolume);
+
+ if(iSPUIRQWait) CheckDlgButton(hW,IDC_IRQWAIT,TRUE);
+ if(iDebugMode) CheckDlgButton(hW,IDC_DEBUGMODE,TRUE);
+ if(iRecordMode) CheckDlgButton(hW,IDC_RECORDMODE,TRUE);
+ if(iDisStereo) CheckDlgButton(hW,IDC_DISSTEREO,TRUE);
+
+ hWC=GetDlgItem(hW,IDC_USETIMER);
+ ComboBox_AddString(hWC, "0: Fast mode (thread, less compatible spu timing)");
+ ComboBox_AddString(hWC, "1: High compatibility mode (timer event, slower)");
+ ComboBox_AddString(hWC, "2: Use SPUasync (must be supported by the emu)");
+ ComboBox_SetCurSel(hWC,iUseTimer);
+
+ hWC=GetDlgItem(hW,IDC_USEREVERB);
+ ComboBox_AddString(hWC, "0: No reverb (fastest)");
+ ComboBox_AddString(hWC, "1: Simple reverb (fakes the most common effects)");
+ ComboBox_AddString(hWC, "2: PSX reverb (best quality)");
+ ComboBox_SetCurSel(hWC,iUseReverb);
+
+ hWC=GetDlgItem(hW,IDC_INTERPOL);
+ ComboBox_AddString(hWC, "0: None (fastest)");
+ ComboBox_AddString(hWC, "1: Simple interpolation");
+ ComboBox_AddString(hWC, "2: Gaussian interpolation (good quality)");
+ ComboBox_AddString(hWC, "3: Cubic interpolation (better treble)");
+ ComboBox_SetCurSel(hWC,iUseInterpolation);
+
+ return TRUE;
+}
+
+////////////////////////////////////////////////////////////////////////
+// WIN CFG DLG OK
+////////////////////////////////////////////////////////////////////////
+
+void OnDSoundOK(HWND hW)
+{
+ HWND hWC;
+
+ if(IsDlgButtonChecked(hW,IDC_XAPITCH))
+ iXAPitch=1; else iXAPitch=0;
+
+ hWC=GetDlgItem(hW,IDC_VOLUME);
+ iVolume=4-ComboBox_GetCurSel(hWC);
+
+ hWC=GetDlgItem(hW,IDC_USETIMER);
+ iUseTimer=ComboBox_GetCurSel(hWC);
+
+ hWC=GetDlgItem(hW,IDC_USEREVERB);
+ iUseReverb=ComboBox_GetCurSel(hWC);
+
+ hWC=GetDlgItem(hW,IDC_INTERPOL);
+ iUseInterpolation=ComboBox_GetCurSel(hWC);
+
+ if(IsDlgButtonChecked(hW,IDC_IRQWAIT))
+ iSPUIRQWait=1; else iSPUIRQWait=0;
+
+ if(IsDlgButtonChecked(hW,IDC_DEBUGMODE))
+ iDebugMode=1; else iDebugMode=0;
+
+ if(IsDlgButtonChecked(hW,IDC_RECORDMODE))
+ iRecordMode=1; else iRecordMode=0;
+
+ if(IsDlgButtonChecked(hW,IDC_DISSTEREO))
+ iDisStereo=1; else iDisStereo=0;
+
+ WriteConfig(); // write registry
+
+ EndDialog(hW,TRUE);
+}
+
+////////////////////////////////////////////////////////////////////////
+// WIN CFG DLG CANCEL
+////////////////////////////////////////////////////////////////////////
+
+void OnDSoundCancel(HWND hW)
+{
+ EndDialog(hW,FALSE);
+}
+
+////////////////////////////////////////////////////////////////////////
+// WIN CFG PROC
+////////////////////////////////////////////////////////////////////////
+
+BOOL CALLBACK DSoundDlgProc(HWND hW, UINT uMsg, WPARAM wParam, LPARAM lParam)
+{
+ switch(uMsg)
+ {
+ case WM_INITDIALOG:
+ return OnInitDSoundDialog(hW);
+
+ case WM_COMMAND:
+ {
+ switch(LOWORD(wParam))
+ {
+ case IDCANCEL: OnDSoundCancel(hW);return TRUE;
+ case IDOK: OnDSoundOK(hW); return TRUE;
+ }
+ }
+ }
+ return FALSE;
+}
diff --git a/win32/plugins/dfsound/winsrc/debug.c b/win32/plugins/dfsound/winsrc/debug.c
new file mode 100644
index 00000000..223be4ce
--- /dev/null
+++ b/win32/plugins/dfsound/winsrc/debug.c
@@ -0,0 +1,372 @@
+/***************************************************************************
+ debug.c - description
+ -------------------
+ begin : Wed May 15 2002
+ copyright : (C) 2002 by Pete Bernert
+ email : BlackDove@addcom.de
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * This program 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. See also the license.txt file for *
+ * additional informations. *
+ * *
+ ***************************************************************************/
+
+//*************************************************************************//
+// History of changes:
+//
+// 2004/09/18 - Pete
+// - corrected ADSRX value display
+//
+// 2003/01/06 - Pete
+// - added Neil's ADSR timings
+//
+// 2002/05/15 - Pete
+// - generic cleanup for the Peops release
+//
+//*************************************************************************//
+
+#include "stdafx.h"
+
+#define _IN_DEBUG
+
+#include "externals.h"
+
+////////////////////////////////////////////////////////////////////////
+// WINDOWS DEBUG DIALOG HANDLING
+////////////////////////////////////////////////////////////////////////
+
+#ifdef _WINDOWS
+
+#include "resource.h"
+
+//#define SMALLDEBUG
+//#include <dbgout.h>
+
+////////////////////////////////////////////////////////////////////////
+// display debug infos
+
+const COLORREF crStreamCol[]={
+ RGB( 0, 0, 0),
+ RGB(255,255,255),
+ RGB(128, 0,128),
+ RGB( 0,128, 0),
+ RGB( 0, 0,255),
+ RGB(255, 0, 0)
+ };
+
+const COLORREF crAdsrCol[] ={
+ RGB( 0, 0, 0),
+ RGB(255, 0, 0),
+ RGB( 0,255, 0),
+ RGB(255, 0,255),
+ RGB( 0, 0,255),
+ RGB( 0, 0, 0),
+ };
+
+HBRUSH hBStream[6]; // brushes for stream lines
+HPEN hPAdsr[6]; // pens for adsr lines
+int iSelChannel=0; // user selected channel
+
+////////////////////////////////////////////////////////////////////////
+// display the sound data waves: no subclassing used, so the
+// area will not be redrawn... but faster that way, and good enuff
+// for debugging purposes
+
+void DisplayStreamInfos(HWND hW)
+{
+ HWND hWS=GetDlgItem(hW,IDC_SAREA);
+ HDC hdc;RECT r;HBRUSH hBO;int ch,dy,i,j,id;
+
+ //----------------------------------------------------//
+
+ GetClientRect(hWS,&r); // get size of stream display
+ hdc=GetDC(hWS); // device context
+ r.right--; // leave the right border intact
+ ScrollDC(hdc,-1,0,&r,&r,NULL,NULL); // scroll one pixel to the left
+
+ //----------------------------------------------------//
+
+ hBO=SelectObject(hdc,hBStream[0]); // clean the right border
+ PatBlt(hdc,r.right-1,0,1,r.bottom,PATCOPY);
+
+ //----------------------------------------------------//
+
+ dy=r.bottom/MAXCHAN; // size of one channel area
+
+ for(ch=0;ch<MAXCHAN;ch++) // loop the channels
+ {
+ if(s_chan[ch].bOn) // channel is on?
+ {
+ if(s_chan[ch].iIrqDone)
+ {
+ s_chan[ch].iIrqDone=0;
+ PatBlt(hdc,r.right-1,ch*r.bottom/MAXCHAN,
+ 1,dy,BLACKNESS);
+ continue;
+ }
+
+ j=s_chan[ch].sval;if(j<0) j=-j; // -> get one channel data (-32k ... 32k)
+ j=(dy*j)/32768; if(j==0) j=1; // -> adjust to display coords
+ i=(dy/2)+(ch*r.bottom/MAXCHAN)-j/2; // -> position where to paint it
+
+
+
+ if (s_chan[ch].iMute) id=1; // -> get color id
+ else if(s_chan[ch].bNoise) id=2;
+ else if(s_chan[ch].bFMod==2) id=3;
+ else if(s_chan[ch].bFMod==1) id=4;
+ else id=5;
+
+ SelectObject(hdc,hBStream[id]); // -> select the brush
+ PatBlt(hdc,r.right-1,i,1,j,PATCOPY); // -> paint the value line
+ }
+
+ if(ch) SetPixel(hdc,r.right-1, // -> not first line?
+ ch*r.bottom/MAXCHAN,RGB(0,0,0)); // --> draw the line (one dot scrolled to the left)
+ }
+
+ //----------------------------------------------------//
+
+ SelectObject(hdc,hBO); // repair brush
+
+ ReleaseDC(hWS,hdc); // release context
+}
+
+////////////////////////////////////////////////////////////////////////
+// display adsr lines: also no subclassing for repainting used
+
+void DisplayADSRInfos(HWND hW)
+{
+ HWND hWS=GetDlgItem(hW,IDC_ADSR);
+ HDC hdc;RECT r;HBRUSH hBO;char szB[16];
+ int ch=iSelChannel,dx,dy,dm,dn,ia,id,is,ir;
+
+ //----------------------------------------------------// get display size
+
+ GetClientRect(hWS,&r);
+ hdc=GetDC(hWS);
+
+ //----------------------------------------------------// clean the area
+
+ hBO=SelectObject(hdc,hBStream[0]);
+ PatBlt(hdc,0,0,r.right,r.bottom,PATCOPY);
+ r.left++;r.right-=2;r.top++;r.bottom-=2; // shrink the display rect for better optics
+
+ //----------------------------------------------------//
+
+ ia=min(s_chan[ch].ADSR.AttackTime,10000); // get adsr, but limit it for drawing
+ id=min(s_chan[ch].ADSR.DecayTime,10000);
+ is=min(s_chan[ch].ADSR.SustainTime,10000);
+ ir=min(s_chan[ch].ADSR.ReleaseTime,10000);
+
+ dx=ia+id+is+ir; // get the dx in (limited) adsr units
+
+ // set the real values to the info statics
+ SetDlgItemInt(hW,IDC_SADSR1,s_chan[ch].ADSRX.AttackRate^0x7f,FALSE);
+ SetDlgItemInt(hW,IDC_SADSR2,(s_chan[ch].ADSRX.DecayRate^0x1f)/4,FALSE);
+ SetDlgItemInt(hW,IDC_SADSR3,s_chan[ch].ADSRX.SustainRate^0x7f,FALSE);
+ SetDlgItemInt(hW,IDC_SADSR4,(s_chan[ch].ADSRX.ReleaseRate^0x1f)/4,FALSE);
+ SetDlgItemInt(hW,IDC_SADSR5,s_chan[ch].ADSRX.SustainLevel>>27,FALSE);
+
+ SetDlgItemInt(hW,IDC_SADSR6,s_chan[ch].ADSRX.SustainIncrease,TRUE);
+ SetDlgItemInt(hW,IDC_SADSR7,s_chan[ch].ADSRX.lVolume,TRUE);
+ wsprintf(szB,"%08lx",s_chan[ch].ADSRX.EnvelopeVol);
+ SetDlgItemText(hW,IDC_SADSR8,szB);
+
+ if(dx) // something to draw?
+ {
+ HPEN hPO=SelectObject(hdc,hPAdsr[1]); // sel A pen
+ dn=r.left;
+ MoveToEx(hdc,dn,r.bottom,NULL); // move to bottom left corner
+
+ dn+=(ia*r.right)/dx; // calc A x line pos
+ LineTo(hdc,dn,r.top); // line to AxPos,top
+
+ SelectObject(hdc,hPAdsr[2]); // sel D pen
+ dn+=(id*r.right)/dx; // calc D x line pos
+ dy=r.top+((1024-s_chan[ch].ADSR.SustainLevel)* // calc the D y pos
+ r.bottom)/1024; // (our S level is ranged from 0 to 1024)
+ LineTo(hdc,dn,dy); // line to DxPos,SLevel
+
+ SelectObject(hdc,hPAdsr[3]); // sel S pen
+ if(s_chan[ch].ADSR.SustainTime>10000) dm=1; // we have to fake the S values... S will
+ else // inc/decrease until channel stop...
+ if(s_chan[ch].ADSR.SustainTime==0) dm=0; // we dunno here when this will happen,
+ else dm=21-(((s_chan[ch].ADSR.SustainTime/500))); // so we do some more ore less angled line,
+ dy=dy-(s_chan[ch].ADSR.SustainModeDec*dm); // roughly depending on the S Time
+ if(dy>r.bottom) dy=r.bottom;
+ if(dy<r.top) dy=r.top;
+ dn+=(is*r.right)/dx;
+ LineTo(hdc,dn,dy); // line to SxPos, fake end volume level
+
+ SelectObject(hdc,hPAdsr[4]); // sel R pen
+ dn+=(ir*r.right)/dx; // calc R x line pos
+ LineTo(hdc,dn,r.bottom); // line to RxPos, bottom right y
+
+ SelectObject(hdc,hPO); // repair pen
+ }
+
+ SelectObject(hdc,hBO); // repair brush
+ ReleaseDC(hWS,hdc); // release context
+}
+
+////////////////////////////////////////////////////////////////////////
+
+void DisplayChannelInfos(HWND hW)
+{
+ int ch=iSelChannel;char szB[16];
+
+ // channel infos
+ SetDlgItemInt(hW,IDC_CI1,s_chan[ch].bOn,TRUE);
+ SetDlgItemInt(hW,IDC_CI2,s_chan[ch].bStop,TRUE);
+ SetDlgItemInt(hW,IDC_CI3,s_chan[ch].bNoise,TRUE);
+ SetDlgItemInt(hW,IDC_CI4,s_chan[ch].bFMod,TRUE);
+ SetDlgItemInt(hW,IDC_CI5,s_chan[ch].bReverb,TRUE);
+ SetDlgItemInt(hW,IDC_CI6,s_chan[ch].bRVBActive,TRUE);
+ SetDlgItemInt(hW,IDC_CI7,s_chan[ch].iRVBNum,TRUE);
+ SetDlgItemInt(hW,IDC_CI8,s_chan[ch].iRVBOffset,TRUE);
+ SetDlgItemInt(hW,IDC_CI9,s_chan[ch].iRVBRepeat,TRUE);
+ SetDlgItemInt(hW,IDC_CI10,(unsigned long)s_chan[ch].pStart-(unsigned long)spuMemC,FALSE);
+ SetDlgItemInt(hW,IDC_CI11,(unsigned long)s_chan[ch].pCurr-(unsigned long)spuMemC,FALSE);
+ SetDlgItemInt(hW,IDC_CI12,(unsigned long)s_chan[ch].pLoop-(unsigned long)spuMemC,FALSE);
+ SetDlgItemInt(hW,IDC_CI13,s_chan[ch].iRightVolume,TRUE);
+ SetDlgItemInt(hW,IDC_CI14,s_chan[ch].iLeftVolume,TRUE);
+ SetDlgItemInt(hW,IDC_CI15,s_chan[ch].iActFreq,TRUE);
+ SetDlgItemInt(hW,IDC_CI16,s_chan[ch].iUsedFreq,TRUE);
+
+ wsprintf(szB,"%04x",s_chan[ch].iRightVolRaw);
+ SetDlgItemText(hW,IDC_CI17,szB);
+ wsprintf(szB,"%04x",s_chan[ch].iLeftVolRaw);
+ SetDlgItemText(hW,IDC_CI18,szB);
+
+ // generic infos
+ if(pSpuIrq==0)
+ SetDlgItemInt(hW,IDC_STA1,-1,TRUE);
+ else SetDlgItemInt(hW,IDC_STA1,(unsigned long)pSpuIrq-(unsigned long)spuMemC,FALSE);
+ wsprintf(szB,"%04x",spuCtrl);
+ SetDlgItemText(hW,IDC_STA2,szB);
+ wsprintf(szB,"%04x",spuStat);
+ SetDlgItemText(hW,IDC_STA3,szB);
+ SetDlgItemInt(hW,IDC_STA4,spuAddr,TRUE);
+
+ // xa infos
+ if(XAPlay<=XAFeed) ch=XAFeed-XAPlay;
+ else ch=(XAFeed-XAStart)+(XAEnd-XAPlay);
+ SetDlgItemInt(hW,IDC_XA4,ch,FALSE);
+ SetDlgItemInt(hW,IDC_XA5,iLeftXAVol,TRUE);
+ SetDlgItemInt(hW,IDC_XA6,iRightXAVol,TRUE);
+ if(!xapGlobal) return;
+ SetDlgItemInt(hW,IDC_XA1,xapGlobal->freq,TRUE);
+ SetDlgItemInt(hW,IDC_XA2,xapGlobal->stereo,TRUE);
+ SetDlgItemInt(hW,IDC_XA3,xapGlobal->nsamples,TRUE);
+}
+
+////////////////////////////////////////////////////////////////////////
+// display everything (called in dialog timer for value refreshing)
+
+void DisplayDebugInfos(HWND hW)
+{
+ DisplayStreamInfos(hW);
+ DisplayADSRInfos(hW);
+ DisplayChannelInfos(hW);
+}
+
+////////////////////////////////////////////////////////////////////////
+// main debug dlg handler
+
+BOOL CALLBACK DebugDlgProc(HWND hW, UINT uMsg, WPARAM wParam, LPARAM lParam)
+{
+ switch(uMsg)
+ {
+ //--------------------------------------------------// init
+ case WM_INITDIALOG:
+ {
+ int i;
+ ShowCursor(TRUE); // mmm... who is hiding it? main emu? tsts
+ iSelChannel=0; // sel first channel
+ CheckRadioButton(hW,IDC_CHAN1,IDC_CHAN24,IDC_CHAN1);
+ // create brushes/pens
+ hBStream[0]=CreateSolidBrush(GetSysColor(COLOR_3DFACE));
+ hPAdsr[0]=CreatePen(PS_SOLID,0,GetSysColor(COLOR_3DFACE));
+ for(i=1;i<6;i++)
+ {
+ hBStream[i]=CreateSolidBrush(crStreamCol[i]);
+ hPAdsr[i]=CreatePen(PS_SOLID,0,crAdsrCol[i]);
+ }
+ SetTimer(hW,999,50,NULL); // now create update timer
+ return TRUE;
+ }
+ //--------------------------------------------------// destroy
+ case WM_DESTROY:
+ {
+ int i;
+ KillTimer(hW,999); // first kill timer
+ for(i=0;i<6;i++) // then kill brushes/pens
+ {
+ DeleteObject(hBStream[i]);
+ DeleteObject(hPAdsr[i]);
+ }
+ }break;
+ //--------------------------------------------------// timer
+ case WM_TIMER:
+ {
+ if(wParam==999) DisplayDebugInfos(hW); // update all values
+ }break;
+ //--------------------------------------------------// command
+ case WM_COMMAND:
+ {
+ if(wParam==IDCANCEL) iDebugMode=2; // cancel? raise flag for destroying the dialog
+
+ if(wParam>=IDC_MUTE1 && wParam<=IDC_MUTE24) // mute clicked?
+ {
+ if(IsDlgButtonChecked(hW,wParam)) // -> mute/unmute it
+ s_chan[wParam-IDC_MUTE1].iMute=1;
+ else s_chan[wParam-IDC_MUTE1].iMute=0;
+ }
+ // all mute/unmute
+ if(wParam==IDC_MUTEOFF) SendMessage(hW,WM_MUTE,0,0);
+ if(wParam==IDC_MUTEON) SendMessage(hW,WM_MUTE,1,0);
+
+ if(wParam>=IDC_CHAN1 && wParam<=IDC_CHAN24) // sel channel
+ {
+ if(IsDlgButtonChecked(hW,wParam))
+ {
+ iSelChannel=wParam-IDC_CHAN1;
+ SetDlgItemInt(hW,IDC_CHANNUM,iSelChannel+1,FALSE);
+ }
+ }
+ }break;
+ //--------------------------------------------------// mute
+ case WM_MUTE:
+ { // will be called by the mute/unmute all button and on savestate load
+ int i;
+ for(i=IDC_MUTE1;i<=IDC_MUTE24;i++)
+ {
+ CheckDlgButton(hW,i,wParam);
+ if(wParam) s_chan[i-IDC_MUTE1].iMute=1;
+ else s_chan[i-IDC_MUTE1].iMute=0;
+ }
+ }break;
+ //--------------------------------------------------// size
+ case WM_SIZE:
+ if(wParam==SIZE_MINIMIZED) SetFocus(hWMain); // if we get minimized, set the foxus to the main window
+ break;
+ //--------------------------------------------------// setcursor
+ case WM_SETCURSOR:
+ {
+ SetCursor(LoadCursor(NULL,IDC_ARROW)); // force the arrow
+ return TRUE;
+ }
+ //--------------------------------------------------//
+ }
+ return FALSE;
+}
+
+////////////////////////////////////////////////////////////////////////
+
+#endif \ No newline at end of file
diff --git a/win32/plugins/dfsound/winsrc/debug.h b/win32/plugins/dfsound/winsrc/debug.h
new file mode 100644
index 00000000..9c309c17
--- /dev/null
+++ b/win32/plugins/dfsound/winsrc/debug.h
@@ -0,0 +1,29 @@
+/***************************************************************************
+ debug.h - description
+ -------------------
+ begin : Wed May 15 2002
+ copyright : (C) 2002 by Pete Bernert
+ email : BlackDove@addcom.de
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * This program 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. See also the license.txt file for *
+ * additional informations. *
+ * *
+ ***************************************************************************/
+
+//*************************************************************************//
+// History of changes:
+//
+// 2002/05/15 - Pete
+// - generic cleanup for the Peops release
+//
+//*************************************************************************//
+
+#ifdef _WINDOWS
+BOOL CALLBACK DebugDlgProc(HWND hW, UINT uMsg, WPARAM wParam, LPARAM lParam);
+#endif
diff --git a/win32/plugins/dfsound/winsrc/dsound.c b/win32/plugins/dfsound/winsrc/dsound.c
new file mode 100644
index 00000000..1d6ce66e
--- /dev/null
+++ b/win32/plugins/dfsound/winsrc/dsound.c
@@ -0,0 +1,277 @@
+/***************************************************************************
+ dsound.c - description
+ -------------------
+ begin : Wed May 15 2002
+ copyright : (C) 2002 by Pete Bernert
+ email : BlackDove@addcom.de
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * This program 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. See also the license.txt file for *
+ * additional informations. *
+ * *
+ ***************************************************************************/
+
+//*************************************************************************//
+// History of changes:
+//
+// 2003/01/12 - Pete
+// - added recording funcs
+//
+// 2002/05/15 - Pete
+// - generic cleanup for the Peops release
+//
+//*************************************************************************//
+
+#include "stdafx.h"
+
+#define _IN_DSOUND
+
+#include "externals.h"
+
+#ifdef _WINDOWS
+
+#include <dsound.h>
+
+#include "record.h"
+
+////////////////////////////////////////////////////////////////////////
+// dsound globals
+////////////////////////////////////////////////////////////////////////
+
+LPDIRECTSOUND lpDS;
+LPDIRECTSOUNDBUFFER lpDSBP = NULL;
+LPDIRECTSOUNDBUFFER lpDSB = NULL;
+DSBUFFERDESC dsbd;
+DSBUFFERDESC dsbdesc;
+DSCAPS dscaps;
+DSBCAPS dsbcaps;
+
+unsigned long LastWrite=0xffffffff;
+unsigned long LastPlay=0;
+
+////////////////////////////////////////////////////////////////////////
+// SETUP SOUND
+////////////////////////////////////////////////////////////////////////
+
+void SetupSound(void)
+{
+ HRESULT dsval;WAVEFORMATEX pcmwf;
+
+ dsval = DirectSoundCreate(NULL,&lpDS,NULL);
+ if(dsval!=DS_OK)
+ {
+ MessageBox(hWMain,"DirectSoundCreate!","Error",MB_OK);
+ return;
+ }
+
+ if(DS_OK!=IDirectSound_SetCooperativeLevel(lpDS,hWMain, DSSCL_PRIORITY))
+ {
+ if(DS_OK!=IDirectSound_SetCooperativeLevel(lpDS,hWMain, DSSCL_NORMAL))
+ {
+ MessageBox(hWMain,"SetCooperativeLevel!","Error",MB_OK);
+ return;
+ }
+ }
+
+ memset(&dsbd,0,sizeof(DSBUFFERDESC));
+ dsbd.dwSize = 20; // NT4 hack! sizeof(dsbd);
+ dsbd.dwFlags = DSBCAPS_PRIMARYBUFFER;
+ dsbd.dwBufferBytes = 0;
+ dsbd.lpwfxFormat = NULL;
+
+ dsval=IDirectSound_CreateSoundBuffer(lpDS,&dsbd,&lpDSBP,NULL);
+ if(dsval!=DS_OK)
+ {
+ MessageBox(hWMain, "CreateSoundBuffer (Primary)", "Error",MB_OK);
+ return;
+ }
+
+ memset(&pcmwf, 0, sizeof(WAVEFORMATEX));
+ pcmwf.wFormatTag = WAVE_FORMAT_PCM;
+
+ if(iDisStereo) {pcmwf.nChannels = 1; pcmwf.nBlockAlign = 2;}
+ else {pcmwf.nChannels = 2; pcmwf.nBlockAlign = 4;}
+
+ pcmwf.nSamplesPerSec = 44100;
+
+ pcmwf.nAvgBytesPerSec = pcmwf.nSamplesPerSec * pcmwf.nBlockAlign;
+ pcmwf.wBitsPerSample = 16;
+
+ dsval=IDirectSoundBuffer_SetFormat(lpDSBP,&pcmwf);
+ if(dsval!=DS_OK)
+ {
+ MessageBox(hWMain, "SetFormat!", "Error",MB_OK);
+ return;
+ }
+
+ dscaps.dwSize = sizeof(DSCAPS);
+ dsbcaps.dwSize = sizeof(DSBCAPS);
+ IDirectSound_GetCaps(lpDS,&dscaps);
+ IDirectSoundBuffer_GetCaps(lpDSBP,&dsbcaps);
+
+ memset(&dsbdesc, 0, sizeof(DSBUFFERDESC));
+ dsbdesc.dwSize = 20; // NT4 hack! sizeof(DSBUFFERDESC);
+ dsbdesc.dwFlags = DSBCAPS_LOCSOFTWARE | DSBCAPS_STICKYFOCUS | DSBCAPS_GETCURRENTPOSITION2;
+ dsbdesc.dwBufferBytes = SOUNDSIZE;
+ dsbdesc.lpwfxFormat = (LPWAVEFORMATEX)&pcmwf;
+
+ dsval=IDirectSound_CreateSoundBuffer(lpDS,&dsbdesc,&lpDSB,NULL);
+ if(dsval!=DS_OK)
+ {
+ MessageBox(hWMain,"CreateSoundBuffer (Secondary)", "Error",MB_OK);
+ return;
+ }
+
+ dsval=IDirectSoundBuffer_Play(lpDSBP,0,0,DSBPLAY_LOOPING);
+ if(dsval!=DS_OK)
+ {
+ MessageBox(hWMain,"Play (Primary)","Error",MB_OK);
+ return;
+ }
+
+ dsval=IDirectSoundBuffer_Play(lpDSB,0,0,DSBPLAY_LOOPING);
+ if(dsval!=DS_OK)
+ {
+ MessageBox(hWMain,"Play (Secondary)","Error",MB_OK);
+ return;
+ }
+}
+
+////////////////////////////////////////////////////////////////////////
+// REMOVE SOUND
+////////////////////////////////////////////////////////////////////////
+
+void RemoveSound(void)
+{
+ int iRes;
+
+ if(iDoRecord) RecordStop();
+
+ if(lpDSB!=NULL)
+ {
+ IDirectSoundBuffer_Stop(lpDSB);
+ iRes=IDirectSoundBuffer_Release(lpDSB);
+ // FF says such a loop is bad... Demo says it's good... Pete doesn't care
+ while(iRes!=0) iRes=IDirectSoundBuffer_Release(lpDSB);
+ lpDSB=NULL;
+ }
+
+ if(lpDSBP!=NULL)
+ {
+ IDirectSoundBuffer_Stop(lpDSBP);
+ iRes=IDirectSoundBuffer_Release(lpDSBP);
+ // FF says such a loop is bad... Demo says it's good... Pete doesn't care
+ while(iRes!=0) iRes=IDirectSoundBuffer_Release(lpDSBP);
+ lpDSBP=NULL;
+ }
+
+ if(lpDS!=NULL)
+ {
+ iRes=IDirectSound_Release(lpDS);
+ // FF says such a loop is bad... Demo says it's good... Pete doesn't care
+ while(iRes!=0) iRes=IDirectSound_Release(lpDS);
+ lpDS=NULL;
+ }
+
+}
+
+////////////////////////////////////////////////////////////////////////
+// GET BYTES BUFFERED
+////////////////////////////////////////////////////////////////////////
+
+unsigned long SoundGetBytesBuffered(void)
+{
+ unsigned long cplay,cwrite;
+
+ if(LastWrite==0xffffffff) return 0;
+
+ IDirectSoundBuffer_GetCurrentPosition(lpDSB,&cplay,&cwrite);
+
+ if(cplay>SOUNDSIZE) return SOUNDSIZE;
+
+ if(cplay<LastWrite) return LastWrite-cplay;
+ return (SOUNDSIZE-cplay)+LastWrite;
+}
+
+////////////////////////////////////////////////////////////////////////
+// FEED SOUND DATA
+////////////////////////////////////////////////////////////////////////
+
+void SoundFeedStreamData(unsigned char* pSound,long lBytes)
+{
+ LPVOID lpvPtr1, lpvPtr2;
+ unsigned long dwBytes1,dwBytes2;
+ unsigned long *lpSS, *lpSD;
+ unsigned long dw,cplay,cwrite;
+ HRESULT hr;
+ unsigned long status;
+
+ if(iDoRecord) RecordBuffer(pSound,lBytes);
+
+ IDirectSoundBuffer_GetStatus(lpDSB,&status);
+ if(status&DSBSTATUS_BUFFERLOST)
+ {
+ if(IDirectSoundBuffer_Restore(lpDSB)!=DS_OK) return;
+ IDirectSoundBuffer_Play(lpDSB,0,0,DSBPLAY_LOOPING);
+ }
+
+ IDirectSoundBuffer_GetCurrentPosition(lpDSB,&cplay,&cwrite);
+
+ if(LastWrite==0xffffffff) LastWrite=cwrite;
+
+/*
+// mmm... security... not needed, I think
+ if(LastWrite<cplay)
+ {
+ if((cplay-LastWrite)<=(unsigned long)lBytes)
+ {
+ LastWrite=0xffffffff;
+ return;
+ }
+ }
+ else
+ {
+ if(LastWrite<cwrite)
+ {
+ LastWrite=0xffffffff;
+ return;
+ }
+ }
+*/
+
+ hr=IDirectSoundBuffer_Lock(lpDSB,LastWrite,lBytes,
+ &lpvPtr1, &dwBytes1,
+ &lpvPtr2, &dwBytes2,
+ 0);
+
+ if(hr!=DS_OK) {LastWrite=0xffffffff;return;}
+
+ lpSD=(unsigned long *)lpvPtr1;
+ dw=dwBytes1>>2;
+
+ lpSS=(unsigned long *)pSound;
+ while(dw) {*lpSD++=*lpSS++;dw--;}
+
+ if(lpvPtr2)
+ {
+ lpSD=(unsigned long *)lpvPtr2;
+ dw=dwBytes2>>2;
+ while(dw) {*lpSD++=*lpSS++;dw--;}
+ }
+
+ IDirectSoundBuffer_Unlock(lpDSB,lpvPtr1,dwBytes1,lpvPtr2,dwBytes2);
+
+ LastWrite+=lBytes;
+ if(LastWrite>=SOUNDSIZE) LastWrite-=SOUNDSIZE;
+ LastPlay=cplay;
+}
+
+#endif
+
+
+
diff --git a/win32/plugins/dfsound/winsrc/psemu.c b/win32/plugins/dfsound/winsrc/psemu.c
new file mode 100644
index 00000000..1451ea4a
--- /dev/null
+++ b/win32/plugins/dfsound/winsrc/psemu.c
@@ -0,0 +1,101 @@
+/***************************************************************************
+ psemu.c - description
+ -------------------
+ begin : Wed May 15 2002
+ copyright : (C) 2002 by Pete Bernert
+ email : BlackDove@addcom.de
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * This program 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. See also the license.txt file for *
+ * additional informations. *
+ * *
+ ***************************************************************************/
+
+// These ancient stuff are still necessary for epsxe, so keep these but only for
+// Windows port -Whistler
+
+#include "stdafx.h"
+
+#define _IN_PSEMU
+
+#include "externals.h"
+#include "regs.h"
+#include "dma.h"
+
+////////////////////////////////////////////////////////////////////////
+// OLD, SOMEWHAT (BUT NOT MUCH) SUPPORTED PSEMUPRO FUNCS
+////////////////////////////////////////////////////////////////////////
+
+unsigned short CALLBACK SPUgetOne(unsigned long val)
+{
+ if(spuAddr!=0xffffffff)
+ {
+ return SPUreadDMA();
+ }
+ if(val>=512*1024) val=512*1024-1;
+ return spuMem[val>>1];
+}
+
+void CALLBACK SPUputOne(unsigned long val,unsigned short data)
+{
+ if(spuAddr!=0xffffffff)
+ {
+ SPUwriteDMA(data);
+ return;
+ }
+ if(val>=512*1024) val=512*1024-1;
+ spuMem[val>>1] = data;
+}
+
+void CALLBACK SPUplaySample(unsigned char ch)
+{
+}
+
+void CALLBACK SPUsetAddr(unsigned char ch, unsigned short waddr)
+{
+ s_chan[ch].pStart=spuMemC+((unsigned long) waddr<<3);
+}
+
+void CALLBACK SPUsetPitch(unsigned char ch, unsigned short pitch)
+{
+ SetPitch(ch,pitch);
+}
+
+void CALLBACK SPUsetVolumeL(unsigned char ch, short vol)
+{
+ SetVolumeR(ch,vol);
+}
+
+void CALLBACK SPUsetVolumeR(unsigned char ch, short vol)
+{
+ SetVolumeL(ch,vol);
+}
+
+void CALLBACK SPUstartChannels1(unsigned short channels)
+{
+ SoundOn(0,16,channels);
+}
+
+void CALLBACK SPUstartChannels2(unsigned short channels)
+{
+ SoundOn(16,24,channels);
+}
+
+void CALLBACK SPUstopChannels1(unsigned short channels)
+{
+ SoundOff(0,16,channels);
+}
+
+void CALLBACK SPUstopChannels2(unsigned short channels)
+{
+ SoundOff(16,24,channels);
+}
+
+void CALLBACK SPUplaySector(unsigned long mode, unsigned char * p)
+{
+}
diff --git a/win32/plugins/dfsound/winsrc/record.c b/win32/plugins/dfsound/winsrc/record.c
new file mode 100644
index 00000000..93c10b00
--- /dev/null
+++ b/win32/plugins/dfsound/winsrc/record.c
@@ -0,0 +1,188 @@
+/***************************************************************************
+ spu.c - description
+ -------------------
+ begin : Sun Jan 12 2003
+ copyright : (C) 2003 by Pete Bernert
+ email : BlackDove@addcom.de
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * This program 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. See also the license.txt file for *
+ * additional informations. *
+ * *
+ ***************************************************************************/
+
+//*************************************************************************//
+// History of changes:
+//
+// 2003/03/01 - Pete
+// - added mono mode
+//
+// 2003/01/12 - Pete
+// - added recording funcs (win version only)
+//
+//*************************************************************************//
+
+#include "stdafx.h"
+
+#ifdef _WINDOWS
+
+#include <mmsystem.h>
+#include "resource.h"
+#include "externals.h"
+
+#define _IN_RECORD
+
+#include "record.h"
+
+////////////////////////////////////////////////////////////////////////
+
+int iDoRecord=0;
+HMMIO hWaveFile=NULL;
+MMCKINFO mmckMain;
+MMCKINFO mmckData;
+char szFileName[256];
+
+////////////////////////////////////////////////////////////////////////
+
+void RecordStart()
+{
+ WAVEFORMATEX pcmwf;
+
+ // setup header in the same format as our directsound stream
+ memset(&pcmwf,0,sizeof(WAVEFORMATEX));
+ pcmwf.wFormatTag = WAVE_FORMAT_PCM;
+
+ if(iDisStereo)
+ {
+ pcmwf.nChannels = 1;
+ pcmwf.nBlockAlign = 2;
+ }
+ else
+ {
+ pcmwf.nChannels = 2;
+ pcmwf.nBlockAlign = 4;
+ }
+
+ pcmwf.nSamplesPerSec = 44100;
+ pcmwf.nAvgBytesPerSec = pcmwf.nSamplesPerSec * pcmwf.nBlockAlign;
+ pcmwf.wBitsPerSample = 16;
+
+ // create file
+ hWaveFile=mmioOpen(szFileName,NULL,MMIO_CREATE|MMIO_WRITE|MMIO_EXCLUSIVE | MMIO_ALLOCBUF);
+ if(!hWaveFile) return;
+
+ // setup WAVE, fmt and data chunks
+ memset(&mmckMain,0,sizeof(MMCKINFO));
+ mmckMain.fccType = mmioFOURCC('W','A','V','E');
+
+ mmioCreateChunk(hWaveFile,&mmckMain,MMIO_CREATERIFF);
+
+ memset(&mmckData,0,sizeof(MMCKINFO));
+ mmckData.ckid = mmioFOURCC('f','m','t',' ');
+ mmckData.cksize = sizeof(WAVEFORMATEX);
+
+ mmioCreateChunk(hWaveFile,&mmckData,0);
+ mmioWrite(hWaveFile,(char*)&pcmwf,sizeof(WAVEFORMATEX));
+ mmioAscend(hWaveFile,&mmckData,0);
+
+ mmckData.ckid = mmioFOURCC('d','a','t','a');
+ mmioCreateChunk(hWaveFile,&mmckData,0);
+}
+
+////////////////////////////////////////////////////////////////////////
+
+void RecordStop()
+{
+ // first some check, if recording is running
+ iDoRecord=0;
+ if(!hWaveFile) return;
+
+ // now finish writing & close the wave file
+ mmioAscend(hWaveFile,&mmckData,0);
+ mmioAscend(hWaveFile,&mmckMain,0);
+ mmioClose(hWaveFile,0);
+
+ // init var
+ hWaveFile=NULL;
+}
+
+////////////////////////////////////////////////////////////////////////
+
+void RecordBuffer(unsigned char* pSound,long lBytes)
+{
+ // write the samples
+ if(hWaveFile) mmioWrite(hWaveFile,pSound,lBytes);
+}
+
+////////////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////////
+
+BOOL CALLBACK RecordDlgProc(HWND hW, UINT uMsg, WPARAM wParam, LPARAM lParam)
+{
+ switch(uMsg)
+ {
+ //--------------------------------------------------// init
+ case WM_INITDIALOG:
+ {
+ SetDlgItemText(hW,IDC_WAVFILE,"C:\\PEOPS.WAV"); // init filename edit
+ ShowCursor(TRUE); // mmm... who is hiding it? main emu? tsts
+ return TRUE;
+ }
+ //--------------------------------------------------// destroy
+ case WM_DESTROY:
+ {
+ RecordStop();
+ }break;
+ //--------------------------------------------------// command
+ case WM_COMMAND:
+ {
+ if(wParam==IDCANCEL) iRecordMode=2; // cancel? raise flag for destroying the dialog
+
+ if(wParam==IDC_RECORD) // record start/stop?
+ {
+ if(IsWindowEnabled(GetDlgItem(hW,IDC_WAVFILE))) // not started yet (edit is not disabled):
+ {
+ GetDlgItemText(hW,IDC_WAVFILE,szFileName,255);// get filename
+
+ RecordStart(); // start recording
+
+ if(hWaveFile) // start was ok?
+ { // -> disable filename edit, change text, raise flag
+ EnableWindow(GetDlgItem(hW,IDC_WAVFILE),FALSE);
+ SetDlgItemText(hW,IDC_RECORD,"Stop recording");
+ iDoRecord=1;
+ }
+ else MessageBeep(0xFFFFFFFF); // error starting recording? BEEP
+ }
+ else // stop recording?
+ {
+ RecordStop(); // -> just do it
+ EnableWindow(GetDlgItem(hW,IDC_WAVFILE),TRUE);// -> enable filename edit again
+ SetDlgItemText(hW,IDC_RECORD,"Start recording");
+ }
+ SetFocus(hWMain);
+ }
+ }break;
+ //--------------------------------------------------// size
+ case WM_SIZE:
+ if(wParam==SIZE_MINIMIZED) SetFocus(hWMain); // if we get minimized, set the foxus to the main window
+ break;
+ //--------------------------------------------------// setcursor
+ case WM_SETCURSOR:
+ {
+ SetCursor(LoadCursor(NULL,IDC_ARROW)); // force the arrow
+ return TRUE;
+ }
+ //--------------------------------------------------//
+ }
+ return FALSE;
+}
+
+////////////////////////////////////////////////////////////////////////
+#endif
diff --git a/win32/plugins/dfsound/winsrc/record.h b/win32/plugins/dfsound/winsrc/record.h
new file mode 100644
index 00000000..7614e327
--- /dev/null
+++ b/win32/plugins/dfsound/winsrc/record.h
@@ -0,0 +1,11 @@
+#ifndef _RECORD_H_
+#define _RECORD_H_
+
+#ifdef _WINDOWS
+void RecordStart();
+void RecordBuffer(unsigned char* pSound,long lBytes);
+void RecordStop();
+BOOL CALLBACK RecordDlgProc(HWND hW, UINT uMsg, WPARAM wParam, LPARAM lParam);
+#endif
+
+#endif \ No newline at end of file
diff --git a/win32/plugins/dfsound/winsrc/resource.h b/win32/plugins/dfsound/winsrc/resource.h
new file mode 100644
index 00000000..64120918
--- /dev/null
+++ b/win32/plugins/dfsound/winsrc/resource.h
@@ -0,0 +1,148 @@
+//{{NO_DEPENDENCIES}}
+// Microsoft Developer Studio generated include file.
+// Used by DFSound.rc
+//
+#define IDC_SETS1 3
+#define IDC_SETS2 4
+#define IDOK2 5
+#define IDD_DIALOG1 130
+#define IDD_ABOUT 130
+#define IDD_CFGDLG 131
+#define IDD_DEBUG 135
+#define IDB_BITMAP1 136
+#define IDB_BITMAP2 137
+#define IDB_BITMAP3 138
+#define IDB_BITMAP4 139
+#define IDB_BITMAP5 140
+#define IDD_RECORD 141
+#define IDC_XAVOLUME 1004
+#define IDC_ENABXA 1005
+#define IDC_XAPITCH 1006
+#define IDC_XABLOCK 1007
+#define IDC_USETIMER 1007
+#define IDC_CMIXRATE 1008
+#define IDC_USEIRQ 1008
+#define IDC_USEREVERB 1008
+#define IDC_CMODE 1009
+#define IDC_VOLUME 1009
+#define IDC_CFILTER 1010
+#define IDC_IRQWAIT 1010
+#define IDC_CQUALITY 1011
+#define IDC_DEBUGMODE 1011
+#define IDC_CDSOUND 1012
+#define IDC_INTERPOL 1012
+#define IDC_PLAYALWAYS 1013
+#define IDC_RECORDMODE 1013
+#define IDC_IGNOREPITCH 1014
+#define IDC_DISSTEREO 1014
+#define IDC_AMPLIF 1015
+#define IDC_IRQDECODE 1015
+#define IDC_VENVELOPE 1016
+#define IDC_VOL1 1016
+#define IDC_REVERB 1017
+#define IDC_VOL2 1017
+#define IDC_VOL3 1018
+#define IDC_VOL4 1019
+#define IDC_SAREA 1022
+#define IDC_ADSR 1023
+#define IDC_MUTE1 1047
+#define IDC_MUTE2 1048
+#define IDC_MUTE3 1049
+#define IDC_MUTE4 1050
+#define IDC_MUTE5 1051
+#define IDC_MUTE6 1052
+#define IDC_MUTE7 1053
+#define IDC_MUTE8 1054
+#define IDC_MUTE9 1055
+#define IDC_MUTE10 1056
+#define IDC_MUTE11 1057
+#define IDC_MUTE12 1058
+#define IDC_MUTE13 1059
+#define IDC_MUTE14 1060
+#define IDC_MUTE15 1061
+#define IDC_MUTE16 1062
+#define IDC_MUTE17 1063
+#define IDC_MUTE18 1064
+#define IDC_MUTE19 1065
+#define IDC_MUTE20 1066
+#define IDC_MUTE21 1067
+#define IDC_MUTE22 1068
+#define IDC_MUTE23 1069
+#define IDC_MUTE24 1070
+#define IDC_CHAN1 1071
+#define IDC_CHAN2 1072
+#define IDC_CHAN3 1073
+#define IDC_CHAN4 1074
+#define IDC_CHAN5 1075
+#define IDC_CHAN6 1076
+#define IDC_CHAN7 1077
+#define IDC_CHAN8 1078
+#define IDC_CHAN9 1079
+#define IDC_CHAN10 1080
+#define IDC_CHAN11 1081
+#define IDC_CHAN12 1082
+#define IDC_CHAN13 1083
+#define IDC_CHAN14 1084
+#define IDC_CHAN15 1085
+#define IDC_CHAN16 1086
+#define IDC_CHAN17 1087
+#define IDC_CHAN18 1088
+#define IDC_CHAN19 1089
+#define IDC_CHAN20 1090
+#define IDC_CHAN21 1091
+#define IDC_CHAN22 1092
+#define IDC_CHAN23 1093
+#define IDC_CHAN24 1094
+#define IDC_SADSR1 1096
+#define IDC_SADSR2 1097
+#define IDC_SADSR3 1098
+#define IDC_SADSR4 1099
+#define IDC_SADSR5 1100
+#define IDC_SADSR6 1101
+#define IDC_CHANNUM 1102
+#define IDC_MUTEOFF 1103
+#define IDC_MUTEON 1104
+#define IDC_SADSR7 1105
+#define IDC_CI1 1106
+#define IDC_CI2 1107
+#define IDC_CI3 1108
+#define IDC_CI4 1109
+#define IDC_CI5 1110
+#define IDC_CI6 1111
+#define IDC_CI7 1112
+#define IDC_CI8 1113
+#define IDC_CI9 1114
+#define IDC_CI10 1115
+#define IDC_CI11 1116
+#define IDC_CI12 1117
+#define IDC_CI13 1118
+#define IDC_CI14 1119
+#define IDC_CI15 1120
+#define IDC_CI16 1121
+#define IDC_STA1 1122
+#define IDC_SADSR8 1123
+#define IDC_STA2 1124
+#define IDC_STA3 1125
+#define IDC_STA4 1126
+#define IDC_XA1 1127
+#define IDC_XA2 1128
+#define IDC_XA3 1129
+#define IDC_XA4 1130
+#define IDC_CI17 1131
+#define IDC_CI18 1132
+#define IDC_XA 1133
+#define IDC_WAVFILE 1134
+#define IDC_XA5 1135
+#define IDC_RECORD 1135
+#define IDC_XA6 1136
+
+// Next default values for new objects
+//
+#ifdef APSTUDIO_INVOKED
+#ifndef APSTUDIO_READONLY_SYMBOLS
+#define _APS_NEXT_RESOURCE_VALUE 144
+#define _APS_NEXT_COMMAND_VALUE 32771
+#define _APS_NEXT_CONTROL_VALUE 1136
+#define _APS_NEXT_SYMED_VALUE 101
+#endif
+#endif
diff --git a/win32/plugins/dfsound/winsrc/winmain.c b/win32/plugins/dfsound/winsrc/winmain.c
new file mode 100644
index 00000000..fb57bf6e
--- /dev/null
+++ b/win32/plugins/dfsound/winsrc/winmain.c
@@ -0,0 +1,34 @@
+/***************************************************************************
+ spuPeopsSound.c - description
+ -------------------
+ begin : Wed May 15 2002
+ copyright : (C) 2002 by Pete Bernert
+ email : BlackDove@addcom.de
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * This program 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. See also the license.txt file for *
+ * additional informations. *
+ * *
+ ***************************************************************************/
+
+// winmain.c : Defines the entry point for the DLL application.
+//
+
+#include "stdafx.h"
+
+HINSTANCE hInst = NULL;
+
+BOOL APIENTRY DllMain( HANDLE hModule,
+ DWORD ul_reason_for_call,
+ LPVOID lpReserved
+ )
+{
+ hInst=(HINSTANCE)hModule;
+ return TRUE;
+}
+