@@ -83,7 +83,7 @@ def __init__(self, audio_output="pwm", seconds_per_eighth=0.25):
8383 # Initialize TLV320
8484 fjPeriphs = adafruit_fruitjam .Peripherals (
8585 audio_output = launcher_config ["audio" ].get ("output" , "headphone" ),
86- safe_volume_limit = launcher_config ["audio" ].get ("volume_override_danger" ,12 ),
86+ safe_volume_limit = launcher_config ["audio" ].get ("volume_override_danger" ,.75 ),
8787 sample_rate = 11025 ,
8888 bit_depth = 16 ,
8989 i2c = board .STEMMA_I2C ()
@@ -103,7 +103,7 @@ def __init__(self, audio_output="pwm", seconds_per_eighth=0.25):
103103 # Initialize TLV320
104104 fjPeriphs = adafruit_fruitjam .Peripherals (
105105 audio_output = launcher_config ["audio" ].get ("output" , "headphone" ),
106- safe_volume_limit = launcher_config ["audio" ].get ("volume_override_danger" ,12 ),
106+ safe_volume_limit = launcher_config ["audio" ].get ("volume_override_danger" ,.75 ),
107107 sample_rate = 11025 ,
108108 bit_depth = 16 ,
109109 i2c = board .I2C ()
@@ -112,10 +112,8 @@ def __init__(self, audio_output="pwm", seconds_per_eighth=0.25):
112112 self .tlv = fjPeriphs .dac
113113
114114 # 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)
115+ if "volume" in launcher_config ["audio" ]:
116+ fjPeriphs .volume = launcher_config ["audio" ]["volume" ] # FruitJam vol 0.0-1.0
119117
120118 # Setup I2S audio output - important to do this AFTER configuring the DAC
121119 # Fruitjam library actually does this before we modify the configuration
0 commit comments