X-Git-Url: https://git.madduck.net/code/pulserecorder.git/blobdiff_plain/ca51df8a58054f318bf7fcd8e467892e1e35262e..refs/heads/master:/pulserecorder?ds=sidebyside diff --git a/pulserecorder b/pulserecorder index 58fdec7..5dad254 100755 --- a/pulserecorder +++ b/pulserecorder @@ -168,7 +168,7 @@ move_source_to_sink() { pactl move-sink-input $1 $2 } -if false; then +if [ -n "${PAREC_PIPE:-}" ]; then # This would be great, but it does not work. For instance, trying this on # audible meant that audible would play at maximum speed (3h played in 3 # minutes), but the result would be full of skips, making me think that @@ -177,8 +177,11 @@ if false; then load_module module-pipe-sink "$devname" "$devname" file="$TMPDIR/outfifo" move_source_to_sink $index "$devname" - oggenc --raw -q5 -o "$outfile" "$TMPDIR/outfifo" || : - #pv -pterb "$TMPDIR/outfifo" > $TMPDIR/outfile.wav || : + #oggenc --raw -q5 -o "$outfile" "$TMPDIR/outfifo" || : + pv -pterb "$TMPDIR/outfifo" > $TMPDIR/outfile.wav & + pid=$! + pa_wait_for_event sink-input remove $index >/dev/null + kill $pid else # More traditional approach, which just takes 1:1 time.