1.Quick Glance #
Audio Functions are GPE functions used to get data on an audio resource. They are also used to play, pause or stop audio and audio groups.
2.Audio Functions #
void GPE.audio_play( int audioId, bool loops)
Begins playing an audio resource . If loops is set to true it then sets it to a constant loop(Useful for background music and ambient noises).
Scope: GPE
Return type : VOID
Parameters:
- int audioId– an integer of an audio resource(aka msc_level1). If undefined, null or non-number based this function does nothing.
- bool loops - select true if you wish to keep the audio playing in repeat after the first successful play.
bool GPE.audio_playing( int audioId)
Returns true or false if the audio is playing.
Scope: GPE
Return type : bool
Parameters:
- int audioId– an integer of an audio resource(aka msc_level1). If undefined, null or non-number based this function returns false.
void GPE.audio_pause_all( )
This function systematically pauses all current audios from playing.
Scope: GPE
Return type : VOID
Parameters: none
void GPE.pause_audio_group( String audioGroupId)
Pauses all audio resources with the matching group id from playing.
Scope: GPE
Return type : void
Parameters:
- String audioGroupId– The name of the audio group. Typically created in editor.
void GPE.audio_stop_all( )
This function systematically stops all current audios from playing.
Scope: GPE
Return type : VOID
Parameters: none
void GPE.stop_audio_group( String audioGroupId)
Stops all audio resources with the matching group id from playing.
Scope: GPE
Return type : void
Parameters:
- String audioGroupId– The name of the audio group. Typically created in editor.
void GPE.loop_audio( int audioId)
Begins playing an audio resource in a constant loop. Useful for background music and ambient noises.
Scope: GPE
Return type : VOID
Parameters:
- int audioId– an integer of an audio resource(aka msc_level1). If undefined, null or non-number based this function does nothing.
void GPE.pause_audio( int audioId)
Pauses the audio resource with the matching id from playing.
Scope: GPE
Return type : VOID
Parameters:
- int audioId– an integer of an audio resource(aka msc_level1). If undefined, null or non-number based this function does nothing.
void GPE.play_audio( int audioId, bool loops)
Begins playing an audio resource . If loops is set to true it then sets it to a constant loop(Useful for background music and ambient noises).
Scope: GPE
Return type : void
Parameters:
- int audioId– an integer of an video resource(aka msc_level1). If undefined, null or non-number based this function does nothing.
- bool loops – select true if you wish to keep the video playing in repeat after the first successful play.
void GPE.stop_audio( int audioId)
Stops the audio resource with the matching id from playing.
Scope: GPE
Return type : VOID
Parameters:
- int audioId– an integer of an audio resource(aka msc_level1). If undefined, null or non-number based this function does nothing.
3.Related Pages #
- Video Editor – quick overview of managing videos in GPE’s editor..
- Video– Information about how GPE handles videos.
- The Editor – Information on how to utilize GPE’s editor.
- Coding with GPE – A general tutorial on how to code in GPE.
- Function Directory – The directory to learn about functions on a categorical basis.