Ingame, mod specific music player...

Ingame, mod specific music player...

Discuss Lua based Spring scripts (LuaUI widgets, mission scripts, gaia scripts, mod-rules scripts, scripted keybindings, etc...)

Moderator: Moderators

Post Reply
User avatar
Forboding Angel
Evolution RTS Developer
Posts: 14673
Joined: 17 Nov 2005, 02:43

Ingame, mod specific music player...

Post 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?
User avatar
Neddie
Community Lead
Posts: 9406
Joined: 10 Apr 2006, 05:05

Post 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.
User avatar
Tired
Posts: 302
Joined: 14 Nov 2005, 07:19

Post 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.
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

It cannot read files inside a mod they have to be extracted into the filesystem to be played
User avatar
Neddie
Community Lead
Posts: 9406
Joined: 10 Apr 2006, 05:05

Post by Neddie »

That screws with all my scheming...
trepan
Former Engine Dev
Posts: 1200
Joined: 17 Nov 2005, 00:52

Post 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.
User avatar
Tired
Posts: 302
Joined: 14 Nov 2005, 07:19

Post by Tired »

Oh? It's a practicality issue now as opposed to an .mp3 format on an open source player?
Post Reply

Return to “Lua Scripts”