Samuel Thibault, le Wed 03 Feb 2010 00:00:43 +0100, a écrit : > Felix Zielcke, le Tue 02 Feb 2010 15:09:47 +0100, a écrit : > > There's play command in commands/i386/pc/play.c but I still don't know > > what file format it actual plays. > > Ok, reading the source code told me how it works.
I'm more and more considering extending the play command a bit: for now it takes a file name as parameter and plays it. However this is far from user-friendly, needs to access /boot already, and one typically just wants to play a few notes, so a separate file seems overkill to me. It would perhaps be good to be able to use the following two syntaxes: play (hd0,1)/boot/grub/melody or play 120 440 1 BTW, the tempo part of the play command currently depends on the value of GRUB_TICKS_PER_SECOND, shouldn't it be independent from it by using the patch below, so that with a base tempo 60 and a duration 1, one gets one second? Samuel 2010-02-07 Samuel Thibault <samuel.thiba...@ens-lyon.org> * commands/i386/pc/play.c (BASE_TEMPO): Set to 60 * GRUB_TICKS_PER_SECOND. --- commands/i386/pc/play.c 2010-01-03 22:05:07 +0000 +++ commands/i386/pc/play.c 2010-02-07 21:48:43 +0000 @@ -29,7 +29,7 @@ #include <grub/command.h> #include <grub/i18n.h> -#define BASE_TEMPO 120 +#define BASE_TEMPO (60 * GRUB_TICKS_PER_SECOND) /* The speaker port. */ #define SPEAKER 0x61 _______________________________________________ Grub-devel mailing list Grub-devel@gnu.org http://lists.gnu.org/mailman/listinfo/grub-devel