[LAU] OT(ish): Strange coding problem (audio related)

Peter Nelson peter at fuzzle.org
Sat Jan 29 12:53:32 UTC 2011


On Sat, 2011-01-29 at 13:22 +0100, Philipp Überbacher wrote:
>  Without optimisation the output is quite
> different, but beginning with -O2 the machine code appears all the same.

That's because your 2048 is static, and nothing is happening in the
loop, therefore gcc can optimise way more stuff away than in the real
code, because it "knows" that buffer size is always 2048 and that k is
not used inside the loop.

Peter.



More information about the Linux-audio-user mailing list