Re: custom AudioUnits and processing iTunes library on iPhone
Re: custom AudioUnits and processing iTunes library on iPhone
- Subject: Re: custom AudioUnits and processing iTunes library on iPhone
- From: Chris Adamson <email@hidden>
- Date: Tue, 03 Apr 2012 15:17:56 -0400
On iOS, you can monitor the tracks being played by the Music app, send it a new playlist, do play/pause/prev/next, etc., but you can't see the samples, just the media items.
There's no access to system level audio, other than an MPVolumeView that lets the user adjust overall system volume (and which itself is bound to the hardware volume buttons). Everything you do with the media APIs on iOS is in the context of your own application, aside from using the Audio Session API to declare your intent vis-a-vis other audio on the system.
--Chris
On Apr 3, 2012, at 3:10 PM, Kevin Dixon wrote:
> Thanks Chris, I was just in need of a "possible or not" answer.
> This is good news, of course.
>
> So is it possible to process the music the user is playing with their
> "media player of choice", or would you have to implement a whole media
> player UI etc? In Android you can instantiate an effect on the global
> output stream for example...
>
> Thanks again
> -Kevin
>
> On Tue, Apr 3, 2012 at 12:02 PM, Chris Adamson <email@hidden> wrote:
>> On Apr 3, 2012, at 2:49 PM, Kevin Dixon wrote:
>>
>>> Quick set of questions regarding feasibility of music processing on
>>> the iPhone/iPod:
>>>
>>> 1. Can an app install AudioUnits? (Are custom AudioUnits supported?)
>>
>> No. There was a custom Audio Units API in iPhone OS 3. It didn't actually work, and was removed in iOS 4.
>>
>> Any custom processing needs to be handled in render callbacks to your own code. It's not unreasonably difficult, and saves you the hassles of testing and packaging a custom unit that you don't intend to offer to third-parties anyways.
>>
>>> 2. Are "Media Player" apps allowed?
>>
>> There are already many apps that use the songs and other audio in the user's music library.
>>
>>> If not, is there a plug-in
>>> architecture for the iPhone's iTunes or whatever its called?
>>
>> The Media Player framework is how you get at items in the user's music library.
>>
>>> 3. Is there any way to process the user's playing music in real time?
>>> AudioUnits or OpenAL?
>>
>> You can get sample-level access to the user's music by using the MPMediaItemPropertyAssetURL, using it to open the song as an AVURLAsset with the AV Foundation framework, then using the AVAssetReader API to read samples. Once you have samples, you could run them through an AUGraph and perform whatever processing you like. There are certain threading and buffering considerations that make this harder than you might be ready for, to say nothing of having to juggle three media APIs, but that should be the basic idea.
>>
>> --Chris
>>
_______________________________________________
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