Page 2 of 2

Re: Strange Audio thing: sound sometimes doesn't play

Posted: Sun Mar 27, 2011 8:19 pm
by TechnoCat
Taehl wrote:the second pluck doesn't get ignored - it starts the sound again (which would be a much better behavior for love.audio.play, failing a more complete solution)).
Source:Stop()
Source:Play()

Re: Strange Audio thing: sound sometimes doesn't play

Posted: Sun Mar 27, 2011 8:52 pm
by Robin
Taehl wrote:It's not just hard for /me/ to use, as is evidenced by people making help threads about it almost weekly.
I rarely do anything with sounds in LÖVE, but when I do, I have no problems with it. (Except when trying to generate music, but that's a whole different kind of problem.)

It is possible the way LÖVE does things is a paradigm shift for many people, but that doesn't make it suck.

Re: Strange Audio thing: sound sometimes doesn't play

Posted: Sun Mar 27, 2011 9:13 pm
by leiradel
TechnoCat wrote:Source:Stop()
Source:Play()
I think a better behavior would be if Source:Play() stops playing the sound if it's still playing. It's easier to figure out what's going on if your sound stops in the middle to being playing again than the sound not playing at all.

Re: Strange Audio thing: sound sometimes doesn't play

Posted: Mon Mar 28, 2011 4:11 am
by TechnoCat
leiradel wrote:
TechnoCat wrote:Source:Stop()
Source:Play()
I think a better behavior would be if Source:Play() stops playing the sound if it's still playing. It's easier to figure out what's going on if your sound stops in the middle to being playing again than the sound not playing at all.
That would require this to get it to not play over itself then.

Code: Select all

if not Source:isPlaying() then
  Source:Play()
end