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.

80 lines
2.0KB

  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 REALTIMEOUT;
  48. static int POLY;
  49. //static int GUI_COLOUR;
  50. //static int GUIBG_COLOUR;
  51. //static int GUIBG2_COLOUR;
  52. string GetHomeDir() {return m_HomeDir;}
  53. protected:
  54. SpiralInfo() : m_HomeDir(getenv("HOME")) {}
  55. virtual ~SpiralInfo() {}
  56. virtual string GetResFileName() { return "ballsSpiralrc"; }
  57. virtual void StreamInPrefs(istream &s);
  58. virtual void StreamOutPrefs(ostream &s);
  59. string m_HomeDir;
  60. int m_Version;
  61. };
  62. #endif