indirect sound

Getting old Windows games working.

Re: indirect sound

Postby Expack3 » 2015-9-06 @ 01:26

mirh wrote:lol

Is it due to OpenAL Soft being used to emulate XAudio2 - which IndirectSound uses to emulate EAX features which are already emulated in Wine's staging branch? (In other words, Wineception?) Or is it due to something else I'm not gathering?
Expack3
Member
 
Posts: 164
Joined: 2015-5-24 @ 23:18

Re: indirect sound

Postby ZellSF » 2015-9-06 @ 10:51

Just to ask: is this project strictly for getting surround sound from games that used to have it or is using it as a general directsound wrapper for compatibility reasons also something you want to work on?
ZellSF
Oldbie
 
Posts: 1124
Joined: 2006-1-01 @ 18:19

Re: indirect sound

Postby mirh » 2015-9-06 @ 12:09

Expack3 wrote:
mirh wrote:lol

Is it due to OpenAL Soft being used to emulate XAudio2 - which IndirectSound uses to emulate EAX features which are already emulated in Wine's staging branch? (In other words, Wineception?)
Something along that.
ZellSF wrote:Just to ask: is this project strictly for getting surround sound from games that used to have it or is using it as a general directsound wrapper for compatibility reasons also something you want to work on?
I guess it tries to be the later, but for the moment it's just the former.
pcgamingwiki.com
mirh
Member
 
Posts: 334
Joined: 2014-9-13 @ 21:39

Re: indirect sound

Postby jonpol » 2015-9-06 @ 23:14

ZellSF wrote:Just to ask: is this project strictly for getting surround sound from games that used to have it or is using it as a general directsound wrapper for compatibility reasons also something you want to work on?


The original and primary goal for me was to re-enable surround sound. A secondary stretch goal was to re-enable EAX.

I actually am not aware of any compatibility problems besides those two that exist. I have heard from a small number of people who say that IndirectSound has fixed problems for them aside from surround sound, but I don't know why it would in any of those cases. (One person told me, for example, that Descent3 sound would stutter terribly until he used IndirectSound, but on my local machine it sounds fine except for the lack of surround and so whatever it was that I apparently fixed was a happy accident.) There are two configurable options I have provided that lets the user choose between the way a SoundBlaster behaves vs. the post-Vista Microsoft behavior and I guess that that could be seen as improving compatibility, but both of those have come about based on user feedback and requests rather than from any grand plan on my part. (A similar pending issue on my to-do list that I believe has been mentioned in this thread is to try and emulate the way that Creative does 3D sound placement since I feel subjectively that it sounds better than the way Microsoft does it.)

I definitely would be interested in fixing any compatibility issues that I was made aware of if possible, but from the example games I've tried it really seems to me that DirectSound still works correctly on modern systems except for the lack of hardware-specific features. (Even DirectSound surround still works correctly on modern systems except when the game itself relies on hardware acceleration to be available in order to enable 3D sounds.) Do you know of any compatibility problems that could or should be addressed, or were you just asking out of curiosity?

(As a side note, IndirectSound actually only emulates hardware accelerated buffers, and any calls that an application makes using software buffers isn't emulated at all and is just passed through to the real DirectSound implementation. Depending on what the theoretical compatibility issue, it might be impossible to fix with the way IndirectSound currently works. It would definitely be possible to re-architect things so that IndirectSound emulates everything and no longer relies on DirectSound at all, but that would be a major change that I probably wouldn't undertake until EAX emulation is working.)
jonpol
Newbie
 
Posts: 58
Joined: 2013-9-24 @ 19:14

Re: indirect sound

Postby mirh » 2015-9-07 @ 12:10

Surround/EAX aside, I know this is one famous compatibility issues
(funnily, in one of the few games that albeit with reduced quality, still has multichannel output in software mode)
pcgamingwiki.com
mirh
Member
 
Posts: 334
Joined: 2014-9-13 @ 21:39

Re: indirect sound

Postby jonpol » 2015-9-07 @ 17:26

mirh wrote:Surround/EAX aside, I know this is one famous compatibility issues
(funnily, in one of the few games that albeit with reduced quality, still has multichannel output in software mode)


I read through a good deal of posts in both links, and it seems likely to me that the problem there happens outside of anything that IndirectSound could do. Some people reported that using ALchemy fixed it which would indicated that IndirectSound could help, but every other piece of information I saw indicates otherwise:
  • It only is a problem with MP3s
  • It is a problem on Windows XP
  • Changing codecs fixes it
  • Disabling hardware acceleration fixes it
  • Changing the audio cache settings in the INI file fixes it
  • The stuttering gets worse when lots of things are happening in the game (or goes away when nothing is happening)
My guess would be that the game itself is just not sending updates to DirectSound frequently enough when it is streaming these MP3 files.

mirh, do you know if anyone with the problem has tried IndirectSound and heard any difference?
jonpol
Newbie
 
Posts: 58
Joined: 2013-9-24 @ 19:14

Re: indirect sound

Postby mirh » 2015-9-10 @ 19:19

jonpol wrote:
mirh wrote:Surround/EAX aside, I know this is one famous compatibility issues
(funnily, in one of the few games that albeit with reduced quality, still has multichannel output in software mode)


I read through a good deal of posts in both links, and it seems likely to me that the problem there happens outside of anything that IndirectSound could do. Some people reported that using ALchemy fixed it which would indicated that IndirectSound could help, but every other piece of information I saw indicates otherwise:
  • It only is a problem with MP3s
  • It is a problem on Windows XP
  • Changing codecs fixes it
  • Disabling hardware acceleration fixes it
  • Changing the audio cache settings in the INI file fixes it
  • The stuttering gets worse when lots of things are happening in the game (or goes away when nothing is happening)
My guess would be that the game itself is just not sending updates to DirectSound frequently enough when it is streaming these MP3 files.

mirh, do you know if anyone with the problem has tried IndirectSound and heard any difference?
No I wouldn't know.
And don't despair facing just noobs looking for a quick workaround instead of a rationale :p
I mean.. if you reach the point you are recommending k-lite codec pack for fixing something, you are completely desperate.

Anyway personally I don't think the codec is faulty or anything. It probably relied on some old runtime.. or worse it's just OK but people tinkering with directshow filters, yet another time managed to screw their computers.
Btw changing the audio cache just seemed to lower the frequency of the problem, not totally solve it.
pcgamingwiki.com
mirh
Member
 
Posts: 334
Joined: 2014-9-13 @ 21:39

Re: indirect sound

Postby Stiletto » 2015-9-10 @ 19:32

Moderator note: Cleaned up thread and split off-topic posts over to here:
viewtopic.php?f=5&t=44830
"I see a little silhouette-o of a man, Scaramouche, Scaramouche, will you
do the Fandango!" - Queen

Stiletto
User avatar
Stiletto
l33t
 
Posts: 4083
Joined: 2002-7-01 @ 21:57

Re: indirect sound

Postby lowenz » 2016-5-25 @ 23:48

Up :D

jonpol, can you explain me in details the differences between your work and this? Can IndirectSound get all the features of the (really old) DirectSound Control ?
http://www.bockholdt.com/dsc/index2.html
lowenz
Oldbie
 
Posts: 969
Joined: 2014-12-20 @ 01:30

Re: indirect sound

Postby lowenz » 2016-8-17 @ 05:13

Re-Up!
lowenz
Oldbie
 
Posts: 969
Joined: 2014-12-20 @ 01:30

Re: indirect sound

Postby ZellSF » 2016-8-17 @ 07:43

jonpol wrote:
ZellSF wrote:Just to ask: is this project strictly for getting surround sound from games that used to have it or is using it as a general directsound wrapper for compatibility reasons also something you want to work on?


The original and primary goal for me was to re-enable surround sound. A secondary stretch goal was to re-enable EAX.

I actually am not aware of any compatibility problems besides those two that exist. I have heard from a small number of people who say that IndirectSound has fixed problems for them aside from surround sound, but I don't know why it would in any of those cases. (One person told me, for example, that Descent3 sound would stutter terribly until he used IndirectSound, but on my local machine it sounds fine except for the lack of surround and so whatever it was that I apparently fixed was a happy accident.)

Caesar III and The Lost Vikings 2 have stuttering sound without IndirectSound.
ZellSF
Oldbie
 
Posts: 1124
Joined: 2006-1-01 @ 18:19

Re: indirect sound

Postby jonpol » 2016-10-23 @ 16:23

lowenz wrote:Up :D

jonpol, can you explain me in details the differences between your work and this? Can IndirectSound get all the features of the (really old) DirectSound Control ?
http://www.bockholdt.com/dsc/index2.html


Hi! Sorry for ignoring your question... I didn't get an email notification about this response and hadn't seen it until today :depressed:

I didn't know about DirectSound Control until now, haha, so I'm not sure of the differences but they look like the intents are similar. Which missing features would you want IndirectSound to have?
jonpol
Newbie
 
Posts: 58
Joined: 2013-9-24 @ 19:14

Re: indirect sound

Postby lowenz » 2016-10-23 @ 16:30

jonpol wrote:
lowenz wrote:Up :D

jonpol, can you explain me in details the differences between your work and this? Can IndirectSound get all the features of the (really old) DirectSound Control ?
http://www.bockholdt.com/dsc/index2.html


Hi! Sorry for ignoring your question... I didn't get an email notification about this response and hadn't seen it until today :depressed:

I didn't know about DirectSound Control until now, haha, so I'm not sure of the differences but they look like the intents are similar. Which missing features would you want IndirectSound to have?

Hey!

A "finer control" would be awesome : sampling frequency, number of bits, speaker configuration (or the windows mixer is already enough?) etc.....(or simply take a look to the config utility of OpenAL Soft).
lowenz
Oldbie
 
Posts: 969
Joined: 2014-12-20 @ 01:30

Re: indirect sound

Postby jonpol » 2016-10-23 @ 17:38

lowenz wrote:
jonpol wrote:
lowenz wrote:Up :D

jonpol, can you explain me in details the differences between your work and this? Can IndirectSound get all the features of the (really old) DirectSound Control ?
http://www.bockholdt.com/dsc/index2.html


Hi! Sorry for ignoring your question... I didn't get an email notification about this response and hadn't seen it until today :depressed:

I didn't know about DirectSound Control until now, haha, so I'm not sure of the differences but they look like the intents are similar. Which missing features would you want IndirectSound to have?

Hey!

A "finer control" would be awesome : sampling frequency, number of bits, speaker configuration (or the windows mixer is already enough?) etc.....(or simply take a look to the config utility of OpenAL Soft).


My philosophy with IndirectSound is to try and prioritize ease of use and understandability for an imagined "average gamer", who may not necessarily be very technical but just wants old games to work properly. Rather than making everything configurable I've tried to only expose options that represent what I see as legitimate preferences that someone might have (i.e. when there is more than one behavior that could be considered correct), or ones that can emulate different kinds of hardware for historical purposes (i.e. if someone wants to play a game as it would have sounded on a specific sound card).

The examples that you've given can all be changed from Windows, and according to my so-called philosophy I would rather not interfere with that because I think that if someone changes the Windows setting for something like that then s/he has a justified expectation that those changes will work. On the other hand, I am definitely considering allowing the internal sample rate of EAX to be configurable (if I ever manage to get it in a releasable state).

I've been convinced on at least one occasion in the past to add an option for something that I initially resisted (allowing the disabled 3D behavior to be configured differently for mono and stereo sources) and I to try and keep an open mind, so if you have a legitimate use case for configuring something that I haven't considered definitely let me know!
jonpol
Newbie
 
Posts: 58
Joined: 2013-9-24 @ 19:14

Re: indirect sound

Postby lowenz » 2016-10-23 @ 17:51

Thanks!

A question: we can be sure that the sample rate/bit quantisation/speaker setup is correctly read by *every* DSound application from the Windows Mixer? (if no other choice is given to the user)
Do you know a monitoring app that can show those data maybe via RTSS (RivaTuner Statistics Server) OSD?
lowenz
Oldbie
 
Posts: 969
Joined: 2014-12-20 @ 01:30

Re: indirect sound

Postby jonpol » 2016-10-23 @ 18:30

lowenz wrote:A question: we can be sure that the sample rate/bit quantisation/speaker setup is correctly read by *every* DSound application from the Windows Mixer? (if no other choice is given to the user)


DirectSound only allows two things about the device to be changed:
  • SetSpeakerConfig
  • SetCooperativeLevel

So there isn't a way for an application to try and change the bit depth or sample rate using DirectSound.

Attempts to change the speaker configuration are supposed to not succeed on Vista or later:
In Windows Vista and later versions of Windows, SetSpeakerConfig is a NOP. For Windows Vista and later versions, the speaker configuration is a system setting that should not be modified by an application. End users can set the speaker configuration through control panels.

(Also see here for more information.)

I can't speak to what DirectSound actually does in response to a SetSpeakerConfig call(), but IndirectSound definitely does nothing (it doesn't pass the call on to the official DirectSound library, but just returns immediately).

With that being said, all of the above is a discussion of DirectSound specifically, and doesn't apply to anything an application might try to do outside of DirectSound. I've forgotten details now, but when I was looking into Diablo 2 I have a memory that it was somehow changing my speaker configuration when I launched it a certain way, and I was never successful in figuring out how it was doing it. So, to answer your question, I can't guarantee that every game actually runs with the settings that it's supposed to, but I can guarantee:
  • When using IndirectSound these settings won't be changed via the DirectSound interface
  • IndirectSound uses XAudio2 to get the speaker configuration and sample rate of the chosen device (by passing in XAUDIO2_DEFAULT_CHANNELS and XAUDIO2_DEFAULT_SAMPLERATE when creating the mastering voice), and if the speaker configuration is different than what is reported by DirectSound it will output an error in the log file (this can happen when using Dolby Digital Live, for example)
I don't have any reason to believe that this isn't working properly besides the curious behavior I saw in Diablo 2, but I also haven't looked into it much and have trusted XAudio2 to do the right thing (which maybe isn't wise :blush: ).

lowenz wrote:Do you know a monitoring app that can show those data maybe via RTSS (RivaTuner Statistics Server) OSD?


I don't, sorry.
jonpol
Newbie
 
Posts: 58
Joined: 2013-9-24 @ 19:14

Re: indirect sound

Postby lowenz » 2016-10-23 @ 20:46

Thanks man, perfect.
lowenz
Oldbie
 
Posts: 969
Joined: 2014-12-20 @ 01:30

Re: indirect sound

Postby lowenz » 2017-8-28 @ 05:36

lowenz
Oldbie
 
Posts: 969
Joined: 2014-12-20 @ 01:30

Re: indirect sound

Postby vogamer » 2017-8-29 @ 01:59

Hi, do Realtek 3D SoundBack and Creative ALchemy achieve the same thing? With/without EAX?

Either way, thank you for this and please consider open-sourcing. Cheers!
vogamer
Newbie
 
Posts: 50
Joined: 2015-9-10 @ 20:08

Re: indirect sound

Postby jonpol » 2017-8-29 @ 03:35

vogamer wrote:Hi, do Realtek 3D SoundBack and Creative ALchemy achieve the same thing? With/without EAX?


Hi, yes, those achieve the same thing if you have the proper hardware. They both also support EAX (which IndirectSound doesn't yet).
jonpol
Newbie
 
Posts: 58
Joined: 2013-9-24 @ 19:14

PreviousNext

Return to Windows

Who is online

Users browsing this forum: wobak, yochenhsieh and 2 guests