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.

82 lines
2.2KB

  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. #include <iostream>
  19. #include <string>
  20. #include <stdlib.h>
  21. #include "Sample.h"
  22. #ifndef SpiralINFO
  23. #define SpiralINFO
  24. using namespace std;
  25. // todo: better place for these util funcs
  26. float RandFloat(float s=0.0f, float e=1.0f);
  27. // Loads info from the resource file, overload and implement
  28. // as singleton for each app. App specifc info may be added
  29. // after the standard items.
  30. class SpiralInfo
  31. {
  32. public:
  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. string GetHomeDir() {return m_HomeDir;}
  57. protected:
  58. SpiralInfo() : m_HomeDir(getenv("HOME")), m_Version(1) {}
  59. virtual ~SpiralInfo() {}
  60. virtual string GetResFileName() { return "Spiralrc"; }
  61. virtual void StreamInPrefs(istream &s);
  62. virtual void StreamOutPrefs(ostream &s);
  63. string m_HomeDir;
  64. int m_Version;
  65. };
  66. #endif