Buffer to wav and/or mp3

hey
Im tryin to find a good method of writing a buffer to a wav or mp3 file, i tried doin some google searches and not really finding anything
the buffer im getting is in A-Law wav audio format, recieved as an Intptr from an API i use.
Any help would be greatly appreciated
[300 byte] By [Krudonix] at [2007-11-20 10:23:35]