LuaSTG-x Core API
audio::RecordingDevice Class Reference
Inheritance diagram for audio::RecordingDevice:

Public Member Functions

function getBitDepth ()
 
function getChannelCount ()
 
function getData ()
 
function getMaxSamples ()
 
function getName ()
 
function getSampleCount ()
 
function getSampleRate ()
 
function isRecording ()
 
function start (local samples, local sampleRate, local bitDepth, local channels)
 
function stop ()
 

Member Function Documentation

◆ getBitDepth()

function getBitDepth ( )

return Bit depth for recording.

Returns
number

◆ getChannelCount()

function getChannelCount ( )

return Number of channels for recording.

Returns
number

◆ getData()

function getData ( )

Retreives recorded data.

return SoundData containing data obtained from recording device.

Returns
audio.SoundData

◆ getMaxSamples()

function getMaxSamples ( )

Gets the maximum number of samples that will be buffered, as set by start().

Returns
number

◆ getName()

function getName ( )

return device name.

Returns
string

◆ getSampleCount()

function getSampleCount ( )

return Number of samples currently recorded.

Returns
number

◆ getSampleRate()

function getSampleRate ( )

return Sample rate for recording.

Returns
number

◆ isRecording()

function isRecording ( )

return True if currently recording.

Returns
boolean

◆ start()

function start ( local  samples,
local  sampleRate,
local  bitDepth,
local  channels 
)

Begins audio input recording process.

param samples Number of samples to buffer.

param sampleRate Desired sample rate.

param bitDepth Desired bit depth (8 or 16).

param channels Desired number of channels.

return True if recording started successfully.

Parameters
samplesnumber
sampleRatenumber
bitDepthnumber
channelsnumber
Returns
boolean

◆ stop()

function stop ( )

Stops audio input recording.

Returns
audio.RecordingDevice

The documentation for this class was generated from the following file: