if the source audio is lossless, pretty much any old audio editor (e.g. audacity) can get the job done. if the audio is lossy and/or i want to sync based on video, i use a set of custom scripts in conjunction with avspmod and mkvmerge to achieve frame-perfect sync with little to no quality degradation. i might post a guide for it one day.