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?
Ingame, mod specific music player...
Moderator: Moderators
- Forboding Angel
- Evolution RTS Developer
- Posts: 14673
- Joined: 17 Nov 2005, 02:43
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.
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.