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 / Playing Seamless Loopable MP3

Author
Message
bjadams
AGK Backer
16
Years of Service
User Offline
Joined: 29th Mar 2008
Location:
Posted: 26th Sep 2011 16:42
Did anyone manage to play loopable mp3 music, seamlessly without a pop or click at the cut?
DVader
20
Years of Service
User Offline
Joined: 28th Jan 2004
Location:
Posted: 27th Sep 2011 04:52
I don't remember having the issue with my WIP shooter and that had several looping mp3's.

bjadams
AGK Backer
16
Years of Service
User Offline
Joined: 29th Mar 2008
Location:
Posted: 27th Sep 2011 08:43
Can't get any mp3 to play seamlessly without harsh gaps.

I tried 7 different mp3 converters.

OGG loops fine with FMOD, but unfortunately AppGameKit does not support OGG playback on Windows and IOS.
Hubdule
21
Years of Service
User Offline
Joined: 3rd Sep 2002
Location: Gundelsheim
Posted: 27th Sep 2011 09:13
As far as I know it's possible too playback OGG as long as there's a codec installed for it.

bjadams
AGK Backer
16
Years of Service
User Offline
Joined: 29th Mar 2008
Location:
Posted: 27th Sep 2011 12:01
Can't depend on codecs. FMOD plays OGG without codecs.
Redostrike
21
Years of Service
User Offline
Joined: 9th Feb 2003
Location: Belgium
Posted: 28th Sep 2011 13:33
Are you sure those mp3 files do not have a few extra soundless seconds at the beginning or end of the file?

You could test it out by adding the file to an mp3 player and set loop on if you hear it loop there perfectly then it should also work in AGK.

Only heroes live forever
bjadams
AGK Backer
16
Years of Service
User Offline
Joined: 29th Mar 2008
Location:
Posted: 28th Sep 2011 18:44
there are no gaps at the start or end. the original wav loops perfectly.

i did some further testing:

fmod loops both mp3 and ogg perfectly on ios. fmod loops ogg perfectly on windows, but mp3 has a gap as the cut.

agk loops mp3 with a gap at the cut on both windows and ios. i couldn't manage to play an ogg on agk as the user does not have control over this.

winamp loops all perfectly, but it is using internal buffering.

winamp, fmod and agk are all using different replay code, so no, it won't sound the same on agk if it plays ok on winamp.
Rich Dersheimer
AGK Developer
14
Years of Service
User Offline
Joined: 1st Jul 2009
Location: Inside the box
Posted: 28th Sep 2011 18:59
DBPro had this same problem, I forget if they ever fixed it. You could search for it in the DBPro boards.

bjadams
AGK Backer
16
Years of Service
User Offline
Joined: 29th Mar 2008
Location:
Posted: 28th Sep 2011 23:36
it's not really a bug, its just that some players cannot replay seamless mp3s.

maybe agk could allow the user to specify an ogg, as right now the user has no control.
Bursar
15
Years of Service
User Offline
Joined: 17th Sep 2008
Location:
Posted: 29th Sep 2011 00:53
Quote: "maybe agk could allow the user to specify an ogg, as right now the user has no control. "

The problem is that you can't play ogg files under Windows unless the user has the codec already installed. Are you going to put a notice on the front screen of your game saying 'If you can't hear the music, go to this website and download the codec. Once you've done that and installed it, run the game again, and hopefully this time you'll hear the music'?
Rich Dersheimer
AGK Developer
14
Years of Service
User Offline
Joined: 1st Jul 2009
Location: Inside the box
Posted: 29th Sep 2011 05:06
Quote: "Are you going to put a notice on the front screen of your game saying 'If you can't hear the music, go to this website and download the codec. Once you've done that and installed it, run the game again, and hopefully this time you'll hear the music'? "


Yes, shades of "you must have DirectX 9.0c installed"

Although, if you're going to sell a game, you'll probably want to use an installer, and that installer could install the ogg codec, I imagine.

bjadams
AGK Backer
16
Years of Service
User Offline
Joined: 29th Mar 2008
Location:
Posted: 29th Sep 2011 11:15
FMOD plays OGG fine on Windows without any need of any codec.
LeeBamber
TGC Lead Developer
24
Years of Service
User Offline
Joined: 21st Jan 2000
Location: England
Posted: 9th Oct 2011 03:43
DBP and AppGameKit both use on-system codec's, and replays the media through a media graph to replay the audio. This lends itself to any delays that the particular decoder has when restarting a track. If you use WAV, this allows seamless looping in AGK. Other formats will inherit the delays caused by the particular decoder on your system. If you are a tier 2 user, and wish to take over the cross-platform responsibility for your audio, you can embed FMOD calls in your apps to help your audio file sizes. We recommend you use small WAV loops for repeating tracks, and secondary OGG/M4A tracks for single play music themes. You will find the secondary track pause is hidden by the primary looping WAV track. Is there a demand for OGG format on Windows? We have M4A which does a similar job in terms of quality and compression.

I drink tea, and in my spare time I write software.
bjadams
AGK Backer
16
Years of Service
User Offline
Joined: 29th Mar 2008
Location:
Posted: 9th Oct 2011 13:47
I am currently using FMOD with Tier2 and successfully playing looping OGGs without gaps in both windows and ios.

I would just like to know if I can do the same with standard AppGameKit audio commands.
Will M4A music play on both Windows and iOS?
XanthorXIII
AGK Gold Backer
12
Years of Service
User Offline
Joined: 13th May 2011
Location:
Posted: 10th Oct 2011 17:16
Lee,
Are you saying that M4A will play without any hiccups?
Rich Dersheimer
AGK Developer
14
Years of Service
User Offline
Joined: 1st Jul 2009
Location: Inside the box
Posted: 10th Oct 2011 17:18
It won't play at all without a codec, and most folks won't have the codec.

bjadams
AGK Backer
16
Years of Service
User Offline
Joined: 29th Mar 2008
Location:
Posted: 10th Oct 2011 17:35
if its codec based then it's not good, as it won't play on ios
Rich Dersheimer
AGK Developer
14
Years of Service
User Offline
Joined: 1st Jul 2009
Location: Inside the box
Posted: 10th Oct 2011 20:33 Edited at: 10th Oct 2011 20:35
bjadams - read the fine print. M4A is fine for iOS. It just needs a codec in windows. Your every-day windows user already can play back wav and mp3 files. But wavs are not considered "music" by AppGameKit, and are larger in file size. MP3's have the looping problem, and there are licensing issues with MP3's as well. TGC has already recommended against using mp3's for that reason.

And Lee, ogg would be good for windows, but NOT if the user has to download and install a codec. I would really hate to go down the same road as DBPro, where a program won't run "out of the box" and the user is frustrated by having to "do something" before the game will run. I guess DirectX is the culprit with that one, they didn't support the DirectX 9 feature set in later versions?

If ogg or M4A codecs can be installed by whatever installer the developer is using, great.

But, if my mp3's loop just fine in Media Player, and they loop great in WinAmp, and they have no pause or click in Irfanview, why can't AppGameKit do the same? It just seems strange, is all.

bjadams
AGK Backer
16
Years of Service
User Offline
Joined: 29th Mar 2008
Location:
Posted: 11th Oct 2011 12:47
Rich I asked myself the same question, why do Windows Media Player and Winamp loop mp3 fine, but AppGameKit has the dreaded gap? And the answer seems to be that Winamp is buffering parts of the mp3 for seamless playback and agk apparently not.

Fmod and OGG solved all the seamless playback problems and mp3 licensing. Maybe one day AppGameKit will play back ogg on windows and ios without the need of a codec.
Impetus73
12
Years of Service
User Offline
Joined: 28th Aug 2011
Location: Volda, Norway
Posted: 11th Oct 2011 14:07
AGK use whatever native mp3 playback system the device has. Some have seamless mp3 looping, others don't. Nothing AppGameKit can do anything with.

----------------
AGK user - novice
Did Amiga / AMOS programming in the 90's, just started programming again with AGK.
bjadams
AGK Backer
16
Years of Service
User Offline
Joined: 29th Mar 2008
Location:
Posted: 11th Oct 2011 16:18
I'm glad I'm using Tier2 then!!!
LeeBamber
TGC Lead Developer
24
Years of Service
User Offline
Joined: 21st Jan 2000
Location: England
Posted: 15th Oct 2011 06:15
Maybe post a feature request in the issues board for seamless OGG in Windows: http://code.google.com/p/agk/issues/list

I drink tea, and in my spare time I write software.
nz0
AGK Developer
16
Years of Service
User Offline
Joined: 13th Jun 2007
Location: Cheshire,UK
Posted: 25th Nov 2011 01:47 Edited at: 25th Nov 2011 01:47
So right now if we want proper looping music, we have to use wav?
MP3 playback requires a buffer to be seamless, as would any compressed format.
Anyway, what's the allowance for MP3 playback license wise? If we have the ability to play MP3, then it's implied that we can use it?

What can we use? (and yes, mp3 is useless for looped music)

Mobiius
Valued Member
21
Years of Service
User Offline
Joined: 27th Feb 2003
Location: The Cold North
Posted: 25th Nov 2011 16:08
mp3 licences are covered by the device, as they can play mp3's natively.

We don't need to worry about it I believe.

My signature is NOT a moderator plaything! Stop changing it!
Rich Dersheimer
AGK Developer
14
Years of Service
User Offline
Joined: 1st Jul 2009
Location: Inside the box
Posted: 25th Nov 2011 17:50
Mobiius, I recall a previous post somewhere, if you sell more than 5,000 units, then the mp3 boys are going to want some cash.
nz0
AGK Developer
16
Years of Service
User Offline
Joined: 13th Jun 2007
Location: Cheshire,UK
Posted: 25th Nov 2011 19:44
Luckily for me, in my first game I have only short music (1x25 secs, 2x 12 secs and the rest are jingles).

Looks like I will have to use wav for the music anyway, as the looping gap is totally unacceptable for me.

Login to post a reply

Server time is: 2024-05-05 22:14:38
Your offset time is: 2024-05-05 22:14:38