A anaylor01 Well-Known Member Licensed User Longtime User May 31, 2016 #1 Sound doesn't always play like it should. Can anyone see the problem in the code below? Code: Copy If lblTimer.Text <= "10" Then lblTimer.textColor = Colors.red Sound.Initialize(2) ticksnd = Sound.Load(File.DirAssets,"beep.mp3") Sound.Play(ticksnd, 1, 1, 10, 0,0) End If
Sound doesn't always play like it should. Can anyone see the problem in the code below? Code: Copy If lblTimer.Text <= "10" Then lblTimer.textColor = Colors.red Sound.Initialize(2) ticksnd = Sound.Load(File.DirAssets,"beep.mp3") Sound.Play(ticksnd, 1, 1, 10, 0,0) End If
DonManfred Expert Licensed User Longtime User May 31, 2016 #2 i guess you should initialize Sound only once and after that only use Play. Upvote 0
Erel B4X founder Staff member Licensed User Longtime User May 31, 2016 #3 That's correct. You should initialize the SoundPool and load the files once when your program starts. Upvote 0
That's correct. You should initialize the SoundPool and load the files once when your program starts.