[Solved] Audio does not work in preview

When playing an ogg or mp3 sound, i cannot hear it in the preview but still registers as playing. When I export it to an exe it works fine.

Is there something I’m doing wrong or is this a bug?

Any help would be much appreciated!

Hello

  • Which version did you use ? Lastest is beta92.

  • Be sure to understand how work the sound/music, one limitation exist.

  • If you want no delay you can use the action music or sound both re interchangeble, but both have differents advantages.

yeh i uninstalled my current version and got the latest from the website. I’ve read the documentation and understand how it works but I wait ages and it just doesnt play. But the app plays it instantly.

Which OS are you using?
What do you mean by “registers as playing”?
Can you show your sound events?

I’m using windows 10. I tested it out, so if the music was not playing, or the music on the channel had stopped, it would quit the game or change the scene. So I waited around the duration of the sound file and then once it stopped playing it ran the event, although I did not hear anything. Attached are the events for the simple menu scene. Currently, it “plays” the music when I press E. I got rid of the testing events but I did something like 'If music on channel 1 is stopped" or “music on channel 1 is not playing (reversed the condition)” then “quit the game” or “change the scene”, and then I would know if it registered as playing or not.

I love GD so far though, awesome software. Making a game which I hope to publish on itch at some point lol

But if you have any suggestions they would be much appreciated. Worst case scenario I’ll just have to put all the sounds in and test on the export.

Does it work in preview or in Web (online build) export?
Does sound work in the example projects? This one, for instance
https://editor.gdevelop-app.com/?project=example://dialogue-tree-with-yarn
Try in your browser, and then try in GDevelop.

I tried web version, and the sound worked.
Then I tried an example project in the app, but it didn’t work in preview.
I uploaded the game to the web and it worked.
But just not in preview! Which is odd…
Thanks for your help!

Thanks for the testing. No other sound issue on your computer? :confused:
Can you check if you have this problem with both music actions and sound actions?

Okay… well i looked into sound mixer settings in windows and well… there it was. Gdevelop was muted for some reason. So I turned it back on and now I think audio is working!
Really silly mistake should’ve checked first lol
sorry and thanks for all of y’all trying to help… in the end it was just me being stupid, which I guess is the root of many problems…
awesome community!

2 Likes

UUmh interesting, maybe the program is muted by default on some computer.

So the solution is turn on the sound in your mixer settings.

I encountered something similar, but with a wav file. There’s a boss that’s supposed to play a sound after firing a bullet, but it’s not playing. why?

This is a year old thread, and the audio engine has been rebuilt since then. I’d recommend making a new thread with a screenshot of your events.

1 Like