[CM] Snd: no tracking-cursor if one sound is stopped

Tito Latini tito.01beta at gmail.com
Fri Apr 3 05:27:59 PDT 2015


I have another patch to fix a graphic problem when two or more sounds
are playing and with-tracking-cursor is not #f (or we start to play
the sounds with [Ctrl][Play]).

Example:

- (set! *with-tracking-cursor* #t)

- open and play two sounds

- stop one sound

  (the cursor of the other sound is motionless)
-------------- next part --------------
diff -ur snd-15~/snd-dac.c snd-15/snd-dac.c
--- snd-15~/snd-dac.c	2015-04-03 13:56:30.423019828 +0200
+++ snd-15/snd-dac.c	2015-04-03 13:56:40.722890341 +0200
@@ -611,6 +611,16 @@
 }
 
 
+static bool something_is_playing(void)
+{
+  int i;
+  if (play_list)
+    for (i = 0; i < dac_max_sounds; i++)
+      if (play_list[i]) return(true);
+  return(false);
+}
+
+
 static void reflect_play_stop(snd_info *sp) 
 {
 #if (!USE_NO_GUI)
@@ -620,7 +630,8 @@
 #if (!USE_NO_GUI)
   view_files_unplay();
 #endif
-  ss->tracking = false;
+  if (!(something_is_playing()))
+    ss->tracking = false;
 }
 
 
@@ -902,16 +913,6 @@
 }
 
 
-static bool something_is_playing(void)
-{
-  int i;
-  if (play_list)
-    for (i = 0; i < dac_max_sounds; i++)
-      if (play_list[i]) return(true);
-  return(false);
-}
-
-
 /* -------------------------------- play (add to play-list) -------------------------------- */
 
 static int find_slot_to_play(void)


More information about the Cmdist mailing list