1 MOC TOOLS DIRECTORY 2 3 41. Introduction 5 6This directory contains debugging and testing tools which are intended for 7developers and maintainers. 8 9 102. The Tools 11 122.1 MD5 Check 13 14The 'md5check.sh' script is intended to verify that the samples which 15arrive at MOC's player code are the same as those produced by the 16library the decoder is using. It does this by having MOC compute the 17MD5 sum of the audio file as it is playing it and writing the result to 18the server's log file. The log file is then read by the 'md5check.sh' 19tool and the MD5 sum checked against one computed from the audio file 20using the library's native decoding program. 21 22It is important to use the program associated with the decoder library 23if one exists because other programs may not produce exactly the same 24samples, particularly for lossy formats. It is also possible that bugs 25in the library mean the samples produced are not correct, but the tool 26is intended to test the passage of the samples through the driver and 27not the fidelity of the library used. 28 292.2 Test File Generation 30 31The 'maketests.sh' script generates test files in the directory in which 32it is run. The test files are 10 seconds of sinewave audio generated by 33SoX. Each file's name is in a format which represents its characteristics 34and these can be checked against those MOC uses with the '-e' option of 35'md5scheck.sh'. 36 37All filenames start with 'sinewave-' and the script will refuse to run if 38any files starting with that name already exist. It is wise to run this 39script in an empty directory. It generates a lot of files. 40