Re: [alsa-devel] aplay\arecord compare utility

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



On Fri, 23 Feb 2018, Muni Sekhar wrote:

>  [ Please keep me in CC as I'm not subscribed to the list]
> 
> I?m using an alsa utilities(aplay & arecord) for sound loopback
> testing. From Linux host , sending & receiving the wav file.
> 
> At end I want to compare the sent & received wav file. Does Linux has
> any utility to support this one?

If the wav headers are identical, you can just use cmp or diff. Otherwise, 
you can extract the raw audio using sox, which gives you files with just 
the audio samples in them, and then you can use cmp or diff to compare 
them. It won't work though if the files aren't actually identical, for 
instance if there is an offset of a couple of samples in one compared to 
the other.

If I had to compare two wav files which were offset by a small number of 
samples, I'd open them in Audacity, manually align them, then sum the 
result, write to a new file and verify that the file just contained zeros.

/Ricard
-- 
Ricard Wolf Wanderlöf                           ricardw(at)axis.com
Axis Communications AB, Lund, Sweden            www.axis.com
Phone +46 46 272 2016                           Fax +46 46 13 61 30
--
To unsubscribe from this list: send the line "unsubscribe linux-sound" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Pulseaudio]     [Linux Audio Users]     [ALSA Devel]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]

  Powered by Linux