int real_multiplication(int *size)
{
  int cycle_count;

  // Conditions
  CHECK_CONDITIONS(VECT1_SIZE >= VECT2_SIZE)
  CHECK_CONDITIONS(VECT3_SIZE > 0)

  // Action
  dsp16_debug_printf("vect1 = vect2 * %f\n", vect3[0]);

  *size = VECT2_SIZE;

  cycle_count = Get_sys_count();
  dsp16_vect_realmul(vect1, vect2, VECT2_SIZE, vect3[0]);

  return Get_sys_count() - cycle_count;
}
Пример #2
0
void generate_signal(dsp16_t *signal, struct signal_source *source)
{
	source->phase = dsp16_gen_sin(signal, BUFFER_LENGTH,
			source->frequency, DAC_SAMPLING_RATE, source->phase);
	dsp16_vect_realmul(signal, signal, BUFFER_LENGTH, source->volume);
}