Index: libs/ardour/diskstream.cc
===================================================================
--- libs/ardour/diskstream.cc	(revision 6409)
+++ libs/ardour/diskstream.cc	(working copy)
@@ -296,7 +296,7 @@
 	if (capture_info.size() > n) {
 		return capture_info[n]->frames;
 	}
-	else {
+	else {  
 		return capture_captured;
 	}
 }
@@ -525,7 +525,16 @@
 			/* was stopped, now rolling (and recording) */
 
 			if (_alignment_style == ExistingMaterial) {
+			  
 				first_recordable_frame += _session.worst_output_latency();
+				
+				//cerr << "** Offset rec from stop " << endl;
+				//cerr << "Capture Offset   : " << _capture_offset << endl;
+				//cerr << "Worst O/P Latency: " << _session.worst_output_latency() << endl;
+				//cerr << "Roll Delay: " << _roll_delay << endl;
+				//cerr << "First Recordable Frame: " << first_recordable_frame << endl;
+				//cerr << "Transport Frame: " << transport_frame << endl;
+
 			} else {
 				first_recordable_frame += _roll_delay;
 			}
@@ -545,16 +554,7 @@
 					   appropriate spot given the roll delay.
 					*/
 
-					capture_start_frame -= _roll_delay;
 
-					/* XXX paul notes (august 2005): i don't know why
-					   this is needed.
-					*/
-
-					first_recordable_frame += _capture_offset;
-
-				} else {
-
 					/* autopunch toggles recording at the precise
 					   transport frame, and then the DS waits
 					   to start recording for a time that depends
@@ -562,6 +562,13 @@
 					*/
 
 					first_recordable_frame += _session.worst_output_latency();
+					
+					//cerr << "** Punch in manual/auto " << endl;
+					//cerr << "Capture Offset   : " << _capture_offset << endl;
+					//cerr << "Worst O/P Latency: " << _session.worst_output_latency() << endl;
+					//cerr << "Roll Delay: " << _roll_delay << endl;
+					//cerr << "First Recordable Frame: " << first_recordable_frame << endl;
+					//cerr << "Transport Frame: " << transport_frame << endl;
 				}
 
 			} else {
@@ -589,7 +596,15 @@
 			last_recordable_frame += _roll_delay;
 		}
 		
-		first_recordable_frame = max_frames;
+		//first_recordable_frame = max_frames;
+
+		//cerr << "** Stop record - " << can_record << " | " << record_enabled() << endl;
+		//cerr << "Capture Offset   : " << _capture_offset << endl;
+		//cerr << "Worst O/P Latency: " << _session.worst_output_latency() << endl;
+		//cerr << "Roll Delay: " << _roll_delay << endl;
+		//cerr << "First Recordable Frame: " << first_recordable_frame << endl;
+		//cerr << "Last Recordable Frame: " << last_recordable_frame << endl;
+		//cerr << "Transport Frame: " << transport_frame << endl;
 	}
 
 	last_possibly_recording = possibly_recording;

