[Interest] is it ok to push audio on a background thread, not a timer?
David M. Cotter
dave at kjams.com
Tue May 19 06:12:55 CEST 2020
>>> Note that you do initialise the i_auP pointer in your constructor's initialisation list
>> which is not a QObject, it's my own wrapper class
> Irrelevant what it derives from
then i'm not understanding what your objection is.
i thought your objection was that objects derived from QObject, if they are used on a back thread then they must be either allocated there or "moved" there.
but since this i_auP is NOT a QObject, it's my own class, that i'm fine to allocate it in one thread (main) and then use it on another thread (audio pump thread) (provided and assuming i am careful to mutex any access from the main thread)
> Are you saying that this calls a function that returned null?
sorry, what is "this" and what function are you referring to that returns null?
if you mean GetCUnit_Out() it returns an object of my own (not a QObject) that has already been allocated and is guaranteed to not be NULL
> I repeat my request for a compileable example.
i hear you loud and clear but let's assume that's not happening for now and see how far we get
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20200518/710445b1/attachment.html>
More information about the Interest
mailing list