Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SDVX EG Fails to load ASIO Drivers with Xonar AE #122

Closed
xmephestox opened this issue Jan 12, 2024 · 6 comments
Closed

SDVX EG Fails to load ASIO Drivers with Xonar AE #122

xmephestox opened this issue Jan 12, 2024 · 6 comments

Comments

@xmephestox
Copy link

SDVX Exceed Gear 2023121900

2023-12-25

Log shows the asio driver is failing to initialize with my Xonar AE, defaults to wave out. The game audio comes in super distorted and slowed down. The card is functioning perfectly with IIDX 30 and 31. ASIO latency is set to 4 ms, I've tried as high as 50 ms no change. I"ve tried to manually force it to my CLSID string with -sdvxasio, it doesn't fix it. The only thing I can do is use -audiobackend which will convert it from wave out back to asio for the audio to sound normal. Audio device settings is set for 44100 and 16 bit

log.txt

@xmephestox xmephestox added the bug Something isn't working label Jan 12, 2024
@sp2xdev
Copy link
Contributor

sp2xdev commented Jan 12, 2024

This is unlikely to be an issue with spice.

While -sp2x-sdvxasio will hook into registry API to swap out the CLSID for another device, it doesn't have anything to do with the actual audio engine initialization; that's between the game and your ASIO driver. Doubly so when the SDVX ASIO option is not set; spice does nothing to get in the way; the game will access the registry, discover XONAR AE, and start using it.

You can see in the log below, but basically:

  • Game tries to initialize an ASIO session for your Xonar AE
  • It gets unhappy with something and fails (M:BMSoundLib: EXPECT FAILED)
  • It falls back to WASAPI Exclusive, but Xonar AE is notoriously bad with that.

It kind of feels like there is some issue with ASIO configurations in your registry. Did you ever manually mess with them? Perhaps reinstalling the Xonar AE driver would help? What does it look like in regedit for these paths:

HKLM\SOFTWARE\ASIO\XONAR SOUND CARD(64)
CLSID should be {30D54986-2A72-4827-8A89-E0B096EABE69}
Description should be XONAR SOUND CARD(64)

HKEY_CLASSES_ROOT\CLSID\{30D54986-2A72-4827-8A89-E0B096EABE69}
should have (Default) set to XONAR SOUND CARD(64)

HKEY_CLASSES_ROOT\CLSID\{30D54986-2A72-4827-8A89-E0B096EABE69}\InprocServer32
should have
(Default) set to c:\program files\asustekcomputer.inc\nhasussc40\driverasussc40\win10\amd64\asussc4064.dll
and ThreadingModel set to Apartment

if any of the above values are different, the game will give up on ASIO.

I'm a bit surprised that it works with IIDX31, because newer versions of 31 have practically the same logic as Exceed Gear for discovering ASIO device. Maybe you have a slightly older version of 31?

This is what it's supposed to look like:

M:BMSoundLib: ASIODriver: Opening driver...: XONAR SOUND CARD(64)
M:BMSoundLib: ASIODriver: Driver loaded: XONAR SOUND CARD(64)
M:BMSoundLib: ASIODriver: Initializing...
M:BMSoundLib: ASIODriver: Initialized. Driver: XONAR SOUND CAR(ver.1): 
M:BMSoundLib: ASIODriver: LoadingStaticDriverInfo()...
M:BMSoundLib: ASIODriver: Channels input=0 output=8
M:BMSoundLib: ASIODriver: BufferSize: min=176 max=2200 preferred=176, granularity=1
M:BMSoundLib: ASIODriver: Default sampling rate=44100.000000
M:BMSoundLib: ASIODriver: Supports outputReady: No
M:BMSoundLib: ASIODriver: StaticDriverInfo loaded.
M:BMSoundLib: ASIODriver: Setting Sampling Rate To 44100.000000Hz.
M:BMSoundLib: ASIODriver: Sampling Rate is set: 44100.000000Hz.
M:BMSoundLib: ASIODriver: Creating buffers (input: 0, output: 8)...
M:BMSoundLib: ASIODriver: Buffer latencies = (input: 176, output: 352)
M:BMSoundLib: ASIODriver: Buffers created.
M:BMSoundLib: Building Graph...
M:dll_entry_init: RebuildCoinXML...
M:BMSoundLib: Audio thread started.
M:BMSoundLib: ASIODriver: Starting...

this is what yours look like:

M:BMSoundLib: ASIODriver: Opening driver...: XONAR SOUND CARD(64)
M:BMSoundLib: ASIODriver: Driver loaded: XONAR SOUND CARD(64)
M:BMSoundLib: ASIODriver: Initializing...
M:BMSoundLib: ASIODriver: Initialized. Driver: XONAR SOUND CAR(ver.1): 
M:BMSoundLib: ASIODriver: LoadingStaticDriverInfo()...
M:BMSoundLib: ASIODriver: Channels input=0 output=2
M:BMSoundLib: ASIODriver: BufferSize: min=176 max=2200 preferred=2200, granularity=1
M:BMSoundLib: ASIODriver: Default sampling rate=44100.000000
M:BMSoundLib: ASIODriver: Supports outputReady: No
M:BMSoundLib: ASIODriver: StaticDriverInfo loaded.
M:BMSoundLib: ASIODriver: Setting Sampling Rate To 44100.000000Hz.
M:BMSoundLib: ASIODriver: Sampling Rate is set: 44100.000000Hz.
M:BMSoundLib: ASIODriver: Creating buffers (input: 0, output: 8)...
M:BMSoundLib: EXPECT FAILED
M:BMSoundLib: ASIODriver: Stopping...
M:BMSoundLib: ASIODriver: Closing...
M:BMSoundLib: Failed to Open Asio device.
M:audio::mmdevice: WrappedIMMDevice::Activate
M:BMSoundLib: Failed to open Device.
M:audio::wasapi: WrappedIAudioClient::IsFormatSupported
W:audio::wasapi: WrappedIAudioClient::IsFormatSupported failed, hr=0x88890008
M:BMSoundLib: WASAPI: Exclusive mode @ 44100hz 24/32bit 6ch PCM is not supported.
M:BMSoundLib: Failed to Open WASAPI device.
M:BMSoundLib: Failed to open Device.
M:audio::mmdevice: WrappedIMMDevice::Activate
M:audio::wasapi: WrappedIAudioClient::IsFormatSupported
W:audio::wasapi: WrappedIAudioClient::IsFormatSupported failed, hr=0x88890008
M:BMSoundLib: WASAPI: Exclusive mode @ 44100hz 24/32bit 2ch PCM is not supported.
M:BMSoundLib: Failed to Open WASAPI device.
M:BMSoundLib: Failed to open Device.
M:audio::mmdevice: WrappedIMMDevice::Activate
M:audio::wasapi: WrappedIAudioClient::IsFormatSupported
M:audio::wasapi: WrappedIAudioClient::GetDevicePeriod
M:BMSoundLib: WASAPI: MinimumDevicePeriod: 3.000000
M:BMSoundLib: WASAPI: DefaultDevicePeriod: 10.000000
M:BMSoundLib: WASAPI: Using devicePeriod: 3.000000
M:BMSoundLib: WASAPI: Initializing Exclusive mode @ 44100hz 16/16bit 2ch PCM.
I:audio::wasapi: IAudioClient::Initialize hook hit
I:audio::wasapi: ... ShareMode         : AUDCLNT_SHAREMODE_EXCLUSIVE
I:audio::wasapi: ... StreamFlags       : AUDCLNT_STREAMFLAGS_EVENTCALLBACK | 
PERSIST
I:audio::wasapi: ... hnsBufferDuration : 30000
I:audio::wasapi: ... hnsPeriodicity    : 30000
I:audio: Wave Format:
I:audio: ... SubFormat           : {00000001-0000-0010-8000-00AA00389B71}
I:audio: ... nChannels           : 2
I:audio: ... nSamplesPerSec      : 44100
I:audio: ... nAvgBytesPerSec     : 176400
I:audio: ... nBlockAlign         : 4
I:audio: ... wBitsPerSample      : 16
I:audio: ... wValidBitsPerSample : 16
I:audio: ... dwChannelMask       : SPEAKER_FRONT_LEFT | SPEAKER_FRONT_RIGHT
I:audio::wasapi: IAudioClient::Initialize success, hr=0x00000000
M:BMSoundLib: WASAPI: AudioClient initialized.
M:audio::wasapi: WrappedIAudioClient::SetEventHandle
M:audio::wasapi: WrappedIAudioClient::GetBufferSize
M:audio::wasapi: WrappedIAudioRenderClient::GetBuffer
M:audio::wasapi: WrappedIAudioRenderClient::ReleaseBuffer
M:BMSoundLib: Building Graph...
M:dll_entry_init: RebuildCoinXML...
M:BMSoundLib: Audio thread started.
M:audio::wasapi: WrappedIAudioClient::Start
M:BMSoundLib: Starting audio client...
M:dll_entry_init: Start BootLoader...
I:AppBootLoader: Starting SoftwareWatchdog...
M:BMSoundLib: Audio client started.

the suspiciously different part is

M:BMSoundLib: ASIODriver: Channels input=0 output=8

vs

M:BMSoundLib: ASIODriver: Channels input=0 output=2

@sp2xdev sp2xdev added troubleshooting audio and removed bug Something isn't working labels Jan 12, 2024
@sp2xdev
Copy link
Contributor

sp2xdev commented Jan 12, 2024

also: see https://github.com/spice2x/spice2x.github.io/wiki/Asus-Xonar-AE#in-sdvx

Make sure your Sonic Studio is not set to Headphones mode. It must be in speakers mode. I think this is it actually.

@xmephestox
Copy link
Author

All registry items are correct, everything is as it should be. I did a combination of only leaving the speaker port plugged in, and uninstalled my realtek asio drivers, as well as uninstalled / reinstalled the xonar drivers. In the logs the card is initializing properly now, but it is still say output of 8 instead of 2. Audio is still distorted in game.

log.txt

@sp2xdev
Copy link
Contributor

sp2xdev commented Jan 12, 2024

In the logs the card is initializing properly now, but it is still say output of 8 instead of 2.

8 is correct. 2 is wrong,

ASIO initialization seems fine now, When ASIO is in use, the game communicates directly to your ASIO card. Spice doesn't get in the way. This means something fishy is going on with your card or the audio driver.... so I'm not quite sure how to help. Only thing I can suggest is if your PC is severely underpowered you might want to try increasing the buffer size. For what it's worth, plenty of people got the Xonar AE to work with Voltex just fine, as long as they went into Sonic Studio and chose Speakers mode.

By the way, your primary display is launching at 60Hz.

[2024/01/12 11:20:35] I:NvDisplayConfig: MainDisplay= 60.000hz / SubDisplay= 60.000hz
[2024/01/12 12:20:39] I:graphics::d3d9: D3D9Ex presentation parameters for adapter 0: BackBufferWidth: 1080, BackBufferHeight: 1920, Format: D3DFMT_X8R8G8B8, BackBufferCount: 1, MultiSampleType: 0, MultiSampleQuality: 0, SwapEffect: 1, Windowed: 0, EnableAutoDepthStencil: 0, AutoDepthStencilFormat: D3DFMT_D16, Flags: 0, FullScreen_RefreshRateInHz: 60, PresentationInterval: D3DPRESENT_INTERVAL_IMMEDIATE
[2024/01/12 12:20:39] I:graphics::d3d9: D3D9Ex presentation parameters for adapter 1: BackBufferWidth: 1920, BackBufferHeight: 1080, Format: D3DFMT_X8R8G8B8, BackBufferCount: 1, MultiSampleType: 0, MultiSampleQuality: 0, SwapEffect: 1, Windowed: 0, EnableAutoDepthStencil: 0, AutoDepthStencilFormat: D3DFMT_D16, Flags: 0, FullScreen_RefreshRateInHz: 60, PresentationInterval: D3DPRESENT_INTERVAL_IMMEDIATE

@xmephestox
Copy link
Author

the display hz is just a weird issue where SDVX is confusing my sub screen for the main screen, and my desktop on my main screen is at 60 hz for pop'n. The game automatically goes to 120 fps once it's loaded as long as I don't have v sync enabled. I'm able to get asio to work on my realtek so will default to that for now. Hoping this issue is fixed with EG becomes final data. Thank you.

@sp2xdev sp2xdev closed this as not planned Won't fix, can't repro, duplicate, stale Jan 13, 2024
@sp2xdev
Copy link
Contributor

sp2xdev commented Jan 19, 2024

xmephestox figured out that this was resolved by going to ASIO settings (right click on Sonic Studio tray icon) and changing from 16 bits to 24 bits.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants