home *** CD-ROM | disk | FTP | other *** search
/ DP Tool Club 12 / CD_ASCQ_12_0294.iso / vrac / panshr24.zip / SOUND.C < prev    next >
Text File  |  1991-10-09  |  610b  |  37 lines

  1. #include <stdlib.h>
  2. #include "panel.h"
  3. #include "keys.h"
  4.  
  5. unsigned resp_keys[] = {
  6.     ESC,
  7.     ENTER,
  8.     0};
  9.  
  10. main()
  11.     {
  12.     char freq[10], dur[10];
  13.  
  14.     pan_init();
  15.     pan_resp_keys(resp_keys);
  16.  
  17.     pan_activate("sound");
  18.  
  19.     while (pan_execute("", 1, 0) != ESC)
  20.         {
  21.         pan_get_field("freq", 1, freq);
  22.         pan_get_field("dur", 1, dur);
  23.  
  24.         if (atoi(freq) != 0)
  25.             pan_sound(atoi(freq),atoi(dur));
  26.         else
  27.             {
  28.             pan_sound(50, 30);
  29.             pan_sound(5, 50);
  30.             }
  31.         }
  32.  
  33.     pan_destroy();
  34.     }
  35.  
  36.  
  37.