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

    • Ansome

      Finally got my PC back from the shop after my SSD got corrupted a week ago and damaged my motherboard. Scary stuff, but thank goodness it happened right after two months of FM development instead of wiping all my work before I could release it. New SSD, repaired Motherboard and BIOS, and we're ready to start working on my second FM with some added version control in the cloud just to be safe!
      · 1 reply
    • Petike the Taffer  »  DeTeEff

      I've updated the articles for your FMs and your author category at the wiki. Your newer nickname (DeTeEff) now comes first, and the one in parentheses is your older nickname (Fieldmedic). Just to avoid confusing people who played your FMs years ago and remember your older nickname. I've added a wiki article for your latest FM, Who Watches the Watcher?, as part of my current updating efforts. Unless I overlooked something, you have five different FMs so far.
      · 0 replies
    • Petike the Taffer

      I've finally managed to log in to The Dark Mod Wiki. I'm back in the saddle and before the holidays start in full, I'll be adding a few new FM articles and doing other updates. Written in Stone is already done.
      · 4 replies
    • nbohr1more

      TDM 15th Anniversary Contest is now active! Please declare your participation: https://forums.thedarkmod.com/index.php?/topic/22413-the-dark-mod-15th-anniversary-contest-entry-thread/
       
      · 0 replies
    • JackFarmer

      @TheUnbeholden
      You cannot receive PMs. Could you please be so kind and check your mailbox if it is full (or maybe you switched off the function)?
      · 1 reply
×
×
  • Create New...