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.

74 lines
2.3KB

  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 UserInterfaceMode;
  44. int VirKeybLayout;
  45. std::string LinuxALSAaudioDev;
  46. std::string nameTag;
  47. } cfg;
  48. int winwavemax, winmidimax; //number of wave/midi devices on Windows
  49. int maxstringsize;
  50. struct winmidionedevice {
  51. char *name;
  52. };
  53. winmidionedevice *winmididevices;
  54. void clearbankrootdirlist();
  55. void clearpresetsdirlist();
  56. void init();
  57. void save();
  58. private:
  59. void readConfig(const char *filename);
  60. void saveConfig(const char *filename);
  61. void getConfigFileName(char *name, int namesize);
  62. };
  63. #endif