On Feb 27, 2018, at 12:24 AM, Daniel Vollmer <[email protected]> wrote:
> On 27. Feb 2018, at 09:19, Brian Willoughby <[email protected]> wrote:
>> On Feb 27, 2018, at 12:00 AM, Daniel Vollmer <[email protected]> wrote:
>>> Hi,
>>> 
>>> On 27. Feb 2018, at 03:11, Brian Willoughby <[email protected]> wrote:
>>>> I do know that std::array will cause glitches. One of the students taking 
>>>> my CoreAudio & AudioUnit course suffered from audio glitches until 
>>>> replacing std::array with a pre-allocated Standard C array.
>>> 
>>> I don’t see how this can be, std::array stores its data inside the object 
>>> and performs no heap allocations of its own. The only problem areas I can 
>>> think are either that the contained type did something funny, or that 
>>> arrays were accidentally copied too much instead of being passed by 
>>> reference.
>> 
>> I don’t quite follow what you’re saying here. If you add an item to an array 
>> that is not large enough to hold that item, then some allocation is 
>> necessary by definition. There are only limited situations in which this 
>> fact can be avoided.
> 
> You can’t add (or remove) items to a std::array, its size is a template 
> parameter and fixed at compile-time.

Oops, I’m thinking of std::vector

Back to your regularly-scheduled programming.

Brian

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Coreaudio-api mailing list      ([email protected])
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/coreaudio-api/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to