It also fails to equalize cycles for both cases, which results in
additional noise.
It looks like someone was trying to "trim" the loop period, but kind of
missed the point.
This is a typical, not-well-engineered example of the simple code to
playback sound "recorded" to 1-bit precision through the cassette input
port.
It reproduces fuzzed or "infinitely clipped" sound, which is OK for some
purposes, but pretty raucous for most purposes. It was used because for
many years it was thought to be "the only game in town" for Apple II's
without hardware assistance.
I used it in my early "HEX DUMP READER" published on my website.
It was my dissatisfaction with simple 1-bit audio that motivated me to
write a 5-bit software DAC (playing through the standard 1-bit speaker)
running at a pulse rate of 11kHz, followed by a 5-bit player running at
22kHz (but still at an 11kHz sample rate).
The double-frequency DAC pulse rate greatly reduces the requirement to
provide a low-pass (reconstruction) filter, since the speaker itself and
many human ears provide sufficient filtering. ;-)
For the AppleCrate synthesizer, I provided an audio processing/amplifying
channel that has stereo 5-pole filters which essentially eliminate the
22kHz pulse tone, and would probably allow going to a 6-bit software DAC
running at a pulse rate of 11kHz.