API ReferenceSandbox
Soundclass
Single source for creating sounds
object→Sound
Methods12
Showing 12 methods
public static void Preload(string eventName)
Precaches sound files associated with given sound event by name. This helps avoid stutters on first load of each sound file.
| Parameter | Type | Description |
|---|---|---|
| eventName | string | — |
Returns:
void—public static void SetEffect(string name, float value, float velocity = 10, float fadeOut = -1)
Obsolete: This API member is obsolete.
| Parameter | Type | Description |
|---|---|---|
| name | string | — |
| value | float | — |
| velocity = 10 | float | — |
| fadeOut = -1 | float | — |
Returns:
void—public static void StopAll(float fade)
| Parameter | Type | Description |
|---|---|---|
| fade | float | — |
Returns:
void—public static void UncompressVoiceData(byte[] buffer, System.Action`1<System.Memory`1<short>> ondata)
| Parameter | Type | Description |
|---|---|---|
| buffer | byte[] | — |
| ondata | Action<Memory<short>> | — |
Returns:
void—No results match this filter.
Properties4
Showing 4 properties
public static string[] Sandbox.Sound.DspNames { get; set; }
Get a list of available DSP names
Returns:
string[]—public static float Sandbox.Sound.MasterVolume { get; set; }
The user's preference for their master volume.
Returns:
float—public static int Sandbox.Sound.VoiceSampleRate { get; set; }
The sample rate for voice data
Returns:
int—No results match this filter.