Page 1 of 1
Ingame, mod specific music player...
Posted: 11 Sep 2007, 20:29
by Forboding Angel
What I'm asking for is a lua player that will read values from a file, or just randomly play mp3's (or ogg files) from a directory.
It doesn't even need an interface. THe only thing it needs is an on/off button and volume control.
This is for music that is included in the mod archive.
Could someone be kind enough to make this happen?
Posted: 11 Sep 2007, 20:34
by Neddie
My main LUA thing may turn up some methods for doing this, but I'm sure somebody else will make it long before I do.
Posted: 12 Sep 2007, 16:51
by Tired
Can use AF's music AI in the meantime. Don't know if it can easily be modified to read files inside of a mod or not, but can always make an executable to put the mod in the mod folder and the music in the music folder when run.
Posted: 13 Sep 2007, 00:50
by AF
It cannot read files inside a mod they have to be extracted into the filesystem to be played
Posted: 13 Sep 2007, 02:43
by Neddie
That screws with all my scheming...
Posted: 13 Sep 2007, 02:54
by trepan
A couple of notes:
1. You could use LuaUI to pull files out of a mod (it can read from the VFS,
and write to the user filesystem). I don't know how well (speed?) it will work
for large files.
2. You could setup a music daemon to look at a spring generated file and
take actions based on its contents. I mention this method because I pulled
out the popen()/system() lua calls in 0.75b1 (iirc).
The best approach would obviously be to support OGG/MP3 files natively
(and be able to read them from the VFS, so that they could be used for
unit sounds, as well as for other reasons). One of the problems is that there
are 2 sounds systems being used by spring (OpenAL and DX). One should
not be given a significant capability without providing the same for the other.
Posted: 13 Sep 2007, 14:04
by Tired
Oh? It's a practicality issue now as opposed to an .mp3 format on an open source player?