When recording we should only write the amount of data read to output
file instead of copying whole buffer. This fixes glitches appearing at
the end of recorded file, when stopping recording.
Fixes: https://github.com/alsa-project/alsa-utils/pull/150
Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
#GDB="valgrind --leak-check=yes --show-reachable=yes"
#GDB="perf stat"
PROG=./alsaucm
-PROG=/home/perex/git/pipewire/builddir/spa/plugins/alsa/spa-acp-tool
-PROG="$HOME/git/pulseaudio/build/src/daemon/pulseaudio -n -F $HOME/git/pulseaudio/build/src/daemon/default.pa -p $HOME/git/pulseaudio/build/src/modules/"
+#PROG=/home/perex/git/pipewire/builddir/spa/plugins/alsa/spa-acp-tool
+#PROG="$HOME/git/pulseaudio/build/src/daemon/pulseaudio -n -F $HOME/git/pulseaudio/build/src/daemon/default.pa -p $HOME/git/pulseaudio/build/src/modules/"
#PROG=pulseaudio
#ALSA_CONFIG_UCM="$HOME/alsa/alsa-ucm-conf/ucm" \
}
}
abort:
- return rcount;
+ return result;
}
static ssize_t pcm_readv(u_char **data, unsigned int channels, size_t rcount)
}
count -= c;
rest -= c;
- fdcount += c;
+ fdcount += save;
}
/* re-enable SIGUSR1 signal */