Hank,
        I have tried with by setting "kAudioUnitProperty_MaximumFramesPerSlice" 
property as 4096 for Mixer and EQ Audio Units. Now audio playback did not stop 
when the device goes to sleep mode.

But  i hear glitches along with Audio.  

I have looked at apple sample code MixerHost. it plays nicely even the device 
is in sleep mode. But Apple sample code simply mixes 2 PCM audio files and play 
it. 

Where as my application converts the stream mp3 in to PCM using 
AudioConverterFillComplexBuffer API in realtime and plays it using AudioUnit. 

Does the Audio Conversion introduce any delay in audio packet generation, which 
could leads to the glitches in audio playback (when the device in the sleep 
mode)?

Should i set different sample value(4096) for different hardware (iPod Touch 
2nd/3rd/4th Gen...etc)

How to derive the number of samples for different Sampling Rate? (As per the 
Apple document 4096 samples @ 44.1kHz)

Thanks
Sasikumar JP

On 26-Apr-2011, at 8:44 PM, Hank Heijink (Mailinglists) wrote:

> You're thinking of kAudioUnitProperty_MaximumFramesPerSlice 
> (http://developer.apple.com/library/ios/#qa/qa1606/_index.html). You have to 
> set that to 4096 frames per slice for every audio unit that's not the 
> remoteIO unit.
> 
> Hank
> 
> On Apr 26, 2011, at 11:05 AM, Gregory Wieber wrote:
> 
>> In the iOS docs on audio sessions there's a section on apps becoming 
>> background tasks. I don't have them in front of me now, but you have to set 
>> a property for buffer size when the app goes into the background for it to 
>> work.
>> 
>> Sent from my iPhone
>> 
>> On Apr 25, 2011, at 9:38 PM, Sasikumar JP <[email protected]> wrote:
>> 
>>> Hi,
>>> I am working on streaming audio player application for iOS. currently i am 
>>> experimenting with AudioQueue and AudioUnit for playback.
>>> 
>>> Both works fine in the normal condition. But AudioUnit playback stopped 
>>> playing when device (ipod touch 2nd gen) goes to sleep mode, where as it 
>>> works fine with AudioQueue.
>>> 
>>> I have set "kAudioSessionCategory_MediaPlayback" session category for both 
>>> cases. I assume this session category should continue the playback even in 
>>> sleep mode.
>>> 
>>> I am not sure what i am missing here. 
>>> 
>>> I want to add pan/effects features to my application, so i am trying with 
>>> AudioUnit.
>>> 
>>> Any help is highly appreciated 
>>> 
>>> Thanks
>>> Sasikumar JP _______________________________________________
>>> Do not post admin requests to the list. They will be ignored.
>>> Coreaudio-api mailing list      ([email protected])
>>> Help/Unsubscribe/Update your Subscription:
>>> http://lists.apple.com/mailman/options/coreaudio-api/gregorywieber%40gmail.com
>>> 
>>> This email sent to [email protected]
>> _______________________________________________
>> Do not post admin requests to the list. They will be ignored.
>> Coreaudio-api mailing list      ([email protected])
>> Help/Unsubscribe/Update your Subscription:
>> http://lists.apple.com/mailman/options/coreaudio-api/hank.list%40runbox.com
>> 
>> This email sent to [email protected]
>> 
> 

_______________________________________________

Cocoa-dev mailing list ([email protected])

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to