本文整理汇总了Python中CeciliaLib.getSoftBuf方法的典型用法代码示例。如果您正苦于以下问题:Python CeciliaLib.getSoftBuf方法的具体用法?Python CeciliaLib.getSoftBuf怎么用?Python CeciliaLib.getSoftBuf使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CeciliaLib
的用法示例。
在下文中一共展示了CeciliaLib.getSoftBuf方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: changeSoftBuff
# 需要导入模块: import CeciliaLib [as 别名]
# 或者: from CeciliaLib import getSoftBuf [as 别名]
def changeSoftBuff(self, index, label):
softBuff = int(self.choiceSoftBuff.getLabel())
if softBuff > CeciliaLib.getHardBuf():
self.choiceSoftBuff.setLabel(str(CeciliaLib.getSoftBuf()))
else:
CeciliaLib.setSoftBuf(softBuff)
示例2: createCsoundPanel
# 需要导入模块: import CeciliaLib [as 别名]
# 或者: from CeciliaLib import getSoftBuf [as 别名]
def createCsoundPanel(self, panel):
csoundPanel = wx.Panel(panel)
csoundPanel.SetBackgroundColour(BACKGROUND_COLOUR)
gridSizer = wx.FlexGridSizer(3,3,10,3)
textKsmps = wx.StaticText(csoundPanel, 0, 'ksmps :')
textKsmps.SetFont(self.font)
self.choiceKsmps = CustomMenu(csoundPanel, choice= ["1", "2", "5", "10", "25", "50", "100"],
init=str(CeciliaLib.getKsmps()), outFunction=self.changeKsmps)
textHardbuff = wx.StaticText(csoundPanel, 0, 'Hardware buffer :')
textHardbuff.SetFont(self.font)
self.choiceHardBuff = CustomMenu(csoundPanel, choice=HARD_BUFF_SIZES,
init=str(CeciliaLib.getHardBuf()), outFunction=self.changeHardBuff)
textSoftbuff = wx.StaticText(csoundPanel, 0, 'Software buffer :')
textSoftbuff.SetFont(self.font)
self.choiceSoftBuff = CustomMenu(csoundPanel, choice=SOFT_BUFF_SIZES,
init=str(CeciliaLib.getSoftBuf()), outFunction=self.changeSoftBuff)
gridSizer.AddMany([
(textKsmps, 0, wx.LEFT | wx.ALIGN_CENTER_VERTICAL, PADDING),
(wx.StaticText(csoundPanel, -1, '', size=(125,-1)), 1, wx.EXPAND),
(self.choiceKsmps, 0, wx.ALIGN_CENTER_VERTICAL),
(textHardbuff, 0, wx.LEFT | wx.ALIGN_CENTER_VERTICAL, PADDING),
(wx.StaticText(csoundPanel, -1, ''), 1, wx.EXPAND),
(self.choiceHardBuff, 0, wx.ALIGN_CENTER_VERTICAL),
(textSoftbuff, 0, wx.LEFT | wx.ALIGN_CENTER_VERTICAL, PADDING),
(wx.StaticText(csoundPanel, -1, ''), 1, wx.EXPAND),
(self.choiceSoftBuff, 0, wx.ALIGN_CENTER_VERTICAL),
])
gridSizer.AddGrowableCol(1, 1)
csoundPanel.SetSizerAndFit(gridSizer)
return csoundPanel