def get_device(self): return bass_call_0(BASS_GetDevice)
def get_length (self, mode=BASS_POS_BYTE): return bass_call_0(BASS_ChannelGetLength, self.handle, mode)
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)
def get_looping(self): return bass_call_0(BASS_ChannelFlags, self.handle, BASS_SAMPLE_LOOP, 0) == 20
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)
def is_stopped(self): return bass_call_0(pybassenc.BASS_Encode_IsActive, self.handle) == pybass.BASS_ACTIVE_STOPPED
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)
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)
def get_data(self, length=16384): buf = c_buffer(length) bass_call_0(BASS_ChannelGetData, self.handle, pointer(buf), length) return buf
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)
def get_file_position(self, mode): return bass_call_0(BASS_StreamGetFilePosition, self.handle, mode)
def push(self, data): return bass_call_0(BASS_StreamPutData, self.handle, data, len(data))
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)
def paused(self): return bass_call_0(pybassenc.BASS_Encode_IsActive, self.handle) == pybass.BASS_ACTIVE_PAUSED
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)
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)
def get_length(self, mode=BASS_POS_BYTE): return bass_call_0(BASS_ChannelGetLength, self.handle, mode)
def get_device(self): """Retrieves the device that a channel is using.""" return bass_call_0(BASS_ChannelGetDevice, self.handle)
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)
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)
def get_device(self): """Retrieves the device that a channel is using.""" return bass_call_0( BASS_ChannelGetDevice, self.handle)
def get_device(self): return bass_call_0(BASS_RecordGetDevice)