From 6fa7cfce657a2862ffd65d581b77443e77bf70b5 Mon Sep 17 00:00:00 2001 From: Samuel Thibault Date: Sun, 14 Feb 2010 18:36:26 +0100 Subject: [PATCH] 2010-02-14 Samuel Thibault * commands/i386/pc/play.c (GRUB_MOD_INIT(play)): Fix help. * docs/grub.texi (Command-line and menu entry commands): Document play command. --- ChangeLog | 6 ++++++ commands/i386/pc/play.c | 3 ++- docs/grub.texi | 19 +++++++++++++++++++ 3 files changed, 27 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 60a1f5db3..74f4380f6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2010-02-14 Samuel Thibault + + * commands/i386/pc/play.c (GRUB_MOD_INIT(play)): Fix help. + * docs/grub.texi (Command-line and menu entry commands): Document play + command. + 2010-02-14 Samuel Thibault * commands/i386/pc/play.c (grub_cmd_play): If grub_file_open fails, diff --git a/commands/i386/pc/play.c b/commands/i386/pc/play.c index 1bca3d763..44d98a1f0 100644 --- a/commands/i386/pc/play.c +++ b/commands/i386/pc/play.c @@ -259,7 +259,8 @@ static grub_command_t cmd; GRUB_MOD_INIT(play) { cmd = grub_register_command ("play", grub_cmd_play, - N_("FILE"), N_("Play a tune.")); + N_("FILE | TEMPO [PITCH1 DURATION1] [PITCH2 DURATION2] ... "), + N_("Play a tune.")); } GRUB_MOD_FINI(play) diff --git a/docs/grub.texi b/docs/grub.texi index 4fa44462e..f8a9bc414 100644 --- a/docs/grub.texi +++ b/docs/grub.texi @@ -1126,6 +1126,7 @@ you forget a command, you can run the command @command{help} * insmod:: Insert a module * keystatus:: Check key modifier status * ls:: List devices or files +* play:: Play a tune * reboot:: Reboot your computer * set:: Set an environment variable * unset:: Unset an environment variable @@ -1364,6 +1365,24 @@ name syntax}), then list the contents of that directory. @end deffn +@node play +@subsection play + +@deffn Command play file | tempo [pitch1 duration1] [pitch2 duration2] ... +Plays a tune + +If the argument is a file name (@pxref{File name syntax}), play the tune +recorded in it. The file format is first the tempo as an unsigned 32bit +little-endian number, then pairs of unsigned 16bit little-endian numbers for +pitch and duration pairs. + +If the arguments are a series of numbers, play the inline tune. + +The tempo is the base for all note durations. 60 gives a 1-second base, 120 +gives a half-second base, etc. Pitches are Hz. +@end deffn + + @node reboot @subsection reboot