|
| 11 May 2015 09:32 PM |
Hi, I'm just having issues with playing sounds on iOS. I made a piano, which works perfectly fine on PC, but it has fatal flaws on iOS:
All sounds are preloaded. The process to play a sound is creation of the instance, setting the time position, and playing it. Four seconds later, the sound is deleted. This uses the delay function. (Is there a better alternative to the delay function? Coroutines?)
The press of a single key, playing a sound, causes the client to freeze for 1 to 2 seconds before part of the sound plays. If someone else decides to break out Chopsticks or The Entertainer, the whole app will freeze indefinitely. Ideas? |
|
|
| Report Abuse |
|
|
|
| 11 May 2015 09:35 PM |
| What iOS device are you using? There could just be something wrong with your script that's causing the game to lag. |
|
|
| Report Abuse |
|
|
|
| 11 May 2015 09:43 PM |
I'm using an iPad 3. The same thing happens on my iPhone 5c.
function PlayNoteSound(note1, source, range)
...stuff happens here
local audio = Instance.new("Sound", SoundFolder) -- Create the audio audio.SoundId = "https://roblox.com/assets/?id="..SoundList[sound] if source then ...not pertinent, does not fire when bug occurs end
audio.TimePosition = offset + (octave - .9)/15 -- set the time position audio:Play() -- Play the audio table.insert(ExistingSounds, 1, audio) if #ExistingSounds >= 10 then ExistingSounds[10]:Stop() -- limit the number of playing sounds! ExistingSounds[10] = nil end delay(4, function() audio:Stop() audio:remove() end ) -- remove the audio in 4 seconds, enough time for it to play end
I'm absolutely certain the issue is in this function, and I'm 99% sure it has to do with playing sounds. |
|
|
| Report Abuse |
|
|
| |
|
| |
|
|
| 12 May 2015 06:06 AM |
| I thought asset ids need https..? Oh, I see. I'll try http. |
|
|
| Report Abuse |
|
|
|
| 12 May 2015 06:08 AM |
Use: rbxassetid:// instead.
audio.SoundId = "rbxassetid://"..SoundList[sound] |
|
|
| Report Abuse |
|
|
chimmihc
|
  |
| Joined: 01 Sep 2014 |
| Total Posts: 17143 |
|
| |
|
|
| 12 May 2015 05:07 PM |
Whatever way it's written, it doesn't seem to have an effect. I think this is a bug with sounds on the client, or something of that nature.
|
|
|
| Report Abuse |
|
|
hdtv13
|
  |
| Joined: 18 Sep 2012 |
| Total Posts: 1628 |
|
|
| 12 May 2015 05:35 PM |
Who really plays games on iOS now?
I have skin, potatoes have skin, therefore I'm a potato. |
|
|
| Report Abuse |
|
|
|
| 12 May 2015 05:38 PM |
People with apple devices..
"I like to program" - Bosswalrus |
|
|
| Report Abuse |
|
|
hdtv13
|
  |
| Joined: 18 Sep 2012 |
| Total Posts: 1628 |
|
|
| 12 May 2015 05:44 PM |
Eafdsgd Its buggy af though
I have skin, potatoes have skin, therefore I'm a potato. |
|
|
| Report Abuse |
|
|