Drag[en]gine Script Module DragonScript 1.35
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()

bool Dragengine.AudioSystem.canCaptureAudio ( )
static

Audio can be captured.

Version
1.32

References canCaptureAudio().

Referenced by canCaptureAudio().

◆ getActiveMicrophone()

Microphone Dragengine.AudioSystem.getActiveMicrophone ( )
static

Active microphone.

References getActiveMicrophone().

Referenced by getActiveMicrophone().

◆ getAudioCaptureBitRate()

int Dragengine.AudioSystem.getAudioCaptureBitRate ( )
static

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

Version
1.32

Returns 0 if audio is not being captured.

References getAudioCaptureSampleRate().

Referenced by getAudioCapturePeak().

◆ getAudioCapturePeak()

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.

References getAudioCaptureBitRate().

Referenced by getAudioCaptureRMS().

◆ getAudioCaptureRMS()

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.

References getAudioCapturePeak().

Referenced by magnitudeToDb().

◆ getAudioCaptureSampleRate()

int Dragengine.AudioSystem.getAudioCaptureSampleRate ( )
static

Sample rate of audio capture in Hz.

Version
1.32

Returns 0 if audio is not being captured.

Referenced by getAudioCaptureBitRate().

◆ getFPSRate()

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.

References getFPSRate(), getParameterInfo(), getParameterValue(), sendCommand(), and setParameterValue().

Referenced by getFPSRate().

◆ getParameterCount()

int Dragengine.AudioSystem.getParameterCount ( )
static

Number of parameters available.

References magnitudeToDb().

Referenced by setParameterValue().

◆ getParameterInfo() [1/2]

ModuleParameter Dragengine.AudioSystem.getParameterInfo ( int index)
static

Parameter information.

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

Referenced by getFPSRate(), and sendCommand().

◆ getParameterInfo() [2/2]

ModuleParameter Dragengine.AudioSystem.getParameterInfo ( String name)
static

Named parameter information or null if not found.

References magnitudeToDbPercentage().

◆ getParameterValue()

String Dragengine.AudioSystem.getParameterValue ( String name)
static

Parameter value.

Exceptions
EInvalidParamParameter with name not found.

Referenced by getFPSRate().

◆ isCapturingAudio()

bool Dragengine.AudioSystem.isCapturingAudio ( )
static

Is capturing audio.

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

References isCapturingAudio().

Referenced by isCapturingAudio().

◆ magnitudeToDb()

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.

References getAudioCaptureRMS().

Referenced by getParameterCount().

◆ magnitudeToDbPercentage()

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).

Referenced by getParameterInfo().

◆ sendCommand()

String Dragengine.AudioSystem.sendCommand ( String command)
static

Send command.

References getParameterInfo().

Referenced by getFPSRate().

◆ setActiveMicrophone()

void Dragengine.AudioSystem.setActiveMicrophone ( Microphone microphone)
static

Set active microphone.

References setActiveMicrophone().

Referenced by setActiveMicrophone().

◆ setParameterValue()

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

Set named parameter value.

Exceptions
EInvalidParamParameter with name not found.

References getParameterCount().

Referenced by getFPSRate().

◆ startAudioCapture()

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().

References startAudioCapture().

Referenced by startAudioCapture().

◆ stopAudioCapture()

void Dragengine.AudioSystem.stopAudioCapture ( )
static

Stop audio capture.

Version
1.32

References stopAudioCapture().

Referenced by stopAudioCapture().


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