Originally Posted by
rllovera
Ok, i've tried delays (as i've said) twice, with values 100000 and 1000000, and it didn't work. One thing makes me sure of the possibility of outputting more than one beep.
I didn't suggest it is impossible to output more than one discernible sound. I said that it is unlikely that the operating system will include features to add delays between two consecutive bits of output to the sound card, so they can be percieved by a human as two distinct sounds if your program does nothing to make sure they occur separately.
A relatively normal way (it depends on what version of unix you use) to introduce a fixed delay is to use a call of
Code:
delay(number_of_seconds * drv_usectohz(1000000));
because delay() works in clock ticks.
One other thing to check is that your are flushing stdout between and after both your desired beep events. For example;
Code:
fprintf(stdout, "\a");
fflush(stdout);
delay(drv_usectohz(1000000));
fprintf(stdout, "\a");
fflush(stdout);
Originally Posted by
rllovera
In Gentoo Linux (the OS i use), when you install a software title and the installation program wnats to warn you about something, you get three beeps, each of them accompanied by a dot displayed on the terminal. So that's why i think it can be done.
Besides, if only one beep were outputted by my program, only a single call for the attention of the program user would be available, which is highly undesireable. While i can't make an argument to refute yours, i'm still not inclind to believe i can't make what i want.
I never said what you want to do is impossible. You were focusing on tweaking the operating system to do what you want, whereas you need to tweek your program to exhibit the intended behaviour. The above should provide a start.