You will have to represent your progress bar with the duration I think. You
can look at the current format settings (e.g. Sample Rate, etc) to
determine how much data you've pulled out with copyNextBuffer as you go as
a percentage of duration

Kevin

On Tue, Jun 14, 2016 at 12:33 PM, Andy Davidson <
[email protected]> wrote:

> I need to read an asset from a users iPod library and convert it to LPCM.
> I want put up an import progress bar. Any idea how I can find the number of
> bytes I need to read? PMediaItemPropertyPlaybackDuration returns the play
> back duration in sec.
>
>
>
>     AVAssetReader *assetReader = [[AVAssetReader assetReaderWithAsset
> :songAsset
>
>                                                                 error
> :&assetError]
>
>                                   retain];
>
>    AVAssetReaderOutput *assetReaderOutput = [[AVAssetReaderAudioMixOutput
>
>
> assetReaderAudioMixOutputWithAudioTracks:songAsset.tracks
>
>                                                audioSettings: nil]
>
>                                               retain];
>
>     if (! [assetReader canAddOutput: assetReaderOutput]) {
>
>         return;
>
>     }
>
>     [assetReader addOutput: assetReaderOutput];
>
>
>     fileSize = [assetReader ????]
> Thanks in advance
>
> Andy
>
>  _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> Coreaudio-api mailing list      ([email protected])
> Help/Unsubscribe/Update your Subscription:
>
> https://lists.apple.com/mailman/options/coreaudio-api/kevin.c.dixon%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:
https://lists.apple.com/mailman/options/coreaudio-api/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to