This code is playing short collision sound.
[blockcode]
local sound = audio.loadSound( ‘sound/hit.wav’ )
local soundId = 1
local function ballContactSound()
audio.stop( soundId )
audio.play( sound, {channel = soundId} )
end
local function ballCollision( self, e )
– play sound
ballContactSound()
end
local ball = display.newCircle( group, 0, 0, 20 )
physics.addBody( ball, ‘dynamic’ )
ball.preCollision = ballCollision
ball:addEventListener(‘preCollision’, ball)
[/blockcode]
At any moment, simulator prints “17dTesting Error with clearing buffer from source: Invalid Operation” error.
this makes me crazy. PLEASE HELP ME [import]uid: 161695 topic_id: 35524 reply_id: 335524[/import]
