@@ -83,7 +83,8 @@ def __init__(self, audio_output="pwm", seconds_per_eighth=0.25):
83
83
# Initialize TLV320
84
84
fjPeriphs = adafruit_fruitjam .Peripherals (
85
85
audio_output = launcher_config ["audio" ].get ("output" , "headphone" ),
86
- safe_volume_limit = launcher_config ["audio" ].get ("volume_override_danger" ,12 ),
86
+ safe_volume_limit =
87
+ launcher_config ["audio" ].get ("volume_override_danger" ,.75 ),
87
88
sample_rate = 11025 ,
88
89
bit_depth = 16 ,
89
90
i2c = board .STEMMA_I2C ()
@@ -103,7 +104,8 @@ def __init__(self, audio_output="pwm", seconds_per_eighth=0.25):
103
104
# Initialize TLV320
104
105
fjPeriphs = adafruit_fruitjam .Peripherals (
105
106
audio_output = launcher_config ["audio" ].get ("output" , "headphone" ),
106
- safe_volume_limit = launcher_config ["audio" ].get ("volume_override_danger" ,12 ),
107
+ safe_volume_limit =
108
+ launcher_config ["audio" ].get ("volume_override_danger" ,.75 ),
107
109
sample_rate = 11025 ,
108
110
bit_depth = 16 ,
109
111
i2c = board .I2C ()
@@ -112,10 +114,8 @@ def __init__(self, audio_output="pwm", seconds_per_eighth=0.25):
112
114
self .tlv = fjPeriphs .dac
113
115
114
116
# If volume was specified use it, otherwise use the fruitjam library default
115
- if "volume_override_danger" in launcher_config ["audio" ]:
116
- fjPeriphs .volume = launcher_config ["audio" ]["volume_override_danger" ]
117
- elif "volume" in launcher_config ["audio" ]:
118
- fjPeriphs .volume = launcher_config ["audio" ]["volume" ] # FruitJam vol (1-20)
117
+ if "volume" in launcher_config ["audio" ]:
118
+ fjPeriphs .volume = launcher_config ["audio" ]["volume" ] # FruitJam vol 0.0-1.0
119
119
120
120
# Setup I2S audio output - important to do this AFTER configuring the DAC
121
121
# Fruitjam library actually does this before we modify the configuration
0 commit comments