コード例 #1
0
 def _put_x_in_bounds(self, x):
     return Utils.put_in_bounds(x, 0, self.width())
コード例 #2
0
ファイル: ChannelModel.py プロジェクト: Van10000/sound_editor
 def get_frame_number_from_ratio(self, ratio):
     ratio = Utils.put_in_bounds(ratio, 0, 1)
     return int(self.start_frame + len(self) * ratio)
コード例 #3
0
 def _get_scaled_len(self, scale_factor):
     return Utils.put_in_bounds(self.MINIMAL_LEN, len(self.wave_state),
                                scale_factor * len(self))