home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The C Users' Group Library 1994 August
/
wc-cdrom-cusersgrouplibrary-1994-08.iso
/
vol_300
/
327_01
/
sound.c
< prev
next >
Wrap
Text File
|
1991-10-08
|
610b
|
37 lines
#include <stdlib.h>
#include "panel.h"
#include "keys.h"
unsigned resp_keys[] = {
ESC,
ENTER,
0};
main()
{
char freq[10], dur[10];
pan_init();
pan_resp_keys(resp_keys);
pan_activate("sound");
while (pan_execute("", 1, 0) != ESC)
{
pan_get_field("freq", 1, freq);
pan_get_field("dur", 1, dur);
if (atoi(freq) != 0)
pan_sound(atoi(freq),atoi(dur));
else
{
pan_sound(50, 30);
pan_sound(5, 50);
}
}
pan_destroy();
}