iOS app erratically freezing up when loading audio files
J. Landman Gay
jacque at hyperactivesw.com
Wed Sep 30 01:15:48 EDT 2020
Some video problems can be solved by setting the filename of the player to
empty, waiting a few milliseconds, and then setting the new filename. I'm
not sure it will work in this case but it's worth a try.
Also, if you aren't using the latest version of LC, try that.
Jacqueline Landman Gay | jacque at hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com
On September 29, 2020 3:48:55 PM Andreas Bergendal via use-livecode
<use-livecode at lists.runrev.com> wrote:
> Hi folks,
> I really need your help now. I’m developing a simple app for a client, to
> be run on iPads in an exhibition starting 8th Oct. It consists of two cards:
> a gallery card, with 16 photos
> a profile card which you go to by clicking a photo on the gallery card
> On the profile card this is loaded:
> the photo again, larger
> a short text in a field
> an audio file (mp3), which starts playing
> All resources are included in file folders with the app, no internet
> needed. The audio files are central to the app. They are recordings of
> people on Guernsey speaking Guernesiais, and sizes range from 1.6Mb to 2.6Mb.
> In iOS a player is created with mobileControlCreate, and the audio
> controller is visible, so the user can pause, fast fwd etc.
> The app design and coding is done and it works perfectly in the IDE, as Mac
> standalone (with standard player) and in the iOS simulator (iOS 13.3).
> It works on the client’s iPads too (iOS 13.6), but irregularly freezes
> (rarely crashes), preventing further interaction until the app is killed
> and restarted. The freeze occurs at (or during)
> ”mobileControlSet "voicePlayer", "filename", sAudioPath”
> In the simulator I get a crash (app quits) if I don’t put ”wait 20 ticks
> with messages” after setting the file path, but never a freeze. I’ve tried
> to give the audio loading a full second wait, in case iPads are slower than
> simulator, and it prevents crash but not the random freezing.
> The iPad user can sometimes load the same profile (or different ones, we
> see no pattern) 30-40 times before freeze occurs, sometimes just 3. So it
> doesn’t seem to have anything to do with cache build-up or so.
> So, has anyone experienced similar problems with playing mp3 files on iOS?
> Any obvious pitfalls?
> The frustrating thing is that I cannot reproduce the problem in simulator
> (it works perfectly there), and have no iPad myself to hook up for Remote
> debugging. So I have to try various solutions, then upload a new build to
> TestFlight and wait for the client’s ”Sorry, it’s still freezing randomly”…
> Hopeful greetings,
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
More information about the use-livecode