Re: Using iPhone's iPodEq Audio Unit
Re: Using iPhone's iPodEq Audio Unit
- Subject: Re: Using iPhone's iPodEq Audio Unit
- From: Xu Ting <email@hidden>
- Date: Thu, 7 May 2009 09:11:54 +0900
Dear Bill, Murray,
I've been watching this mailing list for a long time, and I myself also had been trapped in audio unit for a long time. I saw you and your coworkers are hard working on answering questions in this list, including my questions, and I am appriciate it. But from iPhone OS 2.0 to iPhone OS 3.0 beta 4, I did not see any document improvement on audio unit, which could help us a lot than asking questions in this list.
And I am just curiously want to know, DO you have any plan on the document improvement?
Thanks,
Tonny
--
Life is like a box of chocolates, u never know what u'r gonna get.
On Thu, May 7, 2009 at 2:43 AM, William Stewart
<email@hidden> wrote:
an audio unit needs to be in the signal chain in order for it to have an affect. So, just creating an audio unit is not sufficient (all that does is to create the code, etc, that would do the processing, but it hasn't connected it into the processing chain).
When you use an audio queue, you don't have direct access to the processing chain that the audio goes through - you provide buffers of audio, that audio goes through conversion processes, etc, and then it is output.
We currently don't provide any API to allow you to apply EQ settings on an audio queue - it is something we could add, but we don't have it at this point.
Bill
On May 5, 2009, at 11:26 PM, kode breaker wrote:
Hi All,
I am trying to use the kAudioUnitSubType_AUiPodEQ and I can't get it to work. I don't see any documentation for its properties which can be set, so I am testing using values based on an enum, which I believe might be part of the reason why it doesn't work. I am using an audio queue to play audio, and would like to have the option to change the EQ setting for the audio playback. Here is code I am trying:
-(void) SetupEQUnit:(UInt32)nEqLevel
{
// Open the output unit
int result = 0;
AudioComponentDescription desc;
desc.componentType = kAudioUnitType_Effect; // I've also tried kAudioUnitType_Output with no success
desc.componentSubType = kAudioUnitSubType_AUiPodEQ;
desc.componentManufacturer = kAudioUnitManufacturer_Apple;
desc.componentFlags = 0;
desc.componentFlagsMask = 0;
result = AudioUnitUninitialize(m_EQUnit); // Incase we were already loaded...
printf("AudioUnitUninitialize result is %d\n", result);
AudioComponent comp = AudioComponentFindNext(NULL, &desc);
result = AudioComponentInstanceNew(comp, &m_EQUnit);
printf("AudioComponentInstanceNew result is %d\n", result);
result = AudioUnitSetProperty(m_EQUnit, nEqLevel, 0, 0, (const void *)nEqLevel, sizeof(UInt32));
printf("AudioUnitSetProperty result is %d\n", result);
result = AudioUnitInitialize(m_EQUnit);
printf("AudioUnitInitialize result is %d\n", result);
}
The GDB output is below:
AudioUnitUninitialize result is -50
AudioComponentInstanceNew result is 0
AudioUnitSetProperty result is -10851
AudioUnitInitialize result is 0
While the audio is playing, I'd like to call this function to set the EQ setting.
Any help with figuring out how to set this will be greatly appreciated.
Thanks in advance,
KappA
_______________________________________________
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