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 😊 ).
lowenz wrote:
Do you know a monitoring app that can show those data maybe via RTSS (RivaTuner Statistics Server) OSD?
I don't, sorry.