Hard Light Productions Forums

Modding, Mission Design, and Coding => FS2 Open Coding - The Source Code Project (SCP) => Topic started by: Petrarch of the VBB on March 17, 2006, 01:58:13 pm

Title: That play-sound-from-file SEXP
Post by: Petrarch of the VBB on March 17, 2006, 01:58:13 pm
Do the sound files have to be in any particular format, and indeed in any particular folder?

sexps.html is most unhelpful.
Title: Re: That play-sound-from-file SEXP
Post by: Cobra on March 17, 2006, 02:04:20 pm
from what i know, you can only use wavs and ogg's. :)
Title: Re: That play-sound-from-file SEXP
Post by: Petrarch of the VBB on March 17, 2006, 02:05:59 pm
That'd explain 1 reason why it wasn't working then. Damned MP3s. Cheers.

Now, does it have to be any particular kind of wav? I know the default game sounds are in some crazy format like ADPCM or something.
Title: Re: That play-sound-from-file SEXP
Post by: Cobra on March 17, 2006, 02:08:22 pm
MP3's are not used due to a copyright law that protects them from 'certain' use. ;) Other than that i heard the codemonkeys were having trouble keeping the mp3 music on track, music skipping and speeding up, that kind of thing.

AFAIK i don't think it matters what coding you use, but i've always used PCM.

[EDIT]Hay! What's with the perpetual noob title now? :p
Title: Re: That play-sound-from-file SEXP
Post by: Petrarch of the VBB on March 17, 2006, 02:48:23 pm
Aha, it's working as an ogg. Woo.

Now the problem is that it'll require everyone to have Freespace in the same directory if I release the mission, as the filepath I've entered is "D:\Games\FreeSpace2\forlorn.ogg"

Clearly this is not ideal. So, is there a folder I can put it in (Voice>Special?) where it'll be found automatically if I just enter "forlorn.ogg"?
Title: Re: That play-sound-from-file SEXP
Post by: CP5670 on March 17, 2006, 03:39:41 pm
I think it looks in all the audio folders. I have used it with files in 8b22k, special and music with no problems.
Title: Re: That play-sound-from-file SEXP
Post by: Petrarch of the VBB on March 17, 2006, 05:23:45 pm
Marvellous.
Title: Re: That play-sound-from-file SEXP
Post by: WMCoolmon on March 18, 2006, 03:15:12 am
I detest those '8b22k' folders. They make people think that music has to be in that format and in that folder.

It really doesn't. You can have 8-bit, 16-bit, and up to 44khz in just the sound folder and it should work fine.