Re: FFT-AU: strange behaviour
Re: FFT-AU: strange behaviour
- Subject: Re: FFT-AU: strange behaviour
- From: William Stewart <email@hidden>
- Date: Mon, 16 Apr 2007 18:53:09 -0700
Beni,
It looks like you will probably have to do some more learning about
using the FFT - in the crash in auval below it is deliberately asking
you to do an odd number of samples in your render call (in the
Process call, you should see this 137 number come in as the number of
frames you have to render). This is not a number that is evenly
divisable by a power of 2 (let alone by 4) - so you probably have to
deal with this in a particular manner with the FFT algorithm; perhaps
do some buffering so that if you don't get enough samples in one
call, then you just put those ones in a buffer, return silence (zero)
then wait until you get enough. This also shows up to the outside
world as latency (and we have an AU Property so that you can report
that).
HTH
Bill
On 14/04/2007, at 7:36 AM, Benjamin Federer wrote:
I forgot to include this information from auval:
[...]
RENDER TESTS:
Input Format: AudioStreamBasicDescription: 2 ch, 44100 Hz,
'lpcm' (0x0000002B) 32-bit big-endian float, deinterleaved
Output Format: AudioStreamBasicDescription: 2 ch, 44100 Hz,
'lpcm' (0x0000002B) 32-bit big-endian float, deinterleaved
Render Test at 512 frames
Slicing Render Test at 64 frames
PASS
Render Test at 64 frames, sample rate: 22050 Hz
Render Test at 137 frames, sample rate: 96000 Hz
Bus error
thanks again
.beni
Benjamin Federer schrieb:
Hi all,
I am new to this list and got some questions (naturally). I
already searched this list's archive
over and over again, but was not finding something useful.
I am trying to do a fft (using the apple real fft provided with
the vDSP library)
inside a audio unit. Using the stripped-down fft code from the
Apple tutorial works
fine on itself, as well as the audio unit does - without the
processing. As soon as
I implement the vDSP routines into process(), the AU behaves
strange (I am using
AU Lab for testing, my AU instantiated on the stereo master channel):
- Sometimes it crashes on startup, more often it starts up
flawlessly.
- On removing and/or re-instantiating it crashes often but not
always.
- As soon as an input device (sfplayer or internal mic) is opened,
the AU
either crashes, cuts the audio or passes only one of the stereo
channels.
- Once crashed the report tells me this:
Exception: EXC_BAD_ACCESS (0x0001)
Codes: KERN_INVALID_ADDRESS (0x0001) at 0x3f63f7b7
I am sorry if I am missing something obvious, but as I said, I am
new to this subject.
If you know of any sample code about AUs with FFT, please let me
know - I guess I am
not the first one trying this.
Also I'd like to request the host's signal vector size or frame
packet size (or whatever
it is called within this context). Do you know of any method I
could use?
Thanks in advance for any replies
.beni
_______________________________________________
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
--
mailto:email@hidden
tel: +1 408 974 4056
________________________________________________________________________
__
"Much human ingenuity has gone into finding the ultimate Before.
The current state of knowledge can be summarized thus:
In the beginning, there was nothing, which exploded" - Terry Pratchett
________________________________________________________________________
__
_______________________________________________
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