Commit graph

4 commits

Author SHA1 Message Date
Jaroslav Kysela
feb9c4cdec reshuffle included files to include config.h as first
config.h may contain defines like _FILE_OFFSET_BITS which influence
the system wide include files (off_t types, open -> open64 function
usage etc.).

Related: https://github.com/alsa-project/alsa-utils/pull/223
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2023-08-30 18:48:23 +02:00
Jaroslav Kysela
b36687548d bat: fix the verbose compilation warnings for latest gcc
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2023-08-30 12:44:37 +02:00
Jonathan Liu
f6b59282f7 alsabat: Allow custom sample format for round trip latency test
Setting the format to BAT_PCM_FORMAT_S16_LE in the round trip latency
test initialization is redundant as it is already set by default to
BAT_PCM_FORMAT_S16_LE unless a sample format is specified on the command
line.

Signed-off-by: Jonathan Liu <net147@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2018-08-05 18:45:28 +02:00
vivian,zhang
4157528808 alsabat: add round trip audio latency test
Audio latency is the time delay as an audio signal passes through
a system. There are many kinds of audio latency metrics. One useful
metric is the round trip latency, which is the sum of output latency
and input latency.

The measurement step works like below:
1. Listen and measure the average loudness of the environment for
one second;
2. Create a threshold value 16 decibels higher than the average
loudness;
3. Begin playing a ~1000 Hz sine wave and start counting the samples
elapsed;
4. Stop counting and playing if the input's loudness is higher than
the threshold, as the output wave is probably coming back;
5. Calculate the audio latency value in milliseconds.

Signed-off-by: Zhang Vivian <vivian.zhang@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2016-06-08 15:11:25 +02:00