send_errctx(cc, errctx);
return ret;
}
- if (!(ret = sscanf(lls_input(0, lpr), "%i%c", &i, &c)))
- return -E_COMMAND_SYNTAX;
- if (ret > 1 && c == '-')
- i = -i;
+ ret = para_atoi32(lls_input(0, lpr), &i);
+ if (ret < 0) {
+ if (ret != -E_ATOI_JUNK_AT_END)
+ return ret;
+ /*
+ * Compatibility code to keep the historic syntax (ff 30-)
+ * working. This can be removed after 0.7.0.
+ */
+ ret = sscanf(lls_input(0, lpr), "%i%c", &i, &c);
+ if (ret <= 0)
+ return -E_COMMAND_SYNTAX;
+ if (ret > 1 && c == '-') {
+ PARA_WARNING_LOG("use of obsolete syntax\n");
+ i = -i;
+ }
+ }
mutex_lock(mmd_mutex);
ret = -E_NO_AUDIO_FILE;
if (!mmd->afd.afhi.chunks_total || !mmd->afd.afhi.seconds_total)
summary = enable verbose mode
[subcommand ff]
- purpose = jump N seconds forward or backward
- synopsis = n[-]
+ purpose = jump forward or backward in the current audio file
+ synopsis = seconds
aux_info = VSS_READ | VSS_WRITE
[description]
- This sets the 'R' (reposition request) bit of the vss status flags
- which enqueues a request to jump n seconds forwards or backwards.
-
- Example:
-
- para_client ff 30-
-
- jumps 30 seconds backwards.
+ This enqueues a request to reposition the audio stream according to
+ the argument, which may be signed or unsigned integer. Negative values
+ correspond to backward jumps.
+
+ If a negative number is given whose absolute value exceeds the current
+ postition of the stream, a jump to the beginning of the audio file
+ is performed. If a positive amount of seconds is given which exceeds
+ the remaining time of the audio file, the next audio file is loaded.
[/description]