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.

76 lines
2.0KB

  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
  7. modify it under the terms of the GNU General Public License
  8. as published by the Free Software Foundation; either version 2
  9. of the License, or (at your option) any later version.
  10. */
  11. #ifndef CONFIG_H
  12. #define CONFIG_H
  13. #include <string>
  14. #define MAX_STRING_SIZE 4000
  15. #define MAX_BANK_ROOT_DIRS 100
  16. namespace rtosc
  17. {
  18. struct Ports;
  19. }
  20. class oss_devs_t
  21. {
  22. public:
  23. char *linux_wave_out, *linux_seq_in;
  24. };
  25. /**Configuration file functions*/
  26. class Config
  27. {
  28. public:
  29. Config();
  30. Config(const Config& ) = delete;
  31. ~Config();
  32. struct {
  33. oss_devs_t oss_devs;
  34. int SampleRate, SoundBufferSize, OscilSize, SwapStereo;
  35. int WindowsWaveOutId, WindowsMidiInId;
  36. int BankUIAutoClose;
  37. int GzipCompression;
  38. int Interpolation;
  39. std::string bankRootDirList[MAX_BANK_ROOT_DIRS], currentBankDir;
  40. std::string presetsDirList[MAX_BANK_ROOT_DIRS];
  41. int CheckPADsynth;
  42. int IgnoreProgramChange;
  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() const;
  58. static const rtosc::Ports &ports;
  59. private:
  60. void readConfig(const char *filename);
  61. void saveConfig(const char *filename) const;
  62. void getConfigFileName(char *name, int namesize) const;
  63. };
  64. #endif