robert_e_bone
Let me sum this up for you.
Please get it out of your head that you need to deal with using this parameter. It is NOT needed for what you are doing.
Every single one of us needs our tracks lined up properly, and guess what - they BUILT Sonar to handle this automatically, by using the automatic setting you see there. Sonar queries your interface to ask about latency, and your interface tells Sonar whatever that value is, and then Sonar factors that (properly, I might add) to the recording process, which is the only place this parameter has any meaning anyways.
MULTIPLE posters here have told you to not make manual adjustments to this, and yet you persist down the path of trying to use the parameter.
You asked for advice, then a bunch of folks all independently told you the same thing, and yet you don't accept it? Really?
It does not matter if it is a wav file, an MP3 file, or any other kind of file, nor whether or not you recorded it or imported it. It just WORKS.
Bob Bone
Bob makes a good point here, but personally, even the reported latency from my ASIO interface isn't accurate enough for me. In my case, the reported latency is still about 50 samples off. I end up going through an exercise that gets the latency corrected to the sample, and it's perfect. What I end up doing is this:
1) Enable the measured latency from the ASIO driver, and let Sonar measure the reported latency field in Preferences. You may have to restart Sonar for this to occur in some cases.
2) Next, In a new project (blank) I will set up the metronome to play, while recording it onto a track, by way of using an audio cable of at least 20' plugged into the output of the played track to the input of the recording track. Make sure the input Gain of the armed track will be high enough to match the volume the metronome plays.
3) Record the metronome onto the new track (because now it's an audio signal). One or two clicks is all you need.
4) Repeat this for a another record track (Track 2) by playing back the previously recorded metronome (disable metronome playback itself, btw) into the input mapped to a newly armed track. Make sure Track 1 is not longer armed to record.
5) After recording a few clicks, stop. Then, zoom way in to see the samples. Find a perfectly identify-able part of the click waveform that matches on both Track 1 and Track 2.
6) Setting the Now Time ruler to display "samples", you can measure the difference between reported latency and the actual latency. In my case, this comes in about 50 samples difference.
7) In the Preferences pane (and I don't recall the left-hand column section) with the ASIO reported latency displayed (ensure you have the right audio interface selected in the pull-down), add the measured # of samples in Step 6 in the Manual Offset field. Click Apply.
8) Now, when you play back Track 1 into a newly armed recording track, it should match up perfectly to the sample.