Module ncine.audio_player
The table containing audio player related functions
Functions
ncine.audio_player.has_source (player) | Returns true if a valid OpenAL source is currently assigned to the player |
ncine.audio_player.source_id (player) | Returns the OpenAL id of the player source |
ncine.audio_player.buffer_id (player) | Returns the OpenAL id of the currently playing buffer |
ncine.audio_player.bytes_per_sample (player) | Returns the number of bytes per sample |
ncine.audio_player.num_channels (player) | Returns the number of audio channels of the currently playing buffer |
ncine.audio_player.frequency (player) | Returns the samples frequency of the currently playing buffer |
ncine.audio_player.num_samples (player) | Returns the number of samples |
ncine.audio_player.duration (player) | Returns the duration in seconds |
ncine.audio_player.buffer_size (player) | Returns the size of the currently playing buffer in bytes |
ncine.audio_player.get_sample_offset (player) | Returns the size of the currently playing buffer in bytes |
ncine.audio_player.set_sample_offset (player, offset) | Returns the size of the currently playing buffer in bytes |
ncine.audio_player.is_source_locked (player) | Returns true if the OpenAL source is locked |
ncine.audio_player.set_source_locked (player, locked) | Locks an OpenAL source so it is not released to the pool when the player stops |
ncine.audio_player.play (player) | Starts playing |
ncine.audio_player.pause (player) | Pauses playing |
ncine.audio_player.stop (player) | Stops playing and rewinds |
ncine.audio_player.is_playing (player) | Returns true if the player is playing |
ncine.audio_player.is_paused (player) | Returns true if the player is paused |
ncine.audio_player.is_stopped (player) | Returns true if the player is stopped |
ncine.audio_player.is_looping (player) | Returns the looping property of the player |
ncine.audio_player.set_looping (player, looping) | Sets the looping property of the player |
ncine.audio_player.get_gain (player) | Returns the player gain value |
ncine.audio_player.set_gain (player, gain) | Sets the player gain value |
ncine.audio_player.get_pitch (player) | Returns the player pitch value |
ncine.audio_player.set_pitch (player, pitch) | Sets the player pitch value |
ncine.audio_player.get_position (player) | Returns the player position vector |
ncine.audio_player.set_position (player, position) | Sets the player position vector |
ncine.audio_player.set_position (player, position_x, position_y, position_z) | Sets the player position vector through components |
ncine.audio_player.get_velocity (player) | Returns the player velocity vector |
ncine.audio_player.set_velocity (player, velocity) | Sets the player velocity vector |
ncine.audio_player.set_velocity (player, velocity_x, velocity_y, velocity_z) | Sets the player velocity vector through components |
ncine.audio_player.get_direction (player) | Returns the player direction vector |
ncine.audio_player.set_direction (player, direction) | Sets the player direction vector |
ncine.audio_player.set_direction (player, direction_x, direction_y, direction_z) | Sets the player direction vector through components |
ncine.audio_player.get_cone_inner_angle (player) | Returns the player inside angle of the sound cone in degrees |
ncine.audio_player.set_cone_inner_angle (player, angle) | Sets the player inside angle of the sound cone in degrees |
ncine.audio_player.get_cone_outer_angle (player) | Returns the player outside angle of the sound cone in degrees |
ncine.audio_player.set_cone_outer_angle (player, angle) | Sets the player outside angle of the sound cone in degrees |
ncine.audio_player.get_cone_outer_gain (player) | Returns the player multiplication factor to determine the gain outside the cone |
ncine.audio_player.set_cone_outer_gain (player, gain) | Sets the player multiplication factor to determine the gain outside the cone |
Tables
audioplayerObj | The light user data of an audio player object |
ncine.audio_player.get_air_absorption_factor (player) | Returns the player air absorption factor (only available with OpenAL EFX) |
ncine.audio_player.set_air_absorption_factor (player, factor) | Sets the player air absorption factor (only available with OpenAL EFX) |
ncine.audio_player.get_room_rolloff_factor (player) | Returns the player room rolloff factor (only available with OpenAL EFX) |
ncine.audio_player.set_room_rolloff_factor (player, factor) | Sets the player room rolloff factor (only available with OpenAL EFX) |
ncine.audio_player.get_cone_outer_gain_hf (player) | Returns the player cone outer gain HF value (only available with OpenAL EFX) |
ncine.audio_player.set_cone_outer_gain_hf (player, gain) | Sets the player cone outer gain HF value (only available with OpenAL EFX) |
ncine.audio_player.has_effect_slot (player) | Returns true if a valid OpenAL effect slot is currently assigned to the player (only available with OpenAL EFX) |
ncine.audio_player.get_effect_slot_id (player) | Returns the OpenAL id of the effect slot (only available with OpenAL EFX) |
ncine.audio_player.has_aux_filter (player) | Returns true if a valid OpenAL auxiliary filter is currently assigned to the player (only available with OpenAL EFX) |
ncine.audio_player.get_aux_filter_id (player) | Returns the OpenAL id of the auxiliary filter (only available with OpenAL EFX) |
ncine.audio_player.has_direct_filter (player) | Returns true if a valid OpenAL direct filter is currently assigned to the player (only available with OpenAL EFX) |
ncine.audio_player.get_direct_filter_id (player) | Returns the OpenAL id of the direct filter (only available with OpenAL EFX) |
ncine.audio_player.set_effect_slot (player, audio_effect_slot, audio_filter) | Sets or removes an affect slot, with an optional auxiliary filter, to the player (only available with OpenAL EFX) |
ncine.audio_player.set_direct_filter (player, audio_filter) | Sets or removes the filter parameters from a filter object to the direct signal (only available with OpenAL EFX) |
Functions
- ncine.audio_player.has_source (player)
-
Returns
true
if a valid OpenAL source is currently assigned to the playerParameters:
- player audioplayerObj
Returns:
-
boolean
- ncine.audio_player.source_id (player)
-
Returns the OpenAL id of the player source
Parameters:
- player audioplayerObj
Returns:
-
integer
- ncine.audio_player.buffer_id (player)
-
Returns the OpenAL id of the currently playing buffer
Parameters:
- player audioplayerObj
Returns:
-
integer
- ncine.audio_player.bytes_per_sample (player)
-
Returns the number of bytes per sample
Parameters:
- player audioplayerObj
Returns:
-
integer
- ncine.audio_player.num_channels (player)
-
Returns the number of audio channels of the currently playing buffer
Parameters:
- player audioplayerObj
Returns:
-
integer
- ncine.audio_player.frequency (player)
-
Returns the samples frequency of the currently playing buffer
Parameters:
- player audioplayerObj
Returns:
-
integer
- ncine.audio_player.num_samples (player)
-
Returns the number of samples
Parameters:
- player audioplayerObj
Returns:
-
integer
- ncine.audio_player.duration (player)
-
Returns the duration in seconds
Parameters:
- player audioplayerObj
Returns:
-
number
- ncine.audio_player.buffer_size (player)
-
Returns the size of the currently playing buffer in bytes
Parameters:
- player audioplayerObj
Returns:
-
integer
- ncine.audio_player.get_sample_offset (player)
-
Returns the size of the currently playing buffer in bytes
Parameters:
- player audioplayerObj
Returns:
-
integer
- ncine.audio_player.set_sample_offset (player, offset)
-
Returns the size of the currently playing buffer in bytes
Parameters:
- player audioplayerObj
- offset integer
- ncine.audio_player.is_source_locked (player)
-
Returns
true
if the OpenAL source is lockedParameters:
- player audioplayerObj
Returns:
-
boolean
- ncine.audio_player.set_source_locked (player, locked)
-
Locks an OpenAL source so it is not released to the pool when the player stops
Parameters:
- player audioplayerObj
- locked boolean
- ncine.audio_player.play (player)
-
Starts playing
Parameters:
- player audioplayerObj
- ncine.audio_player.pause (player)
-
Pauses playing
Parameters:
- player audioplayerObj
- ncine.audio_player.stop (player)
-
Stops playing and rewinds
Parameters:
- player audioplayerObj
- ncine.audio_player.is_playing (player)
-
Returns
true
if the player is playingParameters:
- player audioplayerObj
Returns:
-
boolean
- ncine.audio_player.is_paused (player)
-
Returns
true
if the player is pausedParameters:
- player audioplayerObj
Returns:
-
boolean
- ncine.audio_player.is_stopped (player)
-
Returns
true
if the player is stoppedParameters:
- player audioplayerObj
Returns:
-
boolean
- ncine.audio_player.is_looping (player)
-
Returns the looping property of the player
Parameters:
- player audioplayerObj
Returns:
-
boolean
- ncine.audio_player.set_looping (player, looping)
-
Sets the looping property of the player
Parameters:
- player audioplayerObj
- looping boolean
- ncine.audio_player.get_gain (player)
-
Returns the player gain value
Parameters:
- player audioplayerObj
Returns:
-
number
- ncine.audio_player.set_gain (player, gain)
-
Sets the player gain value
Parameters:
- player audioplayerObj
- gain number
- ncine.audio_player.get_pitch (player)
-
Returns the player pitch value
Parameters:
- player audioplayerObj
Returns:
-
number
- ncine.audio_player.set_pitch (player, pitch)
-
Sets the player pitch value
Parameters:
- player audioplayerObj
- pitch number
- ncine.audio_player.get_position (player)
-
Returns the player position vector
Parameters:
- player audioplayerObj
Returns:
-
ncine.vec3
- ncine.audio_player.set_position (player, position)
-
Sets the player position vector
Parameters:
- player audioplayerObj
- position ncine.vec3
- ncine.audio_player.set_position (player, position_x, position_y, position_z)
-
Sets the player position vector through components
Parameters:
- player audioplayerObj
- position_x number
- position_y number
- position_z number
- ncine.audio_player.get_velocity (player)
-
Returns the player velocity vector
Parameters:
- player audioplayerObj
Returns:
-
ncine.vec3
- ncine.audio_player.set_velocity (player, velocity)
-
Sets the player velocity vector
Parameters:
- player audioplayerObj
- velocity ncine.vec3
- ncine.audio_player.set_velocity (player, velocity_x, velocity_y, velocity_z)
-
Sets the player velocity vector through components
Parameters:
- player audioplayerObj
- velocity_x number
- velocity_y number
- velocity_z number
- ncine.audio_player.get_direction (player)
-
Returns the player direction vector
Parameters:
- player audioplayerObj
Returns:
-
ncine.vec3
- ncine.audio_player.set_direction (player, direction)
-
Sets the player direction vector
Parameters:
- player audioplayerObj
- direction ncine.vec3
- ncine.audio_player.set_direction (player, direction_x, direction_y, direction_z)
-
Sets the player direction vector through components
Parameters:
- player audioplayerObj
- direction_x number
- direction_y number
- direction_z number
- ncine.audio_player.get_cone_inner_angle (player)
-
Returns the player inside angle of the sound cone in degrees
Parameters:
- player audioplayerObj
Returns:
-
number
- ncine.audio_player.set_cone_inner_angle (player, angle)
-
Sets the player inside angle of the sound cone in degrees
Parameters:
- player audioplayerObj
- angle number
- ncine.audio_player.get_cone_outer_angle (player)
-
Returns the player outside angle of the sound cone in degrees
Parameters:
- player audioplayerObj
Returns:
-
number
- ncine.audio_player.set_cone_outer_angle (player, angle)
-
Sets the player outside angle of the sound cone in degrees
Parameters:
- player audioplayerObj
- angle number
- ncine.audio_player.get_cone_outer_gain (player)
-
Returns the player multiplication factor to determine the gain outside the cone
Parameters:
- player audioplayerObj
Returns:
-
number
- ncine.audio_player.set_cone_outer_gain (player, gain)
-
Sets the player multiplication factor to determine the gain outside the cone
Parameters:
- player audioplayerObj
- gain number
Tables
- ncine.audio_player.get_air_absorption_factor (player)
-
Returns the player air absorption factor (only available with OpenAL EFX)
Parameters:
- player audioplayerObj
Returns:
-
number
- ncine.audio_player.set_air_absorption_factor (player, factor)
-
Sets the player air absorption factor (only available with OpenAL EFX)
Parameters:
- player audioplayerObj
- factor number
- ncine.audio_player.get_room_rolloff_factor (player)
-
Returns the player room rolloff factor (only available with OpenAL EFX)
Parameters:
- player audioplayerObj
Returns:
-
number
- ncine.audio_player.set_room_rolloff_factor (player, factor)
-
Sets the player room rolloff factor (only available with OpenAL EFX)
Parameters:
- player audioplayerObj
- factor number
- ncine.audio_player.get_cone_outer_gain_hf (player)
-
Returns the player cone outer gain HF value (only available with OpenAL EFX)
Parameters:
- player audioplayerObj
Returns:
-
number
- ncine.audio_player.set_cone_outer_gain_hf (player, gain)
-
Sets the player cone outer gain HF value (only available with OpenAL EFX)
Parameters:
- player audioplayerObj
- gain number
- ncine.audio_player.has_effect_slot (player)
-
Returns
true
if a valid OpenAL effect slot is currently assigned to the player (only available with OpenAL EFX)Parameters:
- player audioplayerObj
Returns:
-
boolean
- ncine.audio_player.get_effect_slot_id (player)
-
Returns the OpenAL id of the effect slot (only available with OpenAL EFX)
Parameters:
- player audioplayerObj
Returns:
-
integer
- ncine.audio_player.has_aux_filter (player)
-
Returns
true
if a valid OpenAL auxiliary filter is currently assigned to the player (only available with OpenAL EFX)Parameters:
- player audioplayerObj
Returns:
-
boolean
- ncine.audio_player.get_aux_filter_id (player)
-
Returns the OpenAL id of the auxiliary filter (only available with OpenAL EFX)
Parameters:
- player audioplayerObj
Returns:
-
integer
- ncine.audio_player.has_direct_filter (player)
-
Returns
true
if a valid OpenAL direct filter is currently assigned to the player (only available with OpenAL EFX)Parameters:
- player audioplayerObj
Returns:
-
boolean
- ncine.audio_player.get_direct_filter_id (player)
-
Returns the OpenAL id of the direct filter (only available with OpenAL EFX)
Parameters:
- player audioplayerObj
Returns:
-
integer
- ncine.audio_player.set_effect_slot (player, audio_effect_slot, audio_filter)
-
Sets or removes an affect slot, with an optional auxiliary filter, to the player (only available with OpenAL EFX)
Parameters:
- player audioplayerObj
- audio_effect_slot ncine.audio_effect_slot.audioeffectslotObj or nil
- audio_filter ncine.audio_filter.audiofilterObj or nil
- ncine.audio_player.set_direct_filter (player, audio_filter)
-
Sets or removes the filter parameters from a filter object to the direct signal (only available with OpenAL EFX)
Parameters:
- player audioplayerObj
- audio_filter ncine.audio_filter.audiofilterObj or nil