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