Author Topic: Found the cause of my sound problems  (Read 2112 times)

0 Members and 1 Guest are viewing this topic.

Offline Dragon

  • Citation needed
  • 212
  • The sky is the limit.
Found the cause of my sound problems
From time to time, I posted a thread complaining about a strange bug with rapid firing weapons causing sounds to randomly disappear. It was hard to reproduce on different configurations, inconsistent and didn't register on debug builds, making it a nightmare to nail, and I never got around to compiling my own build to track the problem more precisely.
However, last time someone mentioned that it's possible that the sound card has problems handling the amount of sounds that appeared. I dismissed that at first, since the sounds seemed rather short (if they weren't, the result would be unlistenable noise). But then, I took a close look at them.

It turned out those short cracks of gunfire had a lengthy, slowly fading reverb, going on for up to 6 seconds! Now, with two guns firing at 50-100 RPS (I know the tricks to make it work with other FSO limits), the soundcard has to cope with playing up to 1200 sounds at the time, most of them inaudible (though them more typical amount would be about 300 simultaneously played sounds. Still enough to cause problems). No wonder it couldn't cope. Turns out you need to be very careful when choosing gatling gun sounds.

 

Offline headdie

  • i don't use punctuation lol
  • 212
  • Lawful Neutral with a Chaotic outook
    • Skype
    • Twitter
    • Headdie on Deviant Art
Re: Found the cause of my sound problems
defiantly something to keep in mind when selecting sounds for mods.
Minister of Interstellar Affairs Sol Union - Retired
quote General Battuta - "FRED is canon!"
Contact me at [email protected]
My Release Thread, Old Release Thread, Celestial Objects Thread, My rubbish attempts at art

 

Offline Kobrar44

  • On Suspended Sentence
  • 29
  • Let me tilerape it for you!
    • Steam
Re: Found the cause of my sound problems
Shouldn't this be in the modding section?
Oh guys, use that [ url ][ img ][ /img ][ /url ] :/

 

Offline Dragon

  • Citation needed
  • 212
  • The sky is the limit.
Re: Found the cause of my sound problems
I wasn't sure. I wrote this to bring a closure to multiple "bug" threads I posted here, but the topic is obviously more modding related. Mods can move it there if they want. I'm not sure how much it's a sound card limit and how much it's an FSO limit (let's face it, anything might have trouble processing 1000+ sounds at the same time).

 

Offline karajorma

  • King Louie - Jungle VIP
  • Administrator
  • 214
    • Karajorma's Freespace FAQ
Re: Found the cause of my sound problems
Or we can leave it here a while and then move it to modding. That way everyone sees it. :)
Karajorma's Freespace FAQ. It's almost like asking me yourself.

[ Diaspora ] - [ Seeds Of Rebellion ] - [ Mind Games ]

 

Offline Dragon

  • Citation needed
  • 212
  • The sky is the limit.
Re: Found the cause of my sound problems
Good idea. This thread could save a great deal of frustration to anybody who wishes to venture into such ROF extremes.

  

Offline Iss Mneur

  • 210
  • TODO:
Re: Found the cause of my sound problems
Having spent a great deal of time working with the FSO sound code, I thought I would offer my knowledge.

The first limit that you would have been hitting is an FSO limit, which is currently 48 concurrent voices (of which only 32 are available for gameplay sound effects, the rest are used for music and other things).  However, even the best virtual sound cards available can only do 256 concurrent voices so, even if FSO was able to exploit every available voice, it would still hit the limits of the sound card.

It is hard to find the number of concurrent voices for modern hardware sound cards.  The vendors don't really say and the OpenAL allows for the vendor to fake it by 1, 2, 16, or 32 voices on the hardware and the rest in software.   The best hardware I could find only expclitly states supporting 32 concurrent voices on the the hardware, but this hardware is long out of production and presumably things have improved since then, but then so a cpu power so it is just as likely that the fancy hardware only supports a couple on the hardware and does the rest in software.
"I love deadlines. I like the whooshing sound they make as they fly by." -Douglas Adams
wxLauncher 0.9.4 public beta (now with no config file editing for FRED) | wxLauncher 2.0 Request for Comments