Re:Four common mistakes in audio development (2016)
by proverbialbunny on Sunday September 22, 2019 @11:18PM
(#21045674)
By any chance do you have any references or information on how to do this (adding a spin delay)? It sounds interesting. -thanks :)
Re:Four common mistakes in audio development (2016)
by Gibbon1 on Sunday September 22, 2019 @11:37PM
(#21045742)
In C it's very simple
volatile int cnt = 0x1000;
while(cnt--)
;
Re:Four common mistakes in audio development (2016)
by hoseja on Monday September 23, 2019 @04:06AM
(#21046861)
I've grown so paranoid of optimizing compilers this wouldn't even cross my mind. But it is correct, right?
Re:Four common mistakes in audio development (2016)
by AlbertoGP on Monday September 23, 2019 @04:55AM
(#21047109)
Not OP, but the “volatile” qualifier should prevent the compiler from optimizing it out.
Re:Four common mistakes in audio development (2016)
by Gibbon1 on Monday September 23, 2019 @05:31PM
(#21053945)
Yeah should.
Multicore super scalar processors make me nervous about my assumptions. I wouldn't put it past one of them to realize that the result is unused and nop it.
It's always good to check.
Tip: If you suspect crap like this, adding spin delays will make it happen often enough to debug.