Getting my game music / soundtrack to play?

I’m trying to get some music into my game using an audio listener on the player and an audio source. I’ve tried setting the min and max volumes the same so that the soundtrack never fades.

I can’t seem to get any sound all however. The sound source is set to activate when the level loads. The sound is an imported .wav file.

Any ideas?

Is the “PlayOnAwake” variable enabled on your audio source? This must be enabled, or you could have it Play from script. Something like:

function Start ()
{
     audio.Play ();
}

Is your audio clip even assigned to the audio source?

Also, presumably your soundtrack is stereo, and stereo sounds never fade anyway, so you don’t have to bother with setting min and max volumes.

–Eric

Did it come from Audacity? It might be worth using finder and playing it from there to check its not corrupt, I have had audacity export files with no actual content in them. Just silence.
AC

The audio clip is assigned to the source. The PlayOnAwake flag is set to true. The file plays fine in iTunes. And it is stereo.

still no luck :frowning:

If you’re ok with sharing the clip, I’ll see if I can get it working.

Well, for now I’ve got some streamed audio working. Still not sure why the other stuff isnt working.

Thanks for all the feedback!