generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripters
Home Search
 

Re: iOS Sound Issue

Previous Thread :: Next Thread 
NickPatella is not online. NickPatella
Joined: 03 Oct 2010
Total Posts: 220
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
nQqzRYVpIKA5jLP is not online. nQqzRYVpIKA5jLP
Joined: 05 Mar 2015
Total Posts: 4135
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
NickPatella is not online. NickPatella
Joined: 03 Oct 2010
Total Posts: 220
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
nQqzRYVpIKA5jLP is not online. nQqzRYVpIKA5jLP
Joined: 05 Mar 2015
Total Posts: 4135
11 May 2015 09:59 PM
Why are you using https?
Report Abuse
nQqzRYVpIKA5jLP is not online. nQqzRYVpIKA5jLP
Joined: 05 Mar 2015
Total Posts: 4135
11 May 2015 10:10 PM
Don't use https.
Report Abuse
NickPatella is not online. NickPatella
Joined: 03 Oct 2010
Total Posts: 220
12 May 2015 06:06 AM
I thought asset ids need https..? Oh, I see. I'll try http.
Report Abuse
epicbreaker is not online. epicbreaker
Joined: 23 Apr 2011
Total Posts: 2791
12 May 2015 06:08 AM
Use: rbxassetid:// instead.

audio.SoundId = "rbxassetid://"..SoundList[sound]
Report Abuse
chimmihc is not online. chimmihc
Joined: 01 Sep 2014
Total Posts: 17143
12 May 2015 06:13 AM
^


I script -~ chimmihc
Report Abuse
NickPatella is not online. NickPatella
Joined: 03 Oct 2010
Total Posts: 220
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 is not online. 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
bosswalrus is not online. bosswalrus
Joined: 04 Jan 2013
Total Posts: 5430
12 May 2015 05:38 PM
People with apple devices..

"I like to program" - Bosswalrus
Report Abuse
hdtv13 is not online. 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
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image