Audio configuration changes
This commit is contained in:
parent
98838420a9
commit
735dde8555
1 changed files with 8 additions and 5 deletions
|
|
@ -42,19 +42,22 @@ if ltv320_present:
|
|||
# set sample rate & bit depth
|
||||
dac.configure_clocks(sample_rate=11030, bit_depth=16)
|
||||
|
||||
if "sound" in launcher_config:
|
||||
if launcher_config["sound"] == "speaker":
|
||||
if "ltv320" in launcher_config:
|
||||
if launcher_config["ltv320"].get("output") == "speaker":
|
||||
# use speaker
|
||||
dac.speaker_output = True
|
||||
dac.speaker_volume = -40
|
||||
dac.speaker_volume = 0
|
||||
dac.dac_volume = launcher_config["ltv320"].get("volume",5) # dB
|
||||
else:
|
||||
# use headphones
|
||||
dac.headphone_output = True
|
||||
dac.headphone_volume = -15 # dB
|
||||
dac.headphone_volume = 0
|
||||
dac.dac_volume = launcher_config["ltv320"].get("volume",-15) # dB
|
||||
else:
|
||||
# default to headphones
|
||||
dac.headphone_output = True
|
||||
dac.headphone_volume = -15 # dB
|
||||
dac.headphone_volume = 0
|
||||
dac.dac_volume = -15 # dB
|
||||
|
||||
wave_file = open("/boot_animation/ada_fruitjam_boot_jingle.wav", "rb")
|
||||
wave = WaveFile(wave_file)
|
||||
|
|
|
|||
Loading…
Reference in a new issue