Exemplo n.º 1
0
 def get_device(self):
     return bass_call_0(BASS_GetDevice)
Exemplo n.º 2
0
 def get_length (self, mode=BASS_POS_BYTE):
  return bass_call_0(BASS_ChannelGetLength, self.handle, mode)
Exemplo n.º 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)
Exemplo n.º 4
0
 def get_looping(self):
  return bass_call_0(BASS_ChannelFlags, self.handle, BASS_SAMPLE_LOOP, 0) == 20
Exemplo n.º 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)
Exemplo n.º 6
0
 def is_stopped(self):
     return bass_call_0(pybassenc.BASS_Encode_IsActive,
                        self.handle) == pybass.BASS_ACTIVE_STOPPED
Exemplo n.º 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)
Exemplo n.º 8
0
 def get_looping(self):
     return bass_call_0(BASS_ChannelFlags, self.handle, BASS_SAMPLE_LOOP,
                        0) == 20
Exemplo n.º 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)
Exemplo n.º 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)
Exemplo n.º 11
0
 def get_data(self, length=16384):
     buf = c_buffer(length)
     bass_call_0(BASS_ChannelGetData, self.handle, pointer(buf), length)
     return buf
Exemplo n.º 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)
Exemplo n.º 13
0
 def get_file_position(self, mode):
     return bass_call_0(BASS_StreamGetFilePosition, self.handle, mode)
Exemplo n.º 14
0
 def push(self, data):
     return bass_call_0(BASS_StreamPutData, self.handle, data, len(data))
Exemplo n.º 15
0
 def is_stopped(self):
  return bass_call_0(pybassenc.BASS_Encode_IsActive, self.handle) == pybass.BASS_ACTIVE_STOPPED
Exemplo n.º 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)
Exemplo n.º 17
0
 def paused(self):
     return bass_call_0(pybassenc.BASS_Encode_IsActive,
                        self.handle) == pybass.BASS_ACTIVE_PAUSED
Exemplo n.º 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)
Exemplo n.º 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)
Exemplo n.º 20
0
 def get_length(self, mode=BASS_POS_BYTE):
     return bass_call_0(BASS_ChannelGetLength, self.handle, mode)
Exemplo n.º 21
0
 def get_data(self, length=16384):
  buf = c_buffer(length)
  bass_call_0(BASS_ChannelGetData, self.handle, pointer(buf), length)
  return buf
Exemplo n.º 22
0
 def get_device(self):
     """Retrieves the device that a channel is using."""
     return bass_call_0(BASS_ChannelGetDevice, self.handle)
Exemplo n.º 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)
Exemplo n.º 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)
Exemplo n.º 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)
Exemplo n.º 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)
Exemplo n.º 27
0
 def get_device(self):
  """Retrieves the device that a channel is using."""
  return bass_call_0( BASS_ChannelGetDevice, self.handle)
Exemplo n.º 28
0
 def get_file_position(self, mode):
  return bass_call_0(BASS_StreamGetFilePosition, self.handle, mode)
Exemplo n.º 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)
Exemplo n.º 30
0
 def push(self, data):
  return bass_call_0(BASS_StreamPutData, self.handle, data, len(data))
Exemplo n.º 31
0
 def get_device(self):
    return bass_call_0(BASS_RecordGetDevice)
Exemplo n.º 32
0
 def paused(self):
  return bass_call_0(pybassenc.BASS_Encode_IsActive, self.handle) == pybass.BASS_ACTIVE_PAUSED