Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Classic Chat / Looping Music - Avoiding the end-of-song pause when looping

Author
Message
anwserman
12
Years of Service
User Offline
Joined: 20th May 2011
Location: Wisconsin
Posted: 17th Jan 2012 08:02
Whenever my music loops, there's a pause. It occurs on both iOS and Windows.

1) Tried switching from MP3 to WAV, there's a pause
2) Tried switching from MP3 to M4A (on iOS), there's a pause
3) Edited the MP3 files to trim out the silence at the start and end of the files, and there's a pause

What can I do to get rid of the pause? The only alternative I can think of is to increase the duration of the songs so that they go on longer without looping, but that will drastically increase the size of the application =/

Hi there. My name is Dug. I have just met you, and I love you.
baxslash
Valued Member
Bronze Codemaster
17
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 17th Jan 2012 13:42
So far the only solution I know of is to check how long your track is and check the timer for when that amount of time has passed. I used Audacity to check the length of my track.

It's a small pain to add into your code but it works.

anwserman
12
Years of Service
User Offline
Joined: 20th May 2011
Location: Wisconsin
Posted: 17th Jan 2012 13:58
So, right before the end of the song, I would start playing it again?... I guess that could work. I increased the length of my music files (sometimes quadrupling the length of the originals) and reduced the bitrate down to 96KBPS - it works enough for me.

What I couldn't stand is having it pause every 30 seconds. Since my average level takes only about a minute or so - before new music starts - I just increased the length of each track to 2+ minutes.

Hi there. My name is Dug. I have just met you, and I love you.
bjadams
AGK Backer
16
Years of Service
User Offline
Joined: 29th Mar 2008
Location:
Posted: 17th Jan 2012 16:09
On T2 the only viable solution was to use FMOD. Works perfectly on iOS and Windows, but couldn't get it to work on Android.
xCept
21
Years of Service
User Offline
Joined: 15th Dec 2002
Location:
Posted: 11th Mar 2012 04:01
In T2 on iOS, it is possible to use the native AVAudioPlayer to seamlessly loop background music (MP3). This is probably not the cleanest solution, but it did solve the loop delay and hiccups of the AppGameKit method.
bjadams
AGK Backer
16
Years of Service
User Offline
Joined: 29th Mar 2008
Location:
Posted: 11th Mar 2012 08:40
if you use T2, try FMOD.
However I could not get it to work on Android with AGK. If anyone managed to accomplish that, let me know!

And... there is no FMOD for Playbook, so it's back to un-seamless playback on that platform!
xCept
21
Years of Service
User Offline
Joined: 15th Dec 2002
Location:
Posted: 11th Mar 2012 17:43
I was going to try FMOD, but its commercial licensing fees scared me away. If I understand correctly, you are expected to pay $3,000 for the Casual License if you want to make any money from your app, and that is for a single release.
bjadams
AGK Backer
16
Years of Service
User Offline
Joined: 29th Mar 2008
Location:
Posted: 11th Mar 2012 18:23
FMOD is good if you want to make free games!

Login to post a reply

Server time is: 2024-05-07 18:47:51
Your offset time is: 2024-05-07 18:47:51