SndPlayer ~~~~~~~~~ This as it's name suggests is a sampled sound player.The one on a previous Newsflash by Brian Postma works fine but breaks some OS rules, can't handle IFF properly and is limited to samples 128k long.Playsound by Aegis software (Update 6) is another good program but uncompressed takes up about 19k of disk space and doesn't seem to playback at the correct rate. Perhaps the main reason for writing this player was because I couldn't find any player that could handle files compressed Delta Fibbonacci. The decompression routine is written as a seperate subroutine that can be re-used.It if fairly fast decompressing files 200k or so in about 2 seconds.The wait isn't that noticable on smaller files.Some commercial programs seem to decompress much slower (probably written in C). This player will play samples up to 256k long (longer samples are possible with a few modifications).Handles compressed files,RAW and IFF files (playing back at the correct rate on NTSC and PAL machines).Plays in stereo and doesn't break the rules (goes through the Audio Device).It is re-entrant, re-executable or 'pure' and can be made resident (as it is if you booted from this disk) though only two versions can run at the same time (only two stereo channels).Can run from CLI or WBench with extended select or as a default tool. You can stop the sample playing by pressing Ctrl C and have a number of command line options.The options are :- -Rn Repeat sample n number of times -Pn Period,sets playback rate to n Periods (or bus cycles) Usable range between 128 and about 800 -Sn SampleRate,sets playback rate to n Hertz (cycles per sec) Usable range between 4000 and 28000 -Vn Volume,set volume to n Usable range 0 (silent) to 64 (max volume) -Ln Length,sets length to n bytes The -L option allows you to load and play just the first n bytes of a sample.This when used with the -R option allows you to create nnnnnn nineteen type effects,of course you can also change the playback rate and volume at the same time.If -P and -S are both used (they effectively do the same job) only the last on the command line is used.The -R opion can be used to set up an infinite loop by selecting -R0 but of course you can stop it with Ctrl C or if you want you could stop it from CLI with the break command.ie run SndPlayer df0:soundfile -r0 wait 5 mins break 2 The soundfile could contain some sampled music (like the Glen Miller (who?) piece on one of your old 17 Bit disks) and can be made to play for 5 minutes then quit. There is only one error message,which is 'Not enough Chip memory'.The reason for this should be fairly obvious.Other messages are just to inform the user of various things.These messages are ( = full pathname of the sample) File compressed Fibbonacci Delta (file was compressed as by PSound) is a RAW file (file is not IFF,file will play using cmd line arguments for Samplrate if specified or PSound default. is IFF but not an 8SVX file (file has IFF FORM chunk but not an 8SVX,program will quit without playing sample) is an IFF 8SVX file (file is a proper IFF sound file.Program will use samplerate from IFF chunk.If the options are used these will overide the IFF data. If you do not supply a pathname for SndPlayer or you use a ? it will print some brief information on SndPlayers usage.All messages can be suppressed by redirecting to NIL: ie SndPlayer >NIL: ram:Soundfile That roughly covers this program so I'll leave you to mess with it. The code could have been much shorter but it was intended that the subroutines within this program could easily be hacked out and re-used. This particular source file probably has more comments than code!.This code requires my own startup include file (DefToolstartup.i) to compile.This include file opens up the most commonly used libraries and handles the command line as well as allocating some memory for temporary workspace. This file is included on this disk.I may rewrite this program to make it more efficient and probably about 20% smaller,but as I have said this program is meant to be more of an example and for experimentation purposes (hence the loads of comments).My verdict upon the usefulness of the audio device ? - well it's usefull for allocating channels - and thats about it!