System variables of Spark
 
Type Name Values Default value Description
spark_SampleType [0..spark_MaxSamples-1] spark_Sample
-
-
Samples
spark_PresetType [0..spark_MaxPresets-1] spark_Preset
-
-
Presets
spark_SourceType [0..spark_MaxSources-1] spark_Source
-
-
Sources
DWORD spark_Devices
>=0
-
Total number of sound devices in the system. (DirectSound devices + WaveOut devices + null device)
DWORD spark_DSDevices >=0 -
Number of DirectSound devices.
DWORD spark_WaveOutDevices >=0 -
Number of WaveOut devices.
DWORD spark_FirstDSDevice >=0 -
Index of the first DirectSound device.
DWORD spark_FirstWaveOutDevice >=0 -
Index of the first WaveOut device.
char* [0..spark_MaxDevices] spark_DeviceName -
-
Names of the sound devices in the system.
DWORD spark_DeviceID
0-(spark_Devices-1)
0 v. 1
Index of device used for playback.
BYTE spark_OutputMode 0-4 1 (stereo) Mode of the sound engine.(0: mono, 1:stereo, 2:surround, 3:DirectSound3D, 4:DirectSound3D + EAX 1.0)
DWORD spark_OutputBufSize 10-5000 150 Size of the output buffer in milliseconds. The smaller the buffer, the faster the response when you change the frequency or volume of the sound sources. However, decreasing the buffer size will increase the chance of random pops and clicks in the output, and the sound may get cut.
BYTE spark_OutputBufSegments 2,4,8 4 Segments of the output buffer (2/4/8).
BYTE spark_GlobalVolume 0-64 64 Global volume of the sound engine.  spark_UpdateFrame must be called after changing its value.
BYTE spark_Interpolation 0-1 1
If non-zero, turns on linear interpolation in mono, stereo or surround mode for better quality..
DWORD spark_OutputMixFreq 8000-96000 44100 Output mixing frequency of the sound engine. 
BYTE spark_RampMode
0-3
3
Mode of the volume ramping.
DWORD spark_RampLength
0-7FFFFFFFh
5
Length of the volume ramps.
BYTE spark_DebugInfo
0-1
1
When non-zero, enables logging in "spark.log".
DWORD spark_OutputPriority
0-5
5
The priority class of the output module.
DWORD spark_StereoSeparation
0-200
100
Stereo separation in percents.
DWORD spark_SurroundSeparation
0-200
100
Surround separation in percents. (Only in surround mode.)
DWORD spark_SurroundDelay 1-500 20 Surround delay in milliseconds. (Only in surround mode.)
BYTE spark_EnableOutputFX
0-255
0
Enables output effects in mono, stereo and surround mode.
BYTE spark_DisableMaxVirt 0-1 0 If non-zero, disables advanced 3D virtualization in DirectSound3D modes. This can improve the speed of the engine on some soundcards.
BYTE spark_SwapLR 0-1 0 If non-zero, swaps left/right channels.
BYTE spark_SwapFS 0-1 0 If non-zero, swaps front/rear channels.

Remarks:

The spark_MaxSamples,spark_MaxPresets and spark_MaxSources constants define the maximum number of samples, presets és sources. (Currently 128, 256 and 384.)

After altering the values of spark_DeviceID,spark_OutputMode,spark_Interpolation, spark_OutputMixFreq, spark_RampMode, spark_RampLength,and  spark_EnableOutputFX, spark_UpdateSoundSystem must be called to validate the changes.