Music (WIP,works, but need some help)
Posted: 04 Aug 2008, 11:00
okay this is what I have
it plays all wav's in spring/music, later it will also play ogg's and will play in a random order if you want too
problems/questions:
-currently it plays all files at the same time, how to fix that?
-if i reload it i see that i get the error, could not play "2" no such file, i had a file named 2 in the music folder, so the widget does not refresh the list, help?
-when you disable it it doesnt disables, i think i know how to fix that, I'll do that later
Code: Select all
function widget:Initialize()
wavFiles = VFS.DirList('music/', '*.wav')
for k,v in pairs(wavFiles) do Spring.PlaySoundFile (v,1) end
end
problems/questions:
-currently it plays all files at the same time, how to fix that?
-if i reload it i see that i get the error, could not play "2" no such file, i had a file named 2 in the music folder, so the widget does not refresh the list, help?
-when you disable it it doesnt disables, i think i know how to fix that, I'll do that later