Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

There's a gap when playing a music with the loop option activated #2

Open
MartinMoizard opened this issue Mar 5, 2013 · 5 comments

Comments

@MartinMoizard
Copy link

Hi,

I want to play a theme music on my iOS game using the following : [[SoundManager sharedManager] playMusic:kThemeSound looping:YES];

It is working well except that there is a gap (a small silence) when the sound is looping. I tried the sound in iTunes, there is no gap when looping.

Is there a way to fix this ?

Thanks,
Martin

@nicklockwood
Copy link
Owner

This may be due to the music format. I think mp3 has this problem. Try changing the format using the command line converter mentioned in the README. Unless you've already done that.

@MartinMoizard
Copy link
Author

I've already done that, I tried many format and nothing changes. Are you able to play music in loop without gaps?

@nicklockwood
Copy link
Owner

Hmm. I don't have a suitable sample to test with, but according to this StackOverflow, it's not possible to do gapless playback using AVAudioPlayer (which is the underlying mechanism used by SoundManager).

http://stackoverflow.com/questions/9188407/avaudioplayer-audioplayerdidfinishplayingsuccessfully-not-called

@MartinMoizard
Copy link
Author

I don't see anything related to gapless playback on this thread...

On Tue, Mar 5, 2013 at 2:06 PM, Nick Lockwood [email protected]:

Hmm. I don't have a suitable sample to test with, but according to this
StackOverflow, it's not possible to do gapless playback using AVAudioPlayer
(which is the underlying mechanism used by SoundManager).

http://stackoverflow.com/questions/9188407/avaudioplayer-audioplayerdidfinishplayingsuccessfully-not-called


Reply to this email directly or view it on GitHubhttps://github.com//issues/2#issuecomment-14438889
.

Martin Moizard
Mail: [email protected]

@nicklockwood
Copy link
Owner

Sorry, that's not the link I thought it was. Here's an article explaining the problem. It also contains a link to a library that supports gapless playback (I've not used it, but it sounds like it will solve your problem):

http://gamua.com/blog/2012/05/gapless-mp3-audio-on-ios/

Kind Regards,

Nick

On 5 Mar 2013, at 02:43 PM, Martin Moizard [email protected] wrote:

I don't see anything related to gapless playback on this thread...

On Tue, Mar 5, 2013 at 2:06 PM, Nick Lockwood [email protected]:

Hmm. I don't have a suitable sample to test with, but according to this
StackOverflow, it's not possible to do gapless playback using AVAudioPlayer
(which is the underlying mechanism used by SoundManager).

http://stackoverflow.com/questions/9188407/avaudioplayer-audioplayerdidfinishplayingsuccessfully-not-called


Reply to this email directly or view it on GitHubhttps://github.com//issues/2#issuecomment-14438889
.

Martin Moizard
Mail: [email protected]

Reply to this email directly or view it on GitHub.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants