Re: Loop Audio on iPhone
Re: Loop Audio on iPhone
- Subject: Re: Loop Audio on iPhone
- From: Marco Papa <email@hidden>
- Date: Wed, 11 Feb 2009 12:21:06 -0800
Date: Tue, 10 Feb 2009 16:57:23 -0800
From: james mccartney <email@hidden>
Subject: Re: Loop Audio on iPhone
To: Marco Papa <email@hidden>
Cc: email@hidden
Message-ID: <email@hidden">email@hidden>
Content-Type: text/plain; charset="us-ascii"
On Feb 9, 2009, at 8:22 PM, Marco Papa wrote:
> I have a number of short mp3 clips that have been built so they can
> can seamlessly loop. How can I loop them on the iPhone so that there
> is no apparent disconnect when the audio restarts at the beginning
> of the clip?
AVAudioPlayer will loop sounds without a gap assuming the original
sound has no audible gap.
Looping MP3 seamlessly would require that your loop be an exact
multiple of the packet size and that you originally encoded enough
context before the beginning and after the end of the loop so that the
encoding would actually be seamless.
James,
I have indeed seen several mentions in the iPhone Dev. Forum of the fact that the audio file must be "an exact multiple of the packet size", otherwise the player will fill the missing portion of the last packet with "silence" when looping, but this is the first time I see mention of "enough context before the beginning and after the end of the loop." What is that?
Thanks for any insight.
--
Marco Papa, Ph.D.
Computer Science Department
University of Southern California
Henry Salvatori Computer Center
Los Angeles, California 90089-0781
Voice: +1-213-974-2137
Cell: +1-310-944-5468
E-mail:
email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Coreaudio-api mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden