• Hello [name]! Thanks for joining the GMC. Before making any posts in the Tech Support forum, can we suggest you read the forum rules? These are simple guidelines that we ask you to follow so that you can get the best help possible for your issue.

Legacy GM [SOLVED] Audio won't work in-game

R

Roland Jones

Guest
I just started messing with Game Maker today (despite having gotten it in the Humble Bundle last year), and decided to start with the tutorials to learn it. Got through most of the Catch the Clown one with no trouble (other than the game window being 640 x 448 instead of 640 x 480; this is really confusing to me too but it's like that even in the pictures so I guess it's not wrong?), but when it came time to compile and play the game, the sound effects aren't working for either clicking or bouncing. It's completely silent. I can play the effects in Game Maker itself just fine, but it doesn't work in the game itself.

I tried Googling the problem, and found some solutions telling me to uncheck "Use New Audio Engine" in the Global Game Settings, but that didn't work. I then looked through the compile logs for and clues, and found this:

Converting snd_click to Wav 16bit mono @ 44100Hz
Converting snd_bounce to Wav 16bit mono @ 44100Hz
Error - audio conversion failed
Error - audio conversion failed
Audio file not found in cache!
Audio file not found in cache!

I'm assuming this is related to the problem, but I have no idea what to do here. Googling this hasn't helped me, so, if anyone here can tell me what's wrong, it would be greatly appreciated.
 
R

Roland Jones

Guest
The sounds exists; I can play them in Game Maker just fine, check them in the file explorer on my computer, etc. They came with the tutorial.

As for the code, I'm actually not sure how to get to it; I'm using D'n'D to make the game, as the tutorial says, and I'm not sure how to see the code for the objects and such I've made this way. I'm still learning the program.
 
R

Roland Jones

Guest
Just delete the ones in Game Maker, or delete the files themselves? I've done the former at least, but it didn't work.
 
R

Roland Jones

Guest
Here's what I get when I click "Show Information" on the object that should be making the sounds:

Information about object: obj_clown
Sprite: spr_clown
Solid: false
Visible: true
Depth: 0
Persistent: false
Parent:
Children:
Mask:
No Physics Object
Create Event:
start moving in directions 111101111 with speed set to 4
Collision Event with object obj_wall:
bounce not precisely against solid objects
play sound snd_bounce; looping: false
Mouse Event for Left Pressed:
set the score relative to 10
play sound snd_click; looping: false
jump to a random position with hor snap 0 and vert snap 0
start moving in directions 111101111 with speed set relative to 0.5

Is that what you want, or something else? I'm not sure what you mean by "a snip of the dnd code", sorry.
 
R

Roland Jones

Guest
Unfortunately that didn't work either. After trying that last night, I tried a different tutorial to see if the problem happened to just be localized to this one project. Instead, I still didn't have working sound, then eventually started getting the following error when I tried to compile:

ffmpeg.exe - System Error
The program can't start because AVICAP32.DLL is missing from your computer. Try reinstalling the program to fix this problem.

I couldn't find a solution to this, and eventually just tried uninstalling and reinstalling Game Maker overnight. Now, this morning I started everything over, remade the clown game as the My First Game tutorial says, and tried to play. Again, no sound. Tried unchecking the Use New Audio Engine option in Global Game Settings again, and now I'm getting the above .DLL error for this game too.
 
R

Roland Jones

Guest
Well, I was going to bundle everything up to post here, but it's working now. I'm not sure exactly why, but I got advice to run my System File Checker in response to this elsewhere, so that might have fixed the DLL problem.

Either way, thank you for all the help. Sorry for the trouble.
 

Zixtix

Member
Thank you for the post. I encountered the same problem and it turns out that it was because ffmpeg relies on avicap32.dll and msvfw32.dll. So even though the error shows that

GML:
Error - audio conversion failed
Audio file not found in cache!
The real cause is that ffmpeg cannot find avicap32.dll and msvfw32.dll. Copying those two files from C:\Windows\System32\ (64bit) or C:\Windows\SysWOW64 (32bit) to the directory of ffmpeg in the GMS runtime directory solved the problem for me.
 
Top