What do you mean trim off the end in cdwave? I've just encountered for the first time, SBEs when encoding wavs to flacs using cdwave and flacfrontend. Not sure what I did to cause this. Used Audacity to edit file at 16/44.1 and exported as wav file. Tracked files in cdwave, then encoded in FFE and checked "align on sector boundries" and the last file of set one had SBEs as well as the remaining files.
from the CD Wave FAQ:
"the last file of a set may also be not aligned, because the original data wasn't, and CDWave does not add extra padding data to the file."
basically, unless the original file that you are starting with end perfectly on a multiple of 588 samples (i.e. 1/75th of a second, i.e. one CD sector), the last file of a set isn't going to end of a Sector Boundary.
a simple way to avoid this is to cut off a little bit a the set, could be less than a second. then throw away this junk track. all the previous tracks will then be cut perfectly on cd sector boundaries. so that explains why the last song of the set had SBE's. all of the remaining files did NOT have SBE's to begin with, but once it finds a file that needs to be fixed, all the rest following them will be affected. here's an example: assume 4 songs per set, and each set takes up a whole CD.
d1t01 - fine
d1t02 - fine
d1t03 - fine
d1t04 - SBE
d2t01 - fine
d2t02 - fine
d2t03 - fine
d2t04 - fine
how the programs fix a SBE is to take a tiny portion of the audio from the next track, in this case d2t01, and fill up the last sector of the previous track with that data. it basically shifts a tiny portion of data from d2t01 to the d1t04 file. ok, so now d1t04 is fixed, but by taking the audio data from d2t01, now that one ends with an incomplete sector, so it takes a tiny portion of audio from the beginning of the next track d2t02 to fill up the last sector of d2t01. but now d2t02 ends with an incomplete sector, etc, etc, etc...
does this help explain it?