I am trying to create an array with a known size.
struct AudioStreamPacketDescription
{
SInt64 mStartOffset;
UInt32 mVariableFramesInPacket;
UInt32 mDataByteSize;
};
typedef struct AudioStreamPacketDescription AudioStreamPacketDescription;
here this gives me null result for the struct array;
AudioStreamPacketDescription tempDesc[packetsFilledDesc];
if I do
AudioStreamPacketDescription tempDesc[24];
it gives me correct value;
how can I initialize array size with a variable?
If this is a C code, I would dynamically allocate the array: