Sound not playing
Sound not playing
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?
I can't come up with a good signature!
- Robin
- The Omniscient
- Posts: 6506
- Joined: Fri Feb 20, 2009 4:29 pm
- Location: The Netherlands
- Contact:
Re: Sound not playing
Have you tried rewinding it with Source:rewind it before playing?
Help us help you: attach a .love.
Re: Sound not playing
Your source code....
EDIT: Also, you should reaaallly read up on the wiki. http://love2d.org/wiki/Game_Distribution
EDIT: Also, you should reaaallly read up on the wiki. http://love2d.org/wiki/Game_Distribution
Do you recognise when the world won't stop for you? Or when the days don't care what you've got to do? When the weight's too tough to lift up, what do you? Don't let them choose for you, that's on you.
Re: Sound not playing
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.
shot_sound = love.audio.newSource("glock18.wav", "static")
and when fired;
shot_sound:rewind()
shot_sound:play()
And still doesnt work.
I can't come up with a good signature!
- Robin
- The Omniscient
- Posts: 6506
- Joined: Fri Feb 20, 2009 4:29 pm
- Location: The Netherlands
- Contact:
Re: Sound not playing
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.
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.
Help us help you: attach a .love.
Re: Sound not playing
Here
- Attachments
-
- Total Shootout.love
- (55.5 KiB) Downloaded 262 times
I can't come up with a good signature!
Who is online
Users browsing this forum: Bing [Bot], Google [Bot] and 5 guests