• Do not use Works in Progress as a way of avoiding the releases system! Works in Progress can be used for sharing early betas and for getting suggestions for improvement. Releases of finished content are not allowed in this forum! If you would like to submit a finished addon, click here for instructions on how to do so.

Sound.h?

Status
Not open for further replies.

Liliam

Member
Well, suppose I want to use a Linedef Executor to play a sound when I step in a sector. Fine and dandy. So I make the control sector, choose a linedef, set the type, make the necessary tags, and choose a sample. How? Linedef length, of course. So I check the Specials Reference Document. It says the list of SFX is in sound.h. Okay.

Help?
 
Sounds.h is probably in the source. The source comes with SRB2. Look for a SRB2Src109.exe.
 
You could also load up the SOC editor and go to the Sound section and it'll list all the sounds with a number next to them that you can use.
 
Okay, new question - if I were to add custom sounds, would they automatically register as they load, or would I have to use SOCs to enable them (to use with the Play SFX linedef, of course).
 
You would just have to import them into a wad under the name DSFRE***.

The "***" would be a number depending on the slot it uses, so DSFRE001 would use the sound slot 137, DSFRE002 would use 138 and so on.

There is about 800 free slots for custom sounds.
 
Why thank you for the help, ree-c =)

New question (these just keep on pouring) - how does the LOOPPOINT thingy on digital music work? I believe it means that after the song is over, it will loop to that position in the track - but how is the position determined? Also, where should you insert it?

For instance, I have a 1 minute long WAV song, which should loop back to 00:30 after the end. I know how to encode it into OGG and stick it in a wad, but how do you make it loop?
 
the resolution of the LOOPPOINT is by audio sample.
There are 44100 samples per second in an srb2 OGG...

30 seconds x 44100Hz = 1323000
 
SSNTails said:
the resolution of the LOOPPOINT is by audio sample.
There are 44100 samples per second in an srb2 OGG...

30 seconds x 44100Hz = 1323000
Funnily enough, after I compared the Sapphire Falls LOOPPOINT with the average position it loops from, I got a value which I had no idea what it was, but I decided to round it to 44100 just for fun. So it means I got the LOOPPOINT values for my music all right after all. However, I still don't know where to insert this value - ASCII editing will tell me it's in the COMMENT string, but how do I edit that?

EDIT: So does this mean that if you load a 22,050 Hz OGG you'll have to multiply 30 seconds by 22050?
 
looppoint.png


SRB2 does not support MP3s or OGGs other than 44100Hz.
 
Ah, thank you, I am most grateful. All my custom music loops correctly now. One step closer to the end of my little "project" =P
 
Me said:
On a side note, due to the lack of reactions and comments, and SRB2's crashy netgames, I'll probably pause NANDE Groove indefinately. I'll just release the maps one by one. Two of them are probably making the contest. At least I hope so.

Yeah. It isn't worth it if netgames averagely last for 4 maps only.

And only you and Ryan made encouraging comments, so meh. I'll just work my secret little mod and the 3-act stage I'm trying to finish for the contest.
 
Status
Not open for further replies.

Who is viewing this thread (Total: 1, Members: 0, Guests: 1)

Back
Top