Hugo & non-resource filed MP3s
Moderators: Ice Cream Jonsey, joltcountry
- Ice Cream Jonsey
- Posts: 30184
- Joined: Sat Apr 27, 2002 2:44 pm
- Location: Colorado
- Contact:
Hugo & non-resource filed MP3s
Anyone know if Hugo could play an MP3 that was not included in a standing resource file? I wonder if it's possible to do a Jukebox of sorts within the language. Certainly, you could if you squashed your MP3s in a file during compile, but that'd lead to limited juking. And we wouldn't want that. (I figure this is probably a question for Kent, but maybe something a bunch of other Hugoers would be interested in, so I just thought to post it here.)
the dark and gritty...Ice Cream Jonsey!
- Ice Cream Jonsey
- Posts: 30184
- Joined: Sat Apr 27, 2002 2:44 pm
- Location: Colorado
- Contact:
I should mention that Kent told me that such a thing is possible. You just have to provide the directory name for the MP3 and then you can play it as you would any compiled and resourced MP3.
So, in theory, to write a Hugo Jukebox player you use a batch file / program / whatever that provides, essentially, a dir *.* > dirlist.txt command. You then parse through that file (which presumably Hugo could do, as it has to read save files, natch). You then write code to play through the list.
(As it has taken me three months to remove negative numbers from a 50-line Hammurabi port, anyone wishing to write such a jukebox app immediately has my full support.)
So, in theory, to write a Hugo Jukebox player you use a batch file / program / whatever that provides, essentially, a dir *.* > dirlist.txt command. You then parse through that file (which presumably Hugo could do, as it has to read save files, natch). You then write code to play through the list.
(As it has taken me three months to remove negative numbers from a 50-line Hammurabi port, anyone wishing to write such a jukebox app immediately has my full support.)
the dark and gritty...Ice Cream Jonsey!
-
- Posts: 976
- Joined: Sat Apr 27, 2002 4:03 pm
- Location: Scotland, Bonnie
- Contact: