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

━ APIs

━ sound.getPriority() (Client)

@Objective: Retrieves sound's priority.
local int: result = sound.getPriority(
  userdata: sound*
)

━ sound.getLoopCount() (Client)

@Objective: Retrieves sound's loop count.
local int: result = sound.getLoopCount(
  userdata: sound*
)

━ sound.getLoopPoint() (Client)

@Objective: Retrieves sound's loop point.
local int: startTick, int: endTick = sound.getLoopPoint(
  userdata: sound*
)

━ sound.getPitch() (Client)

@Objective: Retrieves sound's pitch.
local float: result = sound.getPitch(
  userdata: sound*
)

━ sound.getFrequency() (Client)

@Objective: Retrieves sound's frequency.
local float: result = sound.getFrequency(
  userdata: sound*
)

━ sound.getVolume() (Client)

@Objective: Retrieves sound's volume.
local float: result = sound.getVolume(
  userdata: sound*
)

━ sound.getAudibility() (Client)

@Objective: Retrieves sound's audibility.
local float: result = sound.getAudibility(
  userdata: sound*
)

━ sound.getPosition() (Client)

@Objective: Retrieves sound's playback position.
local int: positionTick = sound.getPosition(
  userdata: sound*
)

━ sound.getMixMatrix() (Client)

@Objective: Retrieves sound's mix matrix.
local table: matrix = sound.getMixMatrix(
  userdata: sound*
)

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

━ sound.get3DAttributes() (Client)

@Objective: Retrieves sound's 3D attributes.
local table: position, table: velocity = sound.get3DAttributes(
  userdata: sound*
)

--Note: position table's format is as depicted below:
position: {
  float: x = 0,
  float: y = 0,
  float: z = 0
}

--Note: velocity table's format is as depicted below:
velocity: {
  float: x = 0,
  float: y = 0,
  float: z = 0
}

━ sound.get3DConeSettings() (Client)

@Objective: Retrieves sound's 3D cone settings.
local table: setting = sound.get3DConeSettings(
  userdata: sound*
)

--Note: setting table's format is as depicted below:
setting: {
  float: insideAngle = 0,
  float: outsideAngle = 0,
  float: outsideVolume = 0
}

━ sound.get3DConeOrientation() (Client)

@Objective: Retrieves sound's 3D cone orientation.
local table: orientation = sound.get3DConeOrientation(
  userdata: sound*
)

--Note: orientation table's format is as depicted below:
orientation: {
  float: x = 0,
  float: y = 0,
  float: z = 0
}

━ sound.get3DDistanceFilter() (Client)

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

--Note: filter table's format is as depicted below:
filter: {
  float: customLevel = 0,
  float: centerFrequency = 0
}

━ sound.get3DDopplerLevel() (Client)

@Objective: Retrieves sound's 3D doppler level.
local float: result = sound.get3DDopplerLevel(
  userdata: sound*
)

━ sound.get3DLevel() (Client)

@Objective: Retrieves sound's 3D level.
local float: result = sound.get3DLevel(
  userdata: sound*
)

━ sound.get3DRange() (Client)

@Objective: Retrieves sound's 3D range.
local float: minDistance, float: maxDistance = sound.get3DRange(
  userdata: sound*
)

━ sound.get3DOcclusion() (Client)

@Objective: Retrieves sound's 3D occlusion.
local table: occlusion = sound.get3DOcclusion(
  userdata: sound*
)

--Note: occlusion table's format is as depicted below:
occlusion: {
  float: directOcclusion = 0,
  float: reverbOcclusion = 0
}

━ sound.get3DSpread() (Client)

@Objective: Retrieves sound's 3D spread.
local float: result = sound.get3DSpread(
  userdata: sound*
)