Audio error

Hi !

I get this error when I quick tapping on red rectangle. Sound is 1 sec. long. I need 3 or more tapps at 1 sec.

audio error: Can’t play shared streamed sample because it is already in use

Thanks.

  
   local snd = audio.loadStream(“flip.mp3” )

   local red = display.newRect( 150, 150, 60, 80 )
   red.name = “red”
   red:setFillColor( 1, 0, 0 )

     – briši odgovor
   local tapMe = function(event)

      local t = event.target

      local phase = event.phase                

      if t.name == “red” then
          audio.play( snd )
      end

  end

   red:addEventListener(“tap”, tapMe)

I think you should use audio.loadSound() instead of audio.loadStream()

It worked, thanks.

I think you should use audio.loadSound() instead of audio.loadStream()

It worked, thanks.