Skip to content
Snippets Groups Projects
Commit 7d651c90 authored by deuce's avatar deuce
Browse files

BSD /dev/speaker durations are specified in 1/100ths of a second, not

1/1000ths.
parent 75d21cb0
Branches
Tags
No related merge requests found
...@@ -223,7 +223,7 @@ void DLLCALL unix_beep(int freq, int dur) ...@@ -223,7 +223,7 @@ void DLLCALL unix_beep(int freq, int dur)
speaker_fd = open("/dev/speaker", O_WRONLY|O_APPEND); speaker_fd = open("/dev/speaker", O_WRONLY|O_APPEND);
if(speaker_fd != -1) { if(speaker_fd != -1) {
tone.frequency=freq; tone.frequency=freq;
tone.duration=dur; tone.duration=dur/10;
ioctl(speaker_fd,SPKRTONE,&tone); ioctl(speaker_fd,SPKRTONE,&tone);
close(speaker_fd); close(speaker_fd);
return; return;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment