Page 1 of 2

Sound not playing

Posted: Sun Apr 10, 2011 1:30 pm
by Anxiety
Im making a shooting game with sounds (of course, duh). But when i do "love.audio.play(sound)", the sound wont play everytime. I hav tried "sound:play()" but still it doesnt play everytime. In case you didnt get the question, how can i make the sound play everytime?

Re: Sound not playing

Posted: Sun Apr 10, 2011 2:04 pm
by Robin
Have you tried rewinding it with Source:rewind it before playing?

Re: Sound not playing

Posted: Sun Apr 10, 2011 2:53 pm
by Anxiety
nope.avi

Re: Sound not playing

Posted: Sun Apr 10, 2011 2:57 pm
by Anxiety
Still doesnt play.

Re: Sound not playing

Posted: Sun Apr 10, 2011 3:03 pm
by Robin
Could you give us a .love?

Re: Sound not playing

Posted: Sun Apr 10, 2011 3:58 pm
by Anxiety
.love?

Re: Sound not playing

Posted: Sun Apr 10, 2011 4:06 pm
by Lafolie
Your source code....

EDIT: Also, you should reaaallly read up on the wiki. http://love2d.org/wiki/Game_Distribution

Re: Sound not playing

Posted: Sun Apr 10, 2011 4:13 pm
by Anxiety
If you mean how i do it;

shot_sound = love.audio.newSource("glock18.wav", "static")

and when fired;

shot_sound:rewind()
shot_sound:play()

And still doesnt work.

Re: Sound not playing

Posted: Sun Apr 10, 2011 4:22 pm
by Robin
I meant your whole source code. Attaching a .love to your post is often done, because it allows us to run the game and see with our own eyes what the problem is, and then dig into the source. This is because the problem is not always where you think it is.

The snippet above is pretty much useless to us, for example.

If you upload a .love of your game to the forums, we can help you better.

Re: Sound not playing

Posted: Sun Apr 10, 2011 4:58 pm
by Anxiety
Here :)