AudioSettings.h 3.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  1. /*
  2. ** Command & Conquer Generals(tm)
  3. ** Copyright 2025 Electronic Arts Inc.
  4. **
  5. ** This program is free software: you can redistribute it and/or modify
  6. ** it under the terms of the GNU General Public License as published by
  7. ** the Free Software Foundation, either version 3 of the License, or
  8. ** (at your option) any later version.
  9. **
  10. ** This program is distributed in the hope that it will be useful,
  11. ** but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  13. ** GNU General Public License for more details.
  14. **
  15. ** You should have received a copy of the GNU General Public License
  16. ** along with this program. If not, see <http://www.gnu.org/licenses/>.
  17. */
  18. ////////////////////////////////////////////////////////////////////////////////
  19. // //
  20. // (c) 2001-2003 Electronic Arts Inc. //
  21. // //
  22. ////////////////////////////////////////////////////////////////////////////////
  23. // EA Pacific
  24. // John McDonald, Jr
  25. // Do not distribute
  26. #pragma once
  27. #ifndef _AUDIOSETTINGS_H_
  28. #define _AUDIOSETTINGS_H_
  29. #include "Common/AsciiString.h"
  30. enum { MAX_HW_PROVIDERS = 4 };
  31. struct AudioSettings
  32. {
  33. AsciiString m_audioRoot;
  34. AsciiString m_soundsFolder;
  35. AsciiString m_musicFolder;
  36. AsciiString m_streamingFolder;
  37. AsciiString m_soundsExtension;
  38. Bool m_useDigital;
  39. Bool m_useMidi;
  40. Int m_outputRate;
  41. Int m_outputBits;
  42. Int m_outputChannels;
  43. Int m_sampleCount2D;
  44. Int m_sampleCount3D;
  45. Int m_streamCount;
  46. Int m_globalMinRange;
  47. Int m_globalMaxRange;
  48. Int m_drawableAmbientFrames;
  49. Int m_fadeAudioFrames;
  50. UnsignedInt m_maxCacheSize;
  51. Real m_minVolume; // At volumes less than this, the sample will be culled.
  52. AsciiString m_preferred3DProvider[MAX_HW_PROVIDERS + 1];
  53. //Defaults actually don't ever get changed!
  54. Real m_relative2DVolume; //2D volume compared to 3D
  55. Real m_defaultSoundVolume;
  56. Real m_default3DSoundVolume;
  57. Real m_defaultSpeechVolume;
  58. Real m_defaultMusicVolume;
  59. UnsignedInt m_defaultSpeakerType2D;
  60. UnsignedInt m_defaultSpeakerType3D;
  61. //If you want to change a value, store it somewhere else (like here)
  62. Real m_preferredSoundVolume;
  63. Real m_preferred3DSoundVolume;
  64. Real m_preferredSpeechVolume;
  65. Real m_preferredMusicVolume;
  66. //The desired altitude of the microphone to improve panning relative to terrain.
  67. Real m_microphoneDesiredHeightAboveTerrain;
  68. //When tracing a line between the ground look-at-point and the camera, we want
  69. //to ensure a maximum percentage, so the microphone never goes behind the camera.
  70. Real m_microphoneMaxPercentageBetweenGroundAndCamera;
  71. //Handles changing sound volume whenever the camera is close to the microphone.
  72. Real m_zoomMinDistance; //If we're closer than the minimum distance, then apply the full bonus no matter how close.
  73. Real m_zoomMaxDistance; //The maximum distance from microphone we need to be before benefiting from any bonus.
  74. //NOTE: The higher this value is, the lower normal sounds will be! If you specify a sound volume value of 25%, then sounds will play
  75. //between 75% and 100%, not 100% to 125%!
  76. Real m_zoomSoundVolumePercentageAmount; //The amount of sound volume dedicated to zooming.
  77. };
  78. #endif // _AUDIOSETTINGS_H_