Skip to content

Files

Latest commit

 

History

History

tools

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
                            MOC TOOLS DIRECTORY


1. Introduction

This directory contains debugging and testing tools which are intended for
developers and maintainers.


2. The Tools

2.1 MD5 Check

The 'md5check.sh' script is intended to verify that the samples which
arrive at MOC's player code are the same as those produced by the
library the decoder is using.  It does this by having MOC compute the
MD5 sum of the audio file as it is playing it and writing the result to
the server's log file.  The log file is then read by the 'md5check.sh'
tool and the MD5 sum checked against one computed from the audio file
using the library's native decoding program.

It is important to use the program associated with the decoder library
if one exists because other programs may not produce exactly the same
samples, particularly for lossy formats.  It is also possible that bugs
in the library mean the samples produced are not correct, but the tool
is intended to test the passage of the samples through the driver and
not the fidelity of the library used.

2.2 Test File Generation

The 'maketests.sh' script generates test files in the directory in which
it is run.  The test files are 10 seconds of sinewave audio generated by
SoX.  Each file's name is in a format which represents its characteristics
and these can be checked against those MOC uses with the '-e' option of
'md5scheck.sh'.

All filenames start with 'sinewave-' and the script will refuse to run if
any files starting with that name already exist.  It is wise to run this
script in an empty directory.  It generates a lot of files.