Sound not playing
Re: Sound not playing
Anyone? I really want for it to work (who doesnt?).
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
Thanks for the .love. Also, don't worry if no-one replied for a few hours. This is still a forum. Plus, it was around dinner time for most of us.
I looked at it but couldn't find the exact cause. Maybe someone else can help.
I looked at it but couldn't find the exact cause. Maybe someone else can help.
Help us help you: attach a .love.
- TechnoCat
- Inner party member
- Posts: 1611
- Joined: Thu Jul 30, 2009 12:31 am
- Location: Milwaukee, WI
- Contact:
Re: Sound not playing
do this instead
You might not be able to rewind statics.
Code: Select all
Source:stop()
Source:play()
- Taehl
- Dreaming in associative arrays
- Posts: 1025
- Joined: Mon Jan 11, 2010 5:07 am
- Location: CA, USA
- Contact:
Re: Sound not playing
Use TEsound and worry no more.
Earliest Love2D supporter who can't Love anymore. Let me disable pixel shaders if I don't use them, dammit!
Lenovo Thinkpad X60 Tablet, built like a tank. But not fancy enough for Love2D 0.10.0+.
Lenovo Thinkpad X60 Tablet, built like a tank. But not fancy enough for Love2D 0.10.0+.
- EmmanuelOga
- Citizen
- Posts: 56
- Joined: Thu Apr 22, 2010 9:42 pm
- Location: Buenos Aires, Argentina
- Contact:
Re: Sound not playing
The easiest is create the source each time you want to play it. Otherwise you need to checkout if the sound is playing, if it is, create a new source for the source file, in order to get the same sound to play more than once, etc...
you can call those methods each time you want to play. Garbage collection should take care of the rest.
Code: Select all
function shot_sound()
love.audio.newSource("sound/glock18.wav", "static"):play()
end
function reload1()
love.audio.newSource("sound/glock_clipin.wav", "static"):play()
end
function reload2()
love.audio.newSource("sound/glock_clipout.wav", "static"):play()
end
--------------------------------------------------------------------------------------------------------
http://EmmanuelOga.com
http://EmmanuelOga.com
Who is online
Users browsing this forum: No registered users and 8 guests