Re: iOS 4.1: using AVAssetReader to stream from an audio file interrupts audio callback
Re: iOS 4.1: using AVAssetReader to stream from an audio file interrupts audio callback
- Subject: Re: iOS 4.1: using AVAssetReader to stream from an audio file interrupts audio callback
- From: Nikolai Collinsky <email@hidden>
- Date: Fri, 29 Oct 2010 10:38:32 +0100
Hi all,
Anyone have any ideas here?
Has anyone successfully done live streaming from a track in the iPod Library on an iOS 4.1 device using AVAssetReader without preloading a whole file?
best,
Nick
On 24 Oct 2010, at 14:07, Nikolai Collinsky wrote:
> Thanks Tahome. Unfortunately, that doesn't help; if I change to
>
> NSDictionary *audioSetting = [NSDictionary dictionaryWithObjectsAndKeys:
> [NSNumber numberWithFloat:44100.0],AVSampleRateKey,
> [NSNumber numberWithInt:2],AVNumberOfChannelsKey, //how many channels has original?
> [NSNumber numberWithInt:16],AVLinearPCMBitDepthKey, //was 16
> [NSNumber numberWithInt:kAudioFormatLinearPCM], AVFormatIDKey,
> [NSNumber numberWithBool:NO], AVLinearPCMIsFloatKey, //was NO
> [NSNumber numberWithBool:0], AVLinearPCMIsBigEndianKey,
> [NSNumber numberWithBool:NO], AVLinearPCMIsNonInterleaved,
> [NSData data], AVChannelLayoutKey, nil];
>
> I still get a freeze for AVAssetReaderTrackOutput, and interruption callback for AVAssetReaderAudioMixOutput.
>
> I'm obviously doing my own floating point processing, and happy to convert back to short int for final output. Also from the documentation:
>
> AVLinearPCMIsFloatKey
> A Boolean value that indicates that the audio format is floating point (YES) or fixed point (NO).
> Available in iOS 3.0 and later.
>
> I figured the convertor could convert to float for me, and have seen some sensible values in -1.0 to 1.0 range in the debugger; I just can't play them via RemoteIO with processing because of the audio callback interruption issue.
>
> any other ideas?
>
> best
> N
>
>
> On 24 Oct 2010, at 11:55, tahome izwah wrote:
>
>> Last time I checked float audio format wasn't supported on the device.
>> You will have to use short int and convert to float in your own code
>> if you must use float.
>>
>> --th
>>
>> 2010/10/24 Nikolai Collinsky <email@hidden>:
>>> I've scratched my head over this for many days, and would now like to request help. I wanted to get floating point samples from any track in the iPod Library, which should be straight forward with new AVAssetReader facilities in iOS 4.1 (I'm working with Xcode 3.2.4, 4.1 SDK, with an iPod Touch at 4.1).
>> _______________________________________________
>> 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
>
> _______________________________________________
> 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
_______________________________________________
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