source/alo.c
static void
click(Alo* self, uint32_t begin, uint32_t end)
{
	float* const output_l = self->ports.output_l;
	float* const output_r = self->ports.output_r;

	float amplitude = (uint32_t)floorf(*(self->ports.click));

	for (uint32_t idx = begin; idx < end; idx++) {
		if (self->high_beat_offset < self->beat_len) {
			output_l[idx] += 0.1 * amplitude * self->high_beat[self->high_beat_offset];
			output_r[idx] += 0.1 * amplitude * self->high_beat[self->high_beat_offset];
			self->high_beat_offset++;
		}

		if (self->low_beat_offset < self->beat_len) {
			output_l[idx] += 0.1 * amplitude * self->low_beat[self->low_beat_offset];
			output_r[idx] += 0.1 * amplitude * self->low_beat[self->low_beat_offset];
			self->low_beat_offset++;
		}
	}
}
/**
   ** Taken directly from metro.c **
   Play back audio for the range [begin..end) relative to this cycle.  This is
   called by run() in-between events to output audio up until the current time.
*/
Taken directly from metro.c
Play back audio for the range [begin..end) relative to this cycle.  This is
called by run() in-between events to output audio up until the current time.
Taken directly from metro . c Play back audio for the range [ begin .. end ) relative to this cycle . This is called by run () in - between events to output audio up until the current time .
static void
click(Alo* self, uint32_t begin, uint32_t end)
{
	float* const output_l = self->ports.output_l;
	float* const output_r = self->ports.output_r;
	float amplitude = (uint32_t)floorf(*(self->ports.click));
	for (uint32_t idx = begin; idx < end; idx++) {
		if (self->high_beat_offset < self->beat_len) {
			output_l[idx] += 0.1 * amplitude * self->high_beat[self->high_beat_offset];
			output_r[idx] += 0.1 * amplitude * self->high_beat[self->high_beat_offset];
			self->high_beat_offset++;
		}
		if (self->low_beat_offset < self->beat_len) {
			output_l[idx] += 0.1 * amplitude * self->low_beat[self->low_beat_offset];
			output_r[idx] += 0.1 * amplitude * self->low_beat[self->low_beat_offset];
			self->low_beat_offset++;
		}
	}
}
static void click ( Alo * self , uint32_t begin , uint32_t end ) { float * const output_l = self -> ports . output_l ; float * const output_r = self -> ports . output_r ; float amplitude = ( uint32_t ) floorf ( * ( self -> ports . click ) ) ; for ( uint32_t idx = begin ; idx < end ; idx ++ ) { if ( self -> high_beat_offset < self -> beat_len ) { output_l [ idx ] += 0.1 * amplitude * self -> high_beat [ self -> high_beat_offset ] ; output_r [ idx ] += 0.1 * amplitude * self -> high_beat [ self -> high_beat_offset ] ; self -> high_beat_offset ++ ; } if ( self -> low_beat_offset < self -> beat_len ) { output_l [ idx ] += 0.1 * amplitude * self -> low_beat [ self -> low_beat_offset ] ; output_r [ idx ] += 0.1 * amplitude * self -> low_beat [ self -> low_beat_offset ] ; self -> low_beat_offset ++ ; } } }
Taken directly from metro.c
Play back audio for the range [begin..end) relative to this cycle.
Taken directly from metro . c Play back audio for the range [ begin .. end ) relative to this cycle .