Initial commit: ROW Client source code

Game client codebase including:
- CharacterActionControl: Character and creature management
- GlobalScript: Network, items, skills, quests, utilities
- RYLClient: Main client application with GUI and event handlers
- Engine: 3D rendering engine (RYLGL)
- MemoryManager: Custom memory allocation
- Library: Third-party dependencies (DirectX, boost, etc.)
- Tools: Development utilities

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
2025-11-29 16:24:34 +09:00
commit e067522598
5135 changed files with 1745744 additions and 0 deletions

View File

@@ -0,0 +1,318 @@
VERSION 5.00
Object = "{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.0#0"; "MSCOMCTL.OCX"
Begin VB.Form frmChorus
BorderStyle = 4 'Fixed ToolWindow
Caption = "Chorus Effects Update"
ClientHeight = 4440
ClientLeft = 45
ClientTop = 285
ClientWidth = 2775
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 4440
ScaleWidth = 2775
ShowInTaskbar = 0 'False
StartUpPosition = 1 'CenterOwner
Begin VB.CommandButton cmdOK
Caption = "OK"
Height = 315
Left = 1800
TabIndex = 15
Top = 4020
Width = 915
End
Begin VB.OptionButton optSin
Caption = "Sine"
Height = 255
Left = 120
TabIndex = 11
Top = 3600
Width = 915
End
Begin VB.OptionButton optTriangle
Caption = "Triangle"
Height = 255
Left = 1680
TabIndex = 10
Top = 3600
Width = 915
End
Begin MSComctlLib.Slider sldFeedback
Height = 195
Left = 60
TabIndex = 0
Top = 360
Width = 2655
_ExtentX = 4683
_ExtentY = 344
_Version = 393216
LargeChange = 10
Min = -99
Max = 99
SelStart = 1
TickFrequency = 10
Value = 1
End
Begin MSComctlLib.Slider sldDelay
Height = 195
Left = 60
TabIndex = 1
Top = 900
Width = 2655
_ExtentX = 4683
_ExtentY = 344
_Version = 393216
Max = 20
TickFrequency = 2
End
Begin MSComctlLib.Slider sldDepth
Height = 195
Left = 60
TabIndex = 2
Top = 1440
Width = 2655
_ExtentX = 4683
_ExtentY = 344
_Version = 393216
Max = 100
TickFrequency = 10
End
Begin MSComctlLib.Slider sldFreq
Height = 195
Left = 60
TabIndex = 3
Top = 1980
Width = 2655
_ExtentX = 4683
_ExtentY = 344
_Version = 393216
TickFrequency = 2
End
Begin MSComctlLib.Slider sldPhase
Height = 195
Left = 60
TabIndex = 8
Top = 2520
Width = 2655
_ExtentX = 4683
_ExtentY = 344
_Version = 393216
LargeChange = 2
Max = 4
End
Begin MSComctlLib.Slider sldWetDry
Height = 195
Left = 60
TabIndex = 13
Top = 3060
Width = 2655
_ExtentX = 4683
_ExtentY = 344
_Version = 393216
LargeChange = 10
SmallChange = 5
Max = 100
SelStart = 1
TickFrequency = 10
Value = 1
End
Begin VB.Label lbl
BackStyle = 0 'Transparent
Caption = "Wet Dry Mix"
Height = 255
Index = 6
Left = 60
TabIndex = 14
Top = 2820
Width = 1035
End
Begin VB.Label lbl
BackStyle = 0 'Transparent
Caption = "Wave Form"
Height = 255
Index = 5
Left = 60
TabIndex = 12
Top = 3360
Width = 915
End
Begin VB.Label lbl
BackStyle = 0 'Transparent
Caption = "Phase"
Height = 255
Index = 2
Left = 60
TabIndex = 9
Top = 2280
Width = 1035
End
Begin VB.Label lbl
BackStyle = 0 'Transparent
Caption = "Feedback"
Height = 255
Index = 1
Left = 60
TabIndex = 7
Top = 120
Width = 735
End
Begin VB.Label lbl
BackStyle = 0 'Transparent
Caption = "Delay"
Height = 255
Index = 0
Left = 60
TabIndex = 6
Top = 660
Width = 735
End
Begin VB.Label lbl
BackStyle = 0 'Transparent
Caption = "Depth"
Height = 255
Index = 3
Left = 60
TabIndex = 5
Top = 1200
Width = 1035
End
Begin VB.Label lbl
BackStyle = 0 'Transparent
Caption = "Frequency"
Height = 255
Index = 4
Left = 60
TabIndex = 4
Top = 1740
Width = 1035
End
End
Attribute VB_Name = "frmChorus"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
'
' Copyright (C) 1999-2001 Microsoft Corporation. All Rights Reserved.
'
' File: frmChorus.frm
'
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
Private oBuffer As DirectSoundSecondaryBuffer8
Private mlIndex As Long
Private oFX As DirectSoundFXChorus8
Private Sub SaveAllSettings()
Dim fxNew As DSFXCHORUS
'Ok, save these new settings
'Set the new information up
With fxNew
.fFeedback = CSng(sldFeedback.Value)
.fDelay = CSng(sldDelay.Value)
.fDepth = CSng(sldDepth.Value)
.fWetDryMix = CSng(sldWetDry.Value)
.fFrequency = CSng(sldFreq.Value)
.lPhase = sldPhase.Value
If optSin.Value Then
.lWaveform = DSFX_WAVE_SIN
ElseIf optTriangle.Value Then
.lWaveform = DSFX_WAVE_TRIANGLE
End If
End With
'Now update the effect
oFX.SetAllParameters fxNew
End Sub
Private Sub cmdOK_Click()
SaveAllSettings
Unload Me
End Sub
Private Sub Form_Load()
Dim fxCurrent As DSFXCHORUS
'Get the echo interface
Set oFX = oBuffer.GetObjectinPath(DSFX_STANDARD_CHORUS, mlIndex, IID_DirectSoundFXChorus)
'Get the current settings from it
fxCurrent = oFX.GetAllParameters
'Now put them out there
With fxCurrent
sldFeedback.Value = CLng(.fFeedback)
sldDelay.Value = CLng(.fDelay)
sldDepth.Value = CLng(.fDepth)
sldWetDry.Value = CLng(.fWetDryMix)
sldFreq.Value = CLng(.fFrequency)
sldPhase.Value = .lPhase
If .lWaveform = DSFX_WAVE_SIN Then
optSin.Value = True
ElseIf .lWaveform = DSFX_WAVE_TRIANGLE Then
optTriangle.Value = True
End If
End With
End Sub
Public Sub SetBuffer(oBuf As DirectSoundSecondaryBuffer8, Index As Long)
'Store the buffer and index
Set oBuffer = oBuf
mlIndex = Index
End Sub
Private Sub optSin_Click()
SaveAllSettings
End Sub
Private Sub optTriangle_Click()
SaveAllSettings
End Sub
Private Sub sldDelay_Change()
SaveAllSettings
End Sub
Private Sub sldDelay_Scroll()
SaveAllSettings
End Sub
Private Sub sldDepth_Change()
SaveAllSettings
End Sub
Private Sub sldDepth_Scroll()
SaveAllSettings
End Sub
Private Sub sldFeedback_Change()
SaveAllSettings
End Sub
Private Sub sldFeedback_Scroll()
SaveAllSettings
End Sub
Private Sub sldFreq_Change()
SaveAllSettings
End Sub
Private Sub sldFreq_Scroll()
SaveAllSettings
End Sub
Private Sub sldPhase_Change()
SaveAllSettings
End Sub
Private Sub sldPhase_Scroll()
SaveAllSettings
End Sub
Private Sub sldWetDry_Change()
SaveAllSettings
End Sub
Private Sub sldWetDry_Scroll()
SaveAllSettings
End Sub

View File

@@ -0,0 +1,286 @@
VERSION 5.00
Object = "{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.0#0"; "MSCOMCTL.OCX"
Begin VB.Form frmCompressor
BorderStyle = 4 'Fixed ToolWindow
Caption = "Compressor Effects Update"
ClientHeight = 2145
ClientLeft = 45
ClientTop = 285
ClientWidth = 5550
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 2145
ScaleWidth = 5550
ShowInTaskbar = 0 'False
StartUpPosition = 1 'CenterOwner
Begin VB.CommandButton cmdOK
Caption = "OK"
Height = 315
Left = 4560
TabIndex = 12
Top = 1680
Width = 915
End
Begin MSComctlLib.Slider sldAttack
Height = 195
Left = 60
TabIndex = 0
Top = 300
Width = 2655
_ExtentX = 4683
_ExtentY = 344
_Version = 393216
LargeChange = 10
SmallChange = 5
Min = 1
Max = 500
SelStart = 1
TickFrequency = 33
Value = 1
End
Begin MSComctlLib.Slider sldOutputGain
Height = 195
Left = 60
TabIndex = 1
Top = 840
Width = 2655
_ExtentX = 4683
_ExtentY = 344
_Version = 393216
LargeChange = 10
SmallChange = 2
Min = -60
Max = 60
TickFrequency = 10
End
Begin MSComctlLib.Slider sldDelay
Height = 195
Left = 60
TabIndex = 2
Top = 1380
Width = 2655
_ExtentX = 4683
_ExtentY = 344
_Version = 393216
LargeChange = 1
Max = 4
End
Begin MSComctlLib.Slider sldRatio
Height = 195
Left = 2820
TabIndex = 3
Top = 840
Width = 2655
_ExtentX = 4683
_ExtentY = 344
_Version = 393216
LargeChange = 10
Min = 1
Max = 100
SelStart = 1
TickFrequency = 10
Value = 1
End
Begin MSComctlLib.Slider sldRelease
Height = 195
Left = 2835
TabIndex = 4
Top = 1365
Width = 2655
_ExtentX = 4683
_ExtentY = 344
_Version = 393216
LargeChange = 10
SmallChange = 5
Min = 50
Max = 3000
SelStart = 50
TickFrequency = 100
Value = 50
End
Begin MSComctlLib.Slider sldThreshold
Height = 195
Left = 2820
TabIndex = 10
Top = 300
Width = 2655
_ExtentX = 4683
_ExtentY = 344
_Version = 393216
LargeChange = 10
Min = -60
Max = 0
TickFrequency = 5
End
Begin VB.Label lbl
BackStyle = 0 'Transparent
Caption = "Threshold"
Height = 255
Index = 8
Left = 2820
TabIndex = 11
Top = 60
Width = 735
End
Begin VB.Label lbl
BackStyle = 0 'Transparent
Caption = "Ratio"
Height = 255
Index = 4
Left = 2820
TabIndex = 9
Top = 600
Width = 1035
End
Begin VB.Label lbl
BackStyle = 0 'Transparent
Caption = "Pre-Delay"
Height = 255
Index = 3
Left = 60
TabIndex = 8
Top = 1140
Width = 1035
End
Begin VB.Label lbl
BackStyle = 0 'Transparent
Caption = "Gain"
Height = 255
Index = 0
Left = 60
TabIndex = 7
Top = 600
Width = 1215
End
Begin VB.Label lbl
BackStyle = 0 'Transparent
Caption = "Attack"
Height = 255
Index = 1
Left = 60
TabIndex = 6
Top = 60
Width = 735
End
Begin VB.Label lbl
BackStyle = 0 'Transparent
Caption = "Release"
Height = 255
Index = 2
Left = 2835
TabIndex = 5
Top = 1125
Width = 1035
End
End
Attribute VB_Name = "frmCompressor"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
'
' Copyright (C) 1999-2001 Microsoft Corporation. All Rights Reserved.
'
' File: frmCompressor.frm
'
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
Private oBuffer As DirectSoundSecondaryBuffer8
Private mlIndex As Long
Private oFX As DirectSoundFXCompressor8
Private Sub SaveAllSettings()
Dim fxNew As DSFXCOMPRESSOR
'Ok, save these new settings
'Set the new information up
With fxNew
.fAttack = CSng(sldAttack.Value)
.fGain = CSng(sldOutputGain.Value)
.fPredelay = CSng(sldDelay.Value)
.fRatio = CSng(sldRatio.Value)
.fRelease = CSng(sldRelease.Value)
.fThreshold = CSng(sldThreshold.Value)
End With
'Now update the effect
oFX.SetAllParameters fxNew
End Sub
Private Sub cmdOK_Click()
SaveAllSettings
Unload Me
End Sub
Private Sub Form_Load()
Dim fxCurrent As DSFXCOMPRESSOR
'Get the echo interface
Set oFX = oBuffer.GetObjectinPath(DSFX_STANDARD_COMPRESSOR, mlIndex, IID_DirectSoundFXCompressor)
'Get the current settings from it
fxCurrent = oFX.GetAllParameters
'Now put them out there
With fxCurrent
sldAttack.Value = CLng(.fAttack)
sldOutputGain.Value = CLng(.fGain)
sldDelay.Value = CLng(.fPredelay)
sldRatio.Value = CLng(.fRatio)
sldRelease.Value = CLng(.fRelease)
sldThreshold.Value = CLng(.fThreshold)
End With
End Sub
Public Sub SetBuffer(oBuf As DirectSoundSecondaryBuffer8, Index As Long)
'Store the buffer and index
Set oBuffer = oBuf
mlIndex = Index
End Sub
Private Sub sldAttack_Change()
SaveAllSettings
End Sub
Private Sub sldAttack_Scroll()
SaveAllSettings
End Sub
Private Sub sldDelay_Change()
SaveAllSettings
End Sub
Private Sub sldDelay_Scroll()
SaveAllSettings
End Sub
Private Sub sldOutputGain_Change()
SaveAllSettings
End Sub
Private Sub sldOutputGain_Scroll()
SaveAllSettings
End Sub
Private Sub sldRatio_Change()
SaveAllSettings
End Sub
Private Sub sldRatio_Scroll()
SaveAllSettings
End Sub
Private Sub sldRelease_Change()
SaveAllSettings
End Sub
Private Sub sldRelease_Scroll()
SaveAllSettings
End Sub
Private Sub sldThreshold_Change()
SaveAllSettings
End Sub
Private Sub sldThreshold_Scroll()
SaveAllSettings
End Sub

View File

@@ -0,0 +1,254 @@
VERSION 5.00
Object = "{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.0#0"; "MSCOMCTL.OCX"
Begin VB.Form frmDistortion
BorderStyle = 4 'Fixed ToolWindow
Caption = "Distortion Effects Update"
ClientHeight = 3240
ClientLeft = 45
ClientTop = 285
ClientWidth = 2775
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 3240
ScaleWidth = 2775
ShowInTaskbar = 0 'False
StartUpPosition = 1 'CenterOwner
Begin VB.CommandButton cmdOK
Caption = "OK"
Height = 315
Left = 1800
TabIndex = 10
Top = 2820
Width = 915
End
Begin MSComctlLib.Slider sldGain
Height = 195
Left = 60
TabIndex = 0
Top = 300
Width = 2655
_ExtentX = 4683
_ExtentY = 344
_Version = 393216
LargeChange = 10
Min = -60
Max = 0
TickFrequency = 5
End
Begin MSComctlLib.Slider sldEdge
Height = 195
Left = 60
TabIndex = 1
Top = 840
Width = 2655
_ExtentX = 4683
_ExtentY = 344
_Version = 393216
LargeChange = 10
Max = 100
TickFrequency = 5
End
Begin MSComctlLib.Slider sldPostEQCenter
Height = 195
Left = 60
TabIndex = 2
Top = 1380
Width = 2655
_ExtentX = 4683
_ExtentY = 344
_Version = 393216
LargeChange = 500
SmallChange = 100
Min = 100
Max = 8000
SelStart = 100
TickFrequency = 500
Value = 100
End
Begin MSComctlLib.Slider sldPostEQBand
Height = 195
Left = 60
TabIndex = 3
Top = 1920
Width = 2655
_ExtentX = 4683
_ExtentY = 344
_Version = 393216
LargeChange = 500
SmallChange = 100
Min = 100
Max = 8000
SelStart = 100
TickFrequency = 500
Value = 100
End
Begin MSComctlLib.Slider sldPreLow
Height = 195
Left = 60
TabIndex = 4
Top = 2460
Width = 2655
_ExtentX = 4683
_ExtentY = 344
_Version = 393216
LargeChange = 500
SmallChange = 100
Min = 100
Max = 8000
SelStart = 100
TickFrequency = 500
Value = 100
End
Begin VB.Label lbl
BackStyle = 0 'Transparent
Caption = "Post EQ Bandwith"
Height = 255
Index = 4
Left = 60
TabIndex = 9
Top = 1680
Width = 2055
End
Begin VB.Label lbl
BackStyle = 0 'Transparent
Caption = "Post EQ Center Frequency"
Height = 255
Index = 3
Left = 60
TabIndex = 8
Top = 1140
Width = 2475
End
Begin VB.Label lbl
BackStyle = 0 'Transparent
Caption = "Edge"
Height = 255
Index = 0
Left = 60
TabIndex = 7
Top = 600
Width = 735
End
Begin VB.Label lbl
BackStyle = 0 'Transparent
Caption = "Gain"
Height = 255
Index = 1
Left = 60
TabIndex = 6
Top = 60
Width = 735
End
Begin VB.Label lbl
BackStyle = 0 'Transparent
Caption = "Prelow Pass Cutoff"
Height = 255
Index = 2
Left = 60
TabIndex = 5
Top = 2220
Width = 2535
End
End
Attribute VB_Name = "frmDistortion"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
'
' Copyright (C) 1999-2001 Microsoft Corporation. All Rights Reserved.
'
' File: frmDistortion.frm
'
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
Private oBuffer As DirectSoundSecondaryBuffer8
Private mlIndex As Long
Private oFX As DirectSoundFXDistortion8
Private Sub SaveAllSettings()
Dim fxNew As DSFXDISTORTION
'Ok, save these new settings
'Set the new information up
With fxNew
.fEdge = CSng(sldEdge.Value)
.fGain = CSng(sldGain.Value)
.fPostEQBandwidth = CSng(sldPostEQBand.Value)
.fPostEQCenterFrequency = CSng(sldPostEQCenter.Value)
.fPreLowpassCutoff = CSng(sldPreLow.Value)
End With
'Now update the effect
oFX.SetAllParameters fxNew
End Sub
Private Sub cmdOK_Click()
SaveAllSettings
Unload Me
End Sub
Private Sub Form_Load()
Dim fxCurrent As DSFXDISTORTION
'Get the echo interface
Set oFX = oBuffer.GetObjectinPath(DSFX_STANDARD_DISTORTION, mlIndex, IID_DirectSoundFXDistortion)
'Get the current settings from it
fxCurrent = oFX.GetAllParameters
'Now put them out there
With fxCurrent
sldEdge.Value = CLng(.fEdge)
sldGain.Value = CLng(.fGain)
sldPostEQBand.Value = CLng(.fPostEQBandwidth)
sldPostEQCenter.Value = CLng(.fPostEQCenterFrequency)
sldPreLow.Value = CLng(.fPreLowpassCutoff)
End With
End Sub
Public Sub SetBuffer(oBuf As DirectSoundSecondaryBuffer8, Index As Long)
'Store the buffer and index
Set oBuffer = oBuf
mlIndex = Index
End Sub
Private Sub sldEdge_Change()
SaveAllSettings
End Sub
Private Sub sldEdge_Scroll()
SaveAllSettings
End Sub
Private Sub sldGain_Change()
SaveAllSettings
End Sub
Private Sub sldGain_Scroll()
SaveAllSettings
End Sub
Private Sub sldPostEQBand_Change()
SaveAllSettings
End Sub
Private Sub sldPostEQBand_Scroll()
SaveAllSettings
End Sub
Private Sub sldPostEQCenter_Change()
SaveAllSettings
End Sub
Private Sub sldPostEQCenter_Scroll()
SaveAllSettings
End Sub
Private Sub sldPreLow_Change()
SaveAllSettings
End Sub
Private Sub sldPreLow_Scroll()
SaveAllSettings
End Sub

View File

@@ -0,0 +1,235 @@
VERSION 5.00
Object = "{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.0#0"; "MSCOMCTL.OCX"
Begin VB.Form frmEcho
BorderStyle = 4 'Fixed ToolWindow
Caption = "Echo Effects Update"
ClientHeight = 3090
ClientLeft = 45
ClientTop = 285
ClientWidth = 2775
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 3090
ScaleWidth = 2775
ShowInTaskbar = 0 'False
StartUpPosition = 1 'CenterOwner
Begin VB.CheckBox chkPan
Caption = "Pan Delay Max"
Height = 195
Left = 120
TabIndex = 9
Top = 2340
Width = 2535
End
Begin VB.CommandButton cmdOK
Caption = "OK"
Height = 315
Left = 1800
TabIndex = 8
Top = 2700
Width = 915
End
Begin MSComctlLib.Slider sldFeedback
Height = 195
Left = 60
TabIndex = 0
Top = 360
Width = 2655
_ExtentX = 4683
_ExtentY = 344
_Version = 393216
LargeChange = 10
Max = 100
SelStart = 1
TickFrequency = 10
Value = 1
End
Begin MSComctlLib.Slider sldLeft
Height = 195
Left = 60
TabIndex = 2
Top = 900
Width = 2655
_ExtentX = 4683
_ExtentY = 344
_Version = 393216
LargeChange = 100
SmallChange = 10
Min = 1
Max = 2000
SelStart = 1
TickFrequency = 100
Value = 1
End
Begin MSComctlLib.Slider sldRight
Height = 195
Left = 60
TabIndex = 4
Top = 1440
Width = 2655
_ExtentX = 4683
_ExtentY = 344
_Version = 393216
LargeChange = 100
SmallChange = 10
Min = 1
Max = 2000
SelStart = 1
TickFrequency = 100
Value = 1
End
Begin MSComctlLib.Slider sldWetDry
Height = 195
Left = 60
TabIndex = 6
Top = 1980
Width = 2655
_ExtentX = 4683
_ExtentY = 344
_Version = 393216
LargeChange = 10
SmallChange = 5
Max = 100
SelStart = 1
TickFrequency = 10
Value = 1
End
Begin VB.Label lbl
BackStyle = 0 'Transparent
Caption = "Wet Dry Mix"
Height = 255
Index = 4
Left = 60
TabIndex = 7
Top = 1740
Width = 1035
End
Begin VB.Label lbl
BackStyle = 0 'Transparent
Caption = "Right Delay"
Height = 255
Index = 3
Left = 60
TabIndex = 5
Top = 1200
Width = 1035
End
Begin VB.Label lbl
BackStyle = 0 'Transparent
Caption = "Left Delay"
Height = 255
Index = 0
Left = 60
TabIndex = 3
Top = 660
Width = 735
End
Begin VB.Label lbl
BackStyle = 0 'Transparent
Caption = "Feedback"
Height = 255
Index = 1
Left = 60
TabIndex = 1
Top = 120
Width = 735
End
End
Attribute VB_Name = "frmEcho"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
'
' Copyright (C) 1999-2001 Microsoft Corporation. All Rights Reserved.
'
' File: frmEcho.frm
'
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
Private oBuffer As DirectSoundSecondaryBuffer8
Private mlIndex As Long
Private oFX As DirectSoundFXEcho8
Private Sub SaveAllSettings()
Dim fxNew As DSFXECHO
'Ok, save these new settings
'Set the new information up
With fxNew
.fFeedback = CSng(sldFeedback.Value)
.fLeftDelay = CSng(sldLeft.Value)
.fRightDelay = CSng(sldRight.Value)
.fWetDryMix = CSng(sldWetDry.Value)
.lPanDelay = chkPan.Value
End With
'Now update the effect
oFX.SetAllParameters fxNew
End Sub
Private Sub chkPan_Click()
SaveAllSettings
End Sub
Private Sub cmdOK_Click()
SaveAllSettings
Unload Me
End Sub
Private Sub Form_Load()
Dim fxCurrent As DSFXECHO
'Get the echo interface
Set oFX = oBuffer.GetObjectinPath(DSFX_STANDARD_ECHO, mlIndex, IID_DirectSoundFXEcho)
'Get the current settings from it
fxCurrent = oFX.GetAllParameters
'Now put them out there
With fxCurrent
sldFeedback.Value = CLng(.fFeedback)
sldLeft.Value = CLng(.fLeftDelay)
sldRight.Value = CLng(.fRightDelay)
sldWetDry.Value = CLng(.fWetDryMix)
chkPan.Value = .lPanDelay
End With
End Sub
Public Sub SetBuffer(oBuf As DirectSoundSecondaryBuffer8, Index As Long)
'Store the buffer and index
Set oBuffer = oBuf
mlIndex = Index
End Sub
Private Sub sldFeedback_Change()
SaveAllSettings
End Sub
Private Sub sldFeedback_Scroll()
SaveAllSettings
End Sub
Private Sub sldLeft_Change()
SaveAllSettings
End Sub
Private Sub sldLeft_Scroll()
SaveAllSettings
End Sub
Private Sub sldRight_Change()
SaveAllSettings
End Sub
Private Sub sldRight_Scroll()
SaveAllSettings
End Sub
Private Sub sldWetDry_Change()
SaveAllSettings
End Sub
Private Sub sldWetDry_Scroll()
SaveAllSettings
End Sub

View File

@@ -0,0 +1,665 @@
VERSION 5.00
Object = "{F9043C88-F6F2-101A-A3C9-08002B2F49FB}#1.2#0"; "comdlg32.ocx"
Begin VB.Form frmEffects
BorderStyle = 1 'Fixed Single
Caption = "Audio Effects using DirectSound Buffers"
ClientHeight = 5790
ClientLeft = 45
ClientTop = 330
ClientWidth = 4770
Icon = "frmFX.frx":0000
LinkTopic = "Form1"
MaxButton = 0 'False
ScaleHeight = 5790
ScaleWidth = 4770
StartUpPosition = 3 'Windows Default
Begin VB.Timer tmrUpdate
Interval = 50
Left = 5760
Top = 900
End
Begin VB.CheckBox chkLoop
Caption = "Loop Sound"
Height = 315
Left = 840
TabIndex = 16
Top = 5340
Width = 1455
End
Begin VB.CommandButton cmdStop
Caption = "&Stop"
Height = 375
Left = 3600
TabIndex = 14
Top = 5340
Width = 1095
End
Begin VB.CommandButton cmdPlay
Caption = "&Play"
Height = 375
Left = 2400
TabIndex = 13
Top = 5340
Width = 1095
End
Begin VB.Frame fraEffects
Caption = "Effects Information"
Height = 3675
Left = 120
TabIndex = 2
Top = 1560
Width = 4515
Begin VB.CommandButton cmdModify
Caption = "Modify Selected Effects"
Enabled = 0 'False
Height = 315
Left = 120
TabIndex = 17
Top = 3240
Width = 2235
End
Begin VB.TextBox txtFile
Height = 285
Left = 120
Locked = -1 'True
TabIndex = 9
Text = "No file loaded..."
Top = 480
Width = 3915
End
Begin VB.CommandButton cmdBrowse
Caption = "..."
Height = 285
Left = 4020
TabIndex = 8
ToolTipText = "Open a new audio file..."
Top = 480
Width = 315
End
Begin VB.ListBox lstAvail
Height = 840
ItemData = "frmFX.frx":0442
Left = 120
List = "frmFX.frx":045E
TabIndex = 7
Top = 1080
Width = 4275
End
Begin VB.ListBox lstUse
Height = 840
Left = 120
TabIndex = 6
Top = 2280
Width = 4275
End
Begin VB.CommandButton cmdAdd
Height = 285
Left = 2040
MaskColor = &H000000FF&
Picture = "frmFX.frx":04AF
Style = 1 'Graphical
TabIndex = 5
Top = 1980
UseMaskColor = -1 'True
Width = 315
End
Begin VB.CommandButton cmdRemove
Height = 285
Left = 2400
MaskColor = &H000000FF&
Picture = "frmFX.frx":09F1
Style = 1 'Graphical
TabIndex = 4
Top = 1980
UseMaskColor = -1 'True
Width = 315
End
Begin VB.CommandButton cmdApply
Caption = "Apply Effects"
Height = 315
Left = 2460
TabIndex = 3
Top = 3240
Width = 1875
End
Begin VB.Label lbl
BackStyle = 0 'Transparent
Caption = "Currently loaded sound file:"
Height = 195
Index = 0
Left = 120
TabIndex = 12
Top = 240
Width = 4515
End
Begin VB.Label lbl
BackStyle = 0 'Transparent
Caption = "Available Effects"
Height = 195
Index = 1
Left = 120
TabIndex = 11
Top = 840
Width = 1215
End
Begin VB.Label lbl
BackStyle = 0 'Transparent
Caption = "Effects in use"
Height = 195
Index = 2
Left = 120
TabIndex = 10
Top = 2040
Width = 1215
End
End
Begin MSComDlg.CommonDialog cdlOpen
Left = 300
Top = 3720
_ExtentX = 847
_ExtentY = 847
_Version = 393216
End
Begin VB.Label lbl
BackStyle = 0 'Transparent
Caption = $"frmFX.frx":0F33
Height = 675
Index = 5
Left = 120
TabIndex = 15
Top = 840
Width = 4575
End
Begin VB.Label lbl
BackStyle = 0 'Transparent
Caption = "Audio Effects using DirectSoundBuffers"
Height = 255
Index = 4
Left = 660
TabIndex = 1
Top = 60
Width = 3195
End
Begin VB.Label lbl
BackStyle = 0 'Transparent
Caption = "Copyright (C) 1999-2001 Microsoft Corporation, All Rights Reserved."
Height = 435
Index = 3
Left = 660
TabIndex = 0
Top = 300
Width = 3555
End
Begin VB.Image Image1
Height = 480
Left = 120
Picture = "frmFX.frx":0FCA
Top = 180
Width = 480
End
Begin VB.Menu mnuPop
Caption = "pop"
Visible = 0 'False
Begin VB.Menu mnuRemove
Caption = "Remove"
End
Begin VB.Menu mnuChange
Caption = "Change Settings..."
End
End
End
Attribute VB_Name = "frmEffects"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
'
' Copyright (C) 1999-2001 Microsoft Corporation. All Rights Reserved.
'
' File: frmFX.frm
'
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
'API declare for windows folder
Private Declare Function GetWindowsDirectory Lib "kernel32" Alias "GetWindowsDirectoryA" (ByVal lpBuffer As String, ByVal nSize As Long) As Long
Private Const mlMaxEffects As Long = 20
'Private declares for our DirectX objects
Private dx As DirectX8
Private ds As DirectSound8
Private dsb As DirectSoundSecondaryBuffer8
Private mlEffectKey As Long
Private Sub cmdAdd_Click()
If lstAvail.ListIndex = -1 Then 'Nothing is selected
MsgBox "Please select an available effect before attempting to add it.", vbOKOnly Or vbInformation, "Nothing selected."
Exit Sub
End If
If Not (dsb Is Nothing) Then
'Yup, now is there a sound already playing?
If (dsb.GetStatus And DSBSTATUS_PLAYING) = DSBSTATUS_PLAYING Then
MsgBox "Stop the currently playing sound before adding any effects.", vbOKOnly Or vbInformation, "Sound is playing"
Exit Sub
End If
End If
If lstUse.ListCount >= mlMaxEffects Then
MsgBox "You cannot add more than " & CStr(mlMaxEffects) & " effects in this sample.", vbOKOnly Or vbInformation, "No more effects."
Exit Sub
End If
'Add this item to our list of effects
lstUse.AddItem lstAvail.List(lstAvail.ListIndex) & " (Unallocated)"
RemoveAllForms
End Sub
Private Sub cmdApply_Click()
ApplySettings
End Sub
Private Sub cmdBrowse_Click()
Static sCurDir As String
Dim desc As DSBUFFERDESC
'We want to open a file now
cdlOpen.flags = cdlOFNHideReadOnly Or cdlOFNFileMustExist
cdlOpen.Filter = "Wave Files (*.wav)|*.wav"
cdlOpen.FileName = vbNullString
If sCurDir = vbNullString Then
'Set the init folder to \windows\media if it exists. If not, set it to the \windows folder
Dim sWindir As String
sWindir = Space$(255)
If GetWindowsDirectory(sWindir, 255) = 0 Then
'We couldn't get the windows folder for some reason, use the c:\
cdlOpen.InitDir = "C:\"
Else
Dim sMedia As String
sWindir = Left$(sWindir, InStr(sWindir, Chr$(0)) - 1)
If Right$(sWindir, 1) = "\" Then
sMedia = sWindir & "Media"
Else
sMedia = sWindir & "\Media"
End If
'We are trying to find the windows\media directory. If it
'doesn't exist, then use the windows folder as a default
If Dir$(sMedia, vbDirectory) <> vbNullString Then
cdlOpen.InitDir = sMedia
Else
cdlOpen.InitDir = sWindir
End If
End If
Else
'No need to move folders. Stay where they picked the last file
cdlOpen.InitDir = sCurDir
End If
On Local Error GoTo ClickedCancel
cdlOpen.CancelError = True
cdlOpen.ShowOpen ' Display the Open dialog box
'Save the current information
sCurDir = GetFolder(cdlOpen.FileName)
On Local Error GoTo NoLoadSegment
'Before we load the buffer stop one if it's playing
If Not (dsb Is Nothing) Then If dsb.GetStatus = DSBSTATUS_PLAYING Then dsb.Stop
'We need to set the CTRLFX flag so we can control the effects on this object
desc.lFlags = DSBCAPS_CTRLFX
'Now let's load the segment
RemoveAllForms
Set dsb = ds.CreateSoundBufferFromFile(cdlOpen.FileName, desc)
mlEffectKey = 0
txtFile.Text = cdlOpen.FileName
Exit Sub
NoLoadSegment:
If Err.Number = DSERR_BUFFERTOOSMALL Then 'This buffer isn't big enough to control effects on
MsgBox "This file isn't long enough to control effects. Please choose a longer audio file.", vbOKOnly Or vbCritical, "Couldn't load"
Else 'Some other error
MsgBox "Couldn't load this file", vbOKOnly Or vbCritical, "Couldn't load"
End If
ClickedCancel:
End Sub
Private Sub cmdModify_Click()
ChangeSettings
End Sub
Private Sub cmdPlay_Click()
If dsb Is Nothing Then
MsgBox "You must first load a wave file into a sound buffer before you can play it.", vbOKOnly Or vbInformation, "No buffer"
Exit Sub
End If
'We need to pre-roll any effects parameter changes that occurred since the last
'call to an API that does pre-rolling (ie, Stop or SetCurrentPosition)
dsb.SetCurrentPosition 0
dsb.Play chkLoop.Value
EnablePlayUI False
End Sub
Private Sub cmdRemove_Click()
Dim lLastIndex As Long
If lstUse.ListIndex = -1 Then 'Nothing is selected
MsgBox "Please select an effect that's being used before attempting to remove it.", vbOKOnly Or vbInformation, "Nothing selected."
Exit Sub
End If
If Not (dsb Is Nothing) Then
'Yup, now is there a sound already playing?
If (dsb.GetStatus And DSBSTATUS_PLAYING) = DSBSTATUS_PLAYING Then
MsgBox "Stop the currently playing sound before removing any effects.", vbOKOnly Or vbInformation, "Sound is playing"
Exit Sub
End If
End If
lLastIndex = lstUse.ListIndex
'Add this item to our list of effects
lstUse.RemoveItem lstUse.ListIndex
If (lstUse.ListCount > 0) Then
If lstUse.ListCount > lLastIndex Then
lstUse.ListIndex = lLastIndex
Else
lstUse.ListIndex = 0
End If
End If
'Enable the menus
If lstUse.ListCount < 1 Or lstUse.ListIndex < 0 Then
EnableMenus False
Else
EnableMenus True
End If
mlEffectKey = 0
RemoveAllForms
End Sub
Private Sub cmdStop_Click()
If dsb Is Nothing Then
MsgBox "You must first load a wave file into a sound buffer before you can stop it.", vbOKOnly Or vbInformation, "No buffer"
Exit Sub
End If
dsb.Stop
'Stop doesn't reset the current position
dsb.SetCurrentPosition 0
EnablePlayUI True
End Sub
Private Sub Form_Load()
EnablePlayUI True
InitDSound
End Sub
Private Sub Form_Unload(Cancel As Integer)
RemoveAllForms
CleanupDSound
End Sub
Private Sub InitDSound()
On Error GoTo FailedInit
Set dx = New DirectX8
'Create our default DirectSound object
Set ds = dx.DirectSoundCreate(vbNullString)
ds.SetCooperativeLevel Me.hWnd, DSSCL_NORMAL
Exit Sub
FailedInit:
MsgBox "Could not initialize DirectSound." & vbCrLf & "This sample will exit.", vbOKOnly Or vbInformation, "Exiting..."
Unload Me
End Sub
Private Sub CleanupDSound()
'Let's clean up now
If Not dsb Is Nothing Then
'If we are playing our file, stop it
If dsb.GetStatus = DSBSTATUS_PLAYING Then dsb.Stop
'Destroy our objects
Set dsb = Nothing
End If
Set ds = Nothing
Set dx = Nothing
End Sub
Private Function GetFolder(ByVal sFile As String) As String
Dim lCount As Long
For lCount = Len(sFile) To 1 Step -1
If Mid$(sFile, lCount, 1) = "\" Then
GetFolder = Left$(sFile, lCount)
Exit Function
End If
Next
GetFolder = vbNullString
End Function
Private Sub lstAvail_DblClick()
'Double clicking should be the same as clicking the 'Add' button
cmdAdd_Click
End Sub
Private Sub lstUse_Click()
'Enable the menu
If lstUse.ListCount < 1 Or lstUse.ListIndex < 0 Then
EnableMenus False
Else
EnableMenus True
End If
End Sub
Private Sub lstUse_DblClick()
'Double clicking should be the same as clicking the 'Remove' button
cmdRemove_Click
End Sub
Private Sub lstUse_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
If Button = vbRightButton Then
'Show the popup menu
If lstUse.ListCount < 1 Or lstUse.ListIndex < 0 Then
EnableMenus False
Else
EnableMenus True
End If
PopupMenu mnuPop, , X + lstUse.Left, Y + lstUse.Top + fraEffects.Top, mnuRemove
End If
End Sub
Private Sub EnableMenus(ByVal fEnable As Boolean)
mnuChange.Enabled = fEnable
mnuRemove.Enabled = fEnable
cmdModify.Enabled = fEnable
End Sub
Private Sub mnuChange_Click()
ChangeSettings
End Sub
Private Sub mnuRemove_Click()
cmdRemove_Click
End Sub
Private Sub ChangeSettings()
Dim fGargle As frmGargle, fCompressor As frmCompressor
Dim fEcho As frmEcho, fDistortion As frmDistortion
Dim fChorus As frmChorus, fFlanger As frmFlanger
Dim fParam As frmParamEQ, fWave As frmWaves
Dim lIndex As Long, lCount As Long
On Error GoTo LeaveSub
'First we need to force the effects to be applied
If Not ApplySettings(True) Then Exit Sub
'No need to continue if the sound is playing or there is no sound buffer
If dsb Is Nothing Then Exit Sub
'Now we need to get the index of this effect
lIndex = -1
For lCount = 0 To lstUse.ListIndex
If LCase(lstUse.List(lstUse.ListIndex)) = LCase(lstUse.List(lCount)) Then lIndex = lIndex + 1
Next
'Now show the correct screen based on the info
Select Case Left$(LCase(lstUse.List(lstUse.ListIndex)), InStr(lstUse.List(lstUse.ListIndex), " ") - 1)
Case "distortion"
Set fDistortion = New frmDistortion
fDistortion.SetBuffer dsb, lIndex
fDistortion.Show vbModeless, Me
Case "echo"
Set fEcho = New frmEcho
fEcho.SetBuffer dsb, lIndex
fEcho.Show vbModeless, Me
Case "chorus"
Set fChorus = New frmChorus
fChorus.SetBuffer dsb, lIndex
fChorus.Show vbModeless, Me
Case "flanger"
Set fFlanger = New frmFlanger
fFlanger.SetBuffer dsb, lIndex
fFlanger.Show vbModeless, Me
Case "compressor"
Set fCompressor = New frmCompressor
fCompressor.SetBuffer dsb, lIndex
fCompressor.Show vbModeless, Me
Case "gargle"
Set fGargle = New frmGargle
fGargle.SetBuffer dsb, lIndex
fGargle.Show vbModeless, Me
Case "parameq"
Set fParam = New frmParamEQ
fParam.SetBuffer dsb, lIndex
fParam.Show vbModeless, Me
Case "wavesreverb"
Set fWave = New frmWaves
fWave.SetBuffer dsb, lIndex
fWave.Show vbModeless, Me
End Select
LeaveSub:
End Sub
Private Sub EnablePlayUI(ByVal fEnable As Boolean)
On Error Resume Next
If fEnable Then
chkLoop.Enabled = True
cmdPlay.Enabled = True
cmdStop.Enabled = False
cmdBrowse.Enabled = True
cmdPlay.SetFocus
Else
chkLoop.Enabled = False
cmdPlay.Enabled = False
cmdStop.Enabled = True
cmdBrowse.Enabled = False
cmdStop.SetFocus
End If
End Sub
Private Sub tmrUpdate_Timer()
If Not (dsb Is Nothing) Then
If (dsb.GetStatus And DSBSTATUS_PLAYING) <> DSBSTATUS_PLAYING Then
If cmdPlay.Enabled = False Then
EnablePlayUI True
End If
End If
End If
End Sub
Private Function ApplySettings(Optional ByVal fIgnoreSoundPlaying As Boolean = False) As Boolean
On Local Error GoTo NoFX
Dim DSEffects() As DSEFFECTDESC
Dim lResults() As Long
Dim lCount As Long
Dim lTempEffect As Long
'Do we have a sound buffer
If dsb Is Nothing Then
MsgBox "You must first load a wave file into a sound buffer before you can apply effects to it.", vbOKOnly Or vbInformation, "No buffer"
Exit Function
End If
If Not fIgnoreSoundPlaying Then
'Yup, now is there a sound already playing?
If (dsb.GetStatus And DSBSTATUS_PLAYING) = DSBSTATUS_PLAYING Then
MsgBox "Stop the currently playing sound before adding effects.", vbOKOnly Or vbInformation, "Sound is playing"
Exit Function
End If
End If
'Yes we do, do we have effects selected?
If lstUse.ListCount = 0 Then
If MsgBox("Do you want to turn off effects for this buffer?", vbYesNo Or vbQuestion, "No effects") = vbYes Then
dsb.SetFX 0, DSEffects, lResults
Exit Function
Else
MsgBox "You must first select some effects to use.", vbOKOnly Or vbInformation, "No effects"
Exit Function
End If
End If
'Ok, let's apply our effects info here
'First get an array of effects structs the right size
ReDim DSEffects(lstUse.ListCount - 1)
ReDim lResults(lstUse.ListCount - 1)
'Now we don't want to apply the effects if they've already been applied. So,
'through our list, and create a 'unique' number to describe this set of effects
'and only apply them if the number is different form our stored one.
For lCount = 0 To lstUse.ListCount - 1
Select Case Left$(LCase(lstUse.List(lCount)), InStr(lstUse.List(lCount), " ") - 1)
Case "distortion"
lTempEffect = lTempEffect + (lCount + &H10)
DSEffects(lCount).guidDSFXClass = DSFX_STANDARD_DISTORTION
Case "echo"
lTempEffect = lTempEffect + (lCount + &H20)
DSEffects(lCount).guidDSFXClass = DSFX_STANDARD_ECHO
Case "chorus"
lTempEffect = lTempEffect + (lCount + &H40)
DSEffects(lCount).guidDSFXClass = DSFX_STANDARD_CHORUS
Case "flanger"
lTempEffect = lTempEffect + (lCount + &H80)
DSEffects(lCount).guidDSFXClass = DSFX_STANDARD_FLANGER
Case "compressor"
lTempEffect = lTempEffect + (lCount + &H100)
DSEffects(lCount).guidDSFXClass = DSFX_STANDARD_COMPRESSOR
Case "gargle"
lTempEffect = lTempEffect + (lCount + &H200)
DSEffects(lCount).guidDSFXClass = DSFX_STANDARD_GARGLE
Case "parameq"
lTempEffect = lTempEffect + (lCount + &H400)
DSEffects(lCount).guidDSFXClass = DSFX_STANDARD_PARAMEQ
Case "wavesreverb"
lTempEffect = lTempEffect + (lCount + &H800)
DSEffects(lCount).guidDSFXClass = DSFX_STANDARD_WAVES_REVERB
End Select
Next
If mlEffectKey <> lTempEffect Then 'They don't match, set the fx.
dsb.SetFX lstUse.ListCount, DSEffects, lResults
Dim sNewItem As String
For lCount = 0 To lstUse.ListCount - 1
sNewItem = Left$(lstUse.List(lCount), InStr(lstUse.List(lCount), " ") - 1)
Select Case lResults(lCount)
Case DSFXR_FAILED
lstUse.List(lCount) = sNewItem & " - Failed"
Case DSFXR_LOCHARDWARE
lstUse.List(lCount) = sNewItem & " - Hardware"
Case DSFXR_LOCSOFTWARE
lstUse.List(lCount) = sNewItem & " - Software"
Case DSFXR_UNALLOCATED
lstUse.List(lCount) = sNewItem & " - Unallocated"
Case DSFXR_UNKNOWN
lstUse.List(lCount) = sNewItem & " - Unknown"
Case DSFXR_PRESENT
lstUse.List(lCount) = sNewItem & " - Present"
End Select
Next
End If
mlEffectKey = lTempEffect
ApplySettings = True
Exit Function
NoFX:
MsgBox "This set of effects could not be set on this audio file.", vbOKOnly Or vbInformation, "Cannot set"
ApplySettings = False
End Function
Private Sub RemoveAllForms()
'Get rid of all forms
Dim f As Form
For Each f In Forms
If Not (f Is Me) Then Unload f
Next
End Sub

View File

@@ -0,0 +1,319 @@
VERSION 5.00
Object = "{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.0#0"; "MSCOMCTL.OCX"
Begin VB.Form frmFlanger
BorderStyle = 4 'Fixed ToolWindow
Caption = "Flanger Effects Update"
ClientHeight = 4440
ClientLeft = 45
ClientTop = 285
ClientWidth = 2775
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 4440
ScaleWidth = 2775
ShowInTaskbar = 0 'False
StartUpPosition = 1 'CenterOwner
Begin VB.OptionButton optTriangle
Caption = "Triangle"
Height = 255
Left = 1680
TabIndex = 2
Top = 3540
Width = 915
End
Begin VB.OptionButton optSin
Caption = "Sine"
Height = 255
Left = 120
TabIndex = 1
Top = 3540
Width = 915
End
Begin VB.CommandButton cmdOK
Caption = "OK"
Height = 315
Left = 1800
TabIndex = 0
Top = 3960
Width = 915
End
Begin MSComctlLib.Slider sldFeedback
Height = 195
Left = 60
TabIndex = 3
Top = 300
Width = 2655
_ExtentX = 4683
_ExtentY = 344
_Version = 393216
LargeChange = 10
Min = -99
Max = 99
SelStart = 1
TickFrequency = 10
Value = 1
End
Begin MSComctlLib.Slider sldDelay
Height = 195
Left = 60
TabIndex = 4
Top = 840
Width = 2655
_ExtentX = 4683
_ExtentY = 344
_Version = 393216
LargeChange = 2
Max = 4
End
Begin MSComctlLib.Slider sldDepth
Height = 195
Left = 60
TabIndex = 5
Top = 1380
Width = 2655
_ExtentX = 4683
_ExtentY = 344
_Version = 393216
Max = 100
TickFrequency = 10
End
Begin MSComctlLib.Slider sldFreq
Height = 195
Left = 60
TabIndex = 6
Top = 1920
Width = 2655
_ExtentX = 4683
_ExtentY = 344
_Version = 393216
TickFrequency = 2
End
Begin MSComctlLib.Slider sldPhase
Height = 195
Left = 60
TabIndex = 7
Top = 2460
Width = 2655
_ExtentX = 4683
_ExtentY = 344
_Version = 393216
LargeChange = 2
Max = 4
End
Begin MSComctlLib.Slider sldWetDry
Height = 195
Left = 60
TabIndex = 8
Top = 3000
Width = 2655
_ExtentX = 4683
_ExtentY = 344
_Version = 393216
LargeChange = 10
SmallChange = 5
Max = 100
SelStart = 1
TickFrequency = 10
Value = 1
End
Begin VB.Label lbl
BackStyle = 0 'Transparent
Caption = "Frequency"
Height = 255
Index = 4
Left = 60
TabIndex = 15
Top = 1680
Width = 1035
End
Begin VB.Label lbl
BackStyle = 0 'Transparent
Caption = "Depth"
Height = 255
Index = 3
Left = 60
TabIndex = 14
Top = 1140
Width = 1035
End
Begin VB.Label lbl
BackStyle = 0 'Transparent
Caption = "Delay"
Height = 255
Index = 0
Left = 60
TabIndex = 13
Top = 600
Width = 735
End
Begin VB.Label lbl
BackStyle = 0 'Transparent
Caption = "Feedback"
Height = 255
Index = 1
Left = 60
TabIndex = 12
Top = 60
Width = 735
End
Begin VB.Label lbl
BackStyle = 0 'Transparent
Caption = "Phase"
Height = 255
Index = 2
Left = 60
TabIndex = 11
Top = 2220
Width = 1035
End
Begin VB.Label lbl
BackStyle = 0 'Transparent
Caption = "Wave Form"
Height = 255
Index = 5
Left = 60
TabIndex = 10
Top = 3300
Width = 915
End
Begin VB.Label lbl
BackStyle = 0 'Transparent
Caption = "Wet Dry Mix"
Height = 255
Index = 6
Left = 60
TabIndex = 9
Top = 2760
Width = 1035
End
End
Attribute VB_Name = "frmFlanger"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
'
' Copyright (C) 1999-2001 Microsoft Corporation. All Rights Reserved.
'
' File: frmFlanger.frm
'
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
Private oBuffer As DirectSoundSecondaryBuffer8
Private mlIndex As Long
Private oFX As DirectSoundFXFlanger8
Private Sub SaveAllSettings()
Dim fxNew As DSFXFLANGER
'Ok, save these new settings
'Set the new information up
With fxNew
.fFeedback = CSng(sldFeedback.Value)
.fDelay = CSng(sldDelay.Value)
.fDepth = CSng(sldDepth.Value)
.fWetDryMix = CSng(sldWetDry.Value)
.fFrequency = CSng(sldFreq.Value)
.lPhase = sldPhase.Value
If optSin.Value Then
.lWaveform = DSFX_WAVE_SIN
ElseIf optTriangle.Value Then
.lWaveform = DSFX_WAVE_TRIANGLE
End If
End With
'Now update the effect
oFX.SetAllParameters fxNew
End Sub
Private Sub cmdOK_Click()
SaveAllSettings
Unload Me
End Sub
Private Sub Form_Load()
Dim fxCurrent As DSFXFLANGER
'Get the echo interface
Set oFX = oBuffer.GetObjectinPath(DSFX_STANDARD_FLANGER, mlIndex, IID_DirectSoundFXFlanger)
'Get the current settings from it
fxCurrent = oFX.GetAllParameters
'Now put them out there
With fxCurrent
sldFeedback.Value = CLng(.fFeedback)
sldDelay.Value = CLng(.fDelay)
sldDepth.Value = CLng(.fDepth)
sldWetDry.Value = CLng(.fWetDryMix)
sldFreq.Value = CLng(.fFrequency)
sldPhase.Value = .lPhase
If .lWaveform = DSFX_WAVE_SIN Then
optSin.Value = True
ElseIf .lWaveform = DSFX_WAVE_TRIANGLE Then
optTriangle.Value = True
End If
End With
End Sub
Public Sub SetBuffer(oBuf As DirectSoundSecondaryBuffer8, Index As Long)
'Store the buffer and index
Set oBuffer = oBuf
mlIndex = Index
End Sub
Private Sub optSin_Click()
SaveAllSettings
End Sub
Private Sub optTriangle_Click()
SaveAllSettings
End Sub
Private Sub sldDelay_Change()
SaveAllSettings
End Sub
Private Sub sldDelay_Scroll()
SaveAllSettings
End Sub
Private Sub sldDepth_Change()
SaveAllSettings
End Sub
Private Sub sldDepth_Scroll()
SaveAllSettings
End Sub
Private Sub sldFeedback_Change()
SaveAllSettings
End Sub
Private Sub sldFeedback_Scroll()
SaveAllSettings
End Sub
Private Sub sldFreq_Change()
SaveAllSettings
End Sub
Private Sub sldFreq_Scroll()
SaveAllSettings
End Sub
Private Sub sldPhase_Change()
SaveAllSettings
End Sub
Private Sub sldPhase_Scroll()
SaveAllSettings
End Sub
Private Sub sldWetDry_Change()
SaveAllSettings
End Sub
Private Sub sldWetDry_Scroll()
SaveAllSettings
End Sub

View File

@@ -0,0 +1,163 @@
VERSION 5.00
Object = "{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.0#0"; "MSCOMCTL.OCX"
Begin VB.Form frmGargle
BorderStyle = 4 'Fixed ToolWindow
Caption = "Gargle Effects Update"
ClientHeight = 1635
ClientLeft = 45
ClientTop = 285
ClientWidth = 2775
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 1635
ScaleWidth = 2775
ShowInTaskbar = 0 'False
StartUpPosition = 1 'CenterOwner
Begin VB.OptionButton optTriangle
Caption = "Triangle"
Height = 255
Left = 1680
TabIndex = 6
Top = 540
Width = 915
End
Begin VB.OptionButton optSquare
Caption = "Square"
Height = 255
Left = 120
TabIndex = 5
Top = 540
Width = 915
End
Begin MSComctlLib.Slider sldRate
Height = 195
Left = 780
TabIndex = 4
Top = 960
Width = 1935
_ExtentX = 3413
_ExtentY = 344
_Version = 393216
LargeChange = 100
SmallChange = 10
Min = 1
Max = 1000
SelStart = 1
TickFrequency = 100
Value = 1
End
Begin VB.CommandButton cmdOK
Caption = "OK"
Height = 315
Left = 1800
TabIndex = 3
Top = 1260
Width = 915
End
Begin VB.Label lbl
BackStyle = 0 'Transparent
Caption = "Rate Hz"
Height = 255
Index = 1
Left = 60
TabIndex = 2
Top = 960
Width = 735
End
Begin VB.Label lbl
BackStyle = 0 'Transparent
Caption = "Wave Type"
Height = 255
Index = 0
Left = 60
TabIndex = 1
Top = 300
Width = 915
End
Begin VB.Label lbl
BackStyle = 0 'Transparent
Caption = "Here you can modify the gargle effect"
Height = 255
Index = 4
Left = 60
TabIndex = 0
Top = 60
Width = 2655
End
End
Attribute VB_Name = "frmGargle"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
'
' Copyright (C) 1999-2001 Microsoft Corporation. All Rights Reserved.
'
' File: frmGargle.frm
'
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
Private oBuffer As DirectSoundSecondaryBuffer8
Private mlIndex As Long
Private oFX As DirectSoundFXGargle8
Private Sub SaveAllSettings()
Dim fxNew As DSFXGARGLE
'Ok, save these new settings
'Set the new information up
fxNew.lRateHz = CLng(sldRate.Value)
If optSquare.Value Then
fxNew.lWaveShape = DSFXGARGLE_WAVE_SQUARE
ElseIf optTriangle.Value Then
fxNew.lWaveShape = DSFXGARGLE_WAVE_TRIANGLE
End If
'Now update the effect
oFX.SetAllParameters fxNew
End Sub
Private Sub cmdOK_Click()
SaveAllSettings
Unload Me
End Sub
Private Sub Form_Load()
Dim fxCurrent As DSFXGARGLE
'Get the gargle interface
Set oFX = oBuffer.GetObjectinPath(DSFX_STANDARD_GARGLE, mlIndex, IID_DirectSoundFXGargle)
'Get the current settings from it
fxCurrent = oFX.GetAllParameters
'Now put them out there
sldRate.Value = fxCurrent.lRateHz
If fxCurrent.lWaveShape = DSFXGARGLE_WAVE_SQUARE Then
optSquare.Value = True
ElseIf fxCurrent.lWaveShape = DSFXGARGLE_WAVE_TRIANGLE Then
optTriangle.Value = True
End If
End Sub
Public Sub SetBuffer(oBuf As DirectSoundSecondaryBuffer8, Index As Long)
'Store the buffer and index
Set oBuffer = oBuf
mlIndex = Index
End Sub
Private Sub optSquare_Click()
SaveAllSettings
End Sub
Private Sub optTriangle_Click()
SaveAllSettings
End Sub
Private Sub sldRate_Change()
SaveAllSettings
End Sub
Private Sub sldRate_Scroll()
SaveAllSettings
End Sub

View File

@@ -0,0 +1,183 @@
VERSION 5.00
Object = "{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.0#0"; "MSCOMCTL.OCX"
Begin VB.Form frmParamEQ
BorderStyle = 4 'Fixed ToolWindow
Caption = "ParamEQ Effects Update"
ClientHeight = 2220
ClientLeft = 45
ClientTop = 285
ClientWidth = 2775
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 2220
ScaleWidth = 2775
ShowInTaskbar = 0 'False
StartUpPosition = 1 'CenterOwner
Begin VB.CommandButton cmdOK
Caption = "OK"
Height = 315
Left = 1800
TabIndex = 6
Top = 1800
Width = 915
End
Begin MSComctlLib.Slider sldCenter
Height = 195
Left = 60
TabIndex = 0
Top = 360
Width = 2655
_ExtentX = 4683
_ExtentY = 344
_Version = 393216
LargeChange = 500
SmallChange = 100
Min = 80
Max = 16000
SelStart = 80
TickFrequency = 1000
Value = 80
End
Begin MSComctlLib.Slider sldBand
Height = 195
Left = 60
TabIndex = 1
Top = 900
Width = 2655
_ExtentX = 4683
_ExtentY = 344
_Version = 393216
LargeChange = 4
Min = 1
Max = 36
SelStart = 1
TickFrequency = 4
Value = 1
End
Begin MSComctlLib.Slider sldGain
Height = 195
Left = 60
TabIndex = 2
Top = 1440
Width = 2655
_ExtentX = 4683
_ExtentY = 344
_Version = 393216
Min = -15
Max = 15
TickFrequency = 2
End
Begin VB.Label lbl
BackStyle = 0 'Transparent
Caption = "Center"
Height = 255
Index = 1
Left = 60
TabIndex = 5
Top = 120
Width = 735
End
Begin VB.Label lbl
BackStyle = 0 'Transparent
Caption = "Bandwith"
Height = 255
Index = 0
Left = 60
TabIndex = 4
Top = 660
Width = 735
End
Begin VB.Label lbl
BackStyle = 0 'Transparent
Caption = "Gain"
Height = 255
Index = 3
Left = 60
TabIndex = 3
Top = 1200
Width = 1035
End
End
Attribute VB_Name = "frmParamEQ"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
'
' Copyright (C) 1999-2001 Microsoft Corporation. All Rights Reserved.
'
' File: frmParamEQ.frm
'
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
Private oBuffer As DirectSoundSecondaryBuffer8
Private mlIndex As Long
Private oFX As DirectSoundFXParamEq8
Private Sub SaveAllSettings()
Dim fxNew As DSFXPARAMEQ
'Ok, save these new settings
'Set the new information up
With fxNew
.fBandwidth = CSng(sldBand.Value)
.fCenter = CSng(sldCenter.Value)
.fGain = CSng(sldGain.Value)
End With
'Now update the effect
oFX.SetAllParameters fxNew
End Sub
Private Sub cmdOK_Click()
SaveAllSettings
Unload Me
End Sub
Private Sub Form_Load()
Dim fxCurrent As DSFXPARAMEQ
'Get the echo interface
Set oFX = oBuffer.GetObjectinPath(DSFX_STANDARD_PARAMEQ, mlIndex, IID_DirectSoundFXParamEq)
'Get the current settings from it
fxCurrent = oFX.GetAllParameters
'Now put them out there
With fxCurrent
sldBand.Value = CLng(.fBandwidth)
sldCenter.Value = CLng(.fCenter)
sldGain.Value = CLng(.fGain)
End With
End Sub
Public Sub SetBuffer(oBuf As DirectSoundSecondaryBuffer8, Index As Long)
'Store the buffer and index
Set oBuffer = oBuf
mlIndex = Index
End Sub
Private Sub sldBand_Change()
SaveAllSettings
End Sub
Private Sub sldBand_Scroll()
SaveAllSettings
End Sub
Private Sub sldCenter_Change()
SaveAllSettings
End Sub
Private Sub sldCenter_Scroll()
SaveAllSettings
End Sub
Private Sub sldGain_Change()
SaveAllSettings
End Sub
Private Sub sldGain_Scroll()
SaveAllSettings
End Sub

View File

@@ -0,0 +1,219 @@
VERSION 5.00
Object = "{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.0#0"; "MSCOMCTL.OCX"
Begin VB.Form frmWaves
BorderStyle = 4 'Fixed ToolWindow
Caption = "WavesReverb Effects Update"
ClientHeight = 2775
ClientLeft = 45
ClientTop = 285
ClientWidth = 2775
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 2775
ScaleWidth = 2775
ShowInTaskbar = 0 'False
StartUpPosition = 1 'CenterOwner
Begin VB.CommandButton cmdOK
Caption = "OK"
Height = 315
Left = 1800
TabIndex = 8
Top = 2340
Width = 915
End
Begin MSComctlLib.Slider sldInGain
Height = 195
Left = 60
TabIndex = 0
Top = 360
Width = 2655
_ExtentX = 4683
_ExtentY = 344
_Version = 393216
LargeChange = 10
Min = -96
Max = 0
TickFrequency = 10
End
Begin MSComctlLib.Slider sldReverbMix
Height = 195
Left = 60
TabIndex = 2
Top = 900
Width = 2655
_ExtentX = 4683
_ExtentY = 344
_Version = 393216
LargeChange = 10
SmallChange = 2
Min = -96
Max = 0
TickFrequency = 10
End
Begin MSComctlLib.Slider sldReverbTime
Height = 195
Left = 60
TabIndex = 4
Top = 1440
Width = 2655
_ExtentX = 4683
_ExtentY = 344
_Version = 393216
LargeChange = 100
SmallChange = 10
Min = 1
Max = 3000
SelStart = 1
TickFrequency = 200
Value = 1
End
Begin MSComctlLib.Slider sldHighFreq
Height = 195
Left = 60
TabIndex = 6
Top = 1980
Width = 2655
_ExtentX = 4683
_ExtentY = 344
_Version = 393216
LargeChange = 100
SmallChange = 10
Min = 1
Max = 999
SelStart = 1
TickFrequency = 50
Value = 1
End
Begin VB.Label lbl
BackStyle = 0 'Transparent
Caption = "High Freq RT Ratio"
Height = 255
Index = 4
Left = 60
TabIndex = 7
Top = 1740
Width = 1695
End
Begin VB.Label lbl
BackStyle = 0 'Transparent
Caption = "Reverb Time"
Height = 255
Index = 3
Left = 60
TabIndex = 5
Top = 1200
Width = 1035
End
Begin VB.Label lbl
BackStyle = 0 'Transparent
Caption = "Reverb Mix"
Height = 255
Index = 0
Left = 60
TabIndex = 3
Top = 660
Width = 1275
End
Begin VB.Label lbl
BackStyle = 0 'Transparent
Caption = "In Gain"
Height = 255
Index = 1
Left = 60
TabIndex = 1
Top = 120
Width = 735
End
End
Attribute VB_Name = "frmWaves"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
'
' Copyright (C) 1999-2001 Microsoft Corporation. All Rights Reserved.
'
' File: frmWaves.frm
'
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
Private oBuffer As DirectSoundSecondaryBuffer8
Private mlIndex As Long
Private oFX As DirectSoundFXWavesReverb8
Private Sub SaveAllSettings()
Dim fxNew As DSFXWAVESREVERB
'Ok, save these new settings
'Set the new information up
With fxNew
.fInGain = CSng(sldInGain.Value)
.fReverbMix = CSng(sldReverbMix.Value)
.fReverbTime = CSng(sldReverbTime.Value)
.fHighFreqRTRatio = CSng(sldHighFreq.Value / 1000) 'Range is 0.001 - 0.999
End With
'Now update the effect
oFX.SetAllParameters fxNew
End Sub
Private Sub cmdOK_Click()
SaveAllSettings
Unload Me
End Sub
Private Sub Form_Load()
Dim fxCurrent As DSFXWAVESREVERB
'Get the echo interface
Set oFX = oBuffer.GetObjectinPath(DSFX_STANDARD_WAVES_REVERB, mlIndex, IID_DirectSoundFXWavesReverb)
'Get the current settings from it
fxCurrent = oFX.GetAllParameters
'Now put them out there
With fxCurrent
sldInGain.Value = CLng(.fInGain)
sldReverbMix.Value = CLng(.fReverbMix)
sldReverbTime.Value = CLng(.fReverbTime)
sldHighFreq.Value = CLng(.fHighFreqRTRatio * 1000) 'Range is 0.001 - 0.999
End With
End Sub
Public Sub SetBuffer(oBuf As DirectSoundSecondaryBuffer8, Index As Long)
'Store the buffer and index
Set oBuffer = oBuf
mlIndex = Index
End Sub
Private Sub sldHighFreq_Change()
SaveAllSettings
End Sub
Private Sub sldHighFreq_Scroll()
SaveAllSettings
End Sub
Private Sub sldInGain_Change()
SaveAllSettings
End Sub
Private Sub sldInGain_Scroll()
SaveAllSettings
End Sub
Private Sub sldReverbMix_Change()
SaveAllSettings
End Sub
Private Sub sldReverbMix_Scroll()
SaveAllSettings
End Sub
Private Sub sldReverbTime_Change()
SaveAllSettings
End Sub
Private Sub sldReverbTime_Scroll()
SaveAllSettings
End Sub

View File

@@ -0,0 +1,54 @@
//-----------------------------------------------------------------------------
//
// Sample Name: Effects Form Sample
//
// Copyright (C) 1999-2001 Microsoft Corporation. All rights reserved.
//
// GM/GS® Sound Set Copyright ©1996, Roland Corporation U.S.
//
//-----------------------------------------------------------------------------
Description
===========
The sample demonstrates:
(1) how to use standard effects (FX) with DirectSound
(2) how to manipulate FX parameters - and what the results sounds like
Path
====
Source: DXSDK\Samples\Multimedia\VBSamples\DirectSound\EffectsForm
Executable: DXSDK\Samples\Multimedia\VBSamples\DirectSound\Bin
User's Guide
============
- make sure a sound file is loaded (can be WAV)
- by default, no FX are enabled. try playing the sound to see what it
orginally sounds like.
- enable one or more FXs by adding them to the list of in use effects.
- Hit Apply to introduce the effects.
- Hit play to hear the FX applied.
- you can adjust parameters for any FX by selecting the effect in the
in use list box, and clicking the modify effects button beneath it.
If you are adjusting parameters for an active FX while sound is playing,
you will hearing the difference immediately.
Programming Notes
=================
Fill one or more DSEFFECTDESC structs, and pass them into
DirectSoundSecondaryBuffer8.SetFX.
When modify effects is clicked call GetObjectInPath to retreive an effects
interface, and then you can call SetAllParameters to modify the effects as
they are playing.

View File

@@ -0,0 +1,40 @@
Type=Exe
Reference=*\G{00020430-0000-0000-C000-000000000046}#2.0#0#stdole2.tlb#OLE Automation
Reference=*\G{E1211242-8E94-11D1-8808-00C04FC2C603}#1.0#0#dx8vb.dll#DirectX 8 for Visual Basic Type Library
Object={831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.0#0; MSCOMCTL.OCX
Object={F9043C88-F6F2-101A-A3C9-08002B2F49FB}#1.2#0; comdlg32.ocx
Form=frmFX.frm
Form=frmGargle.frm
Form=frmFlanger.frm
Form=frmChorus.frm
Form=frmEcho.frm
Form=frmDistortion.frm
Form=frmCompressor.frm
Form=frmParamEQ.frm
Form=frmWaves.frm
Startup="frmEffects"
Command32=""
Name="vbEffectsBuffer"
HelpContextID="0"
CompatibleMode="0"
MajorVer=1
MinorVer=0
RevisionVer=0
AutoIncrementVer=0
ServerSupportFiles=0
VersionCompanyName="Microsoft"
CompilationType=0
OptimizationType=0
FavorPentiumPro(tm)=0
CodeViewDebugInfo=0
NoAliasing=0
BoundsCheck=0
OverflowCheck=0
FlPointCheck=0
FDIVCheck=0
UnroundedFP=0
StartMode=0
Unattended=0
Retained=0
ThreadPerObject=0
MaxNumberOfThreads=1