local demo_dir = gh_utils.get_demo_dir()
local lib_dir = gh_utils.get_lib_dir() 		

dofile(lib_dir .. "lua/libfont/libfont1.lua")   






gh_renderer.set_vsync(1)
    
winW, winH = gh_window.getsize(0)





-- stream is for big audio file (like a mp3 track). For short sounds effects, set stream to 0.
-- When stream=0, a non-streamed sound can be played more than once at a time.
-- When stream=1, a streaming sound can only be played once.
local stream = 0 
local absolute_path = 0

-- FMOD can play many audio formats (.wav, .mp3, .xm, .s3m, etc.).
--
-- groovy.mp3 is the sound track of an old demo by the demogroup Bomb released in 1998!
-- http://www.pouet.net/prod.php?which=281
-- https://www.youtube.com/watch?v=q_bqAucaJ1g
--
sound = gh_audio.sound_create("groovy.mp3", absolute_path, stream)

-- no looping
gh_audio.sound_set_loop_state(sound, 1)

-- Start playing.
channel = gh_audio.sound_play(sound)

-- set volume to 80%
gh_audio.sound_set_volume(sound, channel, 0.8)

-- sound track duration
duration_ms = gh_audio.sound_get_duration_ms(sound)

