Page 1 of 1

Player freezes after playing multiple MP3 files

Posted: Sat Sep 27, 2025 10:00 am
by Fermin
Message:
Hi everyone,
I’m working on a project where I need to play a series of mp3 files, which I call "clips", every few seconds through a single player object (“c2”). This repeats more than 100 times in sessions of about 5–6 minutes.

At first everything works fine, but when the session ends, or if I interrupt it after one or two minutes, the app freezes when I try to play or activate the player again. If I stop earlier, sometimes it doesn’t freeze.

I suspect the problem is that the player gets saturated because of the number of times I assign and release files (set the filename) in such a short time. As an alternative, I tried combining all the clips into one long file, marking start and end positions for each fragment and jumping to them as needed. However, the same issue occurs after a while.

I also tried different ways to “refresh” the player, for example:

Code: Select all

stop player "c2"
set the currentTime of player "c2" to 0
set the filename of player "c2" to empty 
wait 50 milliseconds with messages
and some variations, but I haven’t found a stable solution.

I also tried a ping-pong approach with two players, alternating between them so that while one was playing the other could be prepared with the next clip. I haven’t tested it thoroughly, but the problem seemed to persist.

Has anyone experienced this situation or found a reliable way to avoid these freezes when working with a single player in these conditions?

Environment:
• LiveCode version 9
• iMac with macOS Ventura
• Using mp3 files (switching to WAV is not an option for me)

Thanks in advance for any suggestions or ideas!

Re: Player freezes after playing multiple MP3 files

Posted: Mon Sep 29, 2025 11:44 am
by richmond62
Can LC manage m4a files?

Re: Player freezes after playing multiple MP3 files

Posted: Mon Sep 29, 2025 12:05 pm
by Klaus
Yes, at least I can confirm this for Mac.

But I highly suspect the posting of OliverDonaldson to be AI generated.... 8)

Re: Player freezes after playing multiple MP3 files

Posted: Mon Sep 29, 2025 12:28 pm
by richmond62
So do I. The whole thing looks a bit too generic.

Re: Player freezes after playing multiple MP3 files

Posted: Mon Sep 29, 2025 12:54 pm
by Klaus
Yep, will delete user and posting later!

Re: Player freezes after playing multiple MP3 files

Posted: Mon Sep 29, 2025 1:11 pm
by richmond62
Good to know about m4a files anyway: always a good idea to leverage crap to learn new things! 8)