exactly how many bytes of user data are available on an 700mb 80min cd?

i'm writing a little cd burning program that allows you to add mp3/wav files to a list. when you add files to that list, the program will tell you how close to the cd's capacity you are (hence i need to know exactly how many bytes are available for a user to write to a cd).

also, is there any way to tell an mp3's playing length from within a c program (its a linux program).

and how many bytes per second is a wav file? i.e. if i know the wav's playing length, how big is the file?

thanks.