Problem with looping my VoidLoop

You will have to explain what ir.available() and ir.read() do.

It seems as if ir.read() returns a LONG value all in one go. If so, why have you WHILE ir.available() when it would seem that IF ir.available() would make more sense. Perhaps your code is stuck in an interminable WHILE loop.

It was the WHILE that made me think it was reading 1 byte at a time.

Also, I don't understand why the calls to buzzer() and alarm() are within the WHILE (or IF, if you change it).

...R