Permalink
Switch branches/tags
Nothing to show
Find file
Fetching contributors…
Cannot retrieve contributors at this time
50 lines (40 sloc) 809 Bytes
/*
* Copyright (c) 2012 Evgeny Proydakov <lord.tiran@gmail.com>
*/
#ifndef SOUND_H
#define SOUND_H
#define SOUNT_TIME_OUT 350
sub do_beep(int number_of_repeats, int volume, int time_out)
{
for(int i=0; i < number_of_repeats; i++)
{
// parameters: frequency, duration, volume, loop
PlayToneEx(262, 400, volume, false);
Wait(time_out);
}
}
sub do_beep_finish()
{
do_beep(4, 3, SOUNT_TIME_OUT);
}
sub do_beep_red_line()
{
do_beep(2, 3, SOUNT_TIME_OUT);
}
void do_beep_detected_object()
{
do_beep(2, 3, SOUNT_TIME_OUT);
}
void do_beep_manipulator_error()
{
do_beep(5, 3, SOUNT_TIME_OUT);
}
void do_beep_light_error()
{
do_beep(2, 3, SOUNT_TIME_OUT);
}
void do_beep_ultrasonic_error()
{
do_beep(2, 3, SOUNT_TIME_OUT);
}
#endif // SOUND_H