Re: panning with Audio Queue
Re: panning with Audio Queue
- Subject: Re: panning with Audio Queue
- From: Matthew Pease <email@hidden>
- Date: Mon, 26 Oct 2009 12:13:27 -0700
I suppose if I use ExtendedAudioFile to decode to PCM, then I could
just copy bytes from one channel to the other to have the effect of
panning.
But I thought that if I used ExtendedAudioFile that would greatly
increase the battery drain of my app because MP3 isn't being decoded
by specialized hardware.
Best -
Matt
On Mon, Oct 26, 2009 at 11:15 AM, William Stewart <email@hidden> wrote:
>
> On Oct 24, 2009, at 2:25 PM, Matthew Pease wrote:
>
>> Hello -
>>
>> I am using Audio Queue with File Streams to do streaming MP3s on
>> the iPhone. (using
>>
>> What I'd like to add now is hard panning. The audio is one voice
>> in left channel, another in the right channel. What you get is
>> people talking over each other -- not good.
>>
>>
>> I tried just copying bytes in the stream from left-> right channel
>> (assuming interleaved bytes). But then I realized the data must be
>> encoded MP3s.
>>
>>
>> So then I looked at Audio Units -- the panning unit or the 3d mixer
>> looks promising. However, it is unclear to me: Is their an Audio
>> Unit chain that already exists where I could just modify the 3dMixer's
>> values? Or must I wire up my own Audio Unit graph and handle
>> writing bytes from the stream to it (replacing my AudioQueue code)?
>>
>>
>> Any tips on how to add panning to an http MP3 stream would be very
>> high appreciated!
>
> AQ doesn't support panning of its audio. OpenAL is probably your best
> approach I think - you can use ExtendedAudioFile to read the data and decode
> to a linear PCM buffer, then you attach that to an OpenAL source and pan
> that however you want.
>
> You could also set up your own audio unit mixer, etc, but then you have more
> work to do as you need to manage a read thread, etc.
>
> Bill
>
>>
>> Thank you!
>> Matt
>> _______________________________________________
>> 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