Core-audio - constructing an AudioBufferList struct (Q about c struct definition)

Posted by mustISignUp on Stack Overflow See other posts from Stack Overflow or by mustISignUp
Published on 2010-04-21T10:16:21Z Indexed on 2010/04/21 10:33 UTC
Read the original article Hit count: 661

Filed under:
|

The definition of AudioBufferList looks weird to me… i guess my C is not so good

struct AudioBufferList
{
    UInt32      mNumberBuffers;
    AudioBuffer mBuffers[kVariableLengthArray];
};
typedef struct AudioBufferList  AudioBufferList;

Why

AudioBuffer mBuffers[kVariableLengthArray];

and not

AudioBuffer *mBuffers;

?

kVariableLengthArray appears to be == 1. Eh?

I think i have it working but would appreciate it if anyone could set me straight.

© Stack Overflow or respective owner

Related posts about core-audio

Related posts about struct