Re: Audio data in float format for iOS?
Re: Audio data in float format for iOS?
- Subject: Re: Audio data in float format for iOS?
- From: tahome izwah <email@hidden>
- Date: Tue, 18 Jan 2011 10:06:52 +0100
In our particular case we use the EAFReader class from the Dirac
project to convert chunks of audio coming from a file to float32,
process the data entirely in float32 domain using our own DSP and
convert it back to SInt16 for playback at the very end of our
processing chain.
Not sure if this answers your questions, but as I read it this sounded
like it's what you wanted to do in your application so I recommended
it.
--th
2011/1/18 Steve gfx <email@hidden>:
> Well that sounds like the OP's original question then (See below) : How do
> you do remain in float32 land given the constraints of iOS & Core Audio?
> (Or were you originally implying that some Dirac code handles this for you?
> Or, do you only have ONE stage of processing anyway?)
> "1)Load some audio data as 32-bit floats (2-ch stereo) in to buffers.
> 2) Keep it in this format so that in the mixer and master callbacks no
> conversion is necessary to perform per-channel, or global DSP.
> 3) Finally convert it to whatever necessary for output."
>
> On 18 Jan 2011, at 06:07, tahome izwah wrote:
>
> No. We convert on input (and output) and stay entirely in float32 land
> for all computations.
>
> --th
>
> 2011/1/17 Gregory Wieber <email@hidden>:
>
> Does your code go back and forth between integers and floats? (Typecasting /
>
> converting?).
>
> Curious, because if your observations are accurate, than it implies the
>
> documentation is incorrect on this matter...
>
>
>
> On Mon, Jan 17, 2011 at 12:58 PM, tahome izwah <email@hidden>
>
> wrote:
>
> I don't think that this is true, especially for large chunks of fp
>
> code. Our stuff definitely runs faster with thumb off, for both ARM 6
>
> and 7 targets.
>
> --th
>
> 2011/1/17 Gregory Wieber <email@hidden>:
>
> Again, this is NOT true for arm7 (in which case it is recommended to
>
> leave
>
> thumb ON)
>
> On Mon, Jan 17, 2011 at 12:41 PM, tahome izwah <email@hidden>
>
> wrote:
>
> Float is usually slow when you're compiling for the thumb instruction
>
> set. To see a real speed gain make sure you turn thumb off in Xcode
>
> settings when you're doing a lot of fp calculations.
>
> --th
>
> 2011/1/17 Gregory Wieber <email@hidden>:
>
> Morgan,
>
> Depending on the processor you are using, you may be taking a HUGE
>
> hit
>
> for
>
> those conversions between integers and floats. I noticed a giant
>
> speed-up
>
> in my app when I removed any floating point operations and converted
>
> everything to integer calculations (which means you'll most likely
>
> have
>
> to
>
> read up on bit shifting, etc).
>
> Again, as I just mentioned though, this was for an app compiled
>
> without
>
> Thumb enabled. On newer processors, thumb 2 supports floating point
>
> calculations, so I would also be curious to hear other's
>
> recommendations.
>
> Specifically, to your question: from my limited knowledge on the
>
> subject,
>
> whether you use integers or floats really depends on the processor.
>
> I
>
> would
>
> look at whether your app needs to work on older devices where thumb
>
> is
>
> not
>
> recommended, and if so, avoid floats. Otherwise, let's see what some
>
> of
>
> the
>
> more experienced folks here recommend for the newer processors that
>
> support
>
> floats with thumb 2.
>
>
>
>
> _______________________________________________
> 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