[alsa-devel] aplay patch to add a --seek parameter
I'm using aplay in a sound editor to play PCM files. But I need to be able to say "start playing at point X" to be able to skip around in the file.
I've used the following patch for years, but I think I forgot to submit it for inclusion into alsa-utils.
Lars Magne Ingebrigtsen wrote:
I'm using aplay in a sound editor to play PCM files. But I need to be able to say "start playing at point X" to be able to skip around in the file.
I've used the following patch for years, but I think I forgot to submit it for inclusion into alsa-utils.
Thanks.
Please provide a Signed-off-by tag, document whether this option takes samples, frames, or (milli)seconds, and add this option to the man page. Furthermore, the code doesn't look as if it correctly skips over chunks in VOC files.
Regards, Clemens
Clemens Ladisch clemens@ladisch.de writes:
Please provide a Signed-off-by tag, document whether this option takes samples, frames, or (milli)seconds, and add this option to the man page. Furthermore, the code doesn't look as if it correctly skips over chunks in VOC files.
The --seek number is in bytes, so it assumes that the caller knows what the internal structure of the file is. For my usage (which is a simple visual wave form editor), this makes sense, but specifying it in milliseconds would probably be even more useful, I guess?
I'm not that familiar with the aplay internals, but so if someone who are familiar were to transform the patch into "seek to millisecond X", that would be nice.
Signed-off-by: Lars Magne Ingebrigtsen larsi@gnus.org
2011/4/15 Lars Magne Ingebrigtsen larsi@gnus.org
I'm using aplay in a sound editor to play PCM files. But I need to be able to say "start playing at point X" to be able to skip around in the file.
I've used the following patch for years, but I think I forgot to submit it for inclusion into alsa-utils.
it depend on X is byte or frame
when X is an odd number and the format is S16_LE , aplay just produce noise
participants (3)
-
Clemens Ladisch
-
Lars Magne Ingebrigtsen
-
Raymond Yau