sound.h 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. //
  2. // Copyright (c) 2009, Wei Mingzhi <whistler_wmz@users.sf.net>.
  3. // All rights reserved.
  4. //
  5. // This file is part of SDLPAL.
  6. //
  7. // SDLPAL is free software: you can redistribute it and/or modify
  8. // it under the terms of the GNU General Public License as published by
  9. // the Free Software Foundation, either version 3 of the License, or
  10. // (at your option) any later version.
  11. //
  12. // This program is distributed in the hope that it will be useful,
  13. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  14. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  15. // GNU General Public License for more details.
  16. //
  17. // You should have received a copy of the GNU General Public License
  18. // along with this program. If not, see <http://www.gnu.org/licenses/>.
  19. //
  20. #ifndef SOUND_H
  21. #define SOUND_H
  22. #include "common.h"
  23. #ifndef PAL_SAMPLE_RATE
  24. #define PAL_SAMPLE_RATE 49716
  25. #endif
  26. #ifndef PAL_CHANNELS
  27. #define PAL_CHANNELS 1
  28. #endif
  29. #ifdef __cplusplus
  30. extern "C"
  31. {
  32. #endif
  33. INT
  34. SOUND_OpenAudio(
  35. VOID
  36. );
  37. VOID
  38. SOUND_CloseAudio(
  39. VOID
  40. );
  41. VOID
  42. SOUND_PlayChannel(
  43. INT iSoundNum,
  44. INT iChannel
  45. );
  46. #ifdef __SYMBIAN32__
  47. VOID
  48. SOUND_AdjustVolume(
  49. INT iDirectory
  50. );
  51. #endif
  52. VOID
  53. PAL_PlayMUS(
  54. INT iNumRIX,
  55. BOOL fLoop,
  56. FLOAT flFadeTime
  57. );
  58. BOOL
  59. SOUND_PlayCDA(
  60. INT iNumTrack
  61. );
  62. #define SOUND_Play(i) SOUND_PlayChannel((i), 0)
  63. extern BOOL g_fNoSound;
  64. extern BOOL g_fNoMusic;
  65. #ifdef PAL_HAS_NATIVEMIDI
  66. extern BOOL g_fUseMidi;
  67. #endif
  68. #ifdef __cplusplus
  69. }
  70. #endif
  71. #endif