Browse Source

Misc

tags/1.9.5
falkTX 10 years ago
parent
commit
b783e0c4ae
3 changed files with 19 additions and 17 deletions
  1. +4
    -0
      source/carla_backend.py
  2. +14
    -5
      source/carla_settings.py
  3. +1
    -12
      source/carla_shared.py

+ 4
- 0
source/carla_backend.py View File

@@ -1240,6 +1240,7 @@ else:
class CarlaHostMeta(object):
#class CarlaHostMeta(metaclass=ABCMeta):
def __init__(self):

# info about this host object
self.isControl = False
self.isPlugin = False
@@ -2169,6 +2170,9 @@ class CarlaHostDLL(CarlaHostMeta):
def __init__(self, libName):
CarlaHostMeta.__init__(self)

# info about this host object
self.isPlugin = False

self.lib = cdll.LoadLibrary(libName)

self.lib.carla_get_complete_license_text.argtypes = None


+ 14
- 5
source/carla_settings.py View File

@@ -207,6 +207,7 @@ class CarlaSettingsW(QDialog):
if False:
# kdevelop likes this :)
host = CarlaHostMeta()
self.host = host

self.ui.lw_page.setFixedWidth(48 + 6 + 6 + QFontMetrics(self.ui.lw_page.font()).width("88888888"))

@@ -246,7 +247,7 @@ class CarlaSettingsW(QDialog):
if host.isPlugin:
self.ui.cb_engine_audio_driver.setCurrentIndex(0)
self.ui.cb_engine_audio_driver.setEnabled(False)
self.ui.cb_engine_process_mode_other.setCurrentIndex(gCarla.processMode-self.PROCESS_MODE_NON_JACK_PADDING)
self.ui.cb_engine_process_mode_other.setCurrentIndex(host.processMode-self.PROCESS_MODE_NON_JACK_PADDING)
self.ui.cb_engine_process_mode_other.setEnabled(False)
self.ui.sw_engine_process_mode.setCurrentIndex(1)
self.ui.tb_engine_driver_config.setEnabled(False)
@@ -778,10 +779,18 @@ if __name__ == '__main__':
from carla_app import CarlaApplication
from carla_host import initHost

app = CarlaApplication()
host = initHost("Settings", None, False)
app = CarlaApplication()

gui = CarlaSettingsW(None, host, True, True, True)
gui.show()
host1 = initHost("Settings", None, False, False, True)
host2 = initHost("Settings", None, False, True, True)

gui1 = CarlaSettingsW(None, host1, True, True, True)
gui2 = CarlaSettingsW(None, host2, True, True, True)

gui1.setWindowTitle("Settings - DLL")
gui2.setWindowTitle("Settings - Plugin")

gui1.show()
gui2.show()

sys.exit(app.exec_())

+ 1
- 12
source/carla_shared.py View File

@@ -484,22 +484,11 @@ del DEFAULT_SFZ_PATH

class CarlaObject(object):
__slots__ = [
# Host Window
'gui',
# current buffer size
'bufferSize',
# current sample rate
'sampleRate',
# wherever to use external patchbay mode
'externalPatchbay',
# wherever to use custom skins
'useCustomSkins'
'gui' # Host Window
]

gCarla = CarlaObject()
gCarla.gui = None
gCarla.bufferSize = 0
gCarla.sampleRate = 0.0

# ------------------------------------------------------------------------------------------------------------
# Set CWD


Loading…
Cancel
Save