-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Sound Feature #24
Comments
basically it will boot in an instant. so what you can do is just to edit the kernel, add the loading sound before it loads the logo and terminal. |
I found this function, but was unable to reproduce any sound in virtual box nor in qemu: void beep() {
// Set frequency (~440 Hz)
__asm__ __volatile__ (
"movb $0xB6, %%al;"
"outb %%al, $0x43;"
"movw $0x4E9, %%ax;"
"outb %%al, $0x42;"
"movb %%ah, %%al;"
"outb %%al, $0x42;"
: /* No output */
: /* No input */
: "al", "ax" // Clobbered registers
);
// Enable speaker
__asm__ __volatile__ (
"inb $0x61, %%al;"
"orb $3, %%al;"
"outb %%al, $0x61;"
: /* No output */
: /* No input */
: "al" // Clobbered register
);
// Delay (Note: You would normally use a timer for a precise delay)
for (volatile int i = 0; i < 0xFFFFF; ++i);
// Disable speaker
__asm__ __volatile__ (
"inb $0x61, %%al;"
"andb $0xFC, %%al;"
"outb %%al, $0x61;"
: /* No output */
: /* No input */
: "al" // Clobbered register
);
} |
What about pcspkr |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Would be nice to implement some sounds into this, even if its as simple as just a start-up sound when booting.
The text was updated successfully, but these errors were encountered: