home *** CD-ROM | disk | FTP | other *** search
/ Sound Sensations! / sound_sensations.iso / soundb / sndhack / examp011.wsn < prev    next >
Text File  |  1991-07-28  |  582b  |  24 lines

  1. ;The call to SetVoiceThreshold sets the
  2. ;threshold level to 2 notes in this example.
  3. ;This causes the last notes in the voice
  4. ;queue to be lost since the last call to
  5. ;CloseSound() will flush the voice queue.
  6.  
  7. CloseSound();
  8. OpenSound();
  9.  
  10. ;Warning: Do not set the threshold level
  11. ;to 4 or greater in this example.  This
  12. ;will cause the WaitSoundState to hang
  13. ;forever.
  14.  
  15. SetVoiceThreshold(1, 2);
  16. SetVoiceNote(1, 1, 4, 0);
  17. SetVoiceNote(1, 13, 4, 0);
  18. SetVoiceNote(1, 25, 4, 0);
  19. SetVoiceNote(1, 37, 4, 0);
  20.  
  21. StartSound();
  22. WaitSoundState(S_THRESHOLD);
  23. CloseSound();
  24.