raysan5 / raylib

A simple and easy-to-use library to enjoy videogames programming
http://www.raylib.com
zlib License
22.07k stars 2.23k forks source link

PlaySound working but can't hear the sound #4376

Open Patchap1 opened 2 hours ago

Patchap1 commented 2 hours ago

Hello,

I was trying to add sound to my game using Raylib, but I can't hear anything. However, when I look at the console, it says that the sound and the music stream were loaded successfully (I even added code to show 0 if no sound is playing and 1 if a sound is playing). So I’m guessing I’m missing something to be able to hear it, or the sounds I’m using are incompatible. Can someone help me understand the problem, please?

image_2024-10-10_184908841

image

image

raysan5 commented 2 hours ago

@Patchap1 Did you try the audio examples? Do they work? If they work then issue could be in your code. As per the shared code, everything seems fine... except that list of values in the log that I imagine you printf().

Patchap1 commented 1 hour ago

What do you mean by audio examples? And regarding the list of values in the log, yes, it is from the printf() function, and you can clearly see a line of 1, which means the sound was played but couldn't be heard.

raysan5 commented 30 minutes ago

What do you mean by audio examples?

@Patchap1 I mean the raylib audio examples included with the library. If you are on Windows, you can open the provided VS2022 solution and try them.