[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: beep support?

From: Samuel Thibault
Subject: Re: beep support?
Date: Sun, 7 Feb 2010 22:54:49 +0100
User-agent: Mutt/1.5.12-2006-07-14

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

play (hd0,1)/boot/grub/melody
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?


2010-02-07  Samuel Thibault  <address@hidden>

        * commands/i386/pc/play.c (BASE_TEMPO): Set to 60 *

--- 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
 /* The speaker port.  */
 #define SPEAKER                        0x61

reply via email to

[Prev in Thread] Current Thread [Next in Thread]