Re: Using AVPlayer to play MPMediaItem and add iPod EQ to the output
Re: Using AVPlayer to play MPMediaItem and add iPod EQ to the output
- Subject: Re: Using AVPlayer to play MPMediaItem and add iPod EQ to the output
- From: Fedry Kemilau <email@hidden>
- Date: Sat, 21 Jul 2012 11:03:44 +0700
First of all, thank you for all responses.
This is what I got from some reading on Audio Unit and AVAssetReader.
Using AVAssetReader, I need to use the [AVAssetReader copyNextSampleBuffer].
This function reads the data from MPMediaItem asynchronously because we have to keep looping until the end of the audio file.
Which I think it is not suitable for my app, where users can fast forward / rewind, continue from a certain playback time or skip to next song immediately.
Using Audio Unit, the function ExtAudioFileRead reads the raw bytes synchronously. I think this function is more suitable, however it is not possible to read MPMediaItem raw bytes.
Any advice? Or did I still miss something in Audio Unit?
Regards,
Fedry
On Jul 21, 2012, at 3:09 AM, Bill Phillips wrote:
If I'm reading the source correctly here, DiracAudioPlayer will not
work for MPMediaItem playback. NSURLs provided by MPMediaItem may only
be opened by classes in AVFoundation, e.g. AVURLAsset.
You can pull raw bytes from an AVAsset with AVAssetReader and friends,
and you can then feed those bytes into an AUGraph of your own
construction as Tahome has advised above.
On Fri, Jul 20, 2012 at 11:52 AM, tahome izwah <email@hidden> wrote:
> ...or, you could use a 3rd party substitute for AVAudioPlayer for
> this. DSP Dimension has an example project called "DiracAudioPlayer"
> that does the same thing AVAudioPlayer does except that you can change
> the speed of the playback in real time (time stretching). It's quite
> handy for all sorts of things and they included the entire source code
> for the class: http://dirac.dspdimension.com (you'll want to download
> the DiracLE package).
>
> You could then replace their time stretching aspect with an EQ easily
> and be done in a couple of minutes.
>
> HTH
> --th
>
> 2012/7/20 tahome izwah <email@hidden>:
>> Yes you will have to set up your own graph for this.
>>
>> --th
> _______________________________________________
> 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