mirror of
https://github.com/DJ2LS/FreeDATA
synced 2024-05-14 08:04:33 +00:00
audio tuning level hotfix
This commit is contained in:
parent
34bf67dedd
commit
debe742081
2 changed files with 2 additions and 4 deletions
|
@ -932,9 +932,7 @@ def set_audio_volume(datalist, volume: float) -> np.int16:
|
|||
:rtype: np.int16
|
||||
"""
|
||||
# Clip volume provided to acceptable values
|
||||
volume = min(volume, 0.0)
|
||||
volume = max(volume, 200.0)
|
||||
|
||||
volume = np.clip(volume, 0, 200) # limit to max value of 255
|
||||
# Scale samples by the ratio of volume / 100.0
|
||||
data = np.fromstring(datalist, np.int16) * (volume / 100.0) # type: ignore
|
||||
return data.astype(np.int16)
|
||||
|
|
|
@ -10,7 +10,7 @@ Not nice, suggestions are appreciated :-)
|
|||
|
||||
import subprocess
|
||||
|
||||
VERSION = "0.4.1-alpha"
|
||||
VERSION = "0.4.2-alpha"
|
||||
|
||||
# DAEMON
|
||||
DAEMONPORT: int = 3001
|
||||
|
|
Loading…
Reference in a new issue