Jump to content
The Dark Mod Forums

Sound Shader only playing first ogg


Fidcal

Recommended Posts

I am using a speaker entity and the sounds are just environmental so I want it to keep playing one from the list continuously.

 

After much testing and failing to get my first sound shader to work I made a test map and reduced the shader to just two ogg files. It always just plays the first one only whichever way I put them in the shader.

 

I find this on id's site....

 

"The cvar s_maxSoundsPerShader limits the maximum number of sounds that can be in a shader. This is set to 0 (no limit) for high end systems and 1 for low end systems (which means it always plays the first sound in the list)."

 

s_maxSoundsPerShader is set at 0 in my system. Since id says IS and not SHOUD BE then I'm assuming the above means doom detects my system is 'high end' and sets the cvar to 0? It would have to be a pretty low end system if it can't play a few sounds from a list. I have 2GB of RAM. The sound system I have no idea - it came with the PC which is just a few months old.

 

Any suggestions? Here is the test shader...

 

misc_city01

{

volume 20

minDistance 35

maxDistance 35

no_dups

omnidirectional

looping

 

sound/ambient/environmental/churchbell02.ogg

sound/ambient/environmental/machine_noise03_loop.ogg

}

Link to comment
Share on other sites

I tried that before. I tried no looping first actually because the example on the id site didn't have one. But it doesn't repeat then. Alternatively you can put s_looping on the speaker. Either way it would only play the first in the list. And I've not been able to find any DM ones with a list. Maybe I'll have a look through doom's...

Link to comment
Share on other sites

Yes, I did try different ones - even doom's own sound shaders would only play the first sound in the list for me no matter what I set s_maxSoundsPerShader to. :(

 

But yes! Just about to give up and use multiple speakers when I found the answer. Looping in the shader or on the speaker just loops the first one (why it doesn't just loop any one of them I don't know) but the answer is to use wait instead. wait does a repeat with a pause between (which I want anyway) Not sure without checking if 1 second is the minimum or if it accepts 0 or a fraction but anyway I can now have multiple sounds! And can use it with random as well.

 

Interesting to note that in Doom's own shaders if they put wav when it should be ogg it still worked. My guess is you don't need the suffix and it will check for both presumably in a certain order so unless one has the same name for both wav and ogg in the same folder (so unlikely as to be never) then it might not matter.

 

So you were right the first time it was to do with looping.

 

Now I can take a break on a high! :)

Link to comment
Share on other sites

Interesting to note that in Doom's own shaders if they put wav when it should be ogg it still worked. My guess is you don't need the suffix and it will check for both presumably in a certain order so unless one has the same name for both wav and ogg in the same folder (so unlikely as to be never) then it might not matter.

Yes, as with the texture files, the extensions seems to be cut off and/or ignored. I also had to find this out by trial back when I wrote the sound preview in DarkRadiant.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recent Status Updates

    • OrbWeaver

      Does anyone actually use the Normalise button in the Surface inspector? Even after looking at the code I'm not quite sure what it's for.
      · 7 replies
    • Ansome

      Turns out my 15th anniversary mission idea has already been done once or twice before! I've been beaten to the punch once again, but I suppose that's to be expected when there's over 170 FMs out there, eh? I'm not complaining though, I love learning new tricks and taking inspiration from past FMs. Best of luck on your own fan missions!
      · 4 replies
    • The Black Arrow

      I wanna play Doom 3, but fhDoom has much better features than dhewm3, yet fhDoom is old, outdated and probably not supported. Damn!
      Makes me think that TDM engine for Doom 3 itself would actually be perfect.
      · 6 replies
    • Petike the Taffer

      Maybe a bit of advice ? In the FM series I'm preparing, the two main characters have the given names Toby and Agnes (it's the protagonist and deuteragonist, respectively), I've been toying with the idea of giving them family names as well, since many of the FM series have named protagonists who have surnames. Toby's from a family who were usually farriers, though he eventually wound up working as a cobbler (this serves as a daylight "front" for his night time thieving). Would it make sense if the man's popularly accepted family name was Farrier ? It's an existing, though less common English surname, and it directly refers to the profession practiced by his relatives. Your suggestions ?
      · 9 replies
    • nbohr1more

      Looks like the "Reverse April Fools" releases were too well hidden. Darkfate still hasn't acknowledge all the new releases. Did you play any of the new April Fools missions?
      · 5 replies
×
×
  • Create New...