home *** CD-ROM | disk | FTP | other *** search
/ BUG 4 / BUGCD1997_05.BIN / aplic / clip4win / clip4win.exe / C4W30E.HUF / SOURCE / SNDBLAST.PRG < prev    next >
Text File  |  1995-07-31  |  1KB  |  51 lines

  1. ////////////////////////////
  2. //
  3. //    Clip-4-Win Sound Blaster demo
  4. //
  5. //    Copyright (C) 1995 Skelton Software, Kendal Cottage, Hillam, Leeds, UK.
  6. //    All Rights Reserved.
  7. //
  8. //    To build:    c4wbuild sndblast
  9. //
  10. ////////////////////////////
  11.  
  12. #define    WIN_WANT_ALL
  13. #include "windows.ch"
  14. #include "dll.ch"
  15. #define    NO_C4WCLASS
  16. #include "commands.ch"
  17.  
  18.  
  19. function main()
  20. local    oApp, oWnd
  21.  
  22. CREATE APPLICATION oApp  WINDOW oWND  TITLE "Clip-4-Win Sound Blaster demo" ;
  23.     ON WM_PAINT    OnPaint(oWnd)                    ;
  24.     ON WM_KEYDOWN    OnKey(oWnd)
  25.  
  26. return nil
  27.  
  28.  
  29. static function OnPaint(hWnd)
  30. SetPos(0, 0)
  31. ? ; ? "  Press a key ..."
  32. return nil
  33.  
  34.  
  35. static function OnKey(hWnd)
  36. local    nIpSCB := OpenSpeech(hWnd, 0, 0)
  37. Speak(nIpSCB, "Hello from Clip for Win")
  38. CloseSpeech(nIpSCB)
  39. return nil
  40.  
  41.  
  42. _DLL function OpenSpeech(hWnd AS INT, nMode AS INT, nVoiceType AS LONG)    ;
  43.     AS LONG Pascal:FB_SPCH.OpenSpeech
  44.  
  45. _DLL function Speak(nIpSCB AS LONG, cPhrase AS STRING)            ;
  46.     AS INT Pascal:FB_SPCH.Say
  47.  
  48. _DLL function CloseSpeech(nIpSCB AS LONG)                ;
  49.     AS INT Pascal:FB_SPCH.CloseSpeech
  50.  
  51.