audio.loadSound() won't work

i am working on a simple game for school project, and now i want to add sounds, but no matter what I try, I still get the same warning: WARNING: /home/user/Desktop/2023_Color-game/scenes/menu.lua:24: audio.loadSound() failed to create sound ‘ColorUpAssets/assets/sounds/click.wav’
The path exists (I copied it). The file is 16bit compressed, not corrupted (plays fine on other media). Same happens with every .wav and .mp3 file I try.
I tried finding the implementation of loadSound() function, but I failed in doing so.
I am out of ideas.

_click = audio.loadSound(“ColorUpAssets/assets/sounds/click.wav”)

Path is case sensitive, make sure all folders are named as written

Is the folder containing main.lua named ColorUpAssets?

If so, try this instead:

_click = audio.loadSound("assets/sounds/click.wav")

Also, be careful about quotes. You must use a text/code editor when editing. I noticed the quotes in your pose were stylized like a word processor would generate.

That is these normal quotes "" are not the same as these stylized codes “”. The latter would cause a problem.

Just updating this based on Discord conversation:

@Pepe151101 was doing this on Linux, which currently has issues with (some) audio. This is probably an issue that can’t be fixed without addressing the relevant parts in Solar2D core for Linux.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.