示例#1
0
 def get_device(self):
     return bass_call_0(BASS_GetDevice)
示例#2
0
 def get_length (self, mode=BASS_POS_BYTE):
  return bass_call_0(BASS_ChannelGetLength, self.handle, mode)
示例#3
0
 def bytes_to_seconds(self, position=None):
  """Translates a byte position into time (seconds), based on a channel's format."""
  position = position or self.position
  return bass_call_0(BASS_ChannelBytes2Seconds, self.handle, position)
示例#4
0
 def get_looping(self):
  return bass_call_0(BASS_ChannelFlags, self.handle, BASS_SAMPLE_LOOP, 0) == 20
示例#5
0
 def is_active (self):
  "Checks if a sample, stream, or MOD music is active (playing) or stalled. Can also check if a recording is in progress."""
  return bass_call_0(BASS_ChannelIsActive, self.handle)
示例#6
0
 def is_stopped(self):
     return bass_call_0(pybassenc.BASS_Encode_IsActive,
                        self.handle) == pybass.BASS_ACTIVE_STOPPED
示例#7
0
 def get_level(self):
  """Retrieves the level (peak amplitude) of a stream, MOD music or recording channel."""
  return bass_call_0(BASS_ChannelGetLevel, self.handle)
示例#8
0
 def get_looping(self):
     return bass_call_0(BASS_ChannelFlags, self.handle, BASS_SAMPLE_LOOP,
                        0) == 20
示例#9
0
 def set_looping(self, looping):
     if looping:
         return bass_call_0(BASS_ChannelFlags, self.handle,
                            BASS_SAMPLE_LOOP, BASS_SAMPLE_LOOP)
     return bass_call_0(BASS_ChannelFlags, self.handle, 0, BASS_SAMPLE_LOOP)
示例#10
0
 def get_level(self):
     """Retrieves the level (peak amplitude) of a stream, MOD music or recording channel."""
     return bass_call_0(BASS_ChannelGetLevel, self.handle)
示例#11
0
 def get_data(self, length=16384):
     buf = c_buffer(length)
     bass_call_0(BASS_ChannelGetData, self.handle, pointer(buf), length)
     return buf
示例#12
0
 def is_sliding(self, attribute=None):
     """Checks if an attribute (or any attribute) of a sample, stream, or MOD music is sliding."""
     return bass_call_0(BASS_ChannelIsSliding, self.handle, attribute)
示例#13
0
 def get_file_position(self, mode):
     return bass_call_0(BASS_StreamGetFilePosition, self.handle, mode)
示例#14
0
 def push(self, data):
     return bass_call_0(BASS_StreamPutData, self.handle, data, len(data))
示例#15
0
 def is_stopped(self):
  return bass_call_0(pybassenc.BASS_Encode_IsActive, self.handle) == pybass.BASS_ACTIVE_STOPPED
示例#16
0
 def is_active(self):
     "Checks if a sample, stream, or MOD music is active (playing) or stalled. Can also check if a recording is in progress." ""
     return bass_call_0(BASS_ChannelIsActive, self.handle)
示例#17
0
 def paused(self):
     return bass_call_0(pybassenc.BASS_Encode_IsActive,
                        self.handle) == pybass.BASS_ACTIVE_PAUSED
示例#18
0
 def get_position(self, mode=BASS_POS_BYTE):
     """Retrieves the playback position of a sample, stream, or MOD music. Can also be used with a recording channel."""
     return bass_call_0(BASS_ChannelGetPosition, self.handle, mode)
示例#19
0
 def is_sliding (self, attribute=None):
  """Checks if an attribute (or any attribute) of a sample, stream, or MOD music is sliding."""
  return bass_call_0(BASS_ChannelIsSliding, self.handle, attribute)
示例#20
0
 def get_length(self, mode=BASS_POS_BYTE):
     return bass_call_0(BASS_ChannelGetLength, self.handle, mode)
示例#21
0
 def get_data(self, length=16384):
  buf = c_buffer(length)
  bass_call_0(BASS_ChannelGetData, self.handle, pointer(buf), length)
  return buf
示例#22
0
 def get_device(self):
     """Retrieves the device that a channel is using."""
     return bass_call_0(BASS_ChannelGetDevice, self.handle)
示例#23
0
 def set_looping(self, looping):
  if looping:
   return bass_call_0(BASS_ChannelFlags, self.handle, BASS_SAMPLE_LOOP, BASS_SAMPLE_LOOP)
  return bass_call_0(BASS_ChannelFlags, self.handle, 0, BASS_SAMPLE_LOOP)
示例#24
0
 def bytes_to_seconds(self, position=None):
     """Translates a byte position into time (seconds), based on a channel's format."""
     position = position or self.position
     return bass_call_0(BASS_ChannelBytes2Seconds, self.handle, position)
示例#25
0
 def get_position (self, mode=BASS_POS_BYTE):
  """Retrieves the playback position of a sample, stream, or MOD music. Can also be used with a recording channel."""
  return bass_call_0(BASS_ChannelGetPosition, self.handle, mode)
示例#26
0
 def seconds_to_bytes(self, position):
     """Translates a time (seconds) position into bytes, based on a channel's format."""
     return bass_call_0(BASS_ChannelSeconds2Bytes, self.handle, position)
示例#27
0
 def get_device(self):
  """Retrieves the device that a channel is using."""
  return bass_call_0( BASS_ChannelGetDevice, self.handle)
示例#28
0
 def get_file_position(self, mode):
  return bass_call_0(BASS_StreamGetFilePosition, self.handle, mode)
示例#29
0
 def seconds_to_bytes(self, position):
  """Translates a time (seconds) position into bytes, based on a channel's format."""
  return bass_call_0(BASS_ChannelSeconds2Bytes, self.handle, position)
示例#30
0
 def push(self, data):
  return bass_call_0(BASS_StreamPutData, self.handle, data, len(data))
示例#31
0
文件: input.py 项目: FBSLikan/TheQube
 def get_device(self):
    return bass_call_0(BASS_RecordGetDevice)
示例#32
0
 def paused(self):
  return bass_call_0(pybassenc.BASS_Encode_IsActive, self.handle) == pybass.BASS_ACTIVE_PAUSED