Game Development Community

Reasons a wav won't play?

by Jason McIntosh · in Torque Game Builder · 05/07/2005 (11:36 pm) · 1 replies

I've got a sound that absolutely refuses to play!

It's defined ok, the file plays when I test it outside the game, and every other sound in the game plays fine. I made sure to convert it to 44khz, 16bit mono. I even replaced the wav file on disk with another sound I know works, but yet there's no sound. I know the code is executing because there's an echo saying so the line before the alxPlay() call.

new AudioProfile( pillbugHit_snd )
{
	filename = "game/ball/pillbug/audio/bounce.wav";
	description = "NoLoop_Audio";
	preload = false;
};

So what factors could cause a perfectly normal sound to not play using alxPlay()?

Talk about weird problems....

#1
05/08/2005 (7:08 pm)
How strange is this? I moved the .wav file to the /game directory (which is the same depth as /common, etc), and it plays. If I put it in any other directory, it won't play! o_O And it's only this one sound! Every other sound plays fine in any directory.

This is just bizarre.

Edit: It also plays in the /game/balls/ directory, but any directory below that and it won't play. (Other sounds are nested deeper and play fine.) Regardless, I don't see how the directory a sound file is in could affect it like that.