[6.20] - USB DAC Audio is severely limited

Ask here if you experience technical problems with X4: Foundations.

Moderator: Moderators for English X Forum

Lamquin
Posts: 25
Joined: Mon, 5. Jul 21, 11:12
x4

[6.20] - USB DAC Audio is severely limited

Post by Lamquin »

Version: 6.20.
Modified: No, but used a Custom Creative Game to set up a scenario.

I recently replaced my Onboard Motherboard audio with an Apple USB C - 3.5mm Adapter. It has worked in all games so far, but starting up X4 for the first time since it was installed, I noticed all sound was seemingly off.
Plugging the speaker 3.5mm cable back into the Motherboard audio made it sound as expected in X4, so I recorded a few samples (weapons firing, travel engine starting and some dialogue) to compare the two.

The samples were recorded using Audacity using its "Loopback" feature, and saved as .wav. Comparing the two by using the Audacity "Plot Spectrum" Frequency Analysis shows that something somewhere is going wrong.
Both the Realtek Motherboard and the USB DAC are set to the "24 bit 48000 Hz" format in the Windows settings, and no other game nor application (so far) has displayed this behaviour.

A pulse weapon firing 3 salvos with the Motherboard Audio:
https://i.imgur.com/p2d3cok.png

A pulse weapon firing 3 salvos with the USB DAC:
https://i.imgur.com/ww5if9I.png

I have gathered these examples into this ZIP file that also contains my DxDiag and Vulkaninfo. [Google Drive link]

Any help resolving this would be appreciated!
Last edited by CBJ on Thu, 31. Aug 23, 17:00, edited 1 time in total.
Reason: Oversized images replaced with links
CBJ
EGOSOFT
EGOSOFT
Posts: 54301
Joined: Tue, 29. Apr 03, 00:56
x4

Re: [6.20] - USB DAC Audio is severely limited

Post by CBJ »

The game uses OpenAL for sound playback. Sometimes other applications you install (potentially including games or even mods for those games) may replace certain OpenAL files for their own purposes causing sound problems in X4. See this thread for more info and possible solutions. Whether other games are affected will depend on whether or not they use OpenAL.
Lamquin
Posts: 25
Joined: Mon, 5. Jul 21, 11:12
x4

Re: [6.20] - USB DAC Audio is severely limited

Post by Lamquin »

CBJ wrote: Thu, 31. Aug 23, 17:04 The game uses OpenAL for sound playback. Sometimes other applications you install (potentially including games or even mods for those games) may replace certain OpenAL files for their own purposes causing sound problems in X4. See this thread for more info and possible solutions. Whether other games are affected will depend on whether or not they use OpenAL.
Interesting, I'll look into it - but wouldn't that also influence the game when I plug it back into the normal Onboard audio? The Onboard still sounds perfectly fine, it's only the USB output that exhibits this.
CBJ
EGOSOFT
EGOSOFT
Posts: 54301
Joined: Tue, 29. Apr 03, 00:56
x4

Re: [6.20] - USB DAC Audio is severely limited

Post by CBJ »

Honestly, I don't know, but it's just the most common cause of sound quality issues generally and so worth trying in the first instance. If it's output connection-specific and turns out NOT to be an OpenAL issue, then it's likely to also be outside the scope of anything we can help with, as the game itself knows nothing about the physical connections.
Lamquin
Posts: 25
Joined: Mon, 5. Jul 21, 11:12
x4

Re: [6.20] - USB DAC Audio is severely limited

Post by Lamquin »

Well darn. I've installed OpenAL from www.openal.org/ , but it does not appear to resolve the issue. What's odd to me is that using their Games list on the website, it appears that X:Rebirth uses OpenAL - and it sounds just fine! It does not exhibit this "mute the 7800-8800 Hz sounds" behaviour that X4 does.

Unreal Tournament 2004, another game using OpenAL, also sounds fine.

This is all very odd, but thank you for the help nonetheless. I suppose if I want to play X4 I'll have to crawl under the desk and switch around some cables, it's not the end of the world.
CBJ
EGOSOFT
EGOSOFT
Posts: 54301
Joined: Tue, 29. Apr 03, 00:56
x4

Re: [6.20] - USB DAC Audio is severely limited

Post by CBJ »

One other possible clue just occurred to me. X4 uses .ogg as the file format for the sound files. I don't remember whether X Rebirth does or not, and I'm not currently set up to check. If there were something specifically up with .ogg playback on your system, that might also explain the differences. Again, strange that it would be connection-specific, but worth at least a look.

Another possibility might be per-application settings in your OpenAL configuration. I seem to remember someone saying you could set playback options somewhere in OpenAL.

Correction: X4 uses .ogg for music and voices, but .wav for sound effects. XR uses .ogg for voices only, .wav for sounds effects, and .xwma for music. So it's worth checking whether only certain formats are affected.
Lamquin
Posts: 25
Joined: Mon, 5. Jul 21, 11:12
x4

Re: [6.20] - USB DAC Audio is severely limited

Post by Lamquin »

CBJ wrote: Thu, 31. Aug 23, 18:14 One other possible clue just occurred to me. X4 uses .ogg as the file format for the sound files. I don't remember whether X Rebirth does or not, and I'm not currently set up to check. If there were something specifically up with .ogg playback on your system, that might also explain the differences. Again, strange that it would be connection-specific, but worth at least a look.

Another possibility might be per-application settings in your OpenAL configuration. I seem to remember someone saying you could set playback options somewhere in OpenAL.

Correction: X4 uses .ogg for music and voices, but .wav for sound effects. XR uses .ogg for voices only, .wav for sounds effects, and .xwma for music. So it's worth checking whether only certain formats are affected.
Unfortunately (the .zip includes both Dialogue and Sound Effects) Voices and Sound effects are all impacted by this behaviour in X4. Letting the Main Menu theme play on the X4 start screen and looking at the spectrum showed the same behaviour. It's... just all the X4 sound, for some bizarre reason.
Playing a standalone .ogg and .wav using VLC or Foobar2000 shows no issues.
CBJ
EGOSOFT
EGOSOFT
Posts: 54301
Joined: Tue, 29. Apr 03, 00:56
x4

Re: [6.20] - USB DAC Audio is severely limited

Post by CBJ »

Using VLC isn't a great test for this situation, since it doesn't really use the same pathway as anything else. It does prove that the source files are OK, but we knew that already because other people don't experience the same problems. The issue has to lie somewhere in between the game's request to play the sounds via OpenAL and the output device.

One other thing to consider might be the USB output itself. Have you tried unplugging other USB devices in case there is a throughput problem on the USB host?
Lamquin
Posts: 25
Joined: Mon, 5. Jul 21, 11:12
x4

Re: [6.20] - USB DAC Audio is severely limited

Post by Lamquin »

CBJ wrote: Thu, 31. Aug 23, 19:42 Using VLC isn't a great test for this situation, since it doesn't really use the same pathway as anything else. It does prove that the source files are OK, but we knew that already because other people don't experience the same problems. The issue has to lie somewhere in between the game's request to play the sounds via OpenAL and the output device.

One other thing to consider might be the USB output itself. Have you tried unplugging other USB devices in case there is a throughput problem on the USB host?
I appreciate you not throwing your hands up in the air and walking away, thanks!

The Type-C connector on the Apple device is connected straight into the back panel of the Motherboard (Asus Prime Z390-A) which boasts of a "USB 3.1 Gen 2 Type-C with up to 10 Gbps transfer". Unplugging everything but it from the PC (including the Keyboard and mouse with the game running) made no difference, I'm afraid - but it would've been a very fun conclusion. :)
CBJ
EGOSOFT
EGOSOFT
Posts: 54301
Joined: Tue, 29. Apr 03, 00:56
x4

Re: [6.20] - USB DAC Audio is severely limited

Post by CBJ »

Going back to your original post, the settings for my USB headphones (as well as my other sound device) are set to 16-bit 48000 Hz rather than 24-bit. In fact I don't even have 24-bit listed. If you have 16-bit available, can you try selecting that instead?
Lamquin
Posts: 25
Joined: Mon, 5. Jul 21, 11:12
x4

Re: [6.20] - USB DAC Audio is severely limited

Post by Lamquin »

CBJ wrote: Thu, 31. Aug 23, 22:59 Going back to your original post, the settings for my USB headphones (as well as my other sound device) are set to 16-bit 48000 Hz rather than 24-bit. In fact I don't even have 24-bit listed. If you have 16-bit available, can you try selecting that instead?
These are the 4 options I can select on the Windows settings page:
https://imgur.com/6df5lEI

Switching down to the 16 bit (making sure to restart the game in-between) made no difference, with neither the 16 bit 44100 Hz nor 16 bit 48000 Hz showing any improvement to the audio, I'm sad to report. The game still exhibits these odd craters in the frequency chart.
CBJ
EGOSOFT
EGOSOFT
Posts: 54301
Joined: Tue, 29. Apr 03, 00:56
x4

Re: [6.20] - USB DAC Audio is severely limited

Post by CBJ »

I'm about out of ideas, and time, here I'm afraid. I can't see from your screenshot whether you have any additional per-device sound options; I have an "Audio enhancements" option on mine, for example, but I don't know if that's standard or specific to the hardware manufacturer whose name appears below it. If you do, that would be another thing to try changing. I've also not been able to find any OpenAL configuration tools, so I might have misremembered what was said about that.

Out of interest, is there a particular reason for switching from the on-board sound to USB via an adapter? In general on-board sound should use marginally less CPU time due to the hardware support, and should be at least as good in terms of sound quality. And Realtek are pretty good at keeping their drivers up to date and stable too.
Lamquin
Posts: 25
Joined: Mon, 5. Jul 21, 11:12
x4

Re: [6.20] - USB DAC Audio is severely limited

Post by Lamquin »

CBJ wrote: Fri, 1. Sep 23, 01:15 I'm about out of ideas, and time, here I'm afraid. I can't see from your screenshot whether you have any additional per-device sound options; I have an "Audio enhancements" option on mine, for example, but I don't know if that's standard or specific to the hardware manufacturer whose name appears below it. If you do, that would be another thing to try changing. I've also not been able to find any OpenAL configuration tools, so I might have misremembered what was said about that.

Out of interest, is there a particular reason for switching from the on-board sound to USB via an adapter? In general on-board sound should use marginally less CPU time due to the hardware support, and should be at least as good in terms of sound quality. And Realtek are pretty good at keeping their drivers up to date and stable too.
Thank you for giving it a thorough attempt! I figured as it's using a generic USB Audio driver from Microsoft ( https://learn.microsoft.com/en-us/windo ... io-drivers ) it might've been a known or easily solved issue, but sometimes hardware just does weird unexpected things and what might appear simple is anything but.


The Realtek onboard exhibited some odd "pops" at uneven times that I never could narrow down (potentially due to DPC latency by the CPU/GPU clocking up/down? but that's a whole different can of worms) as well as some (very minor) static sound bleeding through when the graphics card was going full tilt.
I felt that spending 10€ at a simple (but very well reviewed) dongle at the recommendation of a friend might be worth an attempt, and it was!... until I started X4. Heh.

Once again, thank you CBJ for taking the time to try to help me out - I appreciate it.
Daemonjax
Posts: 288
Joined: Tue, 27. May 14, 01:54
x4

Re: [6.20] - USB DAC Audio is severely limited

Post by Daemonjax »

Try configuring the headphones speakers to full-range. Headphones should always be full-range, but sometimes windows defaults to them not being set. I never thouhgt to check a frequency graph to see if it made a difference, though.

Crackling onboard audio is caused by high dpc latency, but the thing that's causing that is the cpu and package powersaving cstates below c2. Disable all cstates c3 through c7 and disable package c3 state. c2 is fine. You can still get down to like 3.5 watts used at idle without needing the lower (c3, c7, etc.) cstates because only c2 is required for speed step/swift step/whatever freqency/power scaling (use hwinfo64 to check, or just look at idle temps -- idle temps will be about the same as with all cstates enabled). The lower cstates can drop wattage down to like 0.6 watts, but who cares on a gaming rig -- my video card uses 40watts idling at the desktop (I can get it lower, but then I get weirdness in web browsers and stuff).
Lamquin
Posts: 25
Joined: Mon, 5. Jul 21, 11:12
x4

Re: [6.20] - USB DAC Audio is severely limited

Post by Lamquin »

Daemonjax wrote: Fri, 1. Sep 23, 18:42 Try configuring the headphones speakers to full-range. Headphones should always be full-range, but sometimes windows defaults to them not being set. I never thouhgt to check a frequency graph to see if it made a difference, though.

Crackling onboard audio is caused by high dpc latency, but the thing that's causing that is the cpu and package powersaving cstates below c2. Disable all cstates c3 through c7 and disable package c3 state. c2 is fine. You can still get down to like 3.5 watts used at idle without needing the lower (c3, c7, etc.) cstates because only c2 is required for speed step/swift step/whatever freqency/power scaling (use hwinfo64 to check, or just look at idle temps -- idle temps will be about the same as with all cstates enabled). The lower cstates can drop wattage down to like 0.6 watts, but who cares on a gaming rig -- my video card uses 40watts idling at the desktop (I can get it lower, but then I get weirdness in web browsers and stuff).
Configuring it to be full range sounds like a good idea, but I have all but no options to configure the device - it's pretty much plug-n-play-n-let-be.
https://imgur.com/z1bb0l3

I tried with a much older USB 2.0 sound card I have which uses the generic Windows USBAUDIO.sys v.10.0.22621.1992 dated to 2023-07-06 compared to the Apple USB DAC which uses the Microsoft USBAUDIO2.sys v.10.0.226.21.1 dated to 2022-05-06.

The old USB with the newer Microsoft driver works just as one would expect X4 to sound, so hopefully Microsoft have identified an issue and might roll out an update in the future.

Thanks for the tip regarding C-states- I've looked into it as LatencyMon (a program to measure DPC latency) had that as advice, but it felt like too much of a hassle at the time.
I can give it another go in the future if this DAC turns out to be a dud - incidentally, my 4070 TI uses 8 Watts at desktop usage with the CPU at 10W according to HWInfo64. Desktop components have become crazy efficient!
Daemonjax
Posts: 288
Joined: Tue, 27. May 14, 01:54
x4

Re: [6.20] - USB DAC Audio is severely limited

Post by Daemonjax »

There should be a speaker device listed in device manager (it's not really a device since it doesn't have an IRQ assigned to it, but it should still be listed there)... to actually "Configure" it in win10, I'm _pretty sure_ you have to go through Control Panel > Hardware and Sound > Sound... that'll get you to the the older-style win7 sound configuration page.

From there you can click on your speaker device, and then the Configure button should become clickable... where you should have the option to set it to stereo and full-range.

Win10 also has a newer sound option setting page (reachable from the Settings button), but I don't think you can actually get where you need to from there... which might lead you to think it's not configurable. Win10 is weird that way... There's "Settings", and then there's "Control Panel", and they're not exactly the same... like MS gave up halfway through re-doing the new Control Panel UI and said screw it, we'll just have both.

Return to “X4: Foundations - Technical Support”