[ Back to Geeks3D.com ]
 GeeXLab
Laboratory for Real Time 3D Programming (prototyping and demos) OpenGL, Lua, Python, GLSL, PhysX and more...Reference Guide Host-API Lua / Python
» Back to Homepage
» Back to Developer's Guide Index
HYP_Playlist Library
Manages play lists.
Number of functions: 10
HYP_Playlist.Create
Create allows to create a new playlist.
:
name [STRING]: Name of the playlist.
id [INTEGER]: Playlist identifier
:
id = HYP_Playlist.Create( name )
HYP_Playlist.Destroy
Destroy allows to destroy a playlist.
:
id [INTEGER]: Playlist identifier
:
HYP_Playlist.Destroy( id )
HYP_Playlist.AddTrack
AddTrack allows to add an audio track to a playlist.
:
id [INTEGER]: Playlist identifier
soundtrack_id [INTEGER]: identifier of the soudtrack. This identifier may have been changed wether in the XML code or by the HYP_Sound.Load() function.
:
id_pl = HYP_Playlist.Create( "myCoolPlaylist" );
id_st1 = HYP_Playlist.AddTrack( id_pl, "data/mp3/first.mp3" );
id_st2 = HYP_Playlist.AddTrack( id_pl, "data/mp3/second.mp3" );
HYP_Playlist.Play( id_pl );
HYP_Playlist.RemoveTrack
RemoveTrack to remove an audio track from a playlist.
:
id [INTEGER]: Playlist identifier
soundtrack_id [INTEGER]: Soundtrack identifier.
:
HYP_Playlist.RemoveTrack( id, soundtrack_id )
HYP_Playlist.SetCurrentTrack
SetCurrentTrack allows to change audio track for playing.
:
id [INTEGER]: Playlist identifier
soundtrack_id [INTEGER]: identifier of the soudtrack.
This identifier may have been changed wether in the XML code or by the HYP_Sound.Load() function.
:
HYP_Playlist.SetCurrentTrack( id, soundtrack_id )
HYP_Playlist.GetCurrentTrackId
GetCurrentTrackId allows to get the identifier of the current playing audio track.
:
id [INTEGER]: Playlist identifier
id_st [INTEGER]: identifier of current soundtrack playing.
:
id_st = HYP_Playlist.GetCurrentTrackId( id )
HYP_Playlist.GetCurrentTrackName
GetCurrentTrackName allows to get the name of the current playing audio track.
:
id [INTEGER]: Playlist identifier
name_st [STRING]: Name of soundtrack. playing
:
name_st = HYP_Playlist.GetCurrentTrackName( id )
HYP_Playlist.Play
Play allows to start playing audio track from the playlist.
:
id [INTEGER]: identifier of the playlist.
:
HYP_Playlist.Play( id )
HYP_Playlist.Stop
Stop allows to stop playing audio track from the playlist.
:
id [INTEGER]: identifier of the playlist.
:
HYP_Playlist.Stop( id )
HYP_Playlist.SetOptions
SetOptions allows to change the working mode of the playlist.
:
options [INTEGER]: playlist options:
PLAYLIST_TRACKS_MANAGEMENT_OFF = 1
PLAYLIST_TRACKS_MANAGEMENT_ON = 2
PLAYLIST_LOOP_ON = 3
PLAYLIST_LOOP_OFF = 4
PLAYLIST_DISPLAY_CUR_TRACK_NAME_ON = 6
PLAYLIST_DISPLAY_CUR_TRACK_NAME_OFF = 7
PLAYLIST_ENABLED = 8
PLAYLIST_DISABLED = 9
These options are 'problem-free' except for PLAYLIST_TRACKS_MANAGEMENT_ON/PLAYLIST_TRACKS_MANAGEMENT_OFF.
PLAYLIST_TRACKS_MANAGEMENT_ON let Demoniak manage the different audio track transitions.
It is the default value. PLAYLIST_TRACKS_MANAGEMENT_OFF requires to use afterwards HYP_Sound.IsTrackFinished()
and other functions from the HYP_Sound lib to manage oneself the audio file playing. - Values = PLAYLIST_TRACKS_MANAGEMENT_OFF = 1|
PLAYLIST_TRACKS_MANAGEMENT_ON = 2|
PLAYLIST_LOOP_ON = 3|
PLAYLIST_LOOP_OFF = 4|
PLAYLIST_DISPLAY_CUR_TRACK_NAME_ON = 6|
PLAYLIST_DISPLAY_CUR_TRACK_NAME_OFF = 7|
PLAYLIST_ENABLED = 8|
PLAYLIST_DISABLED = 9
id [INTEGER]: identifier of the playlist.
:
HYP_Playlist.SetOptions( id, options )
|