Index: /trunk/src/org/openstreetmap/josm/actions/mapmode/SelectAction.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/actions/mapmode/SelectAction.java	(revision 576)
+++ /trunk/src/org/openstreetmap/josm/actions/mapmode/SelectAction.java	(revision 577)
@@ -118,4 +118,5 @@
 	@Override public void exitMode() {
 		super.exitMode();
+		selectionManager.unregister(Main.map.mapView);
 		Main.map.mapView.removeMouseListener(this);
 		Main.map.mapView.removeMouseMotionListener(this);
@@ -210,4 +211,5 @@
 	 */
 	@Override public void mousePressed(MouseEvent e) {
+		if (! (Boolean)this.getValue("active")) return;
 		if (e.getButton() != MouseEvent.BUTTON1)
 			return;
Index: /trunk/src/org/openstreetmap/josm/gui/layer/markerlayer/PlayHeadMarker.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/layer/markerlayer/PlayHeadMarker.java	(revision 576)
+++ /trunk/src/org/openstreetmap/josm/gui/layer/markerlayer/PlayHeadMarker.java	(revision 577)
@@ -57,4 +57,5 @@
 	private boolean enabled;
 	private boolean wasPlaying = false;
+	private int dropTolerance = 50; /* pixels */
 	
 	public static PlayHeadMarker create() {
@@ -75,4 +76,6 @@
 		enabled = Main.pref.getBoolean("marker.traceaudio", true);
 		if (! enabled) return;
+		try { dropTolerance = Integer.parseInt(Main.pref.get("marker.playHeadDropTolerance", "50")); }
+		catch(NumberFormatException x) { dropTolerance = 50; }
 		Main.map.mapView.addMouseListener(new MouseAdapter() {
 			@Override public void mousePressed(MouseEvent ev) {
@@ -117,11 +120,11 @@
 	 */
 	private void endDrag(boolean reset) {
+		if (! wasPlaying || reset) 
+			try { AudioPlayer.pause(); }
+			catch (Exception ex) { AudioPlayer.audioMalfunction(ex);}
 		if (reset)
 			eastNorth = oldEastNorth;
 		Main.map.selectMapMode(oldMode);
 		Main.map.mapView.repaint();
-		if (! wasPlaying) 
-			try { AudioPlayer.pause(); }
-			catch (Exception ex) { AudioPlayer.audioMalfunction(ex);}
 		timer.start();
 	}
@@ -177,13 +180,19 @@
 	 */
 	public void reposition(EastNorth en) {
-		eastNorth = en;
-		WayPoint cw = getClosestTrackPoint(Main.map.mapView.getPoint(en), 25.0);
+		// eastNorth = en;
+		WayPoint cw = null;
+		AudioMarker recent = AudioMarker.recentlyPlayedMarker();
+		if (recent != null && recent.parentLayer != null && recent.parentLayer.fromLayer != null) {
+			/* work out EastNorth equivalent of 50 (default) pixels tolerance */ 
+			Point p = Main.map.mapView.getPoint(en);
+			EastNorth enPlus25px = Main.map.mapView.getEastNorth(p.x+dropTolerance, p.y);
+			cw = recent.parentLayer.fromLayer.nearestPointOnTrack(en, enPlus25px.east() - en.east());
+		}
+		
 		AudioMarker ca = null; 
-		
 		/* Find the prior audio marker (there should always be one in the 
 		 * layer, even if it is only one at the start of the track) to 
 		 * offset the audio from */ 
 		if (cw != null) {
-			AudioMarker recent = AudioMarker.recentlyPlayedMarker(); 		
 			if (recent != null || recent.parentLayer != null) {
 				for (Marker m : recent.parentLayer.data) {
@@ -239,7 +248,10 @@
 		if (ca != null && ! ca.containsPoint(startPoint)) ca = null;
 		
-		/* If we didn't hit an audio marker, we need to create one at the nearest track point */
-		if (ca == null) {
-			WayPoint cw = getClosestTrackPoint(startPoint, 10.0);
+		/* If we didn't hit an audio marker, we need to create one at the nearest point on the track */
+		if (ca == null && recent != null) {
+			/* work out EastNorth equivalent of 50 (default) pixels tolerance */ 
+			Point p = Main.map.mapView.getPoint(en);
+			EastNorth enPlus25px = Main.map.mapView.getEastNorth(p.x+dropTolerance, p.y);
+			WayPoint cw = recent.parentLayer.fromLayer.nearestPointOnTrack(en, enPlus25px.east() - en.east());
 			if (cw == null) {
 				JOptionPane.showMessageDialog(Main.parent, tr("You need to SHIFT-Drag the play head onto an audio marker or onto the track point where you want to synchronize."));
@@ -264,5 +276,4 @@
 		if (time < 0.0) return;
 		Point screen = mv.getPoint(eastNorth);
-		// buttonRectangle.setLocation(screen.x+4, screen.y+2);
 		symbol.paintIcon(mv, g, screen.x, screen.y);
 	}
Index: /trunk/src/org/openstreetmap/josm/tools/AudioPlayer.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/tools/AudioPlayer.java	(revision 576)
+++ /trunk/src/org/openstreetmap/josm/tools/AudioPlayer.java	(revision 577)
@@ -37,5 +37,5 @@
 	private double position; // seconds
 	private double bytesPerSecond; 
-	private static long chunk = 8000; /* bytes */
+	private static long chunk = 4000; /* bytes */
 	private double speed = 1.0;
 
@@ -238,4 +238,5 @@
 					break;
 				case PLAYING:
+					command.possiblyInterrupt();
 					for(;;) {
 						int nBytesRead = 0;
@@ -280,12 +281,13 @@
 							long nBytesRead = 0;
 							position = 0.0;
-							double adjustedOffset = (offset - leadIn) * calibration;
+							offset -= leadIn;
+							double calibratedOffset = offset * calibration;
 							bytesPerSecond = audioFormat.getFrameRate() /* frames per second */
 								* audioFormat.getFrameSize() /* bytes per frame */;
 							if (speed * bytesPerSecond > 256000.0)
 								speed = 256000 / bytesPerSecond;
-							if (offset != 0.0 && adjustedOffset > 0.0) {
+							if (calibratedOffset > 0.0) {
 								long bytesToSkip = (long)(
-									adjustedOffset /* seconds (double) */ * bytesPerSecond);
+										calibratedOffset /* seconds (double) */ * bytesPerSecond);
 								/* skip doesn't seem to want to skip big chunks, so 
 								 * reduce it to smaller ones 
@@ -300,5 +302,5 @@
 								if (bytesToSkip > 0)
 									audioInputStream.skip(bytesToSkip);
-								position = adjustedOffset;
+								position = offset;
 							}
 							if (audioOutputLine != null)
