Skip to content

Commit

Permalink
feat(sound-levels-maintainer): maintain blue mic input gain
Browse files Browse the repository at this point in the history
  • Loading branch information
workflow committed Nov 20, 2024
1 parent eba7557 commit 92d94d8
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,20 @@ get_pipewire_node_id() {

OBS_SPEAKER_ID=$(get_pipewire_node_id "ObsSpeaker")
OBS_MIC_ID=$(get_pipewire_node_id "ObsMic")
BLUE_MIC_ID=$(get_pipewire_node_id "alsa_input.usb-Generic_Blue_Microphones_LT_221104181411AD020101_111000-00.analog-stereo")

wpctl set-volume "$OBS_SPEAKER_ID" 1.0
wpctl set-volume "$OBS_MIC_ID" 1.0
wpctl set-volume "$BLUE_MIC_ID" 1.0

while true; do
current_volume_obs_speaker=$(wpctl get-volume "$OBS_SPEAKER_ID" | awk '{print $2}')
current_volume_obs_mic=$(wpctl get-volume "$OBS_MIC_ID" | awk '{print $2}')
current_volume_blue_mic=$(wpctl get-volume "$BLUE_MIC_ID" | awk '{print $2}')

[ "$current_volume_obs_speaker" != "1.0" ] && wpctl set-volume "$OBS_SPEAKER_ID" 1.0
[ "$current_volume_obs_mic" != "1.0" ] && wpctl set-volume "$OBS_MIC_ID" 1.0
[ "$current_volume_blue_mic" != "1.0" ] && wpctl set-volume "$BLUE_MIC_ID" 1.0

sleep 1
done

0 comments on commit 92d94d8

Please sign in to comment.