sokol: sokol_audio wasapi: audio client initialize failed

When updating from b3ffdf3e561 to master I found audio wasn’t working anymore on Windows. Getting the error: sokol_audio wasapi: audio client initialize failed

I checked out a fresh sokol-examples branch and am seeing the same issue on the saudio-sapp sample as well. The error code is -2147024809. I’m not sure the best way to map that the actual error string- but I can add some code on my side if you have any ideas.

It seems like changing the initialization to use WAVEFORMATEXTENSIBLE might be the source of the issue. From this commit: https://github.com/floooh/sokol/commit/73e6236d95fbd05063b0182df5b5a33b468b69e1#diff-6895bcde273e33259102954399efb1bd6c705ae45183843da44b14ccc8006e09

I was able to reproduce the problem on two different Windows 10 computers.

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 17 (11 by maintainers)

Commits related to this issue

Most upvoted comments

Ok, fixed in https://github.com/floooh/sokol/commit/537568c405a0dc533692c676fa06b957b2b6f89c, I’ll check on my other PCs and update the changelog next. If it’s not working on your end for some reason, just re-open the ticket.

Fair guess, but nope. Not sure if it is a useful data point, but if I throw the wfext in the initialize instead of fmtex it does pass (but of course the sample doesn’t sound right since I’m sure the parameters don’t match).

Sure! It’s no rush on my end, I just reverted the sokol_audio change on my fork and it is working same as before.

PC 1 (few years old desktop): Windows 10 Pro Version: 20H2 OS build: 19042.1466 Audio: Realtek High Definition Audio (6.0.8703.1)

PC 2 (new laptop): Windows 10 Home Version: 21H1 OS build: 19043.1415 Audio: Realtek® Audio (6.0.9167.1)

Let me know if there is any other info I can add or if there is anything you want me to test on my end.