Audio Issue. WASAPI can't initialize audio client

Ask for help with ScummVM problems

Moderator: ScummVM Team

fibs
Posts: 29
Joined: Mon Sep 26, 2022 10:38 pm

Re: Audio Issue. WASAPI can't initialize audio client

Post by fibs »

Maverick_Hunter1900X wrote: Sat Oct 28, 2023 7:24 pmFirstly, when I tried to type in the "set SDL_AUDIODRIVER=directsound" it didn't give me a message about directsound being active or not. It just hopped a line down. So I typed in the "scummvm.exe -d1" command and low and behold it worked, or I think it did, since now it says the following:
That's expected and OK.
Maverick_Hunter1900X wrote: Sat Oct 28, 2023 7:24 pmA couple of questions though...
Can I change the Output sample rate to something higher than 44100 Hz, if so how (If it's a command line, what is the exact command for it?
Can I change The Output buffer size, if so how?
Can I change The Output channels to for example, 5.1 and if so, how?
Dunno, you probably can't, and I don't think it matters for old games supported by ScummVM. The set variable only affects SDL 2.x apps and practically only affects ScummVM the way it was run, in case you're confused about that.
Maverick_Hunter1900X wrote: Sat Oct 28, 2023 7:24 pmOh and one last thing, I tried to load Monkey Island 2 and I have set it to Music Device: Adlib Emulator and Adlib Emulator: Dosbox OPL.
But then I saw this message when closing ScummVM:
[snip]
Is it supposed to say this?
Yes, since it says it with the debug flag, but I have no idea what it means other than it doesn't read like a serious or too unexpected issue.
Maverick_Hunter1900X wrote: Sat Oct 28, 2023 7:24 pmDoes it matter if the Savegame is made from a very old version of ScummVM?
I'd just start over and, since savegames may have sound state information, I at least wouldn't switch the game's audio settings for the entire game run, but if it loads and isn't or doesn't get in a bugged state the next few rooms you're probably out of the woods...

---

Back to the topic at hand, now that you seemingly have it working:

1. Go to the ScummVM folder in Windows Explorer (probably C:\Program Files\ScummVM)
2. Click Send to -> Desktop (Create Shortcut)
- A shortcut file called "scummvm.exe - Shortcut" will be generated in your Desktop folder.
3. Left Click the newly created shortcut, click Properties, then change the Target from whatever it is to exactly:

Code: Select all

C:\Windows\System32\cmd.exe /c "SET SDL_AUDIODRIVER=directsound&& START /D ^"C:\Program Files\ScummVM\^" scummvm.exe"
- change C:\Program Files\ScummVM\ to your installation folder if different
4. Rename the shortcut to ScummVM (Audio Workaround)
5. Run ScummVM with that

You can also modify/duplicate and modify the existing ScummVM shortcut the same way. You may want to keep (or add) --no-console at the end after scummvm.exe in the Target.

Enjoy.
DjDiabolik
Posts: 77
Joined: Thu Feb 02, 2006 11:55 pm

Re: Audio Issue. WASAPI can't initialize audio client

Post by DjDiabolik »

OMG....... Today on my Home Windows PC i have found i have the same exact problems.

Read all reply until now and this is my situation..... if i run Scummvm.exe from Command Prompt whit -d1 option this is the output:

Code: Select all

D:\ScummVM>scummvm.exe -d1
Debuglevel (from command line): 1
Using SDL Video Driver "windows"
Using SDL Audio Driver "wasapi"
SDL mixer sound format: 33056 differs from desired: 32784
WARNING: Could not open audio device: WASAPI can't initialize audio client: ݃ǯñ╗û!
HardwareInput with ID 'JOY_START' not known
HardwareInput with ID 'JOY_LEFT_STICK_Y-' not known
HardwareInput with ID 'JOY_LEFT_STICK_Y+' not known
HardwareInput with ID 'JOY_LEFT_STICK_X-' not known
HardwareInput with ID 'JOY_LEFT_STICK_X+' not known
HardwareInput with ID 'JOY_RIGHT_SHOULDER' not known
CPU extensions:
SSE2(not supported) AVX2(not supported) NEON(not supported)
HardwareInput with ID 'JOY_A' not known
HardwareInput with ID 'JOY_Y' not known
HardwareInput with ID 'JOY_UP' not known
HardwareInput with ID 'JOY_DOWN' not known
HardwareInput with ID 'JOY_LEFT' not known
HardwareInput with ID 'JOY_RIGHT' not known

Can't initialize audio client and look weird........... how i can fix this ?


*EDIT*
"set SDL_AUDIODRIVER=directsound" and also right now setted the new "Environment Variables" on Avdanced System Setting.
So now apparently resolve the issue.......

I hope this not create general issue on other app.
Post Reply