Module ncine.audio_device
The table containing the audio device related functions
Functions
ncine.audio_device.name () | Returns the name of the audio device |
ncine.audio_device.has_efx_extension () | Returns true if the OpenAL EFX extension is available |
ncine.audio_device.get_gain () | Returns the listener gain value |
ncine.audio_device.set_gain (gain) | Sets the listener gain value |
ncine.audio_device.get_position () | Returns the listener position vector |
ncine.audio_device.set_position (position) | Sets the listener position vector |
ncine.audio_device.set_position (position_x, position_y, position_z) | Sets the listener position vector through components |
ncine.audio_device.get_velocity () | Returns the listener velocity vector |
ncine.audio_device.set_velocity (velocity) | Sets the listener velocity vector |
ncine.audio_device.set_position (velocity_x, velocity_y, velocity_z) | Sets the listener velocity vector through components |
ncine.audio_device.get_max_num_sources () | Returns the maximum number of audio sources |
ncine.audio_device.get_num_available_sources () | Returns the number of available audio sources |
ncine.audio_device.get_num_players () | Returns the number of active players |
ncine.audio_device.get_player (index) | Returns the specified active player object |
ncine.audio_device.pause_players () | Pauses every player currently playing. |
ncine.audio_device.stop_players () | Stops every player currently playing |
ncine.audio_device.resume_players () | Resumes all and only the players that were paused by a pause_players() call |
ncine.audio_device.pause_device () | Pauses all audio device activities using an OpenAL-soft extension (if available). |
ncine.audio_device.resume_device () | Resumes all audio device activities using an OpenAL-soft extension (if available). |
Functions
- ncine.audio_device.name ()
-
Returns the name of the audio device
Returns:
- ncine.audio_device.has_efx_extension ()
-
Returns
true
if the OpenAL EFX extension is availableReturns:
-
boolean
- ncine.audio_device.get_gain ()
-
Returns the listener gain value
Returns:
-
number
- ncine.audio_device.set_gain (gain)
-
Sets the listener gain value
Parameters:
- gain number
- ncine.audio_device.get_position ()
-
Returns the listener position vector
Returns:
-
ncine.vec3
- ncine.audio_device.set_position (position)
-
Sets the listener position vector
Parameters:
- position ncine.vec3
- ncine.audio_device.set_position (position_x, position_y, position_z)
-
Sets the listener position vector through components
Parameters:
- position_x number
- position_y number
- position_z number
- ncine.audio_device.get_velocity ()
-
Returns the listener velocity vector
Returns:
-
ncine.vec3
- ncine.audio_device.set_velocity (velocity)
-
Sets the listener velocity vector
Parameters:
- velocity ncine.vec3
- ncine.audio_device.set_position (velocity_x, velocity_y, velocity_z)
-
Sets the listener velocity vector through components
Parameters:
- velocity_x number
- velocity_y number
- velocity_z number
- ncine.audio_device.get_max_num_sources ()
-
Returns the maximum number of audio sources
Returns:
-
integer
- ncine.audio_device.get_num_available_sources ()
-
Returns the number of available audio sources
Returns:
-
integer
- ncine.audio_device.get_num_players ()
-
Returns the number of active players
Returns:
-
integer
- ncine.audio_device.get_player (index)
-
Returns the specified active player object
Parameters:
- index integer
Returns:
-
ncine.audioplayer.audioplayerObj or nil
- ncine.audio_device.pause_players ()
-
Pauses every player currently playing.
Paused players can be resumed with
resume_players()
. - ncine.audio_device.stop_players ()
- Stops every player currently playing
- ncine.audio_device.resume_players ()
-
Resumes all and only the players that were paused by a
pause_players()
call - ncine.audio_device.pause_device ()
-
Pauses all audio device activities using an OpenAL-soft extension (if available).
If the extension is not available, all players are paused.
- ncine.audio_device.resume_device ()
-
Resumes all audio device activities using an OpenAL-soft extension (if available).
If the extension is not available, all paused players resume playing.