/* ------------------------------------
   user supplied encoding command file:
   ------------------------------------
   If you want to use your own mp3-encoder (instead of the CDMagic-standard
   Bladeenc) you can edit this file to suit your needs (i.e. invoke
   your favourite encoder).

   To ACTIVATE this command file you MUST copy it into the CDMagic-WAV-Path
   (as specified in the Settings-window).

   At return: You must leave the current directory with the encoded
 	      file under the name <wavfilename>.MP3
	      After returning CDMagic will perform the neccessary
	      renaming and moving into the appropriate MP3-directory
*/

WAVFileName = arg(1);		/* Pass this filename to your encoder	*/
MP3FileSpec = arg(2);		/* for information only	*/

Everything_Is_Alright = 1;	/* change to 0 if an error occured	*/

/* ----------------------------------	*/
/* invoke your favourite encoder HERE	*/
/* invoke your favourite encoder HERE	*/

/* This is an example of invoking the program LAME:			*/

"x:\Lame\Lame "WAVFileName left(WAVFileName, pos('.',WAVFileName))||"mp3";

if RC <> 0 then
   Everything_Is_Alright = 0;

/* invoke your favourite encoder HERE	*/
/* invoke your favourite encoder HERE	*/
/* ----------------------------------	*/

if Everything_Is_Alright then
   return "0 mp3 File has been successfully encoded";
else;
   return "-1 An error '"RC"' has occured";	/* You can place an appropriate error message behind the '-1'. Take CARE of the SPACE between '-1' and '<error message>'!	*/

