The easiest way to encode to MP3 is with the BASSenc add-on (and LAME encoder). Basically, all you need to add to your code is a BASS_Encode_Start call, something like this...
BASS_Encode_Start(channel, "lame - output.mp3", BASS_ENCODE_AUTOFREE, 0, 0);
A more complete encoded recording demonstration can be found in the RECTEST example in the BASSenc package.