aplay: Fix for arecord recording ghost data
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>
This commit is contained in:
parent
bbc74a61ac
commit
4b959a447a
2 changed files with 4 additions and 4 deletions
|
|
@ -5,8 +5,8 @@
|
|||
#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" \
|
||||
|
|
|
|||
|
|
@ -2268,7 +2268,7 @@ static ssize_t pcm_read(u_char *data, size_t rcount)
|
|||
}
|
||||
}
|
||||
abort:
|
||||
return rcount;
|
||||
return result;
|
||||
}
|
||||
|
||||
static ssize_t pcm_readv(u_char **data, unsigned int channels, size_t rcount)
|
||||
|
|
@ -3326,7 +3326,7 @@ static void capture(char *orig_name)
|
|||
}
|
||||
count -= c;
|
||||
rest -= c;
|
||||
fdcount += c;
|
||||
fdcount += save;
|
||||
}
|
||||
|
||||
/* re-enable SIGUSR1 signal */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue