main.c
void beep_on_char(beep_args_t *args, int consolefd) {

  while (1) {

    char c = getchar();

    if (feof(stdin))
      break;

    putchar(c);
    fflush(stdout);

    beep(args->duration_ms, args->freq_hz, consolefd);
    usleep(args->delay_ms*1000);

  }
}
// Beep for every char on stdin
Beep for every char on stdin
Beep for every char on stdin
void beep_on_char(beep_args_t *args, int consolefd) {
  while (1) {
    char c = getchar();
    if (feof(stdin))
      break;
    putchar(c);
    fflush(stdout);
    beep(args->duration_ms, args->freq_hz, consolefd);
    usleep(args->delay_ms*1000);
  }
}
void beep_on_char ( beep_args_t * args , int consolefd ) { while ( 1 ) { char c = getchar ( ) ; if ( feof ( stdin ) ) break ; putchar ( c ) ; fflush ( stdout ) ; beep ( args -> duration_ms , args -> freq_hz , consolefd ) ; usleep ( args -> delay_ms * 1000 ) ; } }
Beep for every char on stdin
Beep for every char on stdin