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 
19 #ifndef SpiralINFO
20 #define SpiralINFO
21 
22 #include <iostream>
23 #include <string>
24 #include <vector>
25 #include <stdlib.h>
26 #include "Sample.h"
27 
28 using namespace std;
29 
30 // todo: better place for these util funcs
31 float RandFloat (float s=0.0f, float e=1.0f);
32 
33 // Loads info from the resource file
34 
35 class SpiralInfo {
36    public:
37       SpiralInfo();
~SpiralInfo()38       ~SpiralInfo() {}
39       void LoadPrefs();
40       void SavePrefs();
41       static void Alert (string Text);
42       static void Log (string Text);
43       static int    BUFSIZE;
44       static int    FRAGSIZE;
45       static int    FRAGCOUNT;
46       static int    SAMPLERATE;
47       static long   MAXSAMPLE;
48       static float  VALUECONV;
49       static bool   WANTMIDI;
50       static int    FILTERGRAN;
51       static string OUTPUTFILE;
52       static string MIDIFILE;
53       static bool   USEPLUGINLIST;
54       static int    POLY;
55       static string LOCALE;
56       static unsigned GUI_COLOUR;
57       static unsigned SCOPE_BG_COLOUR;
58       static unsigned SCOPE_FG_COLOUR;
59       static unsigned SCOPE_SEL_COLOUR;
60       static unsigned SCOPE_IND_COLOUR;
61       static unsigned SCOPE_MRK_COLOUR;
62       static SpiralInfo* Get();
63       void SetColours();
64       static string PLUGIN_PATH;
65       static vector<string> PLUGINVEC;
66       static int GUICOL_Tool;
67       static int GUICOL_Button;
68       static int GUICOL_Canvas;
69       static int GUICOL_Device;
70       static int GUIDEVICE_Box;
71    private:
72       string m_ResFileName;
73       int m_Version;
74       static SpiralInfo *m_SpiralInfo;
75       void StreamInPrefs (istream &s);
76       void StreamOutPrefs (ostream &s);
77 };
78 
79 #endif
80 
81