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

0 Members and 1 Guest are viewing this topic.

Offline taylor

  • Super SCP/Linux Guru
  • Moderator
  • 212
    • http://www.icculus.org/~taylor
Re: "Testing, Testing, One, Two ..." (new sound code)
I've actually been curious about moving to a OpenAL-Soft binary instead of the Creative reference build for the last several months.  What kind of downsides are there to installing an OpenAL-Soft binary system wide as opposed to using the Creative-supplied one?
Here is a quote from the docs which explains all of that pretty well:

Quote
Note that it is still expected to install the OpenAL redistributable provided by Creative Labs (at http://openal.org/), as that will provide the "router" OpenAL32.dll that applications talk to, and may provide extra drivers for the user's hardware. It will also provide 64-bit DLLs. The DLL provided here will simply add additional devices for applications to select from. If you do not wish to use the redistributable, then simply rename soft_oal.dll to OpenAL32.dll.. just be aware this will prevent other system-installed OpenAL implementations from working.
So, OpenAL-Soft isn't meant to replace, or be used instead of, the Creative stuff.  If you did replace it (like what I had Spoon do, although just for FSO in that case) then you wouldn't have access to hardware acceleration or any special features afforded by sound card driver OpenAL support.  Whether installing it just in it's recommend form, as an addition to the router dll, would help in Spoon's case I don't really know (that is one of things I'm going to have him test).

Edit: Fred complains on start up that it cannot initialize audio. Silly Fred, you don't use audio.
Actually FRED does use audio and it will try to initialize and use EFX too.  This is because some (or all at this point?) of the audio preview stuff in dialogs goes through the games sound system.  And in the case of EFX, there is options now to set the sound environment for a mission in FRED and it allows you to preview what it will sound like.

I would be interested in seeing a FRED debug log to try and figure out why it's not working.

 

Offline Spoon

  • 212
  • ヾ(´︶`♡)ノ
Re: "Testing, Testing, One, Two ..." (new sound code)
I have no idea why, but the fred error stopped showing up.
Maybe FRED got to his senses
Urutorahappī!!

[02:42] <@Axem> spoon somethings wrong
[02:42] <@Axem> critically wrong
[02:42] <@Axem> im happy with these missions now
[02:44] <@Axem> well
[02:44] <@Axem> with 2 of them

 

Offline chief1983

  • Still lacks a custom title
  • Moderator
  • 212
  • ⬇️⬆️⬅️⬅️🅰➡️⬇️
    • Minecraft
    • Skype
    • Steam
    • Twitter
    • Fate of the Galaxy
Re: "Testing, Testing, One, Two ..." (new sound code)
Taylor, thanks for that.  Then my other question is, what about compiling against the new OpenAL Soft libraries?  It seems some Linux distros already include the -soft dev libs, and binaries compiled against one don't play nicely on other systems without the proper simlinks in place.  But since linux has been moving to -soft for a dev lib, what about doing the same with Windows?  Any advantage there?
Fate of the Galaxy - Now Hiring!  Apply within | Diaspora | SCP Home | Collada Importer for PCS2
Karajorma's 'How to report bugs' | Mantis
#freespace | #scp-swc | #diaspora | #SCP | #hard-light on EsperNet

"You may not sell or otherwise commercially exploit the source or things you created based on the source." -- Excerpt from FSO license, for reference

Nuclear1:  Jesus Christ zack you're a little too hamyurger for HLP right now...
iamzack:  i dont have hamynerge i just want ptatoc hips D:
redsniper:  Platonic hips?!
iamzack:  lays

 

Offline taylor

  • Super SCP/Linux Guru
  • Moderator
  • 212
    • http://www.icculus.org/~taylor
Re: "Testing, Testing, One, Two ..." (new sound code)
I think it would be something of a support nightmare actually.  The way OpenAL is set up under Windows just makes it rather difficult to solve the problem at hand without causing issues for many others.  Have a look at this, the "Application Deployment" section:
http://connect.creativelabs.com/openal/OpenAL%20Wiki/Enumeration%20with%20OpenAL%20on%20Windows.aspx

The "problem", I guess, with OpenAL-Soft on Windows is that it really isn't provided as something that normal people should use.  It would have to be installed and updated manually.  It doesn't have to be installed system wide, putting soft_oal.dll in the game directory would allow it to be used and not disable anything else.  It would also only be used for any extra devices that it provides, the Creative lib would still provide the "Generic" devices.  So basically, installing OpenAL-Soft properly on Windows may not actually fix many of these problems by default, but could offer something of a fix if the user selects the right device in the launcher.

Having OpenAL-Soft installed should allow for most of the reported problems to be fixed though.  The user would have to specify one of the OpenAL-Soft devices in the launcher (none of which actually say "OpenAL Soft" btw), but then it should work for most everyone if they can't otherwise use hardware acceleration, of if the drivers for hardware acceleration are the problem.  I believe that it will provide a "DirectSound" device at least and that would be about the same as "Generic Software" except that it would go through the OpenAL-Soft lib and should always run through DirectSound.  That would probably also address the FRAPS problems, since FRAPS doesn't support OpenAL and if the OpenAL playback device doesn't route through DirectSound properly like FRAPS insists on then it can't get sound.


There really is no win-win in any of it though; nothing we can do to solve all of the problems for everyone.  It's work on the user any way we go.  :sigh:

 

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]
Loaded main_amb.wav
OpenAL ERROR: "Invalid enum parameter passed as an argument to an AL call." in d:\scp\builds\fs2_open\code\sound\ds.cpp, line 1640
Loaded user_o.wav
OpenAL ERROR: "Invalid enum parameter passed as an argument to an AL call." in d:\scp\builds\fs2_open\code\sound\ds.cpp, line 1640
Loaded commit.wav
OpenAL ERROR: "Invalid enum parameter passed as an argument to an AL call." in d:\scp\builds\fs2_open\code\sound\ds.cpp, line 1640
Got event GS_EVENT_MAIN_MENU (0) in state GS_STATE_INITIAL_PLAYER_SELECT (37)
AUDIOSTR => Successfully opened: Aquitaine.ogg
Loaded Camp_on.wav
OpenAL ERROR: "Invalid enum parameter passed as an argument to an AL call." in d:\scp\builds\fs2_open\code\sound\ds.cpp, line 1640
Loaded Camp_off.wav
OpenAL ERROR: "Invalid enum parameter passed as an argument to an AL call." in d:\scp\builds\fs2_open\code\sound\ds.cpp, line 1640
Loaded Exitopen.wav
OpenAL ERROR: "Invalid enum parameter passed as an argument to an AL call." in d:\scp\builds\fs2_open\code\sound\ds.cpp, line 1640
Loaded user_c.wav
OpenAL ERROR: "Invalid enum parameter passed as an argument to an AL call." in d:\scp\builds\fs2_open\code\sound\ds.cpp, line 1640
Got event GS_EVENT_QUIT_GAME (5) in state GS_STATE_MAIN_MENU (1)

Thoughts?
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 The E

  • He's Ebeneezer Goode
  • Global Moderator
  • 213
  • Nothing personal, just tech support.
    • Steam
    • Twitter
Re: "Testing, Testing, One, Two ..." (new sound code)
Other than Mantis 2262? No.
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 taylor

  • Super SCP/Linux Guru
  • Moderator
  • 212
    • http://www.icculus.org/~taylor
Re: "Testing, Testing, One, Two ..." (new sound code)
It is annoying in the logs, but is due to nothing more than Creative's screwed up implementation of their own documented feature.  If you use OpenAL-Soft then it works fine since they support it properly.  It's pretty stupid when Creative's own feature is implemented properly by everyone except Creative. :rolleyes:

Right now I think that doppler is disabled since I didn't have time to get it working 100%, but the eventual plan is to get it back at some point and make it a value settable by the mod maker.  So removing those lines really isn't an option since they will just have to be added back later anyway.  Outside of just making the error message ignored, which is a crappy way to handle it, I'm not sure what else to do.

But ultimately this is just a bug on Creative's side and something that they need to fix.

 
Re: "Testing, Testing, One, Two ..." (new sound code)
This new sound code is pretty awesome  :pimp: . I tested it using the latest nightly build (rev 6418) and I figure you could use some feedback.

My mobo is an ASUS M2NPV-VM with SoundMax integrated HD audio, using drivers 6.10.2.6585 and an earlier version which both behave similar.

The good:
  • Brilliant on nebula missions (THUNDER, THUNDER, THUNDER!!!  :D )
  • Finally! concurrent beam sounds!

Some issues though:
  • Using the oal_soft library (directsound device) results in choppy audio with certain sounds, so at the moment its unusable
  • Specifying the sound device on the launcher doesn't appear to work (image attached), instead it chooses the first device on the list. I can work around this by deleting certain openal files (such as soft_oal)
  • Lightning/thunder noises don't work at all when using a debug build (other sounds seem to work fine)
  • Certain sounds will cancel each other out. For instance in 'A Game of Tag', when you tag a fighter and the beams start firing, sometimes either the beam firing sounds wont start, or they do start but the thunder noises stop, but then there will be times that both sounds run fine (this is a case by case basis every time a new beam starts firing)
  • Not a freespace issue, but a soundmax issue: A soundmax driver which I installed created another openal device which basically lists the sound device without specifying whether it is generic software or directsound (it just directly says the device), this device appears to work in debug but the sound quality goes back to sub-retail level. If any other soundmax users get a similar a thing happening, I recommend they not use this device, or uninstall it (appears as Host OpenAL device in programs, it will have been installed by the driver not openal)

Still, brilliant work so far. There should be no going back from here  ;)

EDIT: Problem solved, removed attachment
« Last Edit: September 06, 2010, 06:04:51 am by Waistless »

 

Offline taylor

  • Super SCP/Linux Guru
  • Moderator
  • 212
    • http://www.icculus.org/~taylor
Re: "Testing, Testing, One, Two ..." (new sound code)
Using the oal_soft library (directsound device) results in choppy audio with certain sounds, so at the moment its unusable
What version of OpenAL-Soft are you using?

Quote
Specifying the sound device on the launcher doesn't appear to work (image attached), instead it chooses the first device on the list. I can work around this by deleting certain openal files (such as soft_oal)
What you specify in the launcher is just a preference, it doesn't mean that the game will actually end up using it.  It will test the devices, starting with your launcher preference, then the default device, then all others, in order to find the one that meets the basic requirements that the game wants.  Generally this means that it couldn't create enough sound sources on the device (it wants at least 48), although the logs don't really indicate that it skips using a device for failing a test.

Quote
Lightning/thunder noises don't work at all when using a debug build (other sounds seem to work fine)
But they work in a release build?  It really shouldn't make a difference.

Quote
Certain sounds will cancel each other out. For instance in 'A Game of Tag', when you tag a fighter and the beams start firing, sometimes either the beam firing sounds wont start, or they do start but the thunder noises stop, but then there will be times that both sounds run fine (this is a case by case basis every time a new beam starts firing)
It will only play 32 sound simultaneously, so if a lot is going on then it will cut some sound out in order to play another one.  That isn't new, the old code did the same thing, but the new code allows for multiple copies of the same sound to play at one time (i.e., not cutting off fly-by sounds, concurrent beam sounds, etc.).  So that problem isn't new, you just notice it differently now.

 
Re: "Testing, Testing, One, Two ..." (new sound code)
Quote
What version of OpenAL-Soft are you using?

Latest version as downloaded here http://kcat.strangesoft.net/openal.html . EDIT: I've tried a version you uploaded earlier in the thread and it does the same thing.

Quote
What you specify in the launcher is just a preference, it doesn't mean that the game will actually end up using it.  It will test the devices, starting with your launcher preference, then the default device, then all others, in order to find the one that meets the basic requirements that the game wants.  Generally this means that it couldn't create enough sound sources on the device (it wants at least 48), although the logs don't really indicate that it skips using a device for failing a test.

Well I'm sure its just picking the first in the list, for instance when I had that soundmax openal device it appeared at the top and always picked that first regardless, even though it gave bad quality. And I'm able to force any device I want just by uninstalling the overriding devices.
« Last Edit: September 03, 2010, 11:39:18 pm by Waistless »

 

Offline taylor

  • Super SCP/Linux Guru
  • Moderator
  • 212
    • http://www.icculus.org/~taylor
Re: "Testing, Testing, One, Two ..." (new sound code)
Well I'm sure its just picking the first in the list, for instance when I had that soundmax openal device it appeared at the top and always picked that first regardless, even though it gave bad quality. And I'm able to force any device I want just by uninstalling the overriding devices.
Strange.  If you have a debug_filter.cfg file then add +OpenAL to it, if you don't have one then grab mine (right-click and save as...) and put it in your data/ directory.  Run a debug build and then check the debug log, it will give you the full list of devices in the order that it checks them.  If it doesn't look right then let me know.

 
Re: "Testing, Testing, One, Two ..." (new sound code)
Edit: Found the problem! In regedit I created a new key folder called "Sound" and put the Quality, PlaybackDevice options in there.

It seems the launcher (5.5f) is creating values called "Sound/Quality", "Sound/EnableEFX" etc, while Freespace 2 is expecting the values to be in their own key directory Sound. So either the launcher or the fs code needs to be modified accordingly.

[attachment deleted by admin]
« Last Edit: September 06, 2010, 06:22:15 am by Waistless »

 

Offline chief1983

  • Still lacks a custom title
  • Moderator
  • 212
  • ⬇️⬆️⬅️⬅️🅰➡️⬇️
    • Minecraft
    • Skype
    • Steam
    • Twitter
    • Fate of the Galaxy
Re: "Testing, Testing, One, Two ..." (new sound code)
Hmm.  So, 3.6.12.1 or 5.5g?  :P
Fate of the Galaxy - Now Hiring!  Apply within | Diaspora | SCP Home | Collada Importer for PCS2
Karajorma's 'How to report bugs' | Mantis
#freespace | #scp-swc | #diaspora | #SCP | #hard-light on EsperNet

"You may not sell or otherwise commercially exploit the source or things you created based on the source." -- Excerpt from FSO license, for reference

Nuclear1:  Jesus Christ zack you're a little too hamyurger for HLP right now...
iamzack:  i dont have hamynerge i just want ptatoc hips D:
redsniper:  Platonic hips?!
iamzack:  lays

 

Offline taylor

  • Super SCP/Linux Guru
  • Moderator
  • 212
    • http://www.icculus.org/~taylor
Re: "Testing, Testing, One, Two ..." (new sound code)
Wow.  How in the hell did I miss that. :wtf:

Here we go with 5.5g.  Not needed for 3.6.12 builds of course (except this one), but will be needed for future builds so you may as well get it now.

@chief1983: Fixes will be in SVN shortly, if you want to do another build or whatever.  If not then you can just copy the one I posted to where ever you like for official builds to be.

 

Offline Kolgena

  • 211
Re: "Testing, Testing, One, Two ..." (new sound code)
Sliding doors in the FS2 Aquitaine main menu have their sound entirely, or close to entirely, on the right sound channel for Anti6. I'm guessing that it's a result of the audio code work that is being discussed here, but I could be wrong. I didn't actually read the rest of this thread, and was told to bring it up here by The E.

 
Re: "Testing, Testing, One, Two ..." (new sound code)
Trying out the antipodes 6 build, I'm getting the following assertion: "snd->info.n_channels == 1" at sound.cpp:644
The code there says:
Code: [Select]
// any stereo sounds will not play in proper 3D, but they should have
// been converted to mono already!
Assert( snd->info.n_channels == 1 );

Does that mean that there's a stereo sound trying to play, that the game would prefer to be a mono sound?
If so, it would be handy to have a warning message telling you exactly which file is causing the issue.

 

Offline taylor

  • Super SCP/Linux Guru
  • Moderator
  • 212
    • http://www.icculus.org/~taylor
Re: "Testing, Testing, One, Two ..." (new sound code)
Sliding doors in the FS2 Aquitaine main menu have their sound entirely, or close to entirely, on the right sound channel for Anti6. I'm guessing that it's a result of the audio code work that is being discussed here, but I could be wrong. I didn't actually read the rest of this thread, and was told to bring it up here by The E.
Unless there is a new problem that I'm not aware of, it's just the mainhall.tbl that is causing that.  The retail tbl had incorrect sound positions for some of the doors so it sounds strange.  That problem existed with the old code as well though.

Trying out the antipodes 6 build, I'm getting the following assertion: "snd->info.n_channels == 1" at sound.cpp:644
The code there says:

Does that mean that there's a stereo sound trying to play, that the game would prefer to be a mono sound?
If so, it would be handy to have a warning message telling you exactly which file is causing the issue.
Yeah, that's pretty much what it means, it wants a mono sound but isn't getting it.  That Assert() is there out of some last ditch error checking though, I didn't think it would actually get hit unless something was done wrong in the tbls or something.  And there is debug message when it converts a sound from stereo to mono, but it doesn't give the filename.

Is this a particular mod?  It is most likely an incorrect entry in sounds.tbl, where it is attempting to play a sound in 3D that isn't flagged as being 3D.  It will only do the mono conversion if a sound is flagged as 3D, so if that didn't happen then the file was already mono (which it obviously isn't) or the tbl entry is wrong.

Either way it points out several issues with the way the code handles things.  I'll try and get that resolved later today, adding some extra handling of 3D sound playing and fix up the debug messages as well.

 
Re: "Testing, Testing, One, Two ..." (new sound code)
Yeah, that's pretty much what it means, it wants a mono sound but isn't getting it.  That Assert() is there out of some last ditch error checking though, I didn't think it would actually get hit unless something was done wrong in the tbls or something.  And there is debug message when it converts a sound from stereo to mono, but it doesn't give the filename.

Is this a particular mod?  It is most likely an incorrect entry in sounds.tbl, where it is attempting to play a sound in 3D that isn't flagged as being 3D.  It will only do the mono conversion if a sound is flagged as 3D, so if that didn't happen then the file was already mono (which it obviously isn't) or the tbl entry is wrong.

It seems to be caused by an engine sound in the Ancient-Shivan War. In case anyone has the ASW pack lying around, I've attached a test mission: the assert will trigger when you close in on the destroyer. The odd thing is, that I can't seem to reproduce it out of ASW. I made a test mod that made the Orion use the same engine sound, and nothing happened. It played just fine, without any warnings whatsoever. Tried it both with and without MVPs, to no avail.

The file is stereo (attached), and it's flagged as a 3D sound in sounds.tbl:

Code: [Select]
$Name: 131 engineloop001.ogg, 0, 0.80, 1, 400, 800 ; ASW cruiser engine (3d sound)

[attachment deleted by admin]

 

Offline FUBAR-BDHR

  • Self-Propelled Trouble Magnet
  • 212
  • Master Drunk
    • 165th Beer Drinking Hell Raisers
Re: "Testing, Testing, One, Two ..." (new sound code)
Try changing the 5th value from 1 to 0.  I had to do that for a few sound effects in Diapora when first using the new sound code. 
No-one ever listens to Zathras. Quite mad, they say. It is good that Zathras does not mind. He's even grown to like it. Oh yes. -Zathras

 
Re: "Testing, Testing, One, Two ..." (new sound code)
Hmm, changing that to a 0 removed the error, alright, but it also removed the sound. The ship is completely quiet with a 0 there.