Skip to content

Commit

Permalink
added smartmode check
Browse files Browse the repository at this point in the history
  • Loading branch information
yuannan committed Feb 20, 2021
1 parent e170def commit 4e3893e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion panon/backend/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,8 @@ async def mainloop():
if not use_glDFT and spectrum_data is None:
# Set fps to 2 to lower CPU usage, when audio is unavailable.
latest_wave_data = spectrum_source.read(fps=2)
spectrum_source.update_smart_device()
if smartmode:
spectrum_source.update_smart_device()
else:
latest_wave_data = spectrum_source.read()
isBeat = beatsDetector is not None and beatsDetector.isBeat(latest_wave_data)
Expand Down

0 comments on commit 4e3893e

Please sign in to comment.