Re: Any system calls OK to use in audio thread?
Re: Any system calls OK to use in audio thread?
- Subject: Re: Any system calls OK to use in audio thread?
- From: Daniel Vollmer <email@hidden>
- Date: Tue, 27 Feb 2018 09:24:02 +0100
> On 27. Feb 2018, at 09:19, Brian Willoughby <email@hidden> wrote:
>
>
> On Feb 27, 2018, at 12:00 AM, Daniel Vollmer <email@hidden> wrote:
>> Hi,
>>
>> On 27. Feb 2018, at 03:11, Brian Willoughby <email@hidden> 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.
Daniel.
_______________________________________________
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