Strange Audio thing: sound sometimes doesn't play

Questions about the LÖVE API, installing LÖVE and other support related questions go here.
Forum rules
Before you make a thread asking for help, read this.
User avatar
TechnoCat
Inner party member
Posts: 1611
Joined: Thu Jul 30, 2009 12:31 am
Location: Milwaukee, WI
Contact:

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

Post 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()
User avatar
Robin
The Omniscient
Posts: 6506
Joined: Fri Feb 20, 2009 4:29 pm
Location: The Netherlands
Contact:

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

Post 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.
Help us help you: attach a .love.
User avatar
leiradel
Party member
Posts: 184
Joined: Thu Mar 11, 2010 3:40 am
Location: Lisbon, Portugal

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

Post 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.
User avatar
TechnoCat
Inner party member
Posts: 1611
Joined: Thu Jul 30, 2009 12:31 am
Location: Milwaukee, WI
Contact:

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

Post 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
Post Reply

Who is online

Users browsing this forum: YaCy [Bot] and 5 guests