Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

90 lines
1.3 KiB

  1. /******************/
  2. /* SOUND ROUTINES */
  3. /******************/
  4. #define _WINDOWS
  5. #include <windows.h>
  6. #include <port1632.h>
  7. #include "sound.h"
  8. #include "pref.h"
  9. extern PREF Preferences;
  10. /****** I N I T T U N E S ******/
  11. VOID InitTunes(VOID)
  12. {
  13. // OpenSound();
  14. // SetVoiceAccent(1, 120, 128, S_LEGATO, 0);
  15. }
  16. /****** K I L L T U N E ******/
  17. VOID KillTune(VOID)
  18. {
  19. // StopSound();
  20. }
  21. /****** E N D T U N E S ******/
  22. VOID EndTunes(VOID)
  23. {
  24. // KillTune();
  25. // CloseSound();
  26. }
  27. /****** P L A Y T U N E ******/
  28. VOID PlayTune(INT tune)
  29. {
  30. /* if (!Preferences.fSound)
  31. return;
  32. switch (tune)
  33. {
  34. case TUNE_HITHEAD:
  35. SetVoiceNote(1, 10, 4, 1);
  36. break;
  37. case TUNE_WINLEVEL:
  38. SetVoiceNote(1, 24, 16, 1);
  39. SetVoiceNote(1, 36, 16, 1);
  40. break;
  41. case TUNE_WINGAME:
  42. SetVoiceNote(1, 24, 16, 1);
  43. SetVoiceNote(1, 26, 16, 1);
  44. SetVoiceNote(1, 28, 16, 1);
  45. SetVoiceNote(1, 29, 16, 1);
  46. SetVoiceNote(1, 31, 16, 1);
  47. SetVoiceNote(1, 33, 16, 1);
  48. SetVoiceNote(1, 35, 16, 1);
  49. SetVoiceNote(1, 36, 16, 1);
  50. break;
  51. case TUNE_LOSEGAME:
  52. SetVoiceNote(1, 36, 8, 1);
  53. SetVoiceNote(1, 24, 8, 1);
  54. SetVoiceNote(1, 36, 8, 1);
  55. SetVoiceNote(1, 24, 8, 1);
  56. SetVoiceNote(1, 36, 8, 1);
  57. SetVoiceNote(1, 24, 8, 1);
  58. break;
  59. #ifdef DEBUG
  60. default:
  61. Oops("Invalid Tune");
  62. break;
  63. #endif
  64. }
  65. StartSound();
  66. */
  67. (tune);
  68. }