vlang / v

Simple, fast, safe, compiled language for developing maintainable software. Compiles itself in <1s with zero library dependencies. Supports automatic C => V translation. https://vlang.io
MIT License
35.69k stars 2.15k forks source link

Sokol.audio not working on Windows #16529

Closed KeitoTobi1 closed 1 year ago

KeitoTobi1 commented 1 year ago

Describe the bug

When I try to run expamples/sokol/sounds/melody.v, no sound comes out.

Expected Behavior

The waveform is displayed in the window along with the sound.

Current Behavior

The following error appears in the console and a gray screen appears in the window.

Based on the ByteBeat formula from: https://www.youtube.com/watch?v=V4GfkFbDojc
 "Techno" by Gabriel Miceli
sokol_audio wasapi: failed to create device enumerator

Reproduction Steps

C:\v> v --cc gcc run expamles/sokol/sounds/melody.v

Possible Solution

It may be a compatibility issue between the Sokol library and the hardware.

Additional Information/Context

Processor: 4 cpus, 64bit, little endian, Intel(R) Core(TM) i3-6100 CPU @ 3.70GHz

V version

V 0.3.2 523ccbc.dee75fe

Environment details (OS name and version, etc.)

windows, Microsoft Windows 10 Pro v19045 64 rbg

Wertzui123 commented 1 year ago

I can confirm this with TCC - but it works fine for me with GCC.

JalonSolov commented 1 year ago

Works fine for me with both tcc and gcc, on Linux.

KeitoTobi1 commented 1 year ago

dupe is #15863.