Module ncine.audio_buffer

The table containing audio buffer related functions

Functions

ncine.audio_buffer.new (filename) Constructs an audio buffer object from an audio file.
ncine.audio_buffer.delete (audio_buffer) Destroys an audio buffer object and releases its memory
ncine.audio_buffer.buffer_id (audio_buffer) Returns the OpenAL buffer id
ncine.audio_buffer.bytes_per_sample (audio_buffer) Returns the number of bytes per sample
ncine.audio_buffer.num_channels (audio_buffer) Returns the number of audio channels
ncine.audio_buffer.frequency (audio_buffer) Returns the samples frequency
ncine.audio_buffer.num_samples (audio_buffer) Returns number of samples
ncine.audio_buffer.duration (audio_buffer) Returns the duration in seconds
ncine.audio_buffer.buffer_size (audio_buffer) Returns the size of the buffer in bytes

Tables

audiobufferObj The light user data of an audio buffer object


Functions

ncine.audio_buffer.new (filename)
Constructs an audio buffer object from an audio file.

Don’t forget to call ncine.audio_buffer.delete when you are done with it!

Parameters:

  • filename string The path to an audio file

Returns:

    audiobufferObj A new audio buffer object
ncine.audio_buffer.delete (audio_buffer)
Destroys an audio buffer object and releases its memory

Parameters:

ncine.audio_buffer.buffer_id (audio_buffer)
Returns the OpenAL buffer id

Parameters:

Returns:

    integer
ncine.audio_buffer.bytes_per_sample (audio_buffer)
Returns the number of bytes per sample

Parameters:

Returns:

    integer
ncine.audio_buffer.num_channels (audio_buffer)
Returns the number of audio channels

Parameters:

Returns:

    integer
ncine.audio_buffer.frequency (audio_buffer)
Returns the samples frequency

Parameters:

Returns:

    integer
ncine.audio_buffer.num_samples (audio_buffer)
Returns number of samples

Parameters:

Returns:

    integer
ncine.audio_buffer.duration (audio_buffer)
Returns the duration in seconds

Parameters:

Returns:

    number
ncine.audio_buffer.buffer_size (audio_buffer)
Returns the size of the buffer in bytes

Parameters:

Returns:

    integer

Tables

audiobufferObj
The light user data of an audio buffer object
generated by LDoc 1.5.0 Last updated 2024-12-18 15:08:56