You've already forked RadioPlayer
mirror of
https://github.com/radio95-rnt/RadioPlayer.git
synced 2026-02-26 21:53:54 +01:00
procman play set in and out fades. (i plan to turn the fade in and out bools into floats)
This commit is contained in:
@@ -23,7 +23,7 @@ class Process:
|
||||
class Skeleton_ProcessManager:
|
||||
processes: list[Process]
|
||||
def _get_audio_duration(self, file_path): ...
|
||||
def play(self, track: Track, fade_time: int=5) -> Process: ...
|
||||
def play(self, track: Track, fade_in_time: int=0, fade_out_time: int=0) -> Process: ...
|
||||
def anything_playing(self) -> bool: ...
|
||||
def stop_all(self, timeout: float | None = None) -> None: ...
|
||||
def wait_all(self, timeout: float | None = None) -> None: ...
|
||||
@@ -65,7 +65,7 @@ class ProcmanCommunicator(BaseIMCModule):
|
||||
elif int(op) == 4:
|
||||
return {"op": 4, "arg": self.procman.anything_playing()}
|
||||
elif int(op) == 5:
|
||||
if arg := data.get("arg"): return {"op": 5, "arg": self.procman.play(arg, data.get("fade_time", 5))}
|
||||
if arg := data.get("arg"): return {"op": 5, "arg": self.procman.play(arg, data.get("fade_in_time", data.get("fade_time", 5)), data.get("fade_out_time", data.get("fade_time", 5)))}
|
||||
else: return
|
||||
|
||||
class PlayerModule(BaseIMCModule):
|
||||
|
||||
Reference in New Issue
Block a user