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.

77 lines
2.0KB

  1. /*
  2. ZynAddSubFX - a software synthesizer
  3. CarlaConfig.h - CarlaConfiguration 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 CarlaConfig
  27. {
  28. public:
  29. CarlaConfig();
  30. CarlaConfig(const CarlaConfig& ) = delete;
  31. ~CarlaConfig();
  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. std::string favoriteList[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() const;
  59. static const rtosc::Ports &ports;
  60. private:
  61. void readConfig(const char *filename);
  62. void saveConfig(const char *filename) const;
  63. void getConfigFileName(char *name, int namesize) const;
  64. };
  65. #endif