mirror of
https://github.com/alsa-project/alsa-utils
synced 2024-11-10 00:25:43 +01:00
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="valgrind --leak-check=yes --show-reachable=yes"
|
||||||
#GDB="perf stat"
|
#GDB="perf stat"
|
||||||
PROG=./alsaucm
|
PROG=./alsaucm
|
||||||
PROG=/home/perex/git/pipewire/builddir/spa/plugins/alsa/spa-acp-tool
|
#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/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
|
#PROG=pulseaudio
|
||||||
|
|
||||||
#ALSA_CONFIG_UCM="$HOME/alsa/alsa-ucm-conf/ucm" \
|
#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:
|
abort:
|
||||||
return rcount;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
static ssize_t pcm_readv(u_char **data, unsigned int channels, size_t rcount)
|
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;
|
count -= c;
|
||||||
rest -= c;
|
rest -= c;
|
||||||
fdcount += c;
|
fdcount += save;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* re-enable SIGUSR1 signal */
|
/* re-enable SIGUSR1 signal */
|
||||||
|
|
Loading…
Reference in a new issue