view record-audio @ 35:5697821137de

Revert graph changes after fixing value ordering Backed out changeset 6e30e90527d6
author IBBoard <dev@ibboard.co.uk>
date Sat, 27 Feb 2021 15:57:46 +0000
parents e85e3470a41e
children
line wrap: on
line source

#! /bin/bash

WAV="$1"
if [ -z "$WAV" ]; then
    echo "Usage: $0 OUTPUT.WAV" >&2
    exit 1
fi
rm -f "$WAV"

MONITOR=$(pactl list | grep -A2 '^Source #' | \
    grep 'Name: .*\.monitor$' | awk '{print $NF}' | tail -n1)
parec -d "$MONITOR" | sox -t raw -r 44100 -Lb 16 -e signed-integer -c 2 - "$WAV"