@@ 106,6 106,15 @@ structure SampleStreamTypes = struct
| SEEK_NONBLOCKING => "non-blocking"
| SEEK_WITH_DEADLINE t => "with-deadline " ^ Time.toString t
| SEEK_WITH_BUDGET t => "with-budget " ^ Time.toString t
+
+ fun seekModeToFriendlyString (m : seek_mode) =
+ case m of
+ SEEK_COMPLETE => "complete"
+ | SEEK_NONBLOCKING => "non-blocking"
+ | SEEK_WITH_DEADLINE t => "with-deadline " ^ Time.toString t ^
+ " [remaining budget " ^
+ Time.toString (Time.- (t, Time.now ())) ^ "]"
+ | SEEK_WITH_BUDGET t => "with-budget " ^ Time.toString t
(** Return a seek mode that is effectively the given seek mode
divided by the given divisor, for use when dispatching