Audio plugin host https://kx.studio/carla
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.

Config.h 2.3KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. /*
  2. ZynAddSubFX - a software synthesizer
  3. Config.h - Configuration file functions
  4. Copyright (C) 2003-2005 Nasca Octavian Paul
  5. Author: Nasca Octavian Paul
  6. This program is free software; you can redistribute it and/or modify
  7. it under the terms of version 2 of the GNU General Public License
  8. as published by the Free Software Foundation.
  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 (version 2 or later) for more details.
  13. You should have received a copy of the GNU General Public License (version 2)
  14. along with this program; if not, write to the Free Software Foundation,
  15. Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
  16. */
  17. #ifndef CONFIG_H
  18. #define CONFIG_H
  19. #include "../globals.h"
  20. #include <string>
  21. #define MAX_STRING_SIZE 4000
  22. #define MAX_BANK_ROOT_DIRS 100
  23. /**Configuration file functions*/
  24. class Config
  25. {
  26. public:
  27. /** Constructor*/
  28. Config();
  29. /** Destructor*/
  30. ~Config();
  31. struct {
  32. char *LinuxOSSWaveOutDev, *LinuxOSSSeqInDev;
  33. int SampleRate, SoundBufferSize, OscilSize, SwapStereo;
  34. int WindowsWaveOutId, WindowsMidiInId;
  35. int BankUIAutoClose;
  36. int DumpNotesToFile, DumpAppend;
  37. int GzipCompression;
  38. int Interpolation;
  39. std::string DumpFile;
  40. std::string bankRootDirList[MAX_BANK_ROOT_DIRS], currentBankDir;
  41. std::string presetsDirList[MAX_BANK_ROOT_DIRS];
  42. int CheckPADsynth;
  43. int IgnoreProgramChange;
  44. int UserInterfaceMode;
  45. int VirKeybLayout;
  46. std::string LinuxALSAaudioDev;
  47. std::string nameTag;
  48. } cfg;
  49. int winwavemax, winmidimax; //number of wave/midi devices on Windows
  50. int maxstringsize;
  51. struct winmidionedevice {
  52. char *name;
  53. };
  54. winmidionedevice *winmididevices;
  55. void clearbankrootdirlist();
  56. void clearpresetsdirlist();
  57. void init();
  58. void save();
  59. private:
  60. void readConfig(const char *filename);
  61. void saveConfig(const char *filename);
  62. void getConfigFileName(char *name, int namesize);
  63. };
  64. #endif