Sandbox: Lua: Sound: Setter - ov-studio/Vital.sandbox GitHub Wiki

━ APIs

━ sound.setPriority() (Client)

@Objective: Sets sound's priority.
local bool: result = sound.setPriority(
  userdata: sound*,
  int: value
)

━ sound.setPaused() (Client)

@Objective: Sets sound's pause state.
local bool: result = sound.setPaused(
  userdata: sound*,
  bool: result
)

━ sound.setLooped() (Client)

@Objective: Sets sound's loop state.
local bool: result = sound.setLooped(
  userdata: sound*,
  bool: result
)

━ sound.setLoopCount() (Client)

@Objective: Sets sound's loop count.
local bool: result = sound.setLoopCount(
  userdata: sound*,
  int: value
)

━ sound.setLoopPoint() (Client)

@Objective: Sets sound's loop point.
local bool: result = sound.setLoopPoint(
  userdata: sound*,
  int: startTick,
  int: endTick
)

━ sound.setPitch() (Client)

@Objective: Sets sound's pitch.
local bool: result = sound.setPitch(
  userdata: sound*,
  float: value
)

━ sound.setFrequency() (Client)

@Objective: Sets sound's frequency.
local bool: result = sound.setFrequency(
  userdata: sound*,
  float: value
)

━ sound.setVolume() (Client)

@Objective: Sets sound's volume.
local bool: result = sound.setVolume(
  userdata: sound*,
  float: value
)

━ sound.setVolumeRamped() (Client)

@Objective: Sets sound's volume's ramp state.
local bool: result = sound.setVolumeRamped(
  userdata: sound*,
  bool: result
)

━ sound.setMuted() (Client)

@Objective: Sets sound's mute state.
local bool: result = sound.setMuted(
  userdata: sound*,
  bool: result
)

━ sound.setPosition() (Client)

@Objective: Sets sound's playback position.
local bool: result = sound.setPosition(
  userdata: sound*,
  int: positionTick
)

━ sound.setPan() (Client)

@Objective: Sets sound's pan.
local bool: result = sound.setPan(
  userdata: sound*,
  float: value
)

━ sound.setMixInputLevels() (Client)

@Objective: Sets sound's mix input levels.
local bool: result = sound.setMixInputLevels(
  userdata: sound*,
  table: level
)

--Note: level table must be an array of any size consisting float values
level: {0, 0, 0, 0, ...}

━ sound.setMixOutputLevels() (Client)

@Objective: Sets sound's mix output levels.
local bool: result = sound.setMixOutputLevels(
  userdata: sound*,
  table: level
)

--Note: level table must be strictly in the format as depicted below:
level: {
  float: frontLeft = 0,
  float: frontRight = 0,
  float: center = 0,
  float: lowFrequency = 0,
  float: surroundLeft = 0,
  float: surroundRight = 0,
  float: backLeft = 0,
  float: backRight = 0
}

━ sound.setMixMatrix() (Client)

@Objective: Sets sound's mix matrix.
local bool: result = sound.setMixMatrix(
  userdata: sound*,
  table: matrix
)

--Note: matrix table must be a 2D array of any size consisting float values
matrix: {
  {0, 0, 0, 0, ...},
  {0, 0, 0, 0, ...},
  {0, 0, 0, 0, ...},
  ...
}

━ sound.set3D() (Client)

@Objective: Sets sound's 3D state.
local bool: result = sound.set3D(
  userdata: sound*,
  bool: result
)

━ sound.set3DAttributes() (Client)

@Objective: Sets sound's 3D attributes.
local bool: result = sound.set3DAttributes(
  userdata: sound*,
  table: position,
  table: velocity
)

--Note: position table must be strictly in the format as depicted below:
position: {
  float: x = 0,
  float: y = 0,
  float: z = 0
}

--Note: velocity table must be strictly in the format as depicted below:
velocity: {
  float: x = 0,
  float: y = 0,
  float: z = 0
}

━ sound.set3DConeSettings() (Client)

@Objective: Sets sound's 3D cone settings.
local bool: result = sound.set3DConeSettings(
  userdata: sound*,
  table: setting
)

--Note: setting table must be strictly in the format as depicted below:
setting: {
  float: insideAngle = 0,
  float: outsideAngle = 0,
  float: outsideVolume = 0
}

━ sound.set3DConeOrientation() (Client)

@Objective: Sets sound's 3D cone orientation.
local bool: result = sound.set3DConeOrientation(
  userdata: sound*,
  table: orientation
)

--Note: orientation table must be strictly in the format as depicted below:
orientation: {
  float: x = 0,
  float: y = 0,
  float: z = 0
}

━ sound.set3DDistanceFilter() (Client)

@Objective: Sets sound's 3D distance filter.
local bool: result = sound.set3DDistanceFilter(
  userdata: sound*,
  bool: isEnabled,
  table: filter
)

--Note: filter table must be strictly in the format as depicted below:
filter: {
  float: customLevel = 0,
  float: centerFrequency = 0
}

━ sound.set3DDopplerLevel() (Client)

@Objective: Sets sound's 3D doppler level.
local bool: result = sound.set3DDopplerLevel(
  userdata: sound*,
  float: value
)

━ sound.set3DLevel() (Client)

@Objective: Sets sound's 3D level.
local bool: result = sound.set3DLevel(
  userdata: sound*,
  float: value
)

━ sound.set3DRange() (Client)

@Objective: Sets sound's 3D range.
local bool: result = sound.set3DRange(
  userdata: sound*,
  float: minDistance,
  float: maxDistance
)

━ sound.set3DOcclusion() (Client)

@Objective: Sets sound's 3D occlusion.
local bool: result = sound.set3DOcclusion(
  userdata: sound*,
  table: occlusion
)

--Note: occlusion table must be strictly in the format as depicted below:
occlusion: {
  float: directOcclusion = 0,
  float: reverbOcclusion = 0
}

━ sound.set3DSpread() (Client)

@Objective: Sets sound's 3D spread.
local bool: result = sound.set3DSpread(
  userdata: sound*,
  float: value
)