Skip to content
Snippets Groups Projects
Commit 940d38f8 authored by moon2's avatar moon2 :speech_balloon:
Browse files

bl00mbox callbacks/weak references/backend rewrite

parent c3388838
No related branches found
No related tags found
No related merge requests found
Pipeline #13120 passed
...@@ -5,12 +5,9 @@ import media ...@@ -5,12 +5,9 @@ import media
def recall_blm_channel_stats(blm_chan): def recall_blm_channel_stats(blm_chan):
print(blm_chan)
if blm_chan.free: if blm_chan.free:
print("wha-!")
return return
if blm_chan.name in session_channel_vol_mute: if blm_chan.name in session_channel_vol_mute:
print("whee")
chan = bl00mboxChannel(bl00mbox.SysChannel(blm_chan)) chan = bl00mboxChannel(bl00mbox.SysChannel(blm_chan))
vol, mute = session_channel_vol_mute[chan.get_name()] vol, mute = session_channel_vol_mute[chan.get_name()]
if mute: if mute:
...@@ -185,11 +182,8 @@ class AudioMixer(Responder): ...@@ -185,11 +182,8 @@ class AudioMixer(Responder):
def _refresh(self): def _refresh(self):
self._chans = [mediaChannel()] self._chans = [mediaChannel()]
for c in bl00mbox.active_channels(): for c in bl00mbox.Sys.collect_channels(True):
chan = bl00mboxChannel(c) chan = bl00mboxChannel(c)
if not chan.blm.free and (
chan.blm.foreground or chan.blm.background_mute_override
):
chan.prev_compute_rms = chan.blm.compute_rms chan.prev_compute_rms = chan.blm.compute_rms
chan.blm.compute_rms = True chan.blm.compute_rms = True
self._chans += [chan] self._chans += [chan]
......
...@@ -29,12 +29,16 @@ class _mock(list): ...@@ -29,12 +29,16 @@ class _mock(list):
return _mock() return _mock()
def all_channels(): class Sys:
yield Channel(0) @staticmethod
def collect_channels(active):
if False:
def active_channels(): yield None
yield Channel(0)
@staticmethod
def collect_active_callbacks():
if False:
yield None
class Channel: class Channel:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment