SoundManager
SoundManager copied to clipboard
There's a gap when playing a music with the loop option activated
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
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.
I've already done that, I tried many format and nothing changes. Are you able to play music in loop without gaps?
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
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/nicklockwood/SoundManager/issues/2#issuecomment-14438889 .
Martin Moizard Mail: [email protected]
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/nicklockwood/SoundManager/issues/2#issuecomment-14438889 .
Martin Moizard Mail: [email protected] — Reply to this email directly or view it on GitHub.