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.

91 lines
2.7KB

  1. /* SpiralSound
  2. * Copyleft (C) 2000 David Griffiths <dave@pawfal.org>
  3. *
  4. * This program is free software; you can redistribute it and/or modify
  5. * it under the terms of the GNU General Public License as published by
  6. * the Free Software Foundation; either version 2 of the License, or
  7. * (at your option) any later version.
  8. *
  9. * This program is distributed in the hope that it will be useful,
  10. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12. * GNU General Public License for more details.
  13. *
  14. * You should have received a copy of the GNU General Public License
  15. * along with this program; if not, write to the Free Software
  16. * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
  17. */
  18. #ifndef SpiralINFO
  19. #define SpiralINFO
  20. #include <iostream>
  21. #include <string>
  22. #include <vector>
  23. #include <stdlib.h>
  24. #include "Sample.h"
  25. using namespace std;
  26. // todo: better place for these util funcs
  27. float RandFloat (float s=0.0f, float e=1.0f);
  28. // Loads info from the resource file
  29. class SpiralInfo {
  30. public:
  31. SpiralInfo();
  32. ~SpiralInfo() {}
  33. void LoadPrefs();
  34. void SavePrefs();
  35. static void Alert (string Text);
  36. static void Log (string Text);
  37. static int BUFSIZE;
  38. static int FRAGSIZE;
  39. static int FRAGCOUNT;
  40. static int SAMPLERATE;
  41. static long MAXSAMPLE;
  42. static float VALUECONV;
  43. static bool WANTMIDI;
  44. static int FILTERGRAN;
  45. static string OUTPUTFILE;
  46. static string MIDIFILE;
  47. static bool USEPLUGINLIST;
  48. static int POLY;
  49. static string LOCALE;
  50. static unsigned GUI_COLOUR;
  51. static unsigned SCOPE_BG_COLOUR;
  52. static unsigned SCOPE_FG_COLOUR;
  53. static unsigned SCOPE_SEL_COLOUR;
  54. static unsigned SCOPE_IND_COLOUR;
  55. static unsigned SCOPE_MRK_COLOUR;
  56. static SpiralInfo* Get();
  57. void SetColours();
  58. static string PLUGIN_PATH;
  59. static vector<string> PLUGINVEC;
  60. static int GUICOL_Tool;
  61. static int GUICOL_Button;
  62. static int GUICOL_Canvas;
  63. static int GUICOL_Device;
  64. static int GUIDEVICE_Box;
  65. private:
  66. string m_ResFileName;
  67. int m_Version;
  68. static SpiralInfo *m_SpiralInfo;
  69. void StreamOutMainColourPrefs (ostream &s);
  70. bool StreamInMainColourPrefs (istream &s, string &section, string &ident);
  71. void StreamOutDeviceColourPrefs (ostream &s);
  72. bool StreamInDeviceColourPrefs (istream &s, string &section, string &ident);
  73. void StreamOutAudioSettingsPrefs (ostream &s);
  74. bool StreamInAudioSettingsPrefs (istream &s, string &section, string &ident);
  75. void StreamInPrefs (istream &s);
  76. void StreamOutPrefs (ostream &s);
  77. };
  78. #endif