Skip to content

Commit

Permalink
fix col heart positioning
Browse files Browse the repository at this point in the history
  • Loading branch information
Taiko2k committed Oct 28, 2018
1 parent b60a1a7 commit d0081df
Showing 1 changed file with 39 additions and 3 deletions.
42 changes: 39 additions & 3 deletions tauon.py
Original file line number Diff line number Diff line change
Expand Up @@ -1959,7 +1959,8 @@ def __init__(self):
self.bass_devices = []
self.set_device = 0
self.mpris = None

self.eq = [0] * 2 # not used
self.enable_eq = True # not used

def notify_update(self):

Expand Down Expand Up @@ -3661,11 +3662,27 @@ class BASS_BFX_VOLUME(ctypes.Structure):
('fVolume', ctypes.c_float)
]

class BASS_DX8_PARAMEQ(ctypes.Structure):
_fields_ = [('fCenter', ctypes.c_int),
('fBandwidth', ctypes.c_float),
('fGain', ctypes.c_float),
]

fx_bandwidth = 24
eqs = [
BASS_DX8_PARAMEQ(110, fx_bandwidth, 0),
BASS_DX8_PARAMEQ(11000, fx_bandwidth, 0),

]


#BASS_FXSetParameters = function_type(ctypes.c_bool, ctypes.c_ulong, ctypes.POINTER(BASS_BFX_VOLUME))(
BASS_FXSetParameters = function_type(ctypes.c_bool, ctypes.c_ulong, ctypes.c_void_p)(
('BASS_FXSetParameters', bass_module))

BASS_FXGetParameters = function_type(ctypes.c_bool, ctypes.c_ulong, ctypes.c_void_p)(
('BASS_FXGetParameters', bass_module))

BASS_ChannelSetFX = function_type(ctypes.c_ulong, ctypes.c_ulong, ctypes.c_ulong, ctypes.c_int)(
('BASS_ChannelSetFX', bass_module))

Expand Down Expand Up @@ -3973,6 +3990,24 @@ def replay_gain(stream):
print("Using ReplayGain of " + str(gain))
pctl.active_replaygain = round(gain, 2)

# if pctl.enable_eq:
#
# print("Setting eq...")
# print(pctl.eq)
# BASS_FX_DX8_PARAMEQ = 7
# fx_handle = BASS_ChannelSetFX(stream, BASS_FX_DX8_PARAMEQ, 1)
#
# handles = [
# BASS_ChannelSetFX(stream, BASS_FX_DX8_PARAMEQ, 0),
# BASS_ChannelSetFX(stream, BASS_FX_DX8_PARAMEQ, 0),
# ]
#
# for i, st in enumerate(eqs):
#
# BASS_FXSetParameters(handles[i], ctypes.pointer(st))
# BASS_FXGetParameters(handles[i], ctypes.pointer(st))


br_timer = Timer()

class BASS_Player():
Expand Down Expand Up @@ -13893,7 +13928,7 @@ def key(tag):

tag_list_sort = sorted(tag_list, key=key, reverse=True)

max_tags = (window_size[1] - gui.panelY - gui.panelBY - 10) // 30 * gui.scale
max_tags = round((window_size[1] - gui.panelY - gui.panelBY - 10) // 30 * gui.scale)

tag_list_sort = tag_list_sort[:max_tags]

Expand Down Expand Up @@ -17648,6 +17683,7 @@ def full_render(self):

wid = item[1] - 20 * gui.scale
y = gui.playlist_text_offset + gui.playlist_top + gui.playlist_row_height * w
ry = gui.playlist_top + gui.playlist_row_height * w
if run > end + 24 * gui.scale:
break

Expand Down Expand Up @@ -17768,7 +17804,7 @@ def full_render(self):
elif item[0] == "❤":
# col love
u = 5 * gui.scale
yy = y + (gui.playlist_row_height // 2) - (5 * gui.scale)
yy = ry + (gui.playlist_row_height // 2) - (5 * gui.scale)
if gui.scale == 1.25:
yy += 1

Expand Down

0 comments on commit d0081df

Please sign in to comment.