Audio Scol plugin 1.0
Audio Scol plugin based on CAudio library
Functions
Scol functions definition

Functions

int _CRAudio (mmachine m)
 _CRAudio : This function create a new Audio object
 
int _CRAudioStream (mmachine m)
 _CRAudioStream : This function create a new Audio stream object
 
int _CRAudioInput (mmachine m)
 _CRAudioInput : This function create a new AudioInput object
 
int _DSAudio (mmachine m)
 _DSAudio : This function destroy a Audio Object
 
int _DSAudioInput (mmachine m)
 _DSAudioInput : This function destroy a AudioInput Object
 
int _AudioFillBuffer (mmachine m)
 _AudioFillBuffer : This function fill an Audio Object
 
int _AudioEnableSoundEffect (mmachine m)
 _AudioEnableSoundEffect : This function enable or disable the effects an Audio Object
 
int _AudioEnableSoundFilter (mmachine m)
 _AudioEnableSoundFilter : This function enable or disable the filter an Audio Object
 
int _AudioPlay (mmachine m)
 _AudioPlay : This function play an Audio Object
 
int _AudioStop (mmachine m)
 _AudioStop : This function stop an Audio Object
 
int _AudioPause (mmachine m)
 _AudioPause : This function pause an Audio Object
 
int _AudioSetVolume (mmachine m)
 _AudioSetVolume : This function change the volume of an Audio Object
 
int _AudioGetVolume (mmachine m)
 _AudioGetVolume : This function return the current volume of an Audio Object
 
int _AudioIsPlaying (mmachine m)
 _AudioIsPlaying : This function test if an Audio Object is playing
 
int _AudioPlay3d (mmachine m)
 _AudioPlay3d : This function play an Audio Object with 3d effects
 
int _AudioSetPosition (mmachine m)
 _AudioSetPosition : This function change the 3D position of an Audio Object
 
int _AudioGetPosition (mmachine m)
 _AudioGetPosition : This function retrieve the 3D position of an Audio Object
 
int _AudioSetCone (mmachine m)
 _AudioSetCone : This function change the 3D cone of an Audio Object
 
int _AudioGetCone (mmachine m)
 _AudioGetCone : This function retrieve the 3D position of an Audio Object
 
int _AudioSetRolloffFactor (mmachine m)
 _AudioSetRolloffFactor : This function change the attenuation factor used in attenuating the Audio Object over distance
Larger values make it attenuate faster, smaller values make the source carry better.
 
int _AudioGetRolloffFactor (mmachine m)
 _AudioGetRolloffFactor : This function return the rolloff factor of an Audio Object
 
int _AudioGetCurrentTime (mmachine m)
 _AudioGetCurrentTime : This function return the current time of an Audio Object
 
int _AudioGetTotalTime (mmachine m)
 _AudioGetTotalTime : This function return the total time of an Audio Object
 
int _AudioSetPitch (mmachine m)
 _AudioSetPitch : This function change the pitch of an Audio Object
 
int _AudioGetPitch (mmachine m)
 _AudioGetPitch : This function return the pitch of an Audio Object
 
int _AudioSeek (mmachine m)
 _AudioSeek : This function seek the Audio Object to a specified time
 
int _AudioSetListenerPosition (mmachine m)
 _AudioSetListenerPosition : This function set the global listener position (camera or player position)
 
int _AudioSetMasterVolume (mmachine m)
 _AudioSetMasterVolume : This function change the master volume
 
int _AudioGetMasterVolume (mmachine m)
 _AudioGetMasterVolume : This function returns the master volume
 
int _AudioStopAllSounds (mmachine m)
 _AudioStopAllSounds : This function stop each sound currently playing
 
int _AudioPauseAllPlayingSounds (mmachine m)
 _AudioPauseAllPlayingSounds : This function pauses each sound currently playing. To resume them, use '_AudioResumeAllPreviouslyPausedSounds'
 
int _AudioResumeAllPreviouslyPausedSounds (mmachine m)
 _AudioResumeAllPreviouslyPausedSounds : Resume sounds that has been paused with the function '_AudioPauseAllPlayingSounds'
 
int _AudioIs3d (mmachine m)
 _AudioIs3d : This function test if an Audio Object has been played as a 3D sound previously (memorize only last call on each Audio Object)
 
int _AudioIsLoop (mmachine m)
 _AudioIsLoop : This function test if an Audio Object has been played in loop previously (memorize only last call on each Audio Object)
 
int _AudioSetMasterFilter (mmachine m)
 _AudioSetMasterFilter : This function set a filter on an Audio Object
 
int _AudioSetMasterEffect (mmachine m)
 _AudioSetMasterEffect : This function set an effect on an Audio Object
 
int _AudioStartCapture (mmachine m)
 _AudioStartCapture : This function start the capture of an AudioInput Object
 
int _AudioStopCapture (mmachine m)
 _AudioStopCapture : This function stop the capture of an AudioInput Object
 
int _AudioGetCaptureBuffer (mmachine m)
 _AudioGetCaptureBuffer : This function get the capture buffer of an AudioInput Object
 
int _CBAudioEnd (mmachine m)
 _CBAudioEnd : This function set the Callback for end event of a player content
 

Detailed Description

Scol functions definition

Function Documentation

◆ _AudioEnableSoundEffect()

int _AudioEnableSoundEffect ( mmachine  m)

_AudioEnableSoundEffect : This function enable or disable the effects an Audio Object

Prototype: fun [ObjAudio I] I

Parameters
ObjAudio: the current ObjAudio
I: effect state
Returns
I : 0 if success, NIL otherwise

Definition at line 414 of file plugin.cpp.

◆ _AudioEnableSoundFilter()

int _AudioEnableSoundFilter ( mmachine  m)

_AudioEnableSoundFilter : This function enable or disable the filter an Audio Object

Prototype: fun [ObjAudio I] I

Parameters
ObjAudio: the current ObjAudio
I: effect state
Returns
I : 0 if success, NIL otherwise

Definition at line 467 of file plugin.cpp.

◆ _AudioFillBuffer()

int _AudioFillBuffer ( mmachine  m)

_AudioFillBuffer : This function fill an Audio Object

Prototype: fun [ObjAudio S] I

Parameters
ObjAudio: the current ObjAudio
S: sound data
Returns
I : 0 if success, NIL otherwise

Definition at line 369 of file plugin.cpp.

◆ _AudioGetCaptureBuffer()

int _AudioGetCaptureBuffer ( mmachine  m)

_AudioGetCaptureBuffer : This function get the capture buffer of an AudioInput Object

Prototype: fun [ObjAudioInput] S

Parameters
ObjAudioInput: the current ObjAudioInput
Returns
S : the buffer content if success, NIL otherwise

Definition at line 1808 of file plugin.cpp.

◆ _AudioGetCone()

int _AudioGetCone ( mmachine  m)

_AudioGetCone : This function retrieve the 3D position of an Audio Object

Prototype: fun [ObjAudio] [I I I]

Parameters
ObjAudio: the current ObjAudio
Returns
[I I I] : inner cone, outer cone and outer volume, NIL otherwise

Definition at line 1019 of file plugin.cpp.

◆ _AudioGetCurrentTime()

int _AudioGetCurrentTime ( mmachine  m)

_AudioGetCurrentTime : This function return the current time of an Audio Object

Prototype: fun [ObjAudio] F

Parameters
ObjAudio: the current ObjAudio
Returns
F : the current time in second, NIL otherwise

Definition at line 1156 of file plugin.cpp.

◆ _AudioGetMasterVolume()

int _AudioGetMasterVolume ( mmachine  m)

_AudioGetMasterVolume : This function returns the master volume

Prototype: fun [] I

Returns
F : the master volume (range [0..100])

Definition at line 1459 of file plugin.cpp.

◆ _AudioGetPitch()

int _AudioGetPitch ( mmachine  m)

_AudioGetPitch : This function return the pitch of an Audio Object

Prototype: fun [ObjAudio] F

Parameters
ObjAudio: the current ObjAudio
Returns
F : the sound pitch, NIL otherwise

Definition at line 1280 of file plugin.cpp.

◆ _AudioGetPosition()

int _AudioGetPosition ( mmachine  m)

_AudioGetPosition : This function retrieve the 3D position of an Audio Object

Prototype: fun [ObjAudio] [[F F F] [F F F]]

Parameters
ObjAudio: the current ObjAudio
Returns
[[F F F] [F F F]] : position and direction, NIL otherwise

Definition at line 888 of file plugin.cpp.

◆ _AudioGetRolloffFactor()

int _AudioGetRolloffFactor ( mmachine  m)

_AudioGetRolloffFactor : This function return the rolloff factor of an Audio Object

Prototype: fun [ObjAudio] F

Parameters
ObjAudio: the current ObjAudio
Returns
F : rolloff factor, NIL otherwise

Definition at line 1116 of file plugin.cpp.

◆ _AudioGetTotalTime()

int _AudioGetTotalTime ( mmachine  m)

_AudioGetTotalTime : This function return the total time of an Audio Object

Prototype: fun [ObjAudio] F

Parameters
ObjAudio: the current ObjAudio
Returns
F : the total time in second, NIL otherwise

Definition at line 1196 of file plugin.cpp.

◆ _AudioGetVolume()

int _AudioGetVolume ( mmachine  m)

_AudioGetVolume : This function return the current volume of an Audio Object

Prototype: fun [ObjAudio] I

Parameters
ObjAudio: the current ObjAudio
Returns
I : current volume, NIL otherwise

Definition at line 687 of file plugin.cpp.

◆ _AudioIs3d()

int _AudioIs3d ( mmachine  m)

_AudioIs3d : This function test if an Audio Object has been played as a 3D sound previously (memorize only last call on each Audio Object)

Prototype: fun [ObjAudio] I

Parameters
ObjAudio: the current ObjAudio
Returns
I : 1 if it has been played as a 3D sound previously, 0 if not, NIL otherwise

Definition at line 1550 of file plugin.cpp.

◆ _AudioIsLoop()

int _AudioIsLoop ( mmachine  m)

_AudioIsLoop : This function test if an Audio Object has been played in loop previously (memorize only last call on each Audio Object)

Prototype: fun [ObjAudio] I

Parameters
ObjAudio: the current ObjAudio
Returns
I : 1 if it has been played in loop previously, 0 if not, NIL otherwise

Definition at line 1587 of file plugin.cpp.

◆ _AudioIsPlaying()

int _AudioIsPlaying ( mmachine  m)

_AudioIsPlaying : This function test if an Audio Object is playing

Prototype: fun [ObjAudio] I

Parameters
ObjAudio: the current ObjAudio
Returns
I : 1 if playing state, 0 if not, NIL otherwise

Definition at line 728 of file plugin.cpp.

◆ _AudioPause()

int _AudioPause ( mmachine  m)

_AudioPause : This function pause an Audio Object

Prototype: fun [ObjAudio] I

Parameters
ObjAudio: the current ObjAudio
Returns
I : 0 if success, NIL otherwise

Definition at line 603 of file plugin.cpp.

◆ _AudioPauseAllPlayingSounds()

int _AudioPauseAllPlayingSounds ( mmachine  m)

_AudioPauseAllPlayingSounds : This function pauses each sound currently playing. To resume them, use '_AudioResumeAllPreviouslyPausedSounds'

Prototype: fun [] I

Returns
I : 0 if success, NIL otherwise

Definition at line 1505 of file plugin.cpp.

◆ _AudioPlay()

int _AudioPlay ( mmachine  m)

_AudioPlay : This function play an Audio Object

Prototype: fun [ObjAudio I] I

Parameters
ObjAudio: the current ObjAudio
I: 1 for loop, 0 otherwise
Returns
I : 0 if success, NIL otherwise

Definition at line 520 of file plugin.cpp.

◆ _AudioPlay3d()

int _AudioPlay3d ( mmachine  m)

_AudioPlay3d : This function play an Audio Object with 3d effects

Prototype: fun [ObjAudio I] I

Parameters
ObjAudio: the current ObjAudio
F: attenuation, default 1.0
I: 1 for loop, 0 otherwise
Returns
I : 0 if success, NIL otherwise

Definition at line 773 of file plugin.cpp.

◆ _AudioResumeAllPreviouslyPausedSounds()

int _AudioResumeAllPreviouslyPausedSounds ( mmachine  m)

_AudioResumeAllPreviouslyPausedSounds : Resume sounds that has been paused with the function '_AudioPauseAllPlayingSounds'

Prototype: fun [] I

Returns
I : 0 if success, NIL otherwise

Definition at line 1527 of file plugin.cpp.

◆ _AudioSeek()

int _AudioSeek ( mmachine  m)

_AudioSeek : This function seek the Audio Object to a specified time

Prototype: fun [ObjAudio F I] I

Parameters
ObjAudio: the current ObjAudio
F: time to seek (default 0.0)
I: 1 to seek from the current position, 0 to seek from the start position of the sound (default 0)
Returns
I : 0 if success, NIL otherwise

Definition at line 1321 of file plugin.cpp.

◆ _AudioSetCone()

int _AudioSetCone ( mmachine  m)

_AudioSetCone : This function change the 3D cone of an Audio Object

Prototype: fun [ObjAudio I I I] I

Parameters
ObjAudio: the current ObjAudio
I: inner cone angle 0 to 360
I: outer cone angle 0 to 360
I: sound volume in outer cone (default : 0)
Returns
I : 0 if success, NIL otherwise

Definition at line 964 of file plugin.cpp.

◆ _AudioSetListenerPosition()

int _AudioSetListenerPosition ( mmachine  m)

_AudioSetListenerPosition : This function set the global listener position (camera or player position)

Prototype: fun [[F F F] [F F F]] I

Parameters
[FF F] : position
[FF F] : direction
Returns
I : 0 if success, nil otherwise

Definition at line 1374 of file plugin.cpp.

◆ _AudioSetMasterEffect()

int _AudioSetMasterEffect ( mmachine  m)

_AudioSetMasterEffect : This function set an effect on an Audio Object

Prototype: fun [I S] I

Parameters
I: effect type (AUDIO_EFFECT_NONE, AUDIO_EFFECT_REVERB, AUDIO_EFFECT_CHORUS, AUDIO_EFFECT_DISTORTION, AUDIO_EFFECT_ECHO, AUDIO_EFFECT_FLANGER, AUDIO_EFFECT_RING_MODULATOR, AUDIO_EFFECT_COMPRESSOR, AUDIO_EFFECT_EQUALIZER)
S: effect preset name

presets for Reverb : "Generic", "Padded Cell", "Room", "Bath Room", "Living Room", "Stone Room", "Auditorium", "Concert Hall", "Cave", "Arena", "Hangar", "Carpeted Hallway", "Hallway", "Stone Corridor", "Alley", "Forest", "City", "Mountains", "Quarry", "Plain", "Parking Lot", "Sewer Pipe", "Under Water", "Drugged", "Dizzy", "Psychotic"

Returns
I : 0 if success, NIL otherwise

Definition at line 1683 of file plugin.cpp.

◆ _AudioSetMasterFilter()

int _AudioSetMasterFilter ( mmachine  m)

_AudioSetMasterFilter : This function set a filter on an Audio Object

Prototype: fun [I F F] I

Parameters
I: filter type (AUDIO_FILTER_NONE, AUDIO_FILTER_LOWPASS, AUDIO_FILTER_HIGHPASS, AUDIO_FILTER_BANDPASS)
F: low frequency volume
F: high frequency volume
Returns
I : 0 if success, NIL otherwise

Definition at line 1627 of file plugin.cpp.

◆ _AudioSetMasterVolume()

int _AudioSetMasterVolume ( mmachine  m)

_AudioSetMasterVolume : This function change the master volume

Prototype: fun [I] I

Parameters
I: volume to set (range [0..100])
Returns
I : 0 if success, NIL otherwise

Definition at line 1423 of file plugin.cpp.

◆ _AudioSetPitch()

int _AudioSetPitch ( mmachine  m)

_AudioSetPitch : This function change the pitch of an Audio Object

Prototype: fun [ObjAudio F] I

Parameters
ObjAudio: the current ObjAudio
F: new pitch (between 0 to infinit, default is 1.0)
Returns
I : 0 if success, NIL otherwise

Definition at line 1236 of file plugin.cpp.

◆ _AudioSetPosition()

int _AudioSetPosition ( mmachine  m)

_AudioSetPosition : This function change the 3D position of an Audio Object

Prototype: fun [ObjAudio [F F F] [F F F]] I

Parameters
ObjAudio: the current ObjAudio
[FF F] : position
[FF F] : direction
Returns
I : 0 if success, NIL otherwise

Definition at line 824 of file plugin.cpp.

◆ _AudioSetRolloffFactor()

int _AudioSetRolloffFactor ( mmachine  m)

_AudioSetRolloffFactor : This function change the attenuation factor used in attenuating the Audio Object over distance
Larger values make it attenuate faster, smaller values make the source carry better.

Prototype: fun [ObjAudio F] I

Parameters
ObjAudio: the current ObjAudio
F: new rolloff factor (between 0 to infinit, default is 1.0)
Returns
I : 0 if success, NIL otherwise

Definition at line 1072 of file plugin.cpp.

◆ _AudioSetVolume()

int _AudioSetVolume ( mmachine  m)

_AudioSetVolume : This function change the volume of an Audio Object

Prototype: fun [ObjAudio I] I

Parameters
ObjAudio: the current ObjAudio
I: new volume (default 100)
Returns
I : 0 if success, NIL otherwise

Definition at line 643 of file plugin.cpp.

◆ _AudioStartCapture()

int _AudioStartCapture ( mmachine  m)

_AudioStartCapture : This function start the capture of an AudioInput Object

Prototype: fun [ObjAudioInput] I

Parameters
ObjAudioInput: the current ObjAudioInput
Returns
I : 0 if success, NIL otherwise

Definition at line 1730 of file plugin.cpp.

◆ _AudioStop()

int _AudioStop ( mmachine  m)

_AudioStop : This function stop an Audio Object

Prototype: fun [ObjAudio] I

Parameters
ObjAudio: the current ObjAudio
Returns
I : 0 if success, NIL otherwise

Definition at line 564 of file plugin.cpp.

◆ _AudioStopAllSounds()

int _AudioStopAllSounds ( mmachine  m)

_AudioStopAllSounds : This function stop each sound currently playing

Prototype: fun [] I

Returns
I : 0 if success, NIL otherwise

Definition at line 1483 of file plugin.cpp.

◆ _AudioStopCapture()

int _AudioStopCapture ( mmachine  m)

_AudioStopCapture : This function stop the capture of an AudioInput Object

Prototype: fun [ObjAudioInput] I

Parameters
ObjAudioInput: the current ObjAudioInput
Returns
I : 0 if success, NIL otherwise

Definition at line 1769 of file plugin.cpp.

◆ _CBAudioEnd()

int _CBAudioEnd ( mmachine  m)

_CBAudioEnd : This function set the Callback for end event of a player content

Prototype: fun [ObjAudio fun [ObjAudio u0] u1 u0] ObjAudio

Parameters
ObjAudio: the current ObjAudio
fun[ObjAudio u0] u1 : SCOL CallBack function to call
u0: user parameter
Returns
ObjAudio : same SCOL object

Definition at line 1880 of file plugin.cpp.

◆ _CRAudio()

int _CRAudio ( mmachine  m)

_CRAudio : This function create a new Audio object

Prototype: fun [Chn S P I] ObjAudio

Parameters
Chn: the current channel
S: the name of the sound instance
P: the file to load
I: 1 for stream, 0 otherwise
Returns
ObjAudio : The Audio Object or NIL if creation fail

Definition at line 105 of file plugin.cpp.

◆ _CRAudioInput()

int _CRAudioInput ( mmachine  m)

_CRAudioInput : This function create a new AudioInput object

Prototype: fun [Chn I I I] ObjAudioInput

Parameters
Chn: the current channel
I: the device index (-1 for default)
I: the capture frequency (22050)
I: the capture format (AUDIO_8BIT_MONO, AUDIO_8BIT_STEREO, AUDIO_16BIT_MONO, AUDIO_16BIT_STEREO)
Returns
ObjAudioInput : The AudioInput Object or NIL if creation fail

Definition at line 248 of file plugin.cpp.

◆ _CRAudioStream()

int _CRAudioStream ( mmachine  m)

_CRAudioStream : This function create a new Audio stream object

Prototype: fun [Chn S I I] ObjAudio

Parameters
Chn: the current channel
S: the name of the sound instance
I: stream sample rate (ex : 44100)
I: stream format (AUDIO_8BIT_MONO, AUDIO_8BIT_STEREO, AUDIO_16BIT_MONO, AUDIO_16BIT_STEREO)
Returns
ObjAudio : The Audio Object or NIL if creation fail

Definition at line 175 of file plugin.cpp.

◆ _DSAudio()

int _DSAudio ( mmachine  m)

_DSAudio : This function destroy a Audio Object

Prototype: fun [ObjAudio] I

Parameters
ObjAudio: the current ObjAudio
Returns
I : 0 if success, NIL otherwise

Definition at line 306 of file plugin.cpp.

◆ _DSAudioInput()

int _DSAudioInput ( mmachine  m)

_DSAudioInput : This function destroy a AudioInput Object

Prototype: fun [ObjAudioInput] I

Parameters
ObjAudioInput: the current ObjAudioInput
Returns
I : 0 if success, NIL otherwise

Definition at line 337 of file plugin.cpp.