Drag[en]gine Script Module DragonScript 1.32.1
Loading...
Searching...
No Matches
Dragengine.AudioSystem Class Reference

Audio system. More...

Inheritance diagram for Dragengine.AudioSystem:

Static Public Member Functions

Management
static Microphone getActiveMicrophone ()
 Active microphone.
 
static void setActiveMicrophone (Microphone microphone)
 Set active microphone.
 
static bool canCaptureAudio ()
 Audio can be captured.
 
static void startAudioCapture ()
 Start audio capture.
 
static void stopAudioCapture ()
 Stop audio capture.
 
static bool isCapturingAudio ()
 Is capturing audio.
 
static int getAudioCaptureSampleRate ()
 Sample rate of audio capture in Hz.
 
static int getAudioCaptureBitRate ()
 Bit rate of audio capture (e.g. 16).
 
static float getAudioCapturePeak ()
 Peak audio level.
 
static float getAudioCaptureRMS ()
 Root-mean-square audio level.
 
static float magnitudeToDb (float level)
 Convert magnitude to decibel.
 
static float magnitudeToDbPercentage (float level)
 Convert magnitude to percentage decibel.
 
Parameters
static int getParameterCount ()
 Number of parameters available.
 
static ModuleParameter getParameterInfo (int index)
 Parameter information.
 
static ModuleParameter getParameterInfo (String name)
 Named parameter information or null if not found.
 
static String getParameterValue (String name)
 Parameter value.
 
static void setParameterValue (String name, String value)
 Set named parameter value.
 
static String sendCommand (String command)
 Send command.
 
static int getFPSRate ()
 Frame-per-second rate averaged over the last couple of frames.
 

Detailed Description

Audio system.

This is a native class. This is a pure static class. The class can not be instantiated

Member Function Documentation

◆ canCaptureAudio()

static bool Dragengine.AudioSystem.canCaptureAudio ( )
static

Audio can be captured.

Version
1.32

◆ getActiveMicrophone()

static Microphone Dragengine.AudioSystem.getActiveMicrophone ( )
static

Active microphone.

◆ getAudioCaptureBitRate()

static int Dragengine.AudioSystem.getAudioCaptureBitRate ( )
static

Bit rate of audio capture (e.g. 16).

Version
1.32

Returns 0 if audio is not being captured.

◆ getAudioCapturePeak()

static float Dragengine.AudioSystem.getAudioCapturePeak ( )
static

Peak audio level.

Version
1.32

Returns value in the range from 0 to 1. Returns 0 if audio is not being captured.

◆ getAudioCaptureRMS()

static float Dragengine.AudioSystem.getAudioCaptureRMS ( )
static

Root-mean-square audio level.

Version
1.32

Returns value in the range from 0 to 1. Returns 0 if audio is not being captured.

◆ getAudioCaptureSampleRate()

static int Dragengine.AudioSystem.getAudioCaptureSampleRate ( )
static

Sample rate of audio capture in Hz.

Version
1.32

Returns 0 if audio is not being captured.

◆ getFPSRate()

static int Dragengine.AudioSystem.getFPSRate ( )
static

Frame-per-second rate averaged over the last couple of frames.

Version
1.6

Returns 0 if module is not using a separate thread.

◆ getParameterCount()

static int Dragengine.AudioSystem.getParameterCount ( )
static

Number of parameters available.

◆ getParameterInfo() [1/2]

static ModuleParameter Dragengine.AudioSystem.getParameterInfo ( int  index)
static

Parameter information.

Exceptions
EOutOfBoundaryindex less than 0 or greater than or equal to getParameterCount().

◆ getParameterInfo() [2/2]

static ModuleParameter Dragengine.AudioSystem.getParameterInfo ( String  name)
static

Named parameter information or null if not found.

◆ getParameterValue()

static String Dragengine.AudioSystem.getParameterValue ( String  name)
static

Parameter value.

Exceptions
EInvalidParamParameter with name not found.

◆ isCapturingAudio()

static bool Dragengine.AudioSystem.isCapturingAudio ( )
static

Is capturing audio.

Version
1.32
Returns
true between calls to #startAudioCapture() and #stopAudioCapture() otherwise false.

◆ magnitudeToDb()

static float Dragengine.AudioSystem.magnitudeToDb ( float  level)
static

Convert magnitude to decibel.

Version
1.32

Converts magnitude in the range from 0 to 1 to decibel value.

◆ magnitudeToDbPercentage()

static float Dragengine.AudioSystem.magnitudeToDbPercentage ( float  level)
static

Convert magnitude to percentage decibel.

Version
1.32

Converts magnitude in the range from 0 to 1 to percentage decibel in the range from 0(-60dB) to 1(0dB).

◆ sendCommand()

static String Dragengine.AudioSystem.sendCommand ( String  command)
static

Send command.

◆ setActiveMicrophone()

static void Dragengine.AudioSystem.setActiveMicrophone ( Microphone  microphone)
static

Set active microphone.

◆ setParameterValue()

static void Dragengine.AudioSystem.setParameterValue ( String  name,
String  value 
)
static

Set named parameter value.

Exceptions
EInvalidParamParameter with name not found.

◆ startAudioCapture()

static void Dragengine.AudioSystem.startAudioCapture ( )
static

Start audio capture.

Version
1.32

On certain platforms capturing audio requires explicit user consent. Calling this method can potentially interrupt the application showing a permission dialog. Hence after calling this method it can take some time until the audio capture begins. You can check if audio capturing is running by calling #isCapturingAudio().

◆ stopAudioCapture()

static void Dragengine.AudioSystem.stopAudioCapture ( )
static

Stop audio capture.

Version
1.32

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