]> git.ipfire.org Git - thirdparty/grub.git/commitdiff
2010-02-14 Samuel Thibault <samuel.thibault@ens-lyon.org>
authorSamuel Thibault <samuel.thibault@ens-lyon.org>
Sun, 14 Feb 2010 17:36:26 +0000 (18:36 +0100)
committerSamuel Thibault <samuel.thibault@ens-lyon.org>
Sun, 14 Feb 2010 17:36:26 +0000 (18:36 +0100)
* commands/i386/pc/play.c (GRUB_MOD_INIT(play)): Fix help.
* docs/grub.texi (Command-line and menu entry commands): Document play
command.

ChangeLog
commands/i386/pc/play.c
docs/grub.texi

index 60a1f5db37e16f78401abdbdde8c98191092358d..74f4380f6118101449d0016d2d7de5d8a1654170 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2010-02-14  Samuel Thibault  <samuel.thibault@ens-lyon.org>
+
+       * 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  <samuel.thibault@ens-lyon.org>
 
        * commands/i386/pc/play.c (grub_cmd_play): If grub_file_open fails,
index 1bca3d763c2fa80c1bb5b44ca5f8351d34b40d3f..44d98a1f03e096a4a1ad84d328d9f6ab096494e4 100644 (file)
@@ -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)
index 4fa44462e773c13c1ba1a29d6a8b32b0767ec0a7..f8a9bc4141685bf3d8a356d78b5b0dfd096a3a89 100644 (file)
@@ -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