Re: Accessing audio samples from Audio Queue Buffers
Re: Accessing audio samples from Audio Queue Buffers
- Subject: Re: Accessing audio samples from Audio Queue Buffers
- From: Steven Winston <email@hidden>
- Date: Wed, 9 Sep 2009 15:11:06 -0700
Howdy KappA,
The best solution I've found is to use AudioQueueOfflineRender. The
only problem with it, is it's next to impossible to, for me at least,
get the timing right between the various formats that AudioQueue
supports. See you have to have one AudioQueue to do an offline
render, then change the PCM you receive in the buffer, then send that
back out all while staying ahead of the file being played. My problem
comes from the fact that some files & formats play at different speeds
through the offline render than others.
The only other solution I have come up with that solves this problem
is to port a MP3Library / OggLibrary and do things entirely in
software. It's not as fast as there's no benefit from the hardware
for speed, but at least the rate of decompressing is uniform.
Ofcourse there's probably a trick I'm missing here.
Thanks,
Steve
On Wed, Sep 9, 2009 at 1:48 PM, KappA<email@hidden> wrote:
> Hi All,
>
> I am hoping this is a somewhat simple question. I am using Audio Queue's for
> audio playback (iPhone OS3), and I would like to add some simple EQ effects
> to the audio output... I am supporting MP3 and AAC playback, so I will need
> my solution to still be able to support these formats.
>
> I'd basically like to use this EQ function:
> http://musicdsp.org/archive.php?classid=3#236
>
> Which takes an audio sample input of type "double", and returns a modified
> sample output, of type "double"
>
> I can actually see where we copy the audio bytes to the audio buffer data
> structure, in the Audio Queue Services callbacks... but I am not sure how to
> convert the raw audio bytes to audio samples, where I can manipulate them...
>
> Is this even possible? Am totally off base here?
>
> If it is not possible, any other ideas to acheive something similar with
> Audio Queues?
>
> If I cannot do it with Audio Queues, is there something else I can use for
> playback, that will support MP3's and AAC etc?
>
> I can share more info if needed.
>
> Any help appreciated.
>
> Thanks,
> 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