I’m doing my best to copy the sample code for event sound, but even though the timer is working fine, I can only get the sound itself to play once.
My print statement is successfully running every second, so I know it’s hitting the function
I’m playing a 30ms file, and I’ve tried both .wav and .mp3.
I’m running build 2011.704 on a Windows machine
Here’s the sample code I’ve copied from http://developer.anscamobile.com/content/multimedia-features
[lua]local soundID = media.newEventSound( “beep.caf” )
local playBeep = function()
media.playEventSound( soundID )
end
timer.performWithDelay( 1000, playBeep, 0 )[/lua]
And here’s my code:
[lua]local soundID = media.newEventSound( “sounds/klack_wav.wav” )
local playBeep = function()
print( “playBeep called”)
media.playEventSound( soundID )
end
timer.performWithDelay( 1000, playBeep, 0 )[/lua]
Any ideas? Thanks in advance! [import]uid: 81015 topic_id: 20033 reply_id: 320033[/import]