Author Topic: "Testing, Testing, One, Two ..." (new sound code)  (Read 39296 times)

0 Members and 1 Guest are viewing this topic.

Offline Kolgena

  • 211
Re: "Testing, Testing, One, Two ..." (new sound code)
So after playing a few missions, I do notice a increase in fps, but the sound is messed up. Sometimes when I shoot my primaries, I don't hear them or when my wing mates are talking, their voices cuts off mid sentence. It only seems to happen when I am in the thick of battle.

Quoted from Anti6 thread.

I also noticed primary sounds not playing during very, very, intense battles with several sounds all playing at once. This might be retail behavior though, since previously beam (and I think flak) turrets sometimes fired silently if too much was going on. Edit: I noticed this was addressed a page back. Now I'm wondering if there's a way to prioritize player sounds, since silent primaries are a lot more immersion breaking than not hearing all 5-6 explosion sounds playing at once.

As a side note, when lots of similar sounds are played together, such as when lots of beams are being fired, or when a ship explodes, I get the impression that there's some garbling going on. It sounds gravelly/bumpy, almost as if the sound levels got blown/maxed out or something.
« Last Edit: September 30, 2010, 09:29:08 am by Kolgena »

 

Offline Topgun

  • 210
Re: "Testing, Testing, One, Two ..." (new sound code)
Why did the sound code need a rewrite?

 

Offline The E

  • He's Ebeneezer Goode
  • Global Moderator
  • 213
  • Nothing personal, just tech support.
    • Steam
    • Twitter
Re: "Testing, Testing, One, Two ..." (new sound code)
* The E points at first post in the thread

Let there be light
Let there be moon
Let there be stars and let there be you
Let there be monsters and let there be pain
Let us begin to feel again
--Devin Townsend, Genesis

 

Offline General Battuta

  • Poe's Law In Action
  • 214
  • i wonder when my postcount will exceed my iq
Re: "Testing, Testing, One, Two ..." (new sound code)
Why did the sound code need a rewrite?

Because it sucked.

 

Offline Topgun

  • 210
Re: "Testing, Testing, One, Two ..." (new sound code)
* The E points at first post in the thread


I read the first post, and I see we have a few new features, but I didn't think that those features alone would justify a rewrite, so I wanted to know if there was any other reason.
*sheesh* :)

 

Offline taylor

  • Super SCP/Linux Guru
  • Moderator
  • 212
    • http://www.icculus.org/~taylor
Re: "Testing, Testing, One, Two ..." (new sound code)
Why did the sound code need a rewrite?
There was no rewrite.

The old DirectSound code hadn't been used in years, so it was ripped out to make the code easier to maintain.  The OpenAL implementation was never actually finished, so it got finished.  New options were added for modders to have more control over sound.  New options were added for users to get better sound quality, if they want and if their system can handle it.  Sound bugs reported in Mantis got fixed.

About 90% of the "new" code is exactly the same as the "old" code.  The other 10% is either what was missing previously, the new options mentioned earlier, or bug fixes.  It just got cleaned up, bug fixed, and missing functionality finally got added.  That's it.

 

Offline General Battuta

  • Poe's Law In Action
  • 214
  • i wonder when my postcount will exceed my iq
Re: "Testing, Testing, One, Two ..." (new sound code)
So we're now back to retail FS2 sound levels, but with more moddability?

 

Offline Topgun

  • 210
Re: "Testing, Testing, One, Two ..." (new sound code)
Why did the sound code need a rewrite?
There was no rewrite.

The old DirectSound code hadn't been used in years, so it was ripped out to make the code easier to maintain.  The OpenAL implementation was never actually finished, so it got finished.  New options were added for modders to have more control over sound.  New options were added for users to get better sound quality, if they want and if their system can handle it.  Sound bugs reported in Mantis got fixed.

About 90% of the "new" code is exactly the same as the "old" code.  The other 10% is either what was missing previously, the new options mentioned earlier, or bug fixes.  It just got cleaned up, bug fixed, and missing functionality finally got added.  That's it.
o

 

Offline taylor

  • Super SCP/Linux Guru
  • Moderator
  • 212
    • http://www.icculus.org/~taylor
Re: "Testing, Testing, One, Two ..." (new sound code)
So we're now back to retail FS2 sound levels, but with more moddability?
Basically, yeah.  Modders can now use higher quality sounds (like 32-bit float) as well as control the sound environment (EAX) globally, per mission, and via sexp.  Users can make use of those higher quality sounds (including full quality of OGG files which we didn't support before) if they have the hardware for it, or if every bit of memory and CPU cycles really count then they can take advantage of lower quality sound to get just a little bit of extra performance out of the game.


There are some issues with Creative's version of OpenAL which we are hitting against (missing documented features, static-y sound) and that is causing some problems.  There is also some sort of issue with the prioritization changes for sounds which is causing important ones to not get played when they should be getting played in place of lower priority sounds.

The main issues that everyone is getting now can be attributed to one or both of those two problems.  The first we can't really do much about, aside from telling people who have issues with sound quality to use OpenAL-Soft instead.  The priority problem is a code issue on our side, it's just difficult to replicate for testing a fix.  There are tweaks that can be made however and some future test builds will hopefully get at least that problem sorted out.

 
Re: "Testing, Testing, One, Two ..." (new sound code)
Does the new system have any kind of binaural functionality?

 

Offline Zacam

  • Magnificent Bastard
  • Administrator
  • 211
  • I go Sledge-O-Matic on Spammers
    • Minecraft
    • Steam
    • Twitter
    • ModDB Feature
Re: "Testing, Testing, One, Two ..." (new sound code)
Code: [Select]
code\sound\ds.cpp(903) : warning C4701: potentially uninitialized local variable 'pcm' used
code\sound\audiostr.cpp(871) : warning C4701: potentially uninitialized local variable 'pcm' used

I forget if I had mentioned these already, this is Output for MSVC 2008 Debug Builds.

Release Builds only output the following:
Code: [Select]
code\sound\ds.cpp(2370) : warning C4101: 'err' : unreferenced local variable
« Last Edit: September 30, 2010, 10:15:00 pm by Zacam »
Report MediaVP issues, now on the MediaVP Mantis! Read all about it Here!
Talk with the FSU on #SCP-FSU Talk with the SCP on #SCP
"If you can keep a level head in all this confusion, you just don't understand the situation"

¤[D+¬>

[08/01 16:53:11] <sigtau> EveningTea: I have decided that I am a 32-bit registerkin.  Pronouns are eax, ebx, ecx, edx.
[08/01 16:53:31] <EveningTea> dhauidahh
[08/01 16:53:32] <EveningTea> sak
[08/01 16:53:40] * EveningTea froths at the mouth
[08/01 16:53:40] <sigtau> i broke him, boys

 

Offline CKid

Re: "Testing, Testing, One, Two ..." (new sound code)
So after playing a few missions, I do notice a increase in fps, but the sound is messed up. Sometimes when I shoot my primaries, I don't hear them or when my wing mates are talking, their voices cuts off mid sentence. It only seems to happen when I am in the thick of battle.

Quoted from Anti6 thread.

I also noticed primary sounds not playing during very, very, intense battles with several sounds all playing at once. This might be retail behavior though, since previously beam (and I think flak) turrets sometimes fired silently if too much was going on. Edit: I noticed this was addressed a page back. Now I'm wondering if there's a way to prioritize player sounds, since silent primaries are a lot more immersion breaking than not hearing all 5-6 explosion sounds playing at once.

As a side note, when lots of similar sounds are played together, such as when lots of beams are being fired, or when a ship explodes, I get the impression that there's some garbling going on. It sounds gravelly/bumpy, almost as if the sound levels got blown/maxed out or something.

I guess I should post this here instead of in the Anti6 thread. Me and Kolgena seem to have the same problems. By downloading the OpenAL Soft that is posted in the Anti6 thread, I was able to fix the missing sound effects but like Kolgena, I get the ugly gravelly maxed out sounds. As well, All pilots/command speak as if they are talking from inside a cave. It's kind of like a very short echo overlapping their voice. If I pause the game during mid-sentence, their voice returns to normal but the moment I un-pause the echo returns. The echos only occur in-game, never during briefings.
If I agreed with you, we would both be wrong

 
Re: "Testing, Testing, One, Two ..." (new sound code)
Update on that issue I was having: converting the sound to mono did the trick. It now plays, without asserts. File attached.
Edit for clarity: it's flagged as "stereo 3d" file in the table, meaning the fifth entry is a 1.

[attachment deleted by admin]
« Last Edit: October 01, 2010, 03:18:36 am by FreeSpaceFreak »

 

Offline taylor

  • Super SCP/Linux Guru
  • Moderator
  • 212
    • http://www.icculus.org/~taylor
Re: "Testing, Testing, One, Two ..." (new sound code)
I guess I should post this here instead of in the Anti6 thread. Me and Kolgena seem to have the same problems. By downloading the OpenAL Soft that is posted in the Anti6 thread, I was able to fix the missing sound effects but like Kolgena, I get the ugly gravelly maxed out sounds. As well, All pilots/command speak as if they are talking from inside a cave. It's kind of like a very short echo overlapping their voice. If I pause the game during mid-sentence, their voice returns to normal but the moment I un-pause the echo returns. The echos only occur in-game, never during briefings.
Is "Enable EFX" checked in the launcher?  That's what your description of the problem sounds like to me, like you have EAX effects enabled.


Update on that issue I was having: converting the sound to mono did the trick. It now plays, without asserts. File attached.
Edit for clarity: it's flagged as "stereo 3d" file in the table, meaning the fifth entry is a 1.
I've been trying, but I haven't been able to reproduce the problem with that sound file.  It always converts properly from stereo to mono in all of my tests and plays just like it's supposed to.  I'm going to dig up ASW data and try to reproduce it again.  It must be data related in some way because I simply can't find any issue with the code.  If there is a bug in there it's hiding pretty well.

 

Offline Kolgena

  • 211
Re: "Testing, Testing, One, Two ..." (new sound code)
I guess I should post this here instead of in the Anti6 thread. Me and Kolgena seem to have the same problems. By downloading the OpenAL Soft that is posted in the Anti6 thread, I was able to fix the missing sound effects but like Kolgena, I get the ugly gravelly maxed out sounds. As well, All pilots/command speak as if they are talking from inside a cave. It's kind of like a very short echo overlapping their voice. If I pause the game during mid-sentence, their voice returns to normal but the moment I un-pause the echo returns. The echos only occur in-game, never during briefings.
Is "Enable EFX" checked in the launcher?  That's what your description of the problem sounds like to me, like you have EAX effects enabled.


I get the same clipping with or without EFX. (What does EFX do for FSO anyways? Doppler, dropoff, and reverb? It seems to eat some fps.)

I just thought of turning the effects volume way down in the options menu and seeing how that works. I can't try that out now, but it might do something useful. (It's set at max right now)

 

Offline taylor

  • Super SCP/Linux Guru
  • Moderator
  • 212
    • http://www.icculus.org/~taylor
Re: "Testing, Testing, One, Two ..." (new sound code)
I get the same clipping with or without EFX. (What does EFX do for FSO anyways? Doppler, dropoff, and reverb? It seems to eat some fps.)
It's an open interface to EAX type effects, reverb in the basic sense.  You reported echoing, as if in a cave, and that is the default effect when EAX/EFX is enabled.

And it will eat up a good bit of CPU time too.  With a Creative card, and using the hardware accelerated device, all of the effects should be done in hardware and it should have very little impact on game performance.  If not then it will be done in software and is a rather expensive thing to use.  Without a pretty fast CPU it can really hurt FPS when done all in software.

 

Offline Kolgena

  • 211
Re: "Testing, Testing, One, Two ..." (new sound code)
Does it do anything else aside from reverb? I know you were working on sound dropoff and doppler, but are those reliant on enabling EFX?

 

Offline taylor

  • Super SCP/Linux Guru
  • Moderator
  • 212
    • http://www.icculus.org/~taylor
Re: "Testing, Testing, One, Two ..." (new sound code)
Does it do anything else aside from reverb? I know you were working on sound dropoff and doppler, but are those reliant on enabling EFX?
The dropoff and doppler are just the 3D sound effects, not related to EFX.  EFX is disabled by default, but 3D sound is enabled by default.  You can use the -no_3d_sound cmdline option to go back to the way the old code worked.

 

Offline taylor

  • Super SCP/Linux Guru
  • Moderator
  • 212
    • http://www.icculus.org/~taylor
Re: "Testing, Testing, One, Two ..." (new sound code)
Update on that issue I was having: converting the sound to mono did the trick. It now plays, without asserts. File attached.
Edit for clarity: it's flagged as "stereo 3d" file in the table, meaning the fifth entry is a 1.
I've been trying, but I haven't been able to reproduce the problem with that sound file.  It always converts properly from stereo to mono in all of my tests and plays just like it's supposed to.  I'm going to dig up ASW data and try to reproduce it again.  It must be data related in some way because I simply can't find any issue with the code.  If there is a bug in there it's hiding pretty well.
Found it.  The problem is that engineloop001.ogg is listed twice in sounds.tbl: the first time as 2D, the second time as 3D.  The code won't load the same file twice, so it just returns the entry for the 2D version of the sound when attempting to load/play the 3D one.  Checking for such a case and loading a duplicate of the sound if necessary should fix it.

 

Offline CKid

Re: "Testing, Testing, One, Two ..." (new sound code)
Is "Enable EFX" checked in the launcher?  That's what your description of the problem sounds like to me, like you have EAX effects enabled.

Enable EFX was selected. Disabling it did remove the echo from the voices, Thank you. The only thing giving me trouble now is the super maxed out, blow your speakers, sound effects.
If I agreed with you, we would both be wrong